A team of long-lived bots for DeepSeek Harness, with main bots, bot-to-bot messages and group chats.
Merge remote-tracking branch 'origin/feat/905-connectors' into feat/905-connectors
Fei2411a701011255af
diff --cc ds-bot/client.jsindex 6a6046a7,f4c8dada..8ee39629--- a/ds-bot/client.js+++ b/ds-bot/client.js@@@ -1740,8 -1773,8 +1788,8 @@@ function bodyOf(def, paint, flat = falsreturn "";}}--var eyeMarkup = ([cx, cy, w, h55, tilt]) => `<g transform="translate(${cx} ${cy}) rotate(${tilt})"><rect class="bt-eye" x="${-w / 2}" y="${-h55 / 2}" width="${w}" height="${h55}" rx="${w / 2}"/></g>`;--var happyEyeMarkup = ([cx, cy, w, h55, tilt]) => `<g transform="translate(${cx} ${cy}) rotate(${tilt})"><path class="bt-eye-happy" opacity="0" d="M${-w * 0.62} ${h55 * 0.14}Q0 ${-h55 * 0.42} ${w * 0.62} ${h55 * 0.14}" fill="none" stroke="#000" stroke-width="${w * 0.5}" stroke-linecap="round"/></g>`;++var eyeMarkup = ([cx, cy, w, h56, tilt]) => `<g transform="translate(${cx} ${cy}) rotate(${tilt})"><rect class="bt-eye" x="${-w / 2}" y="${-h56 / 2}" width="${w}" height="${h56}" rx="${w / 2}"/></g>`;++var happyEyeMarkup = ([cx, cy, w, h56, tilt]) => `<g transform="translate(${cx} ${cy}) rotate(${tilt})"><path class="bt-eye-happy" opacity="0" d="M${-w * 0.62} ${h56 * 0.14}Q0 ${-h56 * 0.42} ${w * 0.62} ${h56 * 0.14}" fill="none" stroke="#000" stroke-width="${w * 0.5}" stroke-linecap="round"/></g>`;var maskBox = (size) => `maskUnits="userSpaceOnUse" x="${-size}" y="${-size}" width="${size * 3}" height="${size * 3}"`;var holes = (def, eyes) => `<rect x="${-def.size}" y="${-def.size}" width="${def.size * 3}" height="${def.size * 3}" fill="#fff"/>${eyes}`;var MASK_ID = "%MASK%";@@@ -2537,12 -2584,12 +2599,12 @@@ function liveSprings(apply2)const dt = Math.min(0.5, Math.max(1e-3, (now - last) / 1e3));last = now;const steps = Math.ceil(dt * 240);-- const h55 = dt / steps;++ const h56 = dt / steps;let moving = false;for (const [key, value] of values) {for (let index = 0; index < steps; index += 1) {-- value.v += (-value.k * (value.x - value.to) - value.c * value.v) * h55;-- value.x += value.v * h55;++ value.v += (-value.k * (value.x - value.to) - value.c * value.v) * h56;++ value.x += value.v * h56;}if (Math.abs(value.x - value.to) < 0.05 && Math.abs(value.v) < 1) {value.x = value.to;@@@ -5273,16 -5326,448 +5352,448 @@@ var HANDOFF_CSS =.bt-handoff .bt-q-foot{flex-wrap:wrap}`;- // node_modules/deep-view/src/react/ui.js+ // src/client/computer.jsvar import_react10 = require("react");- var FallbackMarkdown = ({ text }) => (0, import_react10.createElement)("span", null, String(text ?? ""));- var ViewUi = (0, import_react10.createContext)({ t: (key) => key, Markdown: FallbackMarkdown });- var useViewUi = () => (0, import_react10.useContext)(ViewUi);- var lineIcon2 = (paths) => function LineIcon() {+ var LEVELS = [+ ["off", "Off"],+ ["view", "View only"],+ ["background", "Background"],+ ["foreground", "Foreground"]+ ];+ var levelId = (bot) => LEVELS.some(([id]) => id === bot?.computer?.level) ? bot.computer.level : "background";+ function LevelPicker({ bot, actions, run: run2, disabled }) {+ const level = levelId(bot);+ return (0, import_react10.createElement)("select", {+ className: "bt-select bt-level-pick",+ "aria-label": t("Computer use level"),+ value: level,+ disabled,+ onChange: (event) => run2(actions.computerSetLevel(bot.id, event.target.value))+ }, LEVELS.map(([id, label]) => (0, import_react10.createElement)("option", { key: id, value: id }, t(label))));+ }+ var PROVIDER_TEXT = {+ loading: ["Loading the provider…", "loading"],+ ready: ["Ready", "ready"],+ error: ["Could not load the provider", "error"],+ missing: ["The provider package is not installed", "error"],+ occupied: ["Another computer-use provider is running", "error"],+ unsupported: ["Computer use is not available on this platform", "error"]+ };-function ComputerPage({ roster, actions, run: run2, Section, Row: Row3, Switch: Switch2 }) {++function ComputerPage({ roster, actions, run: run2, Section: Section2, Row: Row3, Switch: Switch2 }) {+ const computer = roster.computer ?? { enabled: false };+ const [system, setSystem] = (0, import_react10.useState)(null);+ const provider = computer.provider ?? { state: computer.enabled ? "loading" : "off" };+ const refresh = () => {+ if (actions.computerSystemStatus) void Promise.resolve(actions.computerSystemStatus()).then(setSystem, () => {+ });+ };+ (0, import_react10.useEffect)(() => {+ if (computer.enabled && computer.macos === true) refresh();+ return void 0;+ }, [computer.enabled, computer.macos]);+ const perms = system ?? {};+ const permRow = (key, label) => {+ const state = perms[key]?.state ?? perms[key];+ const granted = state === "granted" || state === true;+ return (0, import_react10.createElement)(+ Row3,+ { key, label: t(label) },+ (0, import_react10.createElement)("span", { className: "bt-perm-state", "data-on": granted || void 0 }, granted ? t("Allowed") : t("Not allowed")),+ granted ? null : (0, import_react10.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => run2(Promise.resolve(actions.computerPermission(key)).then(refresh)) }, t("Grant"))+ );+ };+ return [+ (0, import_react10.createElement)(- Section,++ Section2,+ { key: "switch" },+ (0, import_react10.createElement)(+ Row3,+ { label: t("Let Bots use the computer") },+ Switch2 === void 0 ? null : (0, import_react10.createElement)(Switch2, { label: t("Let Bots use the computer"), on: computer.enabled === true, onChange: (on) => run2(actions.computerSetEnabled(on)) })+ )+ ),+ computer.enabled ? (0, import_react10.createElement)(- Section,++ Section2,+ { key: "provider", title: t("Computer provider") },+ (0, import_react10.createElement)(+ Row3,+ { label: t(PROVIDER_TEXT[provider.state]?.[0] ?? PROVIDER_TEXT.error[0]), hint: provider.message },+ ["error", "missing", "occupied"].includes(provider.state) && actions.computerProviderRetry ? (0, import_react10.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => run2(actions.computerProviderRetry()) }, t("Retry")) : null+ ),+ computer.macos === true ? [permRow("accessibility", "Accessibility"), permRow("screenRecording", "Screen Recording")] : null+ ) : null,+ (0, import_react10.createElement)(- Section,++ Section2,+ { key: "bots", title: t("Bots") },+ roster.bots.map((bot) => (0, import_react10.createElement)(+ Row3,+ { key: bot.id, label: bot.name },+ (0, import_react10.createElement)(LevelPicker, { bot, actions, run: run2, disabled: !computer.enabled })+ ))+ )+ ];+ }+ function BotComputerCard({ bot, roster, actions, run: run2, Card: Card3, Row: Row3 }) {+ const computer = roster.computer ?? { enabled: false };+ const apps = Object.entries(bot.computer?.apps ?? {});return (0, import_react10.createElement)(+ Card3,+ { title: t("Control") },+ !computer.enabled ? (0, import_react10.createElement)(Row3, { label: t("Computer use") }, (0, import_react10.createElement)("span", { className: "bt-muted" }, t("Off in Settings → Computer use"))) : [+ (0, import_react10.createElement)(Row3, { key: "level", label: t("Computer use") }, (0, import_react10.createElement)(LevelPicker, { bot, actions, run: run2 })),+ apps.map(([key, app]) => (0, import_react10.createElement)(+ Row3,+ { key, label: app.name },+ (0, import_react10.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => run2(actions.computerRevokeApp(bot.id, key)) }, t("Revoke"))+ ))+ ]+ );+ }+ function ComputerView({ bot, actions, hooks }) {+ const live = hooks.useComputer?.((map) => map) ?? {};+ const entry = live.bots?.[bot.id] ?? { state: "idle", steps: [] };+ const [shot, setShot] = (0, import_react10.useState)(null);+ (0, import_react10.useEffect)(() => {+ const id = entry.lastShot?.attachmentId;+ if (id === void 0 || !actions.computerShot) {+ setShot(null);+ return void 0;+ }+ let current = true;+ void Promise.resolve(actions.computerShot(id)).then((value) => {+ if (current) setShot(value);+ }, () => {+ });+ return () => {+ current = false;+ };+ }, [entry.lastShot?.attachmentId]);+ const controlLabel = { idle: "Idle", bot: "Operating", user: "You have the computer", waiting: "Waiting for you" }[entry.state] ?? "Idle";+ return (0, import_react10.createElement)(+ "div",+ { className: "bt-cview" },+ (0, import_react10.createElement)(+ "div",+ { className: "bt-cview-head" },+ (0, import_react10.createElement)("span", { className: "bt-cview-state", "data-state": entry.state }, t(controlLabel)),+ entry.app ? (0, import_react10.createElement)("span", { className: "bt-cview-app" }, entry.app) : null+ ),+ shot?.dataUrl ? (0, import_react10.createElement)("img", { className: "bt-cview-shot", src: shot.dataUrl, alt: t("Latest screenshot") }) : null,+ entry.waitingFor === "user-idle" ? (0, import_react10.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => void actions.computerAllowForeground(bot.id) }, t("Let it continue")) : null,+ (0, import_react10.createElement)(+ "div",+ { className: "bt-cview-actions" },+ (0, import_react10.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => void actions.computerStop(bot.id) }, t("Stop")),+ entry.state !== "user" ? (0, import_react10.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => void actions.computerTakeover(bot.id) }, t("Take over the computer")) : (0, import_react10.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => void actions.computerHandback(bot.id) }, t("Hand back"))+ ),+ entry.steps.length > 0 ? (0, import_react10.createElement)(+ "div",+ { className: "bt-cview-steps" },+ (0, import_react10.createElement)("div", { className: "bt-section-title" }, t("Recent steps")),+ [...entry.steps].reverse().map((step, index) => (0, import_react10.createElement)(+ "div",+ { key: index, className: "bt-cview-step", "data-ok": step.ok === false ? "no" : void 0 },+ (0, import_react10.createElement)("span", { className: "bt-cview-step-what" }, [step.app, step.action].filter(Boolean).join(" · ")),+ step.ok === false ? (0, import_react10.createElement)("span", { className: "bt-cview-step-err", title: step.error }, t("failed")) : null+ ))+ ) : null+ );+ }+ function PendingAppAccess({ ask, actions, inline }) {+ const [closed, setClosed] = (0, import_react10.useState)(false);+ const busyRef = (0, import_react10.useRef)(false);+ const titleId = (0, import_react10.useId)();+ const keep = useDockHold(ask.sessionId, "computer-app", ask.id, actions, inline);+ const answer = (choice) => {+ if (busyRef.current) return;+ busyRef.current = true;+ keep();+ setClosed(true);+ void Promise.resolve(actions.computerAppAnswer(ask.id, choice)).catch((error) => {+ setClosed(false);+ actions.reportError?.(error, "computer");+ });+ };+ return (0, import_react10.createElement)(+ "div",+ {+ className: inline ? "bt-q-inline" : "bt-q-dock",+ style: closed ? { display: "none" } : void 0,+ onFocusCapture: keep,+ onPointerDownCapture: keep+ },+ (0, import_react10.createElement)(+ "section",+ { className: inline ? "bt-q" : "bt-q bt-q-raised", role: "group", "aria-labelledby": titleId },+ (0, import_react10.createElement)(+ "div",+ { className: "bt-q-head" },+ (0, import_react10.createElement)(+ "div",+ { className: "bt-q-text" },+ (0, import_react10.createElement)("p", { className: "bt-q-title", id: titleId }, t("Allow {name} to use {app}?", { name: ask.botName ?? "a Bot", app: ask.appName }))+ )+ ),+ (0, import_react10.createElement)(+ "div",+ { className: "bt-q-foot" },+ (0, import_react10.createElement)("button", { type: "button", className: "bt-q-btn", onClick: () => answer("deny") }, t("Deny")),+ (0, import_react10.createElement)("button", { type: "button", className: "bt-q-btn", onClick: () => answer("once") }, t("This time")),+ (0, import_react10.createElement)("button", { type: "button", className: "bt-q-submit", onClick: () => answer("always") }, t("Always"))+ )+ )+ );+ }+ var ACTION_NAMES = { click: "Click", doubleClick: "Double click", rightClick: "Right click", drag: "Drag", typeText: "Type", pressKey: "Key", hotkey: "Hotkey", scroll: "Scroll", screenshot: "Screenshot", getScreenSize: "Screen size", getCapabilities: "Capabilities", listApps: "List apps", listWindows: "List windows", getState: "State", getAccessibilityTree: "Accessibility tree", launchApp: "Launch", killApp: "Kill", bringToFront: "Bring to front", invokeMenu: "Menu", setValue: "Set value", getWindowState: "Window state", verifyState: "Verify state" };+ var actionName = (method) => {+ const known = ACTION_NAMES[method];+ if (known !== void 0) return known;+ const words = String(method ?? "").replace(/^cua_driver_native__/, "").replace(/([a-z])([A-Z])/g, "$1 $2").replace(/_/g, " ").trim();+ return words === "" ? "Computer" : words[0].toUpperCase() + words.slice(1);+ };+ function ComputerCallRow({ sessionId, call: call2, roster, actions, hooks }) {+ const { value: argValue } = toolArgs(call2);+ const method = argValue("method") ?? String(call2?.name ?? "").replace(/^cua_driver_native__/, "");+ const stepApp = hooks?.useComputer?.((map) => (map.bots?.[roster.byId[sessionId]?.id]?.steps ?? []).find((step) => step.callId === call2?.callId)?.app);+ const selector = argValue("params")?.selector;+ const app = stepApp ?? (method === "getApp" && typeof selector === "string" && selector !== "" ? selector : void 0);+ const shot = (call2?.content ?? []).find((block) => (block?.type === "image" || block?.type === "file") && block.attachment !== void 0)?.attachment;+ const [url, setUrl] = (0, import_react10.useState)(null);+ const [open, setOpen] = (0, import_react10.useState)(false);+ (0, import_react10.useEffect)(() => {+ const id = shot?.attachmentId;+ if (id === void 0 || !actions.computerShot) {+ setUrl(null);+ return void 0;+ }+ let current = true;+ void Promise.resolve(actions.computerShot(id)).then((value) => {+ if (current) setUrl(value?.dataUrl ?? null);+ }, () => {+ });+ return () => {+ current = false;+ };+ }, [shot?.attachmentId]);+ return (0, import_react10.createElement)(+ "div",+ { className: "bt-cstep" },+ (0, import_react10.createElement)("span", { className: "bt-cstep-label" }, app !== void 0 ? `${app} · ${actionName(method)}` : actionName(method)),+ url !== null ? (0, import_react10.createElement)(+ "button",+ { type: "button", className: open ? "bt-cstep-shot bt-cstep-shot-open" : "bt-cstep-shot", onClick: () => setOpen((value) => !value) },+ (0, import_react10.createElement)("img", { src: url, alt: actionName(method) })+ ) : null+ );+ }+ function AppAccessCall({ sessionId, callId, roster, actions, heldCards, hooks }) {+ const bot = roster.byId[sessionId];+ const ask = hooks.useComputer?.((map) => Object.values(map.asks ?? {}).find((item) => item.callId === callId));+ if (!bot || ask === void 0 || !actions.computerAppAnswer) return (0, import_react10.createElement)(CellEmpty);+ if (heldCards?.[heldCardKey("computer-app", ask.id)] > 0) return (0, import_react10.createElement)(CellEmpty);+ return (0, import_react10.createElement)(PendingAppAccess, { key: ask.id, ask: { ...ask, botName: bot.name }, actions, inline: true });+ }+ function AppAccessDock({ sessionId, useRoster, useCards, useHeldCards, useComputer, actions }) {+ const bot = useRoster((value) => value.byId[sessionId]);+ const ask = useComputer?.((map) => bot ? Object.values(map.asks ?? {}).find((item) => item.botId === bot.id) : void 0);+ const drawn = useCards?.((state) => ask?.callId !== void 0 && state[sessionId]?.[ask.callId] > 0) === true;+ const held = useHeldCards?.((state) => state[sessionId]?.[heldCardKey("computer-app", ask?.id)] > 0) === true;+ if (!bot || ask === void 0 || !actions.computerAppAnswer || drawn && !held) return null;+ return (0, import_react10.createElement)(PendingAppAccess, { key: ask.id, ask: { ...ask, botName: bot.name }, actions, inline: false });+ }+ var HANDOFF_TITLES = {+ login: "Sign-in needed",+ payment: "Payment needed",+ captcha: "Verification needed",+ confirm: "Needs your confirmation",+ other: "Help needed on the computer"+ };+ var handoffTitle = (hold) => t(HANDOFF_TITLES[hold.reason] ?? HANDOFF_TITLES.other);+ function PendingComputerHandoff({ sessionId, bot, hold, actions, inline }) {+ const [closed, setClosed] = (0, import_react10.useState)(false);+ const busyRef = (0, import_react10.useRef)(false);+ const titleId = (0, import_react10.useId)();+ const keep = useDockHold(sessionId, "handoff", hold.callId ?? hold.id, actions, inline);+ const taken = hold.by === "user";+ const run2 = (make, close) => {+ if (busyRef.current) return;+ busyRef.current = true;+ keep();+ if (close) setClosed(true);+ void Promise.resolve().then(make).catch((error) => {+ setClosed(false);+ actions.reportError?.(error, "handoff");+ }).finally(() => {+ busyRef.current = false;+ });+ };+ const answer = (outcome) => run2(() => actions.computerHoldAnswer(bot.id, { callId: hold.callId ?? hold.id, outcome }), true);+ const takeOver = () => run2(async () => {+ await actions.computerTakeover(bot.id);+ actions.openDetails?.(sessionId, "computer");+ }, false);+ return (0, import_react10.createElement)(+ "div",+ {+ className: inline ? "bt-q-inline" : "bt-q-dock",+ style: closed ? { display: "none" } : void 0,+ onFocusCapture: keep,+ onPointerDownCapture: keep+ },+ (0, import_react10.createElement)(+ "section",+ { className: inline ? "bt-q bt-handoff" : "bt-q bt-q-raised bt-handoff", role: "group", "aria-labelledby": titleId },+ (0, import_react10.createElement)(+ "div",+ { className: "bt-q-head" },+ (0, import_react10.createElement)(+ "div",+ { className: "bt-q-text" },+ (0, import_react10.createElement)("p", { className: "bt-q-title", id: titleId }, handoffTitle(hold)),+ hold.note ? (0, import_react10.createElement)("div", { className: "bt-q-detail" }, hold.note) : null,+ taken ? (0, import_react10.createElement)(+ "div",+ { className: "bt-handoff-state", role: "status" },+ (0, import_react10.createElement)("span", { className: "bt-handoff-dot", "aria-hidden": true }),+ t("You control the computer")+ ) : null+ )+ )+ ),+ (0, import_react10.createElement)(+ "div",+ { className: "bt-q-foot" },+ (0, import_react10.createElement)("button", { type: "button", className: "bt-q-btn", onClick: () => answer("skip") }, t("Skip")),+ taken ? null : (0, import_react10.createElement)("button", { type: "button", className: "bt-q-btn", onClick: takeOver }, t("Take over")),+ (0, import_react10.createElement)("button", { type: "button", className: "bt-q-submit", onClick: () => answer("done") }, t("I'm done"))+ )+ );+ }+ function ComputerHandoffCall({ sessionId, callId, roster, actions, heldCards, hooks }) {+ const bot = roster.byId[sessionId];+ const hold = hooks.useComputer?.((map) => bot ? map.holds?.[bot.id] : void 0);+ if (!bot || hold?.callId !== callId || !actions.computerHoldAnswer) return (0, import_react10.createElement)(CellEmpty, { className: "bt-q-gone" });+ if (heldCards?.[heldCardKey("handoff", callId)] > 0) return (0, import_react10.createElement)(CellEmpty);+ return (0, import_react10.createElement)(PendingComputerHandoff, { key: callId, sessionId, bot, hold, actions, inline: true });+ }+ function ComputerHandoffDock({ sessionId, useRoster, useCards, useHeldCards, useComputer, actions }) {+ const bot = useRoster((value) => value.byId[sessionId]);+ const hold = useComputer?.((map) => bot ? map.holds?.[bot.id] : void 0);+ const holdKey = hold?.callId ?? hold?.id;+ const drawn = useCards?.((state) => state[sessionId]?.[holdKey] > 0) === true;+ const held = useHeldCards?.((state) => state[sessionId]?.[heldCardKey("handoff", holdKey)] > 0) === true;+ if (!bot || holdKey === void 0 || !actions.computerHoldAnswer || drawn && !held) return null;+ return (0, import_react10.createElement)(PendingComputerHandoff, { key: JSON.stringify([sessionId, holdKey]), sessionId, bot, hold, actions, inline: false });+ }+ function SettledComputerHandoff({ handoff }) {+ const skipped = handoff.outcome === "skipped";+ const returned = handoff.outcome === "returned";+ const title = t(HANDOFF_TITLES[handoff.reason] ?? HANDOFF_TITLES.other);+ return (0, import_react10.createElement)(+ "div",+ { className: "bt-q-inline" },+ (0, import_react10.createElement)(+ "div",+ { className: skipped ? "bt-q bt-q-settled bt-q-dismissed" : "bt-q bt-q-settled", role: "group", "aria-label": title },+ (0, import_react10.createElement)(+ "div",+ { className: "bt-q-head" },+ (0, import_react10.createElement)("div", { className: "bt-q-text" }, (0, import_react10.createElement)("p", { className: "bt-q-title" }, title)),+ skipped || returned ? (0, import_react10.createElement)("span", { className: "bt-q-badge" }, t(skipped ? "Skipped" : "Returned")) : (0, import_react10.createElement)("span", { className: "bt-q-check", title: t("Done") }, (0, import_react10.createElement)(CheckIcon))+ )+ )+ );+ }+ function ComputerIndicator({ useComputer, useRoster, actions }) {+ const live = useComputer?.((map) => map) ?? {};+ const roster = useRoster((value) => value);+ const leases = live.leases ?? [];+ const waiting = Object.entries(live.bots ?? {}).filter(([, entry]) => entry.waitingFor === "user-idle");+ if (leases.length === 0 && waiting.length === 0) return null;+ const botOf = (id) => roster.byId[id];+ const nameOf = (id) => botOf(id)?.name ?? t("a Bot");+ const avatarOf = (id) => {+ const look = lookOf(botOf(id));+ if (typeof look.image === "string" && look.image.startsWith("data:image/")) return (0, import_react10.createElement)("img", { className: "bt-cbar-ava", src: look.image, alt: "" });+ return (0, import_react10.createElement)("span", { className: "bt-cbar-ava bt-cbar-ava-dot", style: { background: look.color } }, String(nameOf(id)).slice(0, 1));+ };+ const entries2 = [+ ...leases.map((entry) => ({ key: `l:${entry.botId}`, botId: entry.botId, waiting: false, app: entry.kind === "foreground" ? t("In the foreground") : entry.appName })),+ ...waiting.map(([botId]) => ({ key: `w:${botId}`, botId, waiting: true, app: t("waits for the computer") }))+ ];+ return (0, import_react10.createElement)(+ "div",+ { className: "bt-cbar", role: "status" },+ (0, import_react10.createElement)("span", { className: "bt-cbar-live", title: t("Computer use") }),+ ...entries2.flatMap((entry, index) => [+ index > 0 ? (0, import_react10.createElement)("span", { key: `s${index}`, className: "bt-cbar-sep" }) : null,+ (0, import_react10.createElement)(+ "span",+ { key: entry.key, className: entry.waiting ? "bt-cbar-entry bt-cbar-wait" : "bt-cbar-entry" },+ avatarOf(entry.botId),+ (0, import_react10.createElement)(+ "span",+ { className: "bt-cbar-text" },+ (0, import_react10.createElement)("b", { className: "bt-cbar-name" }, nameOf(entry.botId)),+ (0, import_react10.createElement)("i", { className: "bt-cbar-app" }, entry.app)+ ),+ entry.waiting ? (0, import_react10.createElement)("button", { type: "button", className: "bt-cbar-go", onClick: () => void actions.computerAllowForeground(entry.botId) }, t("Let it continue")) : (0, import_react10.createElement)(+ "button",+ { type: "button", className: "bt-cbar-stop", "aria-label": t("Stop"), title: t("Stop"), onClick: () => void actions.computerStop(entry.botId) },+ (0, import_react10.createElement)("span", { className: "bt-cbar-stopsq" })+ )+ )+ ]),+ leases.length > 1 ? (0, import_react10.createElement)("button", { type: "button", className: "bt-cbar-all", onClick: () => void actions.computerStop(null, true) }, t("Stop all")) : null+ );+ }+ var COMPUTER_CSS = `+ .bt-level-pick{max-width:200px}+ .bt-perm-state{font-size:13px;color:var(--bt-ink-2);margin-right:8px}+ .bt-perm-state[data-on]{color:var(--bt-green)}+ .bt-cview{display:flex;flex-direction:column;gap:12px}+ .bt-cview-head{display:flex;align-items:center;gap:8px}+ .bt-cview-state{font-size:13px;font-weight:500}+ .bt-cview-state[data-state=user]{color:var(--bt-accent)}+ .bt-cview-app{font-size:13px;color:var(--bt-ink-2)}+ .bt-cview-shot{max-width:100%;border-radius:8px;border:1px solid var(--bt-line)}+ .bt-cview-actions{display:flex;gap:8px}+ .bt-cview-steps{display:flex;flex-direction:column;gap:4px}+ .bt-cview-step{display:flex;align-items:center;gap:6px;font-size:12.5px;color:var(--bt-ink-2)}+ .bt-cview-step[data-ok=no]{color:var(--bt-danger)}+ .bt-cview-step-err{font-size:11px}+ .bt-cbar{position:absolute;top:8px;left:50%;transform:translateX(-50%);z-index:60;display:flex;align-items:center;gap:8px;max-width:min(760px,calc(100vw - 32px));padding:6px 12px;border-radius:999px;background:var(--bt-glass-bg);border:.5px solid var(--bt-glass-rim);box-shadow:var(--bt-glass-shadow);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);font-size:12.5px}+ .bt-cbar-live{flex:none;width:7px;height:7px;border-radius:50%;background:var(--bt-danger);box-shadow:0 0 0 3px var(--bt-danger-glow)}+ .bt-cbar-sep{flex:none;width:1px;height:14px;background:var(--bt-line);opacity:.7}+ .bt-cbar-entry{display:flex;align-items:center;gap:6px;min-width:0}+ .bt-cbar-ava{flex:none;width:16px;height:16px;border-radius:50%;object-fit:cover}+ .bt-cbar-ava-dot{display:inline-flex;align-items:center;justify-content:center;color:var(--bt-mark-ink);font-size:9px;font-weight:600;line-height:1}+ .bt-cbar-text{display:flex;align-items:baseline;gap:5px;min-width:0;overflow:hidden}+ .bt-cbar-name{flex:none;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}+ .bt-cbar-app{font-style:normal;color:var(--bt-ink-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:120px}+ .bt-cbar-stop{flex:none;width:22px;height:22px;border:0;border-radius:50%;background:var(--bt-hover);color:var(--bt-ink-2);cursor:pointer;display:inline-flex;align-items:center;justify-content:center}+ .bt-cbar-stopsq{width:8px;height:8px;border-radius:4px;background:currentColor}+ .bt-cbar-stop:hover{background:var(--bt-danger);color:var(--bt-mark-ink)}+ .bt-cbar-go,.bt-cbar-all{flex:none;border-radius:999px;padding:3px 10px;font:inherit;font-size:12px;cursor:pointer;white-space:nowrap;border:1px solid var(--bt-line-2)}+ .bt-cbar-go{background:var(--bt-accent-soft);color:var(--bt-accent);border-color:var(--bt-accent-soft)}+ .bt-cbar-all{background:var(--bt-danger-soft);color:var(--bt-danger);border-color:var(--bt-danger-soft)}+ .bt-cstep{display:flex;align-items:center;gap:10px;padding:3px 0;color:var(--bt-ink-2);font-size:12.5px}+ .bt-cstep-shot{flex:none;border:1px solid var(--bt-line);border-radius:8px;padding:0;background:none;cursor:zoom-in;overflow:hidden;max-height:40px}+ .bt-cstep-shot img{display:block;max-height:40px;max-width:72px;object-fit:cover}+ .bt-cstep-shot-open{max-height:none;cursor:zoom-out}+ .bt-cstep-shot-open img{max-height:280px;max-width:480px}+ `;++ // node_modules/deep-view/src/react/ui.js+ var import_react11 = require("react");+ var FallbackMarkdown = ({ text }) => (0, import_react11.createElement)("span", null, String(text ?? ""));+ var ViewUi = (0, import_react11.createContext)({ t: (key) => key, Markdown: FallbackMarkdown });+ var useViewUi = () => (0, import_react11.useContext)(ViewUi);+ var lineIcon2 = (paths) => function LineIcon() {+ return (0, import_react11.createElement)("svg",{ width: 15, height: 15, viewBox: "0 0 20 20", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true },- paths.map((d, index) => (0, import_react10.createElement)("path", { key: index, d }))+ paths.map((d, index) => (0, import_react11.createElement)("path", { key: index, d })));};var DotsIcon2 = lineIcon2(["M5 10h.01M10 10h.01M15 10h.01"]);@@@ -8209,28 -8704,28 +8730,28 @@@ function AddSecret({ actions, run: run2));}-function SecretsPage({ roster, actions, run: run2, Section }) {+function SecretsPage({ roster, actions, run: run2, Section: Section2 }) {- const [open, setOpen] = (0, import_react16.useState)(null);- const [adding, setAdding] = (0, import_react16.useState)(false);+ const [open, setOpen] = (0, import_react17.useState)(null);+ const [adding, setAdding] = (0, import_react17.useState)(false);const secrets = roster.secrets ?? [];return [- (0, import_react16.createElement)(+ (0, import_react17.createElement)("p",{ key: "about", className: "bt-secret-about" },t("Keys your Bots asked for. Bots never see the values: they use them as "),- (0, import_react16.createElement)("code", null, "$DSH_SECRET_NAME"),+ (0, import_react17.createElement)("code", null, "$DSH_SECRET_NAME"),t(" in their shell, and every value is replaced by "),- (0, import_react16.createElement)("code", null, "[secret:NAME]"),+ (0, import_react17.createElement)("code", null, "[secret:NAME]"),t(" before anything goes to a model.")),- (0, import_react16.createElement)(+ (0, import_react17.createElement)(- Section,+ Section2,{ key: "list", title: t("Secrets · {count}", { count: secrets.length }) },- secrets.length === 0 && !adding ? (0, import_react16.createElement)("div", { className: "bt-set-row" }, (0, import_react16.createElement)("span", { className: "bt-set-hint" }, t("No keys yet. When a Bot needs one, it shows a card in its chat."))) : null,- secrets.map((secret) => (0, import_react16.createElement)(SecretRow, { key: secret.name, secret, roster, actions, run: run2, open: open === secret.name, onToggle: () => setOpen(open === secret.name ? null : secret.name) })),- adding ? (0, import_react16.createElement)(AddSecret, { actions, run: run2, onDone: () => setAdding(false) }) : null+ secrets.length === 0 && !adding ? (0, import_react17.createElement)("div", { className: "bt-set-row" }, (0, import_react17.createElement)("span", { className: "bt-set-hint" }, t("No keys yet. When a Bot needs one, it shows a card in its chat."))) : null,+ secrets.map((secret) => (0, import_react17.createElement)(SecretRow, { key: secret.name, secret, roster, actions, run: run2, open: open === secret.name, onToggle: () => setOpen(open === secret.name ? null : secret.name) })),+ adding ? (0, import_react17.createElement)(AddSecret, { actions, run: run2, onDone: () => setAdding(false) }) : null),- adding ? null : (0, import_react16.createElement)("div", { key: "add", className: "bt-actions" }, (0, import_react16.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => setAdding(true) }, t("Add a key")))+ adding ? null : (0, import_react17.createElement)("div", { key: "add", className: "bt-actions" }, (0, import_react17.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => setAdding(true) }, t("Add a key")))];}var SECRET_CSS = `@@@ -10625,175 -11121,99 +11147,175 @@@ label.bt-bs-row{cursor:text@media (prefers-reduced-motion:reduce){.bt-switch,.bt-switch-knob{transition:none}.bt-avedit :is(.bt-shapes,.bt-colors,.bt-dropzone){animation:none}}`;+// src/client/open-window.js+function reserveWindow() {+ if (window.dshDesktop !== void 0) return { go: (url) => {+ window.open(url, "_blank");+ return true;+ }, close: () => {+ } };+ const reserved = window.open("", "_blank");+ if (reserved !== null) reserved.opener = null;+ return {+ go: (url) => {+ if (reserved === null) return false;+ reserved.location.href = url;+ return true;+ },+ close: () => {+ reserved?.close();+ }+ };+}+var openPage = (url) => reserveWindow().go(url);+// src/client/connector-marks.js- var import_react24 = require("react");- var svg = (...kids) => (0, import_react24.createElement)("svg", { width: 20, height: 20, viewBox: "0 0 24 24", fill: "none", "aria-hidden": true }, ...kids);- var path = (d, fill2) => (0, import_react24.createElement)("path", { d, fill: fill2 });+ var import_react25 = require("react");-var svg = (...kids) => (0, import_react25.createElement)("svg", { width: 20, height: 20, viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": true }, ...kids);-var path = (d) => (0, import_react25.createElement)("path", { d });++var svg = (...kids) => (0, import_react25.createElement)("svg", { width: 20, height: 20, viewBox: "0 0 24 24", fill: "none", "aria-hidden": true }, ...kids);++var path = (d, fill2) => (0, import_react25.createElement)("path", { d, fill: fill2 });var mark = (...kids) => () => svg(...kids);+var GITHUB_D = "M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z";- var GitHubMark = () => (0, import_react24.createElement)(+ var GitHubMark = () => (0, import_react25.createElement)("svg",{ width: 20, height: 20, viewBox: "0 0 16 16", fill: "currentColor", "aria-hidden": true },- (0, import_react24.createElement)("path", { d: GITHUB_D })- (0, import_react25.createElement)("path", { d: "M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z" })++ (0, import_react25.createElement)("path", { d: GITHUB_D })+);- var GithubBrandMark = () => (0, import_react24.createElement)(++var GithubBrandMark = () => (0, import_react25.createElement)(+ "svg",+ { width: 20, height: 20, viewBox: "0 0 16 16", fill: "var(--bt-mark-ink)", "aria-hidden": true },- (0, import_react24.createElement)("path", { d: GITHUB_D })++ (0, import_react25.createElement)("path", { d: GITHUB_D }));var SI = {- notion: "M4.459 4.208c.746.606 1.026.56 2.428.466l13.215-.793c.28 0 .047-.28-.046-.326L17.86 1.968c-.42-.326-.981-.7-2.055-.607L3.01 2.295c-.466.046-.56.28-.374.466zm.793 3.08v13.904c0 .747.373 1.027 1.214.98l14.523-.84c.841-.046.935-.56.935-1.167V6.354c0-.606-.233-.933-.748-.887l-15.177.887c-.56.047-.747.327-.747.933zm14.337.745c.093.42 0 .84-.42.888l-.7.14v10.264c-.608.327-1.168.514-1.635.514-.748 0-.935-.234-1.495-.933l-4.577-7.186v6.952L12.21 19s0 .84-1.168.84l-3.222.186c-.093-.186 0-.653.327-.746l.84-.233V9.854L7.822 9.76c-.094-.42.14-1.026.793-1.073l3.456-.233 4.764 7.279v-6.44l-1.215-.139c-.093-.514.28-.887.747-.933zM1.936 1.035l13.31-.98c1.634-.14 2.055-.047 3.082.7l4.249 2.986c.7.513.934.653.934 1.213v16.378c0 1.026-.373 1.634-1.68 1.726l-15.458.934c-.98.047-1.448-.093-1.962-.747l-3.129-4.06c-.56-.747-.793-1.306-.793-1.96V2.667c0-.839.374-1.54 1.447-1.632z",- linear: "M2.886 4.18A11.982 11.982 0 0 1 11.99 0C18.624 0 24 5.376 24 12.009c0 3.64-1.62 6.903-4.18 9.105L2.887 4.18ZM1.817 5.626l16.556 16.556c-.524.33-1.075.62-1.65.866L.951 7.277c.247-.575.537-1.126.866-1.65ZM.322 9.163l14.515 14.515c-.71.172-1.443.282-2.195.322L0 11.358a12 12 0 0 1 .322-2.195Zm-.17 4.862 9.823 9.824a12.02 12.02 0 0 1-9.824-9.824Z",- atlassian: "M7.12 11.084a.683.683 0 00-1.16.126L.075 22.974a.703.703 0 00.63 1.018h8.19a.678.678 0 00.63-.39c1.767-3.65.696-9.203-2.406-12.52zM11.434.386a15.515 15.515 0 00-.906 15.317l3.95 7.9a.703.703 0 00.628.388h8.19a.703.703 0 00.63-1.017L12.63.38a.664.664 0 00-1.196.006z",- sentry: "M13.91 2.505c-.873-1.448-2.972-1.448-3.844 0L6.904 7.92a15.478 15.478 0 0 1 8.53 12.811h-2.221A13.301 13.301 0 0 0 5.784 9.814l-2.926 5.06a7.65 7.65 0 0 1 4.435 5.848H2.194a.365.365 0 0 1-.298-.534l1.413-2.402a5.16 5.16 0 0 0-1.614-.913L.296 19.275a2.182 2.182 0 0 0 .812 2.999 2.24 2.24 0 0 0 1.086.288h6.983a9.322 9.322 0 0 0-3.845-8.318l1.11-1.922a11.47 11.47 0 0 1 4.95 10.24h5.915a17.242 17.242 0 0 0-7.885-15.28l2.244-3.845a.37.37 0 0 1 .504-.13c.255.14 9.75 16.708 9.928 16.9a.365.365 0 0 1-.327.543h-2.287c.029.612.029 1.223 0 1.831h2.297a2.206 2.206 0 0 0 1.922-3.31z",- stripe: "M13.976 9.15c-2.172-.806-3.356-1.426-3.356-2.409 0-.831.683-1.305 1.901-1.305 2.227 0 4.515.858 6.09 1.631l.89-5.494C18.252.975 15.697 0 12.165 0 9.667 0 7.589.654 6.104 1.872 4.56 3.147 3.757 4.992 3.757 7.218c0 4.039 2.467 5.76 6.476 7.219 2.585.92 3.445 1.574 3.445 2.583 0 .98-.84 1.545-2.354 1.545-1.875 0-4.965-.921-6.99-2.109l-.9 5.555C5.175 22.99 8.385 24 11.714 24c2.641 0 4.843-.624 6.328-1.813 1.664-1.305 2.525-3.236 2.525-5.732 0-4.128-2.524-5.851-6.594-7.305h.003z",- paypal: "M15.607 4.653H8.941L6.645 19.251H1.82L4.862 0h7.995c3.754 0 6.375 2.294 6.473 5.513-.648-.478-2.105-.86-3.722-.86m6.57 5.546c0 3.41-3.01 6.853-6.958 6.853h-2.493L11.595 24H6.74l1.845-11.538h3.592c4.208 0 7.346-3.634 7.153-6.949a5.24 5.24 0 0 1 2.848 4.686M9.653 5.546h6.408c.907 0 1.942.222 2.363.541-.195 2.741-2.655 5.483-6.441 5.483H8.714Z",- square: "M4.01 0A4.01 4.01 0 000 4.01v15.98c0 2.21 1.8 4 4.01 4.01h15.98C22.2 24 24 22.2 24 19.99V4A4.01 4.01 0 0019.99 0H4zm1.62 4.36h12.74c.7 0 1.26.57 1.26 1.27v12.74c0 .7-.56 1.27-1.26 1.27H5.63c-.7 0-1.26-.57-1.26-1.27V5.63a1.27 1.27 0 011.26-1.27zm3.83 4.35a.73.73 0 00-.73.73v5.09c0 .4.32.72.72.72h5.1a.73.73 0 00.73-.72V9.44a.73.73 0 00-.73-.73h-5.1Z",- cloudflare: "M16.5088 16.8447c.1475-.5068.0908-.9707-.1553-1.3154-.2246-.3164-.6045-.499-1.0615-.5205l-8.6592-.1123a.1559.1559 0 0 1-.1333-.0713c-.0283-.042-.0351-.0986-.021-.1553.0278-.084.1123-.1484.2036-.1562l8.7359-.1123c1.0351-.0489 2.1601-.8868 2.5537-1.9136l.499-1.3013c.0215-.0561.0293-.1128.0147-.168-.5625-2.5463-2.835-4.4453-5.5499-4.4453-2.5039 0-4.6284 1.6177-5.3876 3.8614-.4927-.3658-1.1187-.5625-1.794-.499-1.2026.119-2.1665 1.083-2.2861 2.2856-.0283.31-.0069.6128.0635.894C1.5683 13.171 0 14.7754 0 16.752c0 .1748.0142.3515.0352.5273.0141.083.0844.1475.1689.1475h15.9814c.0909 0 .1758-.0645.2032-.1553l.12-.4268zm2.7568-5.5634c-.0771 0-.1611 0-.2383.0112-.0566 0-.1054.0415-.127.0976l-.3378 1.1744c-.1475.5068-.0918.9707.1543 1.3164.2256.3164.6055.498 1.0625.5195l1.8437.1133c.0557 0 .1055.0263.1329.0703.0283.043.0351.1074.0214.1562-.0283.084-.1132.1485-.204.1553l-1.921.1123c-1.041.0488-2.1582.8867-2.5527 1.914l-.1406.3585c-.0283.0713.0215.1416.0986.1416h6.5977c.0771 0 .1474-.0489.169-.126.1122-.4082.1757-.837.1757-1.2803 0-2.6025-2.125-4.727-4.7344-4.727",- vercel: "m12 1.608 12 20.784H0Z",- supabase: "M11.9 1.036c-.015-.986-1.26-1.41-1.874-.637L.764 12.05C-.33 13.427.65 15.455 2.409 15.455h9.579l.113 7.51c.014.985 1.259 1.408 1.873.636l9.262-11.653c1.093-1.375.113-3.403-1.645-3.403h-9.642z",- neon: "M24 0V24l-9.365-8.045V24H0V0ZM2.942 21.087h8.751V9.563l9.365 8.204V2.919L2.942 2.914Z",- figma: "M15.852 8.981h-4.588V0h4.588c2.476 0 4.49 2.014 4.49 4.49s-2.014 4.491-4.49 4.491zM12.735 7.51h3.117c1.665 0 3.019-1.355 3.019-3.019s-1.355-3.019-3.019-3.019h-3.117V7.51zm0 1.471H8.148c-2.476 0-4.49-2.014-4.49-4.49S5.672 0 8.148 0h4.588v8.981zm-4.587-7.51c-1.665 0-3.019 1.355-3.019 3.019s1.354 3.02 3.019 3.02h3.117V1.471H8.148zm4.587 15.019H8.148c-2.476 0-4.49-2.014-4.49-4.49s2.014-4.49 4.49-4.49h4.588v8.98zM8.148 8.981c-1.665 0-3.019 1.355-3.019 3.019s1.355 3.019 3.019 3.019h3.117V8.981H8.148zM8.172 24c-2.489 0-4.515-2.014-4.515-4.49s2.014-4.49 4.49-4.49h4.588v4.441c0 2.503-2.047 4.539-4.563 4.539zm-.024-7.51a3.023 3.023 0 0 0-3.019 3.019c0 1.665 1.365 3.019 3.044 3.019 1.705 0 3.093-1.376 3.093-3.068v-2.97H8.148zm7.704 0h-.098c-2.476 0-4.49-2.014-4.49-4.49s2.014-4.49 4.49-4.49h.098c2.476 0 4.49 2.014 4.49 4.49s-2.014 4.49-4.49 4.49zm-.097-7.509c-1.665 0-3.019 1.355-3.019 3.019s1.355 3.019 3.019 3.019h.098c1.665 0 3.019-1.355 3.019-3.019s-1.355-3.019-3.019-3.019h-.098z",- intercom: "M21 0H3C1.343 0 0 1.343 0 3v18c0 1.658 1.343 3 3 3h18c1.658 0 3-1.342 3-3V3c0-1.657-1.342-3-3-3zm-5.801 4.399c0-.44.36-.8.802-.8.44 0 .8.36.8.8v10.688c0 .442-.36.801-.8.801-.443 0-.802-.359-.802-.801V4.399zM11.2 3.994c0-.44.357-.799.8-.799s.8.359.8.799v11.602c0 .44-.357.8-.8.8s-.8-.36-.8-.8V3.994zm-4 .405c0-.44.359-.8.799-.8.443 0 .802.36.802.8v10.688c0 .442-.36.801-.802.801-.44 0-.799-.359-.799-.801V4.399zM3.199 6c0-.442.36-.8.802-.8.44 0 .799.358.799.8v7.195c0 .441-.359.8-.799.8-.443 0-.802-.36-.802-.8V6zM20.52 18.202c-.123.105-3.086 2.593-8.52 2.593-5.433 0-8.397-2.486-8.521-2.593-.335-.288-.375-.792-.086-1.128.285-.334.79-.375 1.125-.09.047.041 2.693 2.211 7.481 2.211 4.848 0 7.456-2.186 7.479-2.207.334-.289.839-.25 1.128.086.289.336.25.84-.086 1.128zm.281-5.007c0 .441-.36.8-.801.8-.441 0-.801-.36-.801-.8V6c0-.442.361-.8.801-.8.441 0 .801.357.801.8v7.195z",- webflow: "m24 4.515-7.658 14.97H9.149l3.205-6.204h-.144C9.566 16.713 5.621 18.973 0 19.485v-6.118s3.596-.213 5.71-2.435H0V4.515h6.417v5.278l.144-.001 2.622-5.277h4.854v5.244h.144l2.72-5.244H24Z",- wix: "m0 7.354 2.113 9.292h.801a1.54 1.54 0 0 0 1.506-1.218l1.351-6.34a.171.171 0 0 1 .167-.137c.08 0 .15.058.167.137l1.352 6.34a1.54 1.54 0 0 0 1.506 1.218h.805l2.113-9.292h-.565c-.62 0-1.159.43-1.296 1.035l-1.26 5.545-1.106-5.176a1.76 1.76 0 0 0-2.19-1.324c-.639.176-1.113.716-1.251 1.365l-1.094 5.127-1.26-5.537A1.33 1.33 0 0 0 .563 7.354H0zm13.992 0a.951.951 0 0 0-.951.95v8.342h.635a.952.952 0 0 0 .951-.95V7.353h-.635zm1.778 0 3.158 4.66-3.14 4.632h1.325c.368 0 .712-.181.918-.486l1.756-2.59a.12.12 0 0 1 .197 0l1.754 2.59c.206.305.55.486.918.486h1.326l-3.14-4.632L24 7.354h-1.326c-.368 0-.712.181-.918.486l-1.772 2.617a.12.12 0 0 1-.197 0L18.014 7.84a1.108 1.108 0 0 0-.918-.486H15.77z",- netlify: "M6.49 19.04h-.23L5.13 17.9v-.23l1.73-1.71h1.2l.15.15v1.2L6.5 19.04ZM5.13 6.31V6.1l1.13-1.13h.23L8.2 6.68v1.2l-.15.15h-1.2L5.13 6.31Zm9.96 9.09h-1.65l-.14-.13v-3.83c0-.68-.27-1.2-1.1-1.23-.42 0-.9 0-1.43.02l-.07.08v4.96l-.14.14H8.9l-.13-.14V8.73l.13-.14h3.7a2.6 2.6 0 0 1 2.61 2.6v4.08l-.13.14Zm-8.37-2.44H.14L0 12.82v-1.64l.14-.14h6.58l.14.14v1.64l-.14.14Zm17.14 0h-6.58l-.14-.14v-1.64l.14-.14h6.58l.14.14v1.64l-.14.14ZM11.05 6.55V1.64l.14-.14h1.65l.14.14v4.9l-.14.14h-1.65l-.14-.13Zm0 15.81v-4.9l.14-.14h1.65l.14.13v4.91l-.14.14h-1.65l-.14-.14Z",- airtable: "M11.992 1.966c-.434 0-.87.086-1.28.257L1.779 5.917c-.503.208-.49.908.012 1.116l8.982 3.558a3.266 3.266 0 0 0 2.454 0l8.982-3.558c.503-.196.503-.908.012-1.116l-8.957-3.694a3.255 3.255 0 0 0-1.272-.257zM23.4 8.056a.589.589 0 0 0-.222.045l-10.012 3.877a.612.612 0 0 0-.38.564v8.896a.6.6 0 0 0 .821.552L23.62 18.1a.583.583 0 0 0 .38-.551V8.653a.6.6 0 0 0-.6-.596zM.676 8.095a.644.644 0 0 0-.48.19C.086 8.396 0 8.53 0 8.69v8.355c0 .442.515.737.908.54l6.27-3.006.307-.147 2.969-1.436c.466-.22.43-.908-.061-1.092L.883 8.138a.57.57 0 0 0-.207-.044z",- dropbox: "M6 1.807L0 5.629l6 3.822 6.001-3.822L6 1.807zM18 1.807l-6 3.822 6 3.822 6-3.822-6-3.822zM0 13.274l6 3.822 6.001-3.822L6 9.452l-6 3.822zM18 9.452l-6 3.822 6 3.822 6-3.822-6-3.822zM6 18.371l6.001 3.822 6-3.822-6-3.822L6 18.371z",- zapier: "M4.157 0A4.151 4.151 0 0 0 0 4.161v15.678A4.151 4.151 0 0 0 4.157 24h15.682A4.152 4.152 0 0 0 24 19.839V4.161A4.152 4.152 0 0 0 19.839 0H4.157Zm10.61 8.761h.03a.577.577 0 0 1 .23.038.585.585 0 0 1 .201.124.63.63 0 0 1 .162.431.612.612 0 0 1-.162.435.58.58 0 0 1-.201.128.58.58 0 0 1-.23.042.529.529 0 0 1-.235-.042.585.585 0 0 1-.332-.328.559.559 0 0 1-.038-.235.613.613 0 0 1 .17-.431.59.59 0 0 1 .405-.162Zm2.853 1.572c.03.004.061.004.095.004.325-.011.646.064.937.219.238.144.431.355.552.609.128.279.189.582.185.888v.193a2 2 0 0 1 0 .219h-2.498c.003.227.075.45.204.642a.78.78 0 0 0 .646.265.714.714 0 0 0 .484-.136.642.642 0 0 0 .23-.318l.915.257a1.398 1.398 0 0 1-.28.537c-.14.159-.321.284-.521.355a2.234 2.234 0 0 1-.836.136 1.923 1.923 0 0 1-1.001-.245 1.618 1.618 0 0 1-.665-.703 2.221 2.221 0 0 1-.227-1.036 1.95 1.95 0 0 1 .48-1.398 1.9 1.9 0 0 1 1.3-.488Zm-9.607.023c.162.004.325.026.48.079.207.065.4.174.563.314.26.302.393.692.366 1.088v2.276H8.53l-.109-.711h-.065c-.064.163-.155.31-.272.439a1.122 1.122 0 0 1-.374.264 1.023 1.023 0 0 1-.453.083 1.334 1.334 0 0 1-.866-.264.965.965 0 0 1-.329-.801.993.993 0 0 1 .076-.431 1.02 1.02 0 0 1 .242-.363 1.478 1.478 0 0 1 1.043-.303h.952v-.181a.696.696 0 0 0-.136-.454.553.553 0 0 0-.438-.154.695.695 0 0 0-.378.086.48.48 0 0 0-.193.254l-.99-.144a1.26 1.26 0 0 1 .257-.563c.14-.174.321-.302.533-.378.261-.091.54-.136.82-.129.053-.003.106-.007.163-.007Zm4.384.007c.174 0 .347.038.506.114.182.083.34.211.458.374.257.423.377.911.351 1.406a2.53 2.53 0 0 1-.355 1.448 1.148 1.148 0 0 1-1.009.517c-.204 0-.401-.045-.582-.136a1.052 1.052 0 0 1-.48-.457 1.298 1.298 0 0 1-.114-.234h-.045l.004 1.784h-1.059v-4.713h.904l.117.805h.057c.068-.208.177-.401.328-.56a1.129 1.129 0 0 1 .843-.344h.076v-.004Zm7.559.084h.903l.113.805h.053a1.37 1.37 0 0 1 .235-.484.813.813 0 0 1 .313-.242.82.82 0 0 1 .39-.076h.234v1.051h-.401a.662.662 0 0 0-.313.008.623.623 0 0 0-.272.155.663.663 0 0 0-.174.26.683.683 0 0 0-.027.314v1.875h-1.054v-3.666Zm-17.515.003h3.262v.896L3.73 13.104l.034.113h1.973l.042.9H2.4v-.9l1.931-1.754-.045-.117H2.441v-.896Zm11.815 0h1.055v3.659h-1.055V10.45Zm3.443.684.019.016a.69.69 0 0 0-.351.045.756.756 0 0 0-.287.204c-.11.155-.174.336-.189.522h1.545c-.034-.526-.257-.787-.74-.787h.003Zm-5.718.163c-.026 0-.057 0-.083.004a.78.78 0 0 0-.31.053.746.746 0 0 0-.257.189 1.016 1.016 0 0 0-.204.695v.064c-.015.257.057.507.204.711a.634.634 0 0 0 .253.196.638.638 0 0 0 .314.061.644.644 0 0 0 .578-.265c.14-.223.204-.48.189-.74a1.216 1.216 0 0 0-.181-.711.677.677 0 0 0-.503-.257Zm-4.509 1.266a.464.464 0 0 0-.268.102.373.373 0 0 0-.114.276c0 .053.008.106.027.155a.375.375 0 0 0 .087.132.576.576 0 0 0 .397.11v.004a.863.863 0 0 0 .563-.182.573.573 0 0 0 .211-.457v-.14h-.903Z",- clickup: "M2 18.439l3.69-2.828c1.961 2.56 4.044 3.739 6.363 3.739 2.307 0 4.33-1.166 6.203-3.704L22 18.405C19.298 22.065 15.941 24 12.053 24 8.178 24 4.788 22.078 2 18.439zM12.04 6.15l-6.568 5.66-3.036-3.52L12.055 0l9.543 8.296-3.05 3.509z",- todoist: "M21 0H3C1.35 0 0 1.35 0 3v3.858s3.854 2.24 4.098 2.38c.31.18.694.177 1.004 0 .26-.147 8.02-4.608 8.136-4.675.279-.161.58-.107.748-.01.164.097.606.348.84.48.232.134.221.502.013.622l-9.712 5.59c-.346.2-.69.204-1.048.002C3.478 10.907.998 9.463 0 8.882v2.02l4.098 2.38c.31.18.694.177 1.004 0 .26-.147 8.02-4.609 8.136-4.676.279-.16.58-.106.748-.008.164.096.606.347.84.48.232.133.221.5.013.62-.208.121-9.288 5.346-9.712 5.59-.346.2-.69.205-1.048.002C3.478 14.951.998 13.506 0 12.926v2.02l4.098 2.38c.31.18.694.177 1.004 0 .26-.147 8.02-4.609 8.136-4.676.279-.16.58-.106.748-.009.164.097.606.348.84.48.232.133.221.502.013.622l-9.712 5.59c-.346.199-.69.204-1.048.001C3.478 18.994.998 17.55 0 16.97V21c0 1.65 1.35 3 3 3h18c1.65 0 3-1.35 3-3V3c0-1.65-1.35-3-3-3z",- miro: "M17.392 0H13.9L17 4.808 10.444 0H6.949l3.102 6.3L3.494 0H0l3.05 8.131L0 24h3.494L10.05 6.985 6.949 24h3.494L17 5.494 13.899 24h3.493L24 3.672 17.392 0z",- postman: "M13.527.099C6.955-.744.942 3.9.099 10.473c-.843 6.572 3.8 12.584 10.373 13.428 6.573.843 12.587-3.801 13.428-10.374C24.744 6.955 20.101.943 13.527.099zm2.471 7.485a.855.855 0 0 0-.593.25l-4.453 4.453-.307-.307-.643-.643c4.389-4.376 5.18-4.418 5.996-3.753zm-4.863 4.861l4.44-4.44a.62.62 0 1 1 .847.903l-4.699 4.125-.588-.588zm.33.694l-1.1.238a.06.06 0 0 1-.067-.032.06.06 0 0 1 .01-.073l.645-.645.512.512zm-2.803-.459l1.172-1.172.879.878-1.979.426a.074.074 0 0 1-.085-.039.072.072 0 0 1 .013-.093zm-3.646 6.058a.076.076 0 0 1-.069-.083.077.077 0 0 1 .022-.046h.002l.946-.946 1.222 1.222-2.123-.147zm2.425-1.256a.228.228 0 0 0-.117.256l.203.865a.125.125 0 0 1-.211.117h-.003l-.934-.934-.294-.295 3.762-3.758 1.82-.393.874.874c-1.255 1.102-2.971 2.201-5.1 3.268zm5.279-3.428h-.002l-.839-.839 4.699-4.125a.952.952 0 0 0 .119-.127c-.148 1.345-2.029 3.245-3.977 5.091zm3.657-6.46l-.003-.002a1.822 1.822 0 0 1 2.459-2.684l-1.61 1.613a.119.119 0 0 0 0 .169l1.247 1.247a1.817 1.817 0 0 1-2.093-.343zm2.578 0a1.714 1.714 0 0 1-.271.218h-.001l-1.207-1.207 1.533-1.533c.661.72.637 1.832-.054 2.522zM18.855 6.05a.143.143 0 0 0-.053.157.416.416 0 0 1-.053.45.14.14 0 0 0 .023.197.141.141 0 0 0 .084.03.14.14 0 0 0 .106-.05.691.691 0 0 0 .087-.751.138.138 0 0 0-.194-.033z",- asana: "M18.78 12.653c-2.882 0-5.22 2.336-5.22 5.22s2.338 5.22 5.22 5.22 5.22-2.34 5.22-5.22-2.336-5.22-5.22-5.22zm-13.56 0c-2.88 0-5.22 2.337-5.22 5.22s2.338 5.22 5.22 5.22 5.22-2.338 5.22-5.22-2.336-5.22-5.22-5.22zm12-6.525c0 2.883-2.337 5.22-5.22 5.22-2.882 0-5.22-2.337-5.22-5.22 0-2.88 2.338-5.22 5.22-5.22 2.883 0 5.22 2.34 5.22 5.22z",- box: "M.959 5.523c-.54 0-.959.42-.959.899v7.549a4.59 4.59 0 004.613 4.494 4.717 4.717 0 004.135-2.457c.779 1.438 2.337 2.457 4.074 2.457 2.577 0 4.674-2.037 4.674-4.613.06-2.457-2.037-4.495-4.613-4.495-1.738 0-3.295.959-4.074 2.397-.78-1.438-2.338-2.397-4.135-2.397-1.079 0-2.038.36-2.817.899V6.422a.92.92 0 00-.898-.899zM17.602 9.26a.95.95 0 00-.704.158c-.36.3-.479.899-.18 1.318l2.397 3.116-2.396 3.115c-.3.42-.24.96.18 1.26.419.3 1.016.298 1.316-.122l2.039-2.636 2.096 2.697c.3.36.899.419 1.318.12.36-.3.42-.84.121-1.259l-2.338-3.115 2.338-3.057c.3-.419.298-1.018-.121-1.318-.48-.3-1.019-.24-1.318.18l-2.096 2.576-2.04-2.695c-.149-.18-.373-.3-.612-.338zM4.613 11.154c1.558 0 2.817 1.26 2.817 2.758 0 1.558-1.259 2.756-2.817 2.756-1.558 0-2.816-1.198-2.816-2.756 0-1.498 1.258-2.758 2.816-2.758zm8.27 0c1.558 0 2.816 1.26 2.816 2.758-.06 1.558-1.318 2.756-2.816 2.756-1.558 0-2.817-1.198-2.817-2.756 0-1.498 1.259-2.758 2.817-2.758Z",- hubspot: "M18.164 7.93V5.084a2.198 2.198 0 001.267-1.978v-.067A2.2 2.2 0 0017.238.845h-.067a2.2 2.2 0 00-2.193 2.193v.067a2.196 2.196 0 001.252 1.973l.013.006v2.852a6.22 6.22 0 00-2.969 1.31l.012-.01-7.828-6.095A2.497 2.497 0 104.3 4.656l-.012.006 7.697 5.991a6.176 6.176 0 00-1.038 3.446c0 1.343.425 2.588 1.147 3.607l-.013-.02-2.342 2.343a1.968 1.968 0 00-.58-.095h-.002a2.033 2.033 0 102.033 2.033 1.978 1.978 0 00-.1-.595l.005.014 2.317-2.317a6.247 6.247 0 104.782-11.134l-.036-.005zm-.964 9.378a3.206 3.206 0 113.215-3.207v.002a3.206 3.206 0 01-3.207 3.207z",- huggingface: "M12.025 1.13c-5.77 0-10.449 4.647-10.449 10.378 0 1.112.178 2.181.503 3.185.064-.222.203-.444.416-.577a.96.96 0 0 1 .524-.15c.293 0 .584.124.84.284.278.173.48.408.71.694.226.282.458.611.684.951v-.014c.017-.324.106-.622.264-.874s.403-.487.762-.543c.3-.047.596.06.787.203s.31.313.4.467c.15.257.212.468.233.542.01.026.653 1.552 1.657 2.54.616.605 1.01 1.223 1.082 1.912.055.537-.096 1.059-.38 1.572.637.121 1.294.187 1.967.187.657 0 1.298-.063 1.921-.178-.287-.517-.44-1.041-.384-1.581.07-.69.465-1.307 1.081-1.913 1.004-.987 1.647-2.513 1.657-2.539.021-.074.083-.285.233-.542.09-.154.208-.323.4-.467a1.08 1.08 0 0 1 .787-.203c.359.056.604.29.762.543s.247.55.265.874v.015c.225-.34.457-.67.683-.952.23-.286.432-.52.71-.694.257-.16.547-.284.84-.285a.97.97 0 0 1 .524.151c.228.143.373.388.43.625l.006.04a10.3 10.3 0 0 0 .534-3.273c0-5.731-4.678-10.378-10.449-10.378M8.327 6.583a1.5 1.5 0 0 1 .713.174 1.487 1.487 0 0 1 .617 2.013c-.183.343-.762-.214-1.102-.094-.38.134-.532.914-.917.71a1.487 1.487 0 0 1 .69-2.803m7.486 0a1.487 1.487 0 0 1 .689 2.803c-.385.204-.536-.576-.916-.71-.34-.12-.92.437-1.103.094a1.487 1.487 0 0 1 .617-2.013 1.5 1.5 0 0 1 .713-.174m-10.68 1.55a.96.96 0 1 1 0 1.921.96.96 0 0 1 0-1.92m13.838 0a.96.96 0 1 1 0 1.92.96.96 0 0 1 0-1.92M8.489 11.458c.588.01 1.965 1.157 3.572 1.164 1.607-.007 2.984-1.155 3.572-1.164.196-.003.305.12.305.454 0 .886-.424 2.328-1.563 3.202-.22-.756-1.396-1.366-1.63-1.32q-.011.001-.02.006l-.044.026-.01.008-.03.024q-.018.017-.035.036l-.032.04a1 1 0 0 0-.058.09l-.014.025q-.049.088-.11.19a1 1 0 0 1-.083.116 1.2 1.2 0 0 1-.173.18q-.035.029-.075.058a1.3 1.3 0 0 1-.251-.243 1 1 0 0 1-.076-.107c-.124-.193-.177-.363-.337-.444-.034-.016-.104-.008-.2.022q-.094.03-.216.087-.06.028-.125.063l-.13.074q-.067.04-.136.086a3 3 0 0 0-.135.096 3 3 0 0 0-.26.219 2 2 0 0 0-.12.121 2 2 0 0 0-.106.128l-.002.002a2 2 0 0 0-.09.132l-.001.001a1.2 1.2 0 0 0-.105.212q-.013.036-.024.073c-1.139-.875-1.563-2.317-1.563-3.203 0-.334.109-.457.305-.454m.836 10.354c.824-1.19.766-2.082-.365-3.194-1.13-1.112-1.789-2.738-1.789-2.738s-.246-.945-.806-.858-.97 1.499.202 2.362c1.173.864-.233 1.45-.685.64-.45-.812-1.683-2.896-2.322-3.295s-1.089-.175-.938.647 2.822 2.813 2.562 3.244-1.176-.506-1.176-.506-2.866-2.567-3.49-1.898.473 1.23 2.037 2.16c1.564.932 1.686 1.178 1.464 1.53s-3.675-2.511-4-1.297c-.323 1.214 3.524 1.567 3.287 2.405-.238.839-2.71-1.587-3.216-.642-.506.946 3.49 2.056 3.522 2.064 1.29.33 4.568 1.028 5.713-.624m5.349 0c-.824-1.19-.766-2.082.365-3.194 1.13-1.112 1.789-2.738 1.789-2.738s.246-.945.806-.858.97 1.499-.202 2.362c-1.173.864.233 1.45.685.64.451-.812 1.683-2.896 2.322-3.295s1.089-.175.938.647-2.822 2.813-2.562 3.244 1.176-.506 1.176-.506 2.866-2.567 3.49-1.898-.473 1.23-2.037 2.16c-1.564.932-1.686 1.178-1.464 1.53s3.675-2.511 4-1.297c.323 1.214-3.524 1.567-3.287 2.405.238.839 2.71-1.587 3.216-.642.506.946-3.49 2.056-3.522 2.064-1.29.33-4.568 1.028-5.713-.624",- gmail: "M24 5.457v13.909c0 .904-.732 1.636-1.636 1.636h-3.819V11.73L12 16.64l-6.545-4.91v9.273H1.636A1.636 1.636 0 0 1 0 19.366V5.457c0-2.023 2.309-3.178 3.927-1.964L5.455 4.64 12 9.548l6.545-4.91 1.528-1.145C21.69 2.28 24 3.434 24 5.457z",- icloud: "M13.762 4.29a6.51 6.51 0 0 0-5.669 3.332 3.571 3.571 0 0 0-1.558-.36 3.571 3.571 0 0 0-3.516 3A4.918 4.918 0 0 0 0 14.796a4.918 4.918 0 0 0 4.92 4.914 4.93 4.93 0 0 0 .617-.045h14.42c2.305-.272 4.041-2.258 4.043-4.589v-.009a4.594 4.594 0 0 0-3.727-4.508 6.51 6.51 0 0 0-6.511-6.27z",- qq: "M21.395 15.035a40 40 0 0 0-.803-2.264l-1.079-2.695c.001-.032.014-.562.014-.836C19.526 4.632 17.351 0 12 0S4.474 4.632 4.474 9.241c0 .274.013.804.014.836l-1.08 2.695a39 39 0 0 0-.802 2.264c-1.021 3.283-.69 4.643-.438 4.673.54.065 2.103-2.472 2.103-2.472 0 1.469.756 3.387 2.394 4.771-.612.188-1.363.479-1.845.835-.434.32-.379.646-.301.778.343.578 5.883.369 7.482.189 1.6.18 7.14.389 7.483-.189.078-.132.132-.458-.301-.778-.483-.356-1.233-.646-1.846-.836 1.637-1.384 2.393-3.302 2.393-4.771 0 0 1.563 2.537 2.103 2.472.251-.03.581-1.39-.438-4.673"+ notion: ["M4.459 4.208c.746.606 1.026.56 2.428.466l13.215-.793c.28 0 .047-.28-.046-.326L17.86 1.968c-.42-.326-.981-.7-2.055-.607L3.01 2.295c-.466.046-.56.28-.374.466zm.793 3.08v13.904c0 .747.373 1.027 1.214.98l14.523-.84c.841-.046.935-.56.935-1.167V6.354c0-.606-.233-.933-.748-.887l-15.177.887c-.56.047-.747.327-.747.933zm14.337.745c.093.42 0 .84-.42.888l-.7.14v10.264c-.608.327-1.168.514-1.635.514-.748 0-.935-.234-1.495-.933l-4.577-7.186v6.952L12.21 19s0 .84-1.168.84l-3.222.186c-.093-.186 0-.653.327-.746l.84-.233V9.854L7.822 9.76c-.094-.42.14-1.026.793-1.073l3.456-.233 4.764 7.279v-6.44l-1.215-.139c-.093-.514.28-.887.747-.933zM1.936 1.035l13.31-.98c1.634-.14 2.055-.047 3.082.7l4.249 2.986c.7.513.934.653.934 1.213v16.378c0 1.026-.373 1.634-1.68 1.726l-15.458.934c-.98.047-1.448-.093-1.962-.747l-3.129-4.06c-.56-.747-.793-1.306-.793-1.96V2.667c0-.839.374-1.54 1.447-1.632z", "var(--bt-mark-ink)"],+ linear: ["M2.886 4.18A11.982 11.982 0 0 1 11.99 0C18.624 0 24 5.376 24 12.009c0 3.64-1.62 6.903-4.18 9.105L2.887 4.18ZM1.817 5.626l16.556 16.556c-.524.33-1.075.62-1.65.866L.951 7.277c.247-.575.537-1.126.866-1.65ZM.322 9.163l14.515 14.515c-.71.172-1.443.282-2.195.322L0 11.358a12 12 0 0 1 .322-2.195Zm-.17 4.862 9.823 9.824a12.02 12.02 0 0 1-9.824-9.824Z", "#5E6AD2"],+ sentry: ["M13.91 2.505c-.873-1.448-2.972-1.448-3.844 0L6.904 7.92a15.478 15.478 0 0 1 8.53 12.811h-2.221A13.301 13.301 0 0 0 5.784 9.814l-2.926 5.06a7.65 7.65 0 0 1 4.435 5.848H2.194a.365.365 0 0 1-.298-.534l1.413-2.402a5.16 5.16 0 0 0-1.614-.913L.296 19.275a2.182 2.182 0 0 0 .812 2.999 2.24 2.24 0 0 0 1.086.288h6.983a9.322 9.322 0 0 0-3.845-8.318l1.11-1.922a11.47 11.47 0 0 1 4.95 10.24h5.915a17.242 17.242 0 0 0-7.885-15.28l2.244-3.845a.37.37 0 0 1 .504-.13c.255.14 9.75 16.708 9.928 16.9a.365.365 0 0 1-.327.543h-2.287c.029.612.029 1.223 0 1.831h2.297a2.206 2.206 0 0 0 1.922-3.31z", "#6C5FC7"],+ stripe: ["M13.976 9.15c-2.172-.806-3.356-1.426-3.356-2.409 0-.831.683-1.305 1.901-1.305 2.227 0 4.515.858 6.09 1.631l.89-5.494C18.252.975 15.697 0 12.165 0 9.667 0 7.589.654 6.104 1.872 4.56 3.147 3.757 4.992 3.757 7.218c0 4.039 2.467 5.76 6.476 7.219 2.585.92 3.445 1.574 3.445 2.583 0 .98-.84 1.545-2.354 1.545-1.875 0-4.965-.921-6.99-2.109l-.9 5.555C5.175 22.99 8.385 24 11.714 24c2.641 0 4.843-.624 6.328-1.813 1.664-1.305 2.525-3.236 2.525-5.732 0-4.128-2.524-5.851-6.594-7.305h.003z", "#635BFF"],+ square: ["M4.01 0A4.01 4.01 0 000 4.01v15.98c0 2.21 1.8 4 4.01 4.01h15.98C22.2 24 24 22.2 24 19.99V4A4.01 4.01 0 0019.99 0H4zm1.62 4.36h12.74c.7 0 1.26.57 1.26 1.27v12.74c0 .7-.56 1.27-1.26 1.27H5.63c-.7 0-1.26-.57-1.26-1.27V5.63a1.27 1.27 0 011.26-1.27zm3.83 4.35a.73.73 0 00-.73.73v5.09c0 .4.32.72.72.72h5.1a.73.73 0 00.73-.72V9.44a.73.73 0 00-.73-.73h-5.1Z", "#006AFF"],+ vercel: ["m12 1.608 12 20.784H0Z", "var(--bt-mark-ink)"],+ supabase: ["M11.9 1.036c-.015-.986-1.26-1.41-1.874-.637L.764 12.05C-.33 13.427.65 15.455 2.409 15.455h9.579l.113 7.51c.014.985 1.259 1.408 1.873.636l9.262-11.653c1.093-1.375.113-3.403-1.645-3.403h-9.642z", "#3ECF8E"],+ neon: ["M24 0V24l-9.365-8.045V24H0V0ZM2.942 21.087h8.751V9.563l9.365 8.204V2.919L2.942 2.914Z", "#00C885"],+ intercom: ["M21 0H3C1.343 0 0 1.343 0 3v18c0 1.658 1.343 3 3 3h18c1.658 0 3-1.342 3-3V3c0-1.657-1.342-3-3-3zm-5.801 4.399c0-.44.36-.8.802-.8.44 0 .8.36.8.8v10.688c0 .442-.36.801-.8.801-.443 0-.802-.359-.802-.801V4.399zM11.2 3.994c0-.44.357-.799.8-.799s.8.359.8.799v11.602c0 .44-.357.8-.8.8s-.8-.36-.8-.8V3.994zm-4 .405c0-.44.359-.8.799-.8.443 0 .802.36.802.8v10.688c0 .442-.36.801-.802.801-.44 0-.799-.359-.799-.801V4.399zM3.199 6c0-.442.36-.8.802-.8.44 0 .799.358.799.8v7.195c0 .441-.359.8-.799.8-.443 0-.802-.36-.802-.8V6zM20.52 18.202c-.123.105-3.086 2.593-8.52 2.593-5.433 0-8.397-2.486-8.521-2.593-.335-.288-.375-.792-.086-1.128.285-.334.79-.375 1.125-.09.047.041 2.693 2.211 7.481 2.211 4.848 0 7.456-2.186 7.479-2.207.334-.289.839-.25 1.128.086.289.336.25.84-.086 1.128zm.281-5.007c0 .441-.36.8-.801.8-.441 0-.801-.36-.801-.8V6c0-.442.361-.8.801-.8.441 0 .801.357.801.8v7.195z", "#0057FF"],+ webflow: ["m24 4.515-7.658 14.97H9.149l3.205-6.204h-.144C9.566 16.713 5.621 18.973 0 19.485v-6.118s3.596-.213 5.71-2.435H0V4.515h6.417v5.278l.144-.001 2.622-5.277h4.854v5.244h.144l2.72-5.244H24Z", "#146EF5"],+ wix: ["m0 7.354 2.113 9.292h.801a1.54 1.54 0 0 0 1.506-1.218l1.351-6.34a.171.171 0 0 1 .167-.137c.08 0 .15.058.167.137l1.352 6.34a1.54 1.54 0 0 0 1.506 1.218h.805l2.113-9.292h-.565c-.62 0-1.159.43-1.296 1.035l-1.26 5.545-1.106-5.176a1.76 1.76 0 0 0-2.19-1.324c-.639.176-1.113.716-1.251 1.365l-1.094 5.127-1.26-5.537A1.33 1.33 0 0 0 .563 7.354H0zm13.992 0a.951.951 0 0 0-.951.95v8.342h.635a.952.952 0 0 0 .951-.95V7.353h-.635zm1.778 0 3.158 4.66-3.14 4.632h1.325c.368 0 .712-.181.918-.486l1.756-2.59a.12.12 0 0 1 .197 0l1.754 2.59c.206.305.55.486.918.486h1.326l-3.14-4.632L24 7.354h-1.326c-.368 0-.712.181-.918.486l-1.772 2.617a.12.12 0 0 1-.197 0L18.014 7.84a1.108 1.108 0 0 0-.918-.486H15.77z", "#0C6EFC"],+ netlify: ["M6.49 19.04h-.23L5.13 17.9v-.23l1.73-1.71h1.2l.15.15v1.2L6.5 19.04ZM5.13 6.31V6.1l1.13-1.13h.23L8.2 6.68v1.2l-.15.15h-1.2L5.13 6.31Zm9.96 9.09h-1.65l-.14-.13v-3.83c0-.68-.27-1.2-1.1-1.23-.42 0-.9 0-1.43.02l-.07.08v4.96l-.14.14H8.9l-.13-.14V8.73l.13-.14h3.7a2.6 2.6 0 0 1 2.61 2.6v4.08l-.13.14Zm-8.37-2.44H.14L0 12.82v-1.64l.14-.14h6.58l.14.14v1.64l-.14.14Zm17.14 0h-6.58l-.14-.14v-1.64l.14-.14h6.58l.14.14v1.64l-.14.14ZM11.05 6.55V1.64l.14-.14h1.65l.14.14v4.9l-.14.14h-1.65l-.14-.13Zm0 15.81v-4.9l.14-.14h1.65l.14.13v4.91l-.14.14h-1.65l-.14-.14Z", "#00C7B7"],+ dropbox: ["M6 1.807L0 5.629l6 3.822 6.001-3.822L6 1.807zM18 1.807l-6 3.822 6 3.822 6-3.822-6-3.822zM0 13.274l6 3.822 6.001-3.822L6 9.452l-6 3.822zM18 9.452l-6 3.822 6 3.822 6-3.822-6-3.822zM6 18.371l6.001 3.822 6-3.822-6-3.822L6 18.371z", "#0061FF"],+ zapier: ["M4.157 0A4.151 4.151 0 0 0 0 4.161v15.678A4.151 4.151 0 0 0 4.157 24h15.682A4.152 4.152 0 0 0 24 19.839V4.161A4.152 4.152 0 0 0 19.839 0H4.157Zm10.61 8.761h.03a.577.577 0 0 1 .23.038.585.585 0 0 1 .201.124.63.63 0 0 1 .162.431.612.612 0 0 1-.162.435.58.58 0 0 1-.201.128.58.58 0 0 1-.23.042.529.529 0 0 1-.235-.042.585.585 0 0 1-.332-.328.559.559 0 0 1-.038-.235.613.613 0 0 1 .17-.431.59.59 0 0 1 .405-.162Zm2.853 1.572c.03.004.061.004.095.004.325-.011.646.064.937.219.238.144.431.355.552.609.128.279.189.582.185.888v.193a2 2 0 0 1 0 .219h-2.498c.003.227.075.45.204.642a.78.78 0 0 0 .646.265.714.714 0 0 0 .484-.136.642.642 0 0 0 .23-.318l.915.257a1.398 1.398 0 0 1-.28.537c-.14.159-.321.284-.521.355a2.234 2.234 0 0 1-.836.136 1.923 1.923 0 0 1-1.001-.245 1.618 1.618 0 0 1-.665-.703 2.221 2.221 0 0 1-.227-1.036 1.95 1.95 0 0 1 .48-1.398 1.9 1.9 0 0 1 1.3-.488Zm-9.607.023c.162.004.325.026.48.079.207.065.4.174.563.314.26.302.393.692.366 1.088v2.276H8.53l-.109-.711h-.065c-.064.163-.155.31-.272.439a1.122 1.122 0 0 1-.374.264 1.023 1.023 0 0 1-.453.083 1.334 1.334 0 0 1-.866-.264.965.965 0 0 1-.329-.801.993.993 0 0 1 .076-.431 1.02 1.02 0 0 1 .242-.363 1.478 1.478 0 0 1 1.043-.303h.952v-.181a.696.696 0 0 0-.136-.454.553.553 0 0 0-.438-.154.695.695 0 0 0-.378.086.48.48 0 0 0-.193.254l-.99-.144a1.26 1.26 0 0 1 .257-.563c.14-.174.321-.302.533-.378.261-.091.54-.136.82-.129.053-.003.106-.007.163-.007Zm4.384.007c.174 0 .347.038.506.114.182.083.34.211.458.374.257.423.377.911.351 1.406a2.53 2.53 0 0 1-.355 1.448 1.148 1.148 0 0 1-1.009.517c-.204 0-.401-.045-.582-.136a1.052 1.052 0 0 1-.48-.457 1.298 1.298 0 0 1-.114-.234h-.045l.004 1.784h-1.059v-4.713h.904l.117.805h.057c.068-.208.177-.401.328-.56a1.129 1.129 0 0 1 .843-.344h.076v-.004Zm7.559.084h.903l.113.805h.053a1.37 1.37 0 0 1 .235-.484.813.813 0 0 1 .313-.242.82.82 0 0 1 .39-.076h.234v1.051h-.401a.662.662 0 0 0-.313.008.623.623 0 0 0-.272.155.663.663 0 0 0-.174.26.683.683 0 0 0-.027.314v1.875h-1.054v-3.666Zm-17.515.003h3.262v.896L3.73 13.104l.034.113h1.973l.042.9H2.4v-.9l1.931-1.754-.045-.117H2.441v-.896Zm11.815 0h1.055v3.659h-1.055V10.45Zm3.443.684.019.016a.69.69 0 0 0-.351.045.756.756 0 0 0-.287.204c-.11.155-.174.336-.189.522h1.545c-.034-.526-.257-.787-.74-.787h.003Zm-5.718.163c-.026 0-.057 0-.083.004a.78.78 0 0 0-.31.053.746.746 0 0 0-.257.189 1.016 1.016 0 0 0-.204.695v.064c-.015.257.057.507.204.711a.634.634 0 0 0 .253.196.638.638 0 0 0 .314.061.644.644 0 0 0 .578-.265c.14-.223.204-.48.189-.74a1.216 1.216 0 0 0-.181-.711.677.677 0 0 0-.503-.257Zm-4.509 1.266a.464.464 0 0 0-.268.102.373.373 0 0 0-.114.276c0 .053.008.106.027.155a.375.375 0 0 0 .087.132.576.576 0 0 0 .397.11v.004a.863.863 0 0 0 .563-.182.573.573 0 0 0 .211-.457v-.14h-.903Z", "#FF4F00"],+ todoist: ["M21 0H3C1.35 0 0 1.35 0 3v3.858s3.854 2.24 4.098 2.38c.31.18.694.177 1.004 0 .26-.147 8.02-4.608 8.136-4.675.279-.161.58-.107.748-.01.164.097.606.348.84.48.232.134.221.502.013.622l-9.712 5.59c-.346.2-.69.204-1.048.002C3.478 10.907.998 9.463 0 8.882v2.02l4.098 2.38c.31.18.694.177 1.004 0 .26-.147 8.02-4.609 8.136-4.676.279-.16.58-.106.748-.008.164.096.606.347.84.48.232.133.221.5.013.62-.208.121-9.288 5.346-9.712 5.59-.346.2-.69.205-1.048.002C3.478 14.951.998 13.506 0 12.926v2.02l4.098 2.38c.31.18.694.177 1.004 0 .26-.147 8.02-4.609 8.136-4.676.279-.16.58-.106.748-.009.164.097.606.348.84.48.232.133.221.502.013.622l-9.712 5.59c-.346.199-.69.204-1.048.001C3.478 18.994.998 17.55 0 16.97V21c0 1.65 1.35 3 3 3h18c1.65 0 3-1.35 3-3V3c0-1.65-1.35-3-3-3z", "#E44332"],+ miro: ["M17.392 0H13.9L17 4.808 10.444 0H6.949l3.102 6.3L3.494 0H0l3.05 8.131L0 24h3.494L10.05 6.985 6.949 24h3.494L17 5.494 13.899 24h3.493L24 3.672 17.392 0z", "#F59E0B"],+ postman: ["M13.527.099C6.955-.744.942 3.9.099 10.473c-.843 6.572 3.8 12.584 10.373 13.428 6.573.843 12.587-3.801 13.428-10.374C24.744 6.955 20.101.943 13.527.099zm2.471 7.485a.855.855 0 0 0-.593.25l-4.453 4.453-.307-.307-.643-.643c4.389-4.376 5.18-4.418 5.996-3.753zm-4.863 4.861l4.44-4.44a.62.62 0 1 1 .847.903l-4.699 4.125-.588-.588zm.33.694l-1.1.238a.06.06 0 0 1-.067-.032.06.06 0 0 1 .01-.073l.645-.645.512.512zm-2.803-.459l1.172-1.172.879.878-1.979.426a.074.074 0 0 1-.085-.039.072.072 0 0 1 .013-.093zm-3.646 6.058a.076.076 0 0 1-.069-.083.077.077 0 0 1 .022-.046h.002l.946-.946 1.222 1.222-2.123-.147zm2.425-1.256a.228.228 0 0 0-.117.256l.203.865a.125.125 0 0 1-.211.117h-.003l-.934-.934-.294-.295 3.762-3.758 1.82-.393.874.874c-1.255 1.102-2.971 2.201-5.1 3.268zm5.279-3.428h-.002l-.839-.839 4.699-4.125a.952.952 0 0 0 .119-.127c-.148 1.345-2.029 3.245-3.977 5.091zm3.657-6.46l-.003-.002a1.822 1.822 0 0 1 2.459-2.684l-1.61 1.613a.119.119 0 0 0 0 .169l1.247 1.247a1.817 1.817 0 0 1-2.093-.343zm2.578 0a1.714 1.714 0 0 1-.271.218h-.001l-1.207-1.207 1.533-1.533c.661.72.637 1.832-.054 2.522zM18.855 6.05a.143.143 0 0 0-.053.157.416.416 0 0 1-.053.45.14.14 0 0 0 .023.197.141.141 0 0 0 .084.03.14.14 0 0 0 .106-.05.691.691 0 0 0 .087-.751.138.138 0 0 0-.194-.033z", "#FF6C37"],+ asana: ["M18.78 12.653c-2.882 0-5.22 2.336-5.22 5.22s2.338 5.22 5.22 5.22 5.22-2.34 5.22-5.22-2.336-5.22-5.22-5.22zm-13.56 0c-2.88 0-5.22 2.337-5.22 5.22s2.338 5.22 5.22 5.22 5.22-2.338 5.22-5.22-2.336-5.22-5.22-5.22zm12-6.525c0 2.883-2.337 5.22-5.22 5.22-2.882 0-5.22-2.337-5.22-5.22 0-2.88 2.338-5.22 5.22-5.22 2.883 0 5.22 2.34 5.22 5.22z", "#F06A6A"],+ box: ["M.959 5.523c-.54 0-.959.42-.959.899v7.549a4.59 4.59 0 004.613 4.494 4.717 4.717 0 004.135-2.457c.779 1.438 2.337 2.457 4.074 2.457 2.577 0 4.674-2.037 4.674-4.613.06-2.457-2.037-4.495-4.613-4.495-1.738 0-3.295.959-4.074 2.397-.78-1.438-2.338-2.397-4.135-2.397-1.079 0-2.038.36-2.817.899V6.422a.92.92 0 00-.898-.899zM17.602 9.26a.95.95 0 00-.704.158c-.36.3-.479.899-.18 1.318l2.397 3.116-2.396 3.115c-.3.42-.24.96.18 1.26.419.3 1.016.298 1.316-.122l2.039-2.636 2.096 2.697c.3.36.899.419 1.318.12.36-.3.42-.84.121-1.259l-2.338-3.115 2.338-3.057c.3-.419.298-1.018-.121-1.318-.48-.3-1.019-.24-1.318.18l-2.096 2.576-2.04-2.695c-.149-.18-.373-.3-.612-.338zM4.613 11.154c1.558 0 2.817 1.26 2.817 2.758 0 1.558-1.259 2.756-2.817 2.756-1.558 0-2.816-1.198-2.816-2.756 0-1.498 1.258-2.758 2.816-2.758zm8.27 0c1.558 0 2.816 1.26 2.816 2.758-.06 1.558-1.318 2.756-2.816 2.756-1.558 0-2.817-1.198-2.817-2.756 0-1.498 1.259-2.758 2.817-2.758Z", "#0061D5"],+ hubspot: ["M18.164 7.93V5.084a2.198 2.198 0 001.267-1.978v-.067A2.2 2.2 0 0017.238.845h-.067a2.2 2.2 0 00-2.193 2.193v.067a2.196 2.196 0 001.252 1.973l.013.006v2.852a6.22 6.22 0 00-2.969 1.31l.012-.01-7.828-6.095A2.497 2.497 0 104.3 4.656l-.012.006 7.697 5.991a6.176 6.176 0 00-1.038 3.446c0 1.343.425 2.588 1.147 3.607l-.013-.02-2.342 2.343a1.968 1.968 0 00-.58-.095h-.002a2.033 2.033 0 102.033 2.033 1.978 1.978 0 00-.1-.595l.005.014 2.317-2.317a6.247 6.247 0 104.782-11.134l-.036-.005zm-.964 9.378a3.206 3.206 0 113.215-3.207v.002a3.206 3.206 0 01-3.207 3.207z", "#FF7A59"],+ huggingface: ["M12.025 1.13c-5.77 0-10.449 4.647-10.449 10.378 0 1.112.178 2.181.503 3.185.064-.222.203-.444.416-.577a.96.96 0 0 1 .524-.15c.293 0 .584.124.84.284.278.173.48.408.71.694.226.282.458.611.684.951v-.014c.017-.324.106-.622.264-.874s.403-.487.762-.543c.3-.047.596.06.787.203s.31.313.4.467c.15.257.212.468.233.542.01.026.653 1.552 1.657 2.54.616.605 1.01 1.223 1.082 1.912.055.537-.096 1.059-.38 1.572.637.121 1.294.187 1.967.187.657 0 1.298-.063 1.921-.178-.287-.517-.44-1.041-.384-1.581.07-.69.465-1.307 1.081-1.913 1.004-.987 1.647-2.513 1.657-2.539.021-.074.083-.285.233-.542.09-.154.208-.323.4-.467a1.08 1.08 0 0 1 .787-.203c.359.056.604.29.762.543s.247.55.265.874v.015c.225-.34.457-.67.683-.952.23-.286.432-.52.71-.694.257-.16.547-.284.84-.285a.97.97 0 0 1 .524.151c.228.143.373.388.43.625l.006.04a10.3 10.3 0 0 0 .534-3.273c0-5.731-4.678-10.378-10.449-10.378M8.327 6.583a1.5 1.5 0 0 1 .713.174 1.487 1.487 0 0 1 .617 2.013c-.183.343-.762-.214-1.102-.094-.38.134-.532.914-.917.71a1.487 1.487 0 0 1 .69-2.803m7.486 0a1.487 1.487 0 0 1 .689 2.803c-.385.204-.536-.576-.916-.71-.34-.12-.92.437-1.103.094a1.487 1.487 0 0 1 .617-2.013 1.5 1.5 0 0 1 .713-.174m-10.68 1.55a.96.96 0 1 1 0 1.921.96.96 0 0 1 0-1.92m13.838 0a.96.96 0 1 1 0 1.92.96.96 0 0 1 0-1.92M8.489 11.458c.588.01 1.965 1.157 3.572 1.164 1.607-.007 2.984-1.155 3.572-1.164.196-.003.305.12.305.454 0 .886-.424 2.328-1.563 3.202-.22-.756-1.396-1.366-1.63-1.32q-.011.001-.02.006l-.044.026-.01.008-.03.024q-.018.017-.035.036l-.032.04a1 1 0 0 0-.058.09l-.014.025q-.049.088-.11.19a1 1 0 0 1-.083.116 1.2 1.2 0 0 1-.173.18q-.035.029-.075.058a1.3 1.3 0 0 1-.251-.243 1 1 0 0 1-.076-.107c-.124-.193-.177-.363-.337-.444-.034-.016-.104-.008-.2.022q-.094.03-.216.087-.06.028-.125.063l-.13.074q-.067.04-.136.086a3 3 0 0 0-.135.096 3 3 0 0 0-.26.219 2 2 0 0 0-.12.121 2 2 0 0 0-.106.128l-.002.002a2 2 0 0 0-.09.132l-.001.001a1.2 1.2 0 0 0-.105.212q-.013.036-.024.073c-1.139-.875-1.563-2.317-1.563-3.203 0-.334.109-.457.305-.454m.836 10.354c.824-1.19.766-2.082-.365-3.194-1.13-1.112-1.789-2.738-1.789-2.738s-.246-.945-.806-.858-.97 1.499.202 2.362c1.173.864-.233 1.45-.685.64-.45-.812-1.683-2.896-2.322-3.295s-1.089-.175-.938.647 2.822 2.813 2.562 3.244-1.176-.506-1.176-.506-2.866-2.567-3.49-1.898.473 1.23 2.037 2.16c1.564.932 1.686 1.178 1.464 1.53s-3.675-2.511-4-1.297c-.323 1.214 3.524 1.567 3.287 2.405-.238.839-2.71-1.587-3.216-.642-.506.946 3.49 2.056 3.522 2.064 1.29.33 4.568 1.028 5.713-.624m5.349 0c-.824-1.19-.766-2.082.365-3.194 1.13-1.112 1.789-2.738 1.789-2.738s.246-.945.806-.858.97 1.499-.202 2.362c-1.173.864.233 1.45.685.64.451-.812 1.683-2.896 2.322-3.295s1.089-.175.938.647-2.822 2.813-2.562 3.244 1.176-.506 1.176-.506 2.866-2.567 3.49-1.898-.473 1.23-2.037 2.16c-1.564.932-1.686 1.178-1.464 1.53s3.675-2.511 4-1.297c.323 1.214-3.524 1.567-3.287 2.405.238.839 2.71-1.587 3.216-.642.506.946-3.49 2.056-3.522 2.064-1.29.33-4.568 1.028-5.713-.624", "#F59E0B"],+ icloud: ["M13.762 4.29a6.51 6.51 0 0 0-5.669 3.332 3.571 3.571 0 0 0-1.558-.36 3.571 3.571 0 0 0-3.516 3A4.918 4.918 0 0 0 0 14.796a4.918 4.918 0 0 0 4.92 4.914 4.93 4.93 0 0 0 .617-.045h14.42c2.305-.272 4.041-2.258 4.043-4.589v-.009a4.594 4.594 0 0 0-3.727-4.508 6.51 6.51 0 0 0-6.511-6.27z", "#3693F3"],+ qq: ["M21.395 15.035a40 40 0 0 0-.803-2.264l-1.079-2.695c.001-.032.014-.562.014-.836C19.526 4.632 17.351 0 12 0S4.474 4.632 4.474 9.241c0 .274.013.804.014.836l-1.08 2.695a39 39 0 0 0-.802 2.264c-1.021 3.283-.69 4.643-.438 4.673.54.065 2.103-2.472 2.103-2.472 0 1.469.756 3.387 2.394 4.771-.612.188-1.363.479-1.845.835-.434.32-.379.646-.301.778.343.578 5.883.369 7.482.189 1.6.18 7.14.389 7.483-.189.078-.132.132-.458-.301-.778-.483-.356-1.233-.646-1.846-.836 1.637-1.384 2.393-3.302 2.393-4.771 0 0 1.563 2.537 2.103 2.472.251-.03.581-1.39-.438-4.673", "#1EBAFC"]};-var siMarks = Object.fromEntries(Object.entries(SI).map(([id, d]) => [id, mark(path(d))]));-var SLACK_DROP = "M11.2 7H8.9A2.3 2.3 0 1 0 11.2 4.7V7Z";+var siMarks = Object.fromEntries(Object.entries(SI).map(([id, [d, fill2]]) => [id, mark(path(d, fill2))]));+var AtlassianMark = mark(+ path("M7.12 11.084a.683.683 0 00-1.16.126L.075 22.974a.703.703 0 00.63 1.018h8.19a.678.678 0 00.63-.39c1.767-3.65.696-9.203-2.406-12.52z", "#2684FF"),+ path("M11.434.386a15.515 15.515 0 00-.906 15.317l3.95 7.9a.703.703 0 00.628.388h8.19a.703.703 0 00.63-1.017L12.63.38a.664.664 0 00-1.196.006z", "#0052CC")+);+var CloudflareMark = mark(+ path("M16.5088 16.8447c.1475-.5068.0908-.9707-.1553-1.3154-.2246-.3164-.6045-.499-1.0615-.5205l-8.6592-.1123a.1559.1559 0 0 1-.1333-.0713c-.0283-.042-.0351-.0986-.021-.1553.0278-.084.1123-.1484.2036-.1562l8.7359-.1123c1.0351-.0489 2.1601-.8868 2.5537-1.9136l.499-1.3013c.0215-.0561.0293-.1128.0147-.168-.5625-2.5463-2.835-4.4453-5.5499-4.4453-2.5039 0-4.6284 1.6177-5.3876 3.8614-.4927-.3658-1.1187-.5625-1.794-.499-1.2026.119-2.1665 1.083-2.2861 2.2856-.0283.31-.0069.6128.0635.894C1.5683 13.171 0 14.7754 0 16.752c0 .1748.0142.3515.0352.5273.0141.083.0844.1475.1689.1475h15.9814c.0909 0 .1758-.0645.2032-.1553l.12-.4268z", "#F38020"),+ path("M19.2656 11.2813c-.0771 0-.1611 0-.2383.0112-.0566 0-.1054.0415-.127.0976l-.3378 1.1744c-.1475.5068-.0918.9707.1543 1.3164.2256.3164.6055.498 1.0625.5195l1.8437.1133c.0557 0 .1055.0263.1329.0703.0283.043.0351.1074.0214.1562-.0283.084-.1132.1485-.204.1553l-1.921.1123c-1.041.0488-2.1582.8867-2.5527 1.914l-.1406.3585c-.0283.0713.0215.1416.0986.1416h6.5977c.0771 0 .1474-.0489.169-.126.1122-.4082.1757-.837.1757-1.2803 0-2.6025-2.125-4.727-4.7344-4.727", "#FAAE40")+);+var PaypalMark = mark(+ path("M15.607 4.653H8.941L6.645 19.251H1.82L4.862 0h7.995c3.754 0 6.375 2.294 6.473 5.513-.648-.478-2.105-.86-3.722-.86Z", "#1557C0"),+ path("M22.178 10.199c0 3.41-3.01 6.853-6.958 6.853h-2.493L11.595 24H6.74l1.845-11.538h3.592c4.208 0 7.346-3.634 7.153-6.949a5.24 5.24 0 0 1 2.848 4.686Z", "#2997FF"),+ path("M9.653 5.546h6.408c.907 0 1.942.222 2.363.541-.195 2.741-2.655 5.483-6.441 5.483H8.714Z", "#00457C")+);+var AirtableMark = mark(+ path("M11.992 1.966c-.434 0-.87.086-1.28.257L1.779 5.917c-.503.208-.49.908.012 1.116l8.982 3.558a3.266 3.266 0 0 0 2.454 0l8.982-3.558c.503-.196.503-.908.012-1.116l-8.957-3.694a3.255 3.255 0 0 0-1.272-.257z", "#FCB400"),+ path("M23.4 8.056a.589.589 0 0 0-.222.045l-10.012 3.877a.612.612 0 0 0-.38.564v8.896a.6.6 0 0 0 .821.552L23.62 18.1a.583.583 0 0 0 .38-.551V8.653a.6.6 0 0 0-.6-.596z", "#18BFFF"),+ path("M.676 8.095a.644.644 0 0 0-.48.19C.086 8.396 0 8.53 0 8.69v8.355c0 .442.515.737.908.54l6.27-3.006.307-.147 2.969-1.436c.466-.22.43-.908-.061-1.092L.883 8.138a.57.57 0 0 0-.207-.044z", "#F82B60")+);+var ClickupMark = mark(+ path("M2 18.439l3.69-2.828c1.961 2.56 4.044 3.739 6.363 3.739 2.307 0 4.33-1.166 6.203-3.704L22 18.405C19.298 22.065 15.941 24 12.053 24 8.178 24 4.788 22.078 2 18.439z", "#49CCF9"),+ path("M12.04 6.15l-6.568 5.66-3.036-3.52L12.055 0l9.543 8.296-3.05 3.509z", "#7B68EE")+);+var FigmaMark = mark(+ path("M8.4 1.2h3.6v7.2H8.4a3.6 3.6 0 1 1 0-7.2Z", "#F24E1E"),+ path("M12 1.2h3.6a3.6 3.6 0 1 1 0 7.2H12V1.2Z", "#FF7262"),+ path("M8.4 8.4h3.6v7.2H8.4a3.6 3.6 0 1 1 0-7.2Z", "#A259FF"),- (0, import_react24.createElement)("circle", { cx: 15.6, cy: 12, r: 3.6, fill: "#1ABCFE" }),++ (0, import_react25.createElement)("circle", { cx: 15.6, cy: 12, r: 3.6, fill: "#1ABCFE" }),+ path("M8.4 15.6h3.6v3.6a3.6 3.6 0 1 1-3.6-3.6Z", "#0ACF83")+);+var GmailMark = mark(+ path("M0 5.457v13.909c0 .904.732 1.636 1.636 1.636h3.819V11.73L0 7.64V5.457Z", "#4285F4"),+ path("M24 5.457v13.909c0 .904-.732 1.636-1.636 1.636h-3.819V11.73L24 7.64V5.457Z", "#34A853"),+ path("M18.545 4.64v7.09L24 7.64V5.457c0-2.023-2.31-3.177-3.927-1.964L18.545 4.64Z", "#FBBC04"),+ path("M5.455 4.64v7.09L12 16.64l6.545-4.91V4.64L12 9.548 5.455 4.64Z", "#EA4335"),+ path("M0 5.457v2.183l5.455 4.09V4.64L3.927 3.493C2.309 2.28 0 3.434 0 5.457Z", "#C5221F")+);+var SLACK_QUAD = [[0, "#36C5F0"], [90, "#2EB67D"], [180, "#ECB22E"], [270, "#E01E5A"]];var SlackMark = () => svg(- SLACK_QUAD.map(([a, fill2]) => (0, import_react24.createElement)(- [0, 90, 180, 270].map((a) => (0, import_react25.createElement)(++ SLACK_QUAD.map(([a, fill2]) => (0, import_react25.createElement)("g",- { key: a, transform: `rotate(${a} 12 12)` },- path(SLACK_DROP),- (0, import_react25.createElement)("rect", { x: 2.6, y: 8.2, width: 7.6, height: 4.4, rx: 2.2 })+ { key: a, transform: `rotate(${a} 12 12)`, fill: fill2 },- (0, import_react24.createElement)("path", { d: "M9.3 1.8a1.9 1.9 0 0 0 0 3.8h1.9V3.7a1.9 1.9 0 0 0-1.9-1.9Z" }),- (0, import_react24.createElement)("rect", { x: 1.8, y: 7.4, width: 9.4, height: 3.8, rx: 1.9 })++ (0, import_react25.createElement)("path", { d: "M9.3 1.8a1.9 1.9 0 0 0 0 3.8h1.9V3.7a1.9 1.9 0 0 0-1.9-1.9Z" }),++ (0, import_react25.createElement)("rect", { x: 1.8, y: 7.4, width: 9.4, height: 3.8, rx: 1.9 }))));-var CanvaMark = mark((0, import_react25.createElement)("path", { d: "M17.6 7.6C14.9 4.8 10.4 4.5 7.4 7.6 4.2 10.9 4.7 16.2 8.6 18.6c3 1.9 7.4 1.4 9.5-1.1", fill: "none", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round" }));+var CanvaMark = mark(+ path("M17.8 7.5A6.8 6.8 0 0 0 6.8 9.2c-1.5 3.6-.1 7.8 3.4 9.3a6.8 6.8 0 0 0 7.6-1.8", "none"),- (0, import_react24.createElement)("path", { d: "M17.8 7.5A6.8 6.8 0 0 0 6.8 9.2", stroke: "#00C4CC", strokeWidth: 3.2, strokeLinecap: "round" }),- (0, import_react24.createElement)("path", { d: "M6.8 9.2c-1.5 3.6-.1 7.8 3.4 9.3a6.8 6.8 0 0 0 7.6-1.8", stroke: "#7D2AE8", strokeWidth: 3.2, strokeLinecap: "round" })++ (0, import_react25.createElement)("path", { d: "M17.8 7.5A6.8 6.8 0 0 0 6.8 9.2", stroke: "#00C4CC", strokeWidth: 3.2, strokeLinecap: "round" }),++ (0, import_react25.createElement)("path", { d: "M6.8 9.2c-1.5 3.6-.1 7.8 3.4 9.3a6.8 6.8 0 0 0 7.6-1.8", stroke: "#7D2AE8", strokeWidth: 3.2, strokeLinecap: "round" })+);var MondayMark = () => svg(- (0, import_react24.createElement)("path", { d: "M4.6 17.2L8.8 7.2", stroke: "#FF3D57", strokeWidth: 4.4, strokeLinecap: "round" }),- (0, import_react24.createElement)("path", { d: "M12.2 17.2L16.4 7.2", stroke: "#FFCB00", strokeWidth: 4.4, strokeLinecap: "round" }),- (0, import_react24.createElement)("circle", { cx: 19.6, cy: 17.2, r: 2.3, fill: "#00CA72" })- (0, import_react25.createElement)("path", { d: "M5.2 3.4L8 14.8 13.8 18.6", fill: "none", stroke: "currentColor", strokeWidth: 4, strokeLinecap: "round", strokeLinejoin: "round" }),- (0, import_react25.createElement)("path", { d: "M13.4 6.2L17.8 13.6", fill: "none", stroke: "currentColor", strokeWidth: 4, strokeLinecap: "round" }),- (0, import_react25.createElement)("circle", { cx: 18.6, cy: 19.2, r: 2.5 })++ (0, import_react25.createElement)("path", { d: "M4.6 17.2L8.8 7.2", stroke: "#FF3D57", strokeWidth: 4.4, strokeLinecap: "round" }),++ (0, import_react25.createElement)("path", { d: "M12.2 17.2L16.4 7.2", stroke: "#FFCB00", strokeWidth: 4.4, strokeLinecap: "round" }),++ (0, import_react25.createElement)("circle", { cx: 19.6, cy: 17.2, r: 2.3, fill: "#00CA72" }));- var AttioMark = mark((0, import_react24.createElement)(+ var AttioMark = mark((0, import_react25.createElement)("g",{ transform: "translate(3 0) skewX(-15)" },- (0, import_react24.createElement)("rect", { x: 4.4, y: 3.4, width: 4.4, height: 17.2, rx: 1.2, fill: "var(--bt-mark-ink)" }),- (0, import_react24.createElement)("rect", { x: 13.4, y: 3.4, width: 4.4, height: 17.2, rx: 1.2, fill: "#6366F1" })- (0, import_react25.createElement)("rect", { x: 4.4, y: 3.4, width: 4.4, height: 17.2, rx: 1.2 }),- (0, import_react25.createElement)("rect", { x: 13.4, y: 3.4, width: 4.4, height: 17.2, rx: 1.2 })++ (0, import_react25.createElement)("rect", { x: 4.4, y: 3.4, width: 4.4, height: 17.2, rx: 1.2, fill: "var(--bt-mark-ink)" }),++ (0, import_react25.createElement)("rect", { x: 13.4, y: 3.4, width: 4.4, height: 17.2, rx: 1.2, fill: "#6366F1" })));var ExaMark = () => svg(- (0, import_react24.createElement)("rect", { x: 4.2, y: 4.2, width: 15.6, height: 15.6, rx: 1.5, stroke: "#254BF6", strokeWidth: 2.1 }),- (0, import_react24.createElement)("path", { d: "M5.6 5.6L11 12 5.6 18.4M18.4 5.6L11 12 18.4 18.4", stroke: "#254BF6", strokeWidth: 2.1 })- (0, import_react25.createElement)("rect", { x: 4.7, y: 4.7, width: 14.6, height: 14.6, fill: "none", stroke: "currentColor", strokeWidth: 1.9 }),- (0, import_react25.createElement)("path", { d: "M6 6L10.9 12 6 18M18 6L10.9 12 18 18", fill: "none", stroke: "currentColor", strokeWidth: 1.9 })++ (0, import_react25.createElement)("rect", { x: 4.2, y: 4.2, width: 15.6, height: 15.6, rx: 1.5, stroke: "#254BF6", strokeWidth: 2.1 }),++ (0, import_react25.createElement)("path", { d: "M5.6 5.6L11 12 5.6 18.4M18.4 5.6L11 12 18.4 18.4", stroke: "#254BF6", strokeWidth: 2.1 }));var HEX = (cx, cy, r) => `M${cx} ${cy - r}l${r * 0.87} ${r * 0.5}v${r}l-${r * 0.87} ${r * 0.5}l-${r * 0.87}-${r * 0.5}v-${r}l${r * 0.87}-${r * 0.5}z`;-var DeepwikiMark = mark(path(HEX(7.2, 6.9, 4.4)) + HEX(7.2, 17.1, 4.4) + HEX(15.6, 12, 4.4));+var DeepwikiMark = mark(+ path(HEX(7.2, 6.9, 4.4) + HEX(7.2, 17.1, 4.4), "#2B7FFF"),+ path(HEX(15.6, 12, 4.4), "#0D9488")+);- var Context7Mark = () => (0, import_react24.createElement)(+ var Context7Mark = () => (0, import_react25.createElement)("svg",- { width: 20, height: 20, viewBox: "0 0 28 28", fill: "currentColor", "aria-hidden": true },- path("M10.5724 15.2565C10.5724 17.5025 9.6613 19.3778 8.17805 21.1047H11.6319L11.6319 22.7786H6.33459V21.1895C7.95557 19.3566 8.58065 17.8628 8.58065 15.2565L10.5724 15.2565Z"),- path("M17.4276 15.2565C17.4276 17.5025 18.3387 19.3778 19.822 21.1047H16.3681V22.7786H21.6654V21.1895C20.0444 19.3566 19.4194 17.8628 19.4194 15.2565H17.4276Z"),- path("M10.5724 12.7435C10.5724 10.4975 9.66131 8.62224 8.17807 6.89532L11.6319 6.89532V5.22137L6.33461 5.22137V6.81056C7.95558 8.64343 8.58066 10.1373 8.58066 12.7435L10.5724 12.7435Z"),- path("M17.4276 12.7435C17.4276 10.4975 18.3387 8.62224 19.822 6.89532L16.3681 6.89532L16.3681 5.22138L21.6654 5.22138V6.81056C20.0444 8.64343 19.4194 10.1373 19.4194 12.7435H17.4276Z")+ { width: 20, height: 20, viewBox: "0 0 28 28", fill: "#059669", "aria-hidden": true },- (0, import_react24.createElement)("path", { d: "M10.5724 15.2565C10.5724 17.5025 9.6613 19.3778 8.17805 21.1047H11.6319L11.6319 22.7786H6.33459V21.1895C7.95557 19.3566 8.58065 17.8628 8.58065 15.2565L10.5724 15.2565Z" }),- (0, import_react24.createElement)("path", { d: "M17.4276 15.2565C17.4276 17.5025 18.3387 19.3778 19.822 21.1047H16.3681V22.7786H21.6654V21.1895C20.0444 19.3566 19.4194 17.8628 19.4194 15.2565H17.4276Z" }),- (0, import_react24.createElement)("path", { d: "M10.5724 12.7435C10.5724 10.4975 9.66131 8.62224 8.17807 6.89532L11.6319 6.89532V5.22137L6.33461 5.22137V6.81056C7.95558 8.64343 8.58066 10.1373 8.58066 12.7435L10.5724 12.7435Z" }),- (0, import_react24.createElement)("path", { d: "M17.4276 12.7435C17.4276 10.4975 18.3387 8.62224 19.822 6.89532L16.3681 6.89532L16.3681 5.22138L21.6654 5.22138V6.81056C20.0444 8.64343 19.4194 10.1373 19.4194 12.7435H17.4276Z" })++ (0, import_react25.createElement)("path", { d: "M10.5724 15.2565C10.5724 17.5025 9.6613 19.3778 8.17805 21.1047H11.6319L11.6319 22.7786H6.33459V21.1895C7.95557 19.3566 8.58065 17.8628 8.58065 15.2565L10.5724 15.2565Z" }),++ (0, import_react25.createElement)("path", { d: "M17.4276 15.2565C17.4276 17.5025 18.3387 19.3778 19.822 21.1047H16.3681V22.7786H21.6654V21.1895C20.0444 19.3566 19.4194 17.8628 19.4194 15.2565H17.4276Z" }),++ (0, import_react25.createElement)("path", { d: "M10.5724 12.7435C10.5724 10.4975 9.66131 8.62224 8.17807 6.89532L11.6319 6.89532V5.22137L6.33461 5.22137V6.81056C7.95558 8.64343 8.58066 10.1373 8.58066 12.7435L10.5724 12.7435Z" }),++ (0, import_react25.createElement)("path", { d: "M17.4276 12.7435C17.4276 10.4975 18.3387 8.62224 19.822 6.89532L16.3681 6.89532L16.3681 5.22138L21.6654 5.22138V6.81056C20.0444 8.64343 19.4194 10.1373 19.4194 12.7435H17.4276Z" }));var MslearnMark = () => svg(- (0, import_react24.createElement)("rect", { x: 2.5, y: 2.5, width: 8.75, height: 8.75, fill: "#F25022" }),- (0, import_react24.createElement)("rect", { x: 12.75, y: 2.5, width: 8.75, height: 8.75, fill: "#7FBA00" }),- (0, import_react24.createElement)("rect", { x: 2.5, y: 12.75, width: 8.75, height: 8.75, fill: "#00A4EF" }),- (0, import_react24.createElement)("rect", { x: 12.75, y: 12.75, width: 8.75, height: 8.75, fill: "#FFB900" })- (0, import_react25.createElement)("rect", { x: 2.5, y: 2.5, width: 8.75, height: 8.75 }),- (0, import_react25.createElement)("rect", { x: 12.75, y: 2.5, width: 8.75, height: 8.75 }),- (0, import_react25.createElement)("rect", { x: 2.5, y: 12.75, width: 8.75, height: 8.75 }),- (0, import_react25.createElement)("rect", { x: 12.75, y: 12.75, width: 8.75, height: 8.75 })++ (0, import_react25.createElement)("rect", { x: 2.5, y: 2.5, width: 8.75, height: 8.75, fill: "#F25022" }),++ (0, import_react25.createElement)("rect", { x: 12.75, y: 2.5, width: 8.75, height: 8.75, fill: "#7FBA00" }),++ (0, import_react25.createElement)("rect", { x: 2.5, y: 12.75, width: 8.75, height: 8.75, fill: "#00A4EF" }),++ (0, import_react25.createElement)("rect", { x: 12.75, y: 12.75, width: 8.75, height: 8.75, fill: "#FFB900" })+);+var AmapMark = mark(+ path("M20.6 3.4L2.4 11.9l6.7 2.5L20.6 3.4Z", "#42A5F5"),+ path("M20.6 3.4L9.1 14.4l1.1 5.8 3.2-3.7 7.2-13.1Z", "#1565C0"),+ path("M20.6 3.4l-7.2 13.1 4.8 3.9 2.4-17Z", "#1E88E5"));-var AmapMark = mark(path("M12 2.9L19.6 20.8 12.9 16.8 12 14.9 11.1 16.8 4.4 20.8Z"));-var EnvelopeMark = () => svg(- (0, import_react25.createElement)("rect", { x: 2.4, y: 5.2, width: 19.2, height: 13.6, rx: 2.4 }),- (0, import_react25.createElement)("path", { d: "M4.2 7.4L12 13.6 19.8 7.4", fill: "none", stroke: "var(--bt-card)", strokeWidth: 1.7, strokeLinecap: "round", strokeLinejoin: "round" })+var envelope = (fill2) => mark(+ path("M3.2 5.2h17.6c.7 0 1.3.4 1.6 1L12 13.4 1.6 6.2c.3-.6.9-1 1.6-1Z", fill2),+ path("M1.6 8.2l9.7 6.7a1.2 1.2 0 0 0 1.4 0l9.7-6.7v8.6a2 2 0 0 1-2 2H3.6a2 2 0 0 1-2-2V8.2Z", fill2));+var EnvelopeBlue = envelope("#3B82F6");+var EnvelopeRed = envelope("#E60012");var MARKS = {- github: GitHubMark,+ github: GithubBrandMark,...siMarks,- "cloudflare-docs": siMarks.cloudflare,+ atlassian: AtlassianMark,+ cloudflare: CloudflareMark,+ "cloudflare-docs": CloudflareMark,+ paypal: PaypalMark,+ airtable: AirtableMark,+ clickup: ClickupMark,+ figma: FigmaMark,slack: SlackMark,canva: CanvaMark,monday: MondayMark,@@@ -10817,68 -11237,62 +11339,68 @@@ var import_react26 = require("react")var TOKEN_URL = "https://github.com/settings/personal-access-tokens/new";function ConnectorMark({ connector }) {const Mark2 = MARKS[connector.id];- if (Mark2) return (0, import_react25.createElement)(Mark2);+ if (Mark2) return (0, import_react26.createElement)(Mark2);let hash = 0;for (const ch of String(connector.id)) hash = hash * 31 + ch.charCodeAt(0) >>> 0;- return (0, import_react25.createElement)("span", { className: "bt-connector-mono", style: { "--bt-hue": hash % 360 }, "aria-hidden": true }, (connector.name ?? "?").slice(0, 1).toUpperCase());+ return (0, import_react26.createElement)("span", { className: "bt-connector-mono", style: { "--bt-hue": hash % 360 }, "aria-hidden": true }, (connector.name ?? "?").slice(0, 1).toUpperCase());}-var CATEGORIES = ["dev", "docs", "work", "design", "data", "commerce", "search"];-var CATEGORY_LABEL = { dev: "Developer", docs: "Docs & files", work: "Work", design: "Design", data: "Data", commerce: "Commerce", search: "Search" };function statusText2(connector) {if (connector.state === "connecting") return connector.pending ? t("Waiting for sign-in…") : t("Connecting…");if (connector.state === "needs-sign-in") return t("Sign in again");if (connector.state === "needs-client") return t("This service needs an app client ID");if (connector.state === "error") return t("Could not connect: {error}", { error: connector.error ?? "" });- if (connector.state === "ready") return connector.account ? t("Connected as {account}", { account: connector.account }) : t("Connected");- return connector.about ?? "";+ if (connector.state === "ready") {+ const who = connector.account ? t("Connected as {account}", { account: connector.account }) : t("Connected");+ return connector.tools > 0 ? `${who} · ${t("{count} tools", { count: connector.tools })}` : who;+ }+ return connector.about ? t(connector.about) : "";}function BrowserPanel({ connector, actions, run: run2 }) {- const [pasting, setPasting] = (0, import_react25.useState)(false);- const [input, setInput] = (0, import_react25.useState)("");- return (0, import_react25.createElement)(++ const [pasting, setPasting] = (0, import_react26.useState)(false);+ const [input, setInput] = (0, import_react26.useState)("");+ return (0, import_react26.createElement)("div",{ className: "bt-connector-form" },- (0, import_react25.createElement)(+ (0, import_react26.createElement)("div",{ className: "bt-connector-form-row" },- (0, import_react25.createElement)("span", { className: "bt-connector-wait" }, t("Finish signing in in your browser.")),- (0, import_react25.createElement)("button", { type: "button", className: "bt-connector-link", onClick: () => openPage(connector.pending.url) }, t("Open again")),- (0, import_react25.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => void run2(actions.connectorCancel(connector.id)) }, t("Cancel"))- (0, import_react26.createElement)("a", { className: "bt-connector-link", href: connector.pending.url, target: "_blank", rel: "noopener noreferrer" }, t("Open the sign-in page")),++ (0, import_react26.createElement)("span", { className: "bt-connector-wait" }, t("Finish signing in in your browser.")),++ (0, import_react26.createElement)("button", { type: "button", className: "bt-connector-link", onClick: () => openPage(connector.pending.url) }, t("Open again")),+ (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => void run2(actions.connectorCancel(connector.id)) }, t("Cancel"))),- pasting ? (0, import_react25.createElement)(- (0, import_react26.createElement)("input", { className: "bt-input", "aria-label": t("Paste the address you land on"), placeholder: t("Or paste the address you land on"), value: input, spellCheck: false, autoComplete: "off", onChange: (e) => setInput(e.target.value) }),- input.trim() !== "" ? (0, import_react26.createElement)(++ pasting ? (0, import_react26.createElement)("div",{ className: "bt-connector-form-row" },- (0, import_react25.createElement)("input", { className: "bt-input", "aria-label": t("Paste the address you land on"), placeholder: t("Paste the address you land on"), value: input, spellCheck: false, autoComplete: "off", autoFocus: true, onChange: (e) => setInput(e.target.value) }),- (0, import_react25.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: input.trim() === "", onClick: () => void run2(actions.connectorSignInCode(connector.id, input.trim())) }, t("Finish sign-in"))- ) : (0, import_react25.createElement)("button", { type: "button", className: "bt-connector-link bt-connector-aside", onClick: () => setPasting(true) }, t("Did not come back here?"))- (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => void run2(actions.connectorSignInCode(connector.id, input.trim())) }, t("Finish sign-in"))- ) : null++ (0, import_react26.createElement)("input", { className: "bt-input", "aria-label": t("Paste the address you land on"), placeholder: t("Paste the address you land on"), value: input, spellCheck: false, autoComplete: "off", autoFocus: true, onChange: (e) => setInput(e.target.value) }),++ (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: input.trim() === "", onClick: () => void run2(actions.connectorSignInCode(connector.id, input.trim())) }, t("Finish sign-in"))++ ) : (0, import_react26.createElement)("button", { type: "button", className: "bt-connector-link bt-connector-aside", onClick: () => setPasting(true) }, t("Did not come back here?")));}function DevicePanel({ connector, actions, run: run2, onUseToken }) {+ const { userCode, verificationUri } = connector.pending;- const [copied, setCopied] = (0, import_react25.useState)(false);+ const [copied, setCopied] = (0, import_react26.useState)(false);+ const copy2 = () => {+ void navigator.clipboard?.writeText(userCode).then(() => {+ setCopied(true);+ setTimeout(() => setCopied(false), 1600);+ });+ };- return (0, import_react25.createElement)(+ return (0, import_react26.createElement)("div",{ className: "bt-connector-form" },- (0, import_react25.createElement)(+ (0, import_react26.createElement)("div",{ className: "bt-connector-device" },- (0, import_react25.createElement)("code", { className: "bt-connector-code" }, userCode),- (0, import_react25.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: copy2 }, copied ? t("Copied") : t("Copy"))- (0, import_react26.createElement)("code", { className: "bt-connector-code" }, connector.pending.userCode),- (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => {- void navigator.clipboard?.writeText(connector.pending.userCode).then(() => {- setCopied(true);- setTimeout(() => setCopied(false), 1600);- });- } }, copied ? t("Copied") : t("Copy"))++ (0, import_react26.createElement)("code", { className: "bt-connector-code" }, userCode),++ (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: copy2 }, copied ? t("Copied") : t("Copy"))),- (0, import_react25.createElement)(+ (0, import_react26.createElement)("div",{ className: "bt-connector-form-row" },- (0, import_react25.createElement)("span", { className: "bt-connector-wait" }, t("Paste the code on {host} and authorize.", { host: verificationUri.replace(/^https?:\/\//, "") })),- (0, import_react25.createElement)("button", { type: "button", className: "bt-connector-link", onClick: () => openPage(verificationUri) }, t("Open again")),- connector.auth?.token === true && onUseToken ? (0, import_react25.createElement)("button", { type: "button", className: "bt-connector-link", onClick: () => void run2(actions.connectorCancel(connector.id), onUseToken) }, t("Use a token instead")) : null,- (0, import_react25.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => void run2(actions.connectorCancel(connector.id)) }, t("Cancel"))- (0, import_react26.createElement)("a", { className: "bt-connector-link", href: connector.pending.verificationUri, target: "_blank", rel: "noopener noreferrer" }, t("Open {host}", { host: connector.pending.verificationUri.replace(/^https?:\/\//, "") })),++ (0, import_react26.createElement)("span", { className: "bt-connector-wait" }, t("Paste the code on {host} and authorize.", { host: verificationUri.replace(/^https?:\/\//, "") })),++ (0, import_react26.createElement)("button", { type: "button", className: "bt-connector-link", onClick: () => openPage(verificationUri) }, t("Open again")),+ connector.auth?.token === true && onUseToken ? (0, import_react26.createElement)("button", { type: "button", className: "bt-connector-link", onClick: () => void run2(actions.connectorCancel(connector.id), onUseToken) }, t("Use a token instead")) : null,+ (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => void run2(actions.connectorCancel(connector.id)) }, t("Cancel"))));}@@@ -10908,97 -11322,78 +11430,97 @@@ function TokenPanel({ connector, actiononDone?.();});};- return (0, import_react25.createElement)(+ return (0, import_react26.createElement)("div",{ className: "bt-connector-form" },- (0, import_react25.createElement)("label", { className: "bt-q-field bt-secret-field" }, (0, import_react25.createElement)(MaskedInput, { value: token, onChange: setToken, onEnter: connect, label: isKey ? t("{name} key", { name: connector.name }) : t("{name} token", { name: connector.name }), autoFocus: true })),- (0, import_react25.createElement)(+ (0, import_react26.createElement)("label", { className: "bt-q-field bt-secret-field" }, (0, import_react26.createElement)(MaskedInput, { value: token, onChange: setToken, onEnter: connect, label: isKey ? t("{name} key", { name: connector.name }) : t("{name} token", { name: connector.name }), autoFocus: true })),+ (0, import_react26.createElement)("div",{ className: "bt-connector-form-row" },- connector.id === "github" ? (0, import_react25.createElement)("a", { className: "bt-connector-link", href: TOKEN_URL, target: "_blank", rel: "noopener noreferrer" }, t("Create a token on GitHub")) : connector.auth?.keyUrl ? (0, import_react25.createElement)("a", { className: "bt-connector-link", href: connector.auth.keyUrl, target: "_blank", rel: "noopener noreferrer" }, t("Get a key")) : (0, import_react25.createElement)("span", { className: "bt-connector-wait" }),- (0, import_react25.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: onDone }, t("Cancel")),- (0, import_react25.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: token.trim() === "", onClick: connect }, t("Connect"))- connector.id === "github" ? (0, import_react26.createElement)("a", { className: "bt-connector-link", href: TOKEN_URL, target: "_blank", rel: "noopener noreferrer" }, t("Create a token on GitHub")) : connector.auth?.keyUrl ? (0, import_react26.createElement)("a", { className: "bt-connector-link", href: connector.auth.keyUrl, target: "_blank", rel: "noopener noreferrer" }, t("Get a key")) : (0, import_react26.createElement)("span", { className: "bt-connector-link" }),++ connector.id === "github" ? (0, import_react26.createElement)("a", { className: "bt-connector-link", href: TOKEN_URL, target: "_blank", rel: "noopener noreferrer" }, t("Create a token on GitHub")) : connector.auth?.keyUrl ? (0, import_react26.createElement)("a", { className: "bt-connector-link", href: connector.auth.keyUrl, target: "_blank", rel: "noopener noreferrer" }, t("Get a key")) : (0, import_react26.createElement)("span", { className: "bt-connector-wait" }),+ (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: onDone }, t("Cancel")),+ (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: token.trim() === "", onClick: connect }, t("Connect"))));}+var openSignIn = (win, id, view) => {+ const pending = view?.connectors?.find((entry) => entry.id === id)?.pending;+ if (pending?.kind === "browser") return void win.go(pending.url);+ if (pending?.kind === "device") {+ void navigator.clipboard?.writeText(pending.userCode).catch(() => {+ });+ return void win.go(pending.verificationUri);+ }+ win.close();+};function ConnectorRow({ connector, actions }) {- const [form, setForm] = (0, import_react25.useState)(null);- const [busy, setBusy] = (0, import_react25.useState)(false);- const [error, setError] = (0, import_react25.useState)(null);+ const [form, setForm] = (0, import_react26.useState)(null);+ const [busy, setBusy] = (0, import_react26.useState)(false);+ const [error, setError] = (0, import_react26.useState)(null);- const run2 = (task, after) => {+ const run2 = (task, after, failed) => {setBusy(true);setError(null);- return Promise.resolve(task).then(() => {- after?.();- }, (failure) => setError(failure?.message ?? String(failure))).finally(() => setBusy(false));+ return Promise.resolve(task).then((value) => {+ after?.(value);+ }, (failure) => {+ failed?.();+ setError(failure?.message ?? String(failure));+ }).finally(() => setBusy(false));};const on = connector.state !== "off" && connector.state !== "needs-client";const pending = connector.pending;- const row = (0, import_react25.useRef)(null);+ const row = (0, import_react26.useRef)(null);useMorph(row, `${form}:${error !== null}:${connector.state}:${pending?.kind ?? ""}`);+ const signIn = () => {+ const win = reserveWindow();+ void run2(actions.connectorConnect(connector.id, {}), (view) => openSignIn(win, connector.id, view), () => win.close());+ };const connect = () => {if (connector.auth?.kind === "none") return void run2(actions.connectorConnect(connector.id, {}));if (connector.auth?.kind === "key") return setForm("token");- if (connector.auth?.kind === "oauth") {- if (connector.auth.client?.id || !connector.auth.token) return void run2(actions.connectorConnect(connector.id, {}));- return setForm("token");- }+ if (connector.auth?.kind === "oauth") return connector.auth.client?.id || !connector.auth.token ? signIn() : setForm("token");return void 0;};- const button = (label, onClick) => (0, import_react25.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: busy, onClick }, label);++ const button = (label, onClick) => (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: busy, onClick }, label);+ let actionsNode = null;+ if (pending || form) actionsNode = null;+ else if (connector.state === "needs-sign-in") actionsNode = [button(t("Sign in again"), signIn), button(t("Disconnect"), () => void run2(actions.connectorDisconnect(connector.id)))];+ else if (connector.state === "error") actionsNode = [button(t("Try again"), () => void run2(actions.connectorRetry(connector.id))), button(connector.custom ? t("Remove") : t("Disconnect"), () => void run2(actions.connectorDisconnect(connector.id)))];+ else if (on) actionsNode = button(connector.custom ? t("Remove") : t("Disconnect"), () => void run2(actions.connectorDisconnect(connector.id)));+ else {+ actionsNode = [- connector.auth?.kind === "oauth" && connector.auth.token === true && connector.auth.client?.id ? (0, import_react25.createElement)("button", { key: "token", type: "button", className: "bt-connector-link", disabled: busy, onClick: () => setForm("token") }, t("Use a token instead")) : null,- (0, import_react25.createElement)("button", { key: "connect", type: "button", className: "bt-soft bt-soft-sm", disabled: busy, onClick: connect }, busy ? t("Connecting…") : t("Connect"))++ connector.auth?.kind === "oauth" && connector.auth.token === true && connector.auth.client?.id ? (0, import_react26.createElement)("button", { key: "token", type: "button", className: "bt-connector-link", disabled: busy, onClick: () => setForm("token") }, t("Use a token instead")) : null,++ (0, import_react26.createElement)("button", { key: "connect", type: "button", className: "bt-soft bt-soft-sm", disabled: busy, onClick: connect }, busy ? t("Connecting…") : t("Connect"))+ ];+ }- return (0, import_react25.createElement)(+ return (0, import_react26.createElement)("div",{ ref: row, className: "bt-connector", "data-state": connector.state },- (0, import_react25.createElement)(+ (0, import_react26.createElement)("div",{ className: "bt-connector-head" },- (0, import_react25.createElement)("span", { className: "bt-connector-mark" }, (0, import_react25.createElement)(ConnectorMark, { connector })),- (0, import_react25.createElement)(+ (0, import_react26.createElement)("span", { className: "bt-connector-mark" }, (0, import_react26.createElement)(ConnectorMark, { connector })),+ (0, import_react26.createElement)("span",{ className: "bt-connector-text" },- (0, import_react25.createElement)("span", { className: "bt-connector-name" }, connector.name, connector.custom ? (0, import_react25.createElement)("span", { className: "bt-tag" }, t("Added")) : null),- (0, import_react25.createElement)("span", { className: "bt-connector-status" }, statusText2(connector))+ (0, import_react26.createElement)("span", { className: "bt-connector-name" }, connector.name, connector.custom ? (0, import_react26.createElement)("span", { className: "bt-tag" }, t("Added")) : null),- (0, import_react26.createElement)("span", { className: "bt-connector-status" }, t(statusText2(connector)))++ (0, import_react26.createElement)("span", { className: "bt-connector-status" }, statusText2(connector))),- actionsNode ? (0, import_react25.createElement)("span", { className: "bt-connector-actions" }, actionsNode) : null- (0, import_react26.createElement)(- "span",- { className: "bt-connector-actions" },- connector.state === "error" || connector.state === "needs-sign-in" ? (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: busy, onClick: () => void run2(actions.connectorRetry(connector.id)) }, connector.state === "needs-sign-in" ? t("Sign in again") : t("Try again")) : null,- on && !pending ? (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: busy, onClick: () => void run2(actions.connectorDisconnect(connector.id)) }, connector.custom ? t("Remove") : t("Disconnect")) : pending || form ? null : (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: busy, onClick: connect }, t("Connect")),- !on && !pending && form === null && connector.auth?.kind === "oauth" && connector.auth.token === true && connector.auth.client?.id ? (0, import_react26.createElement)("button", { type: "button", className: "bt-connector-link", disabled: busy, onClick: () => setForm("token") }, t("Use a token instead")) : null- )++ actionsNode ? (0, import_react26.createElement)("span", { className: "bt-connector-actions" }, actionsNode) : null),- connector.readOnly !== void 0 && on && connector.state === "ready" ? (0, import_react25.createElement)(- connector.readOnly !== void 0 && on ? (0, import_react26.createElement)(++ connector.readOnly !== void 0 && on && connector.state === "ready" ? (0, import_react26.createElement)("div",{ className: "bt-connector-ro" },- (0, import_react25.createElement)(SwitchRow, { label: t("Read-only"), on: connector.readOnly === true, onChange: (checked) => void run2(actions.connectorSet(connector.id, { readOnly: checked })) })+ (0, import_react26.createElement)(SwitchRow, { label: t("Read-only"), on: connector.readOnly === true, onChange: (checked) => void run2(actions.connectorSet(connector.id, { readOnly: checked })) })) : null,- pending?.kind === "browser" ? (0, import_react25.createElement)(BrowserPanel, { connector, actions, run: run2 }) : null,- pending?.kind === "device" ? (0, import_react25.createElement)(DevicePanel, { connector, actions, run: run2, onUseToken: () => setForm("token") }) : null,- connector.state === "needs-client" && !pending?.kind ? (0, import_react25.createElement)(ClientPanel, { connector, actions, run: run2 }) : null,- form === "token" ? (0, import_react25.createElement)(TokenPanel, { connector, actions, run: run2, onDone: () => {+ pending?.kind === "browser" ? (0, import_react26.createElement)(BrowserPanel, { connector, actions, run: run2 }) : null,+ pending?.kind === "device" ? (0, import_react26.createElement)(DevicePanel, { connector, actions, run: run2, onUseToken: () => setForm("token") }) : null,+ connector.state === "needs-client" && !pending?.kind ? (0, import_react26.createElement)(ClientPanel, { connector, actions, run: run2 }) : null,+ form === "token" ? (0, import_react26.createElement)(TokenPanel, { connector, actions, run: run2, onDone: () => {setForm(null);setError(null);} }) : null,- error ? (0, import_react25.createElement)("div", { className: "bt-connector-error", role: "alert" }, hostText(error)) : null- error ? (0, import_react26.createElement)("div", { className: "bt-connector-error", role: "alert" }, error) : null,- connector.tools > 0 ? (0, import_react26.createElement)("div", { className: "bt-connector-status" }, t("{count} tools", { count: connector.tools })) : null++ error ? (0, import_react26.createElement)("div", { className: "bt-connector-error", role: "alert" }, hostText(error)) : null);}var NETEASE_STEPS = [@@@ -11045,191 -11440,220 +11567,191 @@@ var MAIL_GUIDES =}};function MailAccount({ account, actions, run: run2 }) {- const [busy, setBusy] = (0, import_react25.useState)(false);+ const [busy, setBusy] = (0, import_react26.useState)(false);- const busyRef = (0, import_react26.useRef)(false);const remove = () => {- if (busyRef.current || busy) return;- busyRef.current = true;+ if (busy) return;setBusy(true);- void Promise.resolve(run2(actions.mailAccountRemove(account.id))).finally(() => {- busyRef.current = false;- setBusy(false);- });+ void Promise.resolve(run2(actions.mailAccountRemove(account.id))).finally(() => setBusy(false));};+ const markId = `mail-${account.provider}`;- return (0, import_react25.createElement)(+ return (0, import_react26.createElement)("div",{ className: "bt-connector", "data-state": account.error ? "error" : "ready" },- (0, import_react25.createElement)(+ (0, import_react26.createElement)("div",{ className: "bt-connector-head" },- (0, import_react25.createElement)("span", { className: "bt-connector-mark" }, (0, import_react25.createElement)(ConnectorMark, { connector: { id: markId, name: account.address } })),- (0, import_react25.createElement)(- (0, import_react26.createElement)("span", { className: "bt-connector-mark" }, (0, import_react26.createElement)(ConnectorMark, { connector: { id: `mail-${account.provider}`, name: account.address } })),++ (0, import_react26.createElement)("span", { className: "bt-connector-mark" }, (0, import_react26.createElement)(ConnectorMark, { connector: { id: markId, name: account.address } })),+ (0, import_react26.createElement)("span",{ className: "bt-connector-text" },- (0, import_react25.createElement)("span", { className: "bt-connector-name" }, account.address),- (0, import_react25.createElement)("span", { className: "bt-connector-status" }, account.error ? hostText(account.error) : t("Connected"))+ (0, import_react26.createElement)("span", { className: "bt-connector-name" }, account.address),+ (0, import_react26.createElement)("span", { className: "bt-connector-status" }, account.error ? hostText(account.error) : t("Connected"))),- (0, import_react25.createElement)(+ (0, import_react26.createElement)("span",{ className: "bt-connector-actions" },- (0, import_react25.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: busy, onClick: remove }, t("Remove"))+ (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: busy, onClick: remove }, t("Remove")))));}function MailPending({ pending }) {- return (0, import_react25.createElement)(+ return (0, import_react26.createElement)("div",{ className: "bt-connector", "data-state": "connecting" },- (0, import_react25.createElement)(+ (0, import_react26.createElement)("div",{ className: "bt-connector-head" },- (0, import_react25.createElement)("span", { className: "bt-connector-mark" }, (0, import_react25.createElement)(ConnectorMark, { connector: { id: "mail-gmail", name: "Google" } })),- (0, import_react25.createElement)(+ (0, import_react26.createElement)("span", { className: "bt-connector-mark" }, (0, import_react26.createElement)(ConnectorMark, { connector: { id: "mail-gmail", name: "Google" } })),+ (0, import_react26.createElement)("span",{ className: "bt-connector-text" },- (0, import_react25.createElement)("span", { className: "bt-connector-name" }, pending.address ?? "Gmail"),- (0, import_react25.createElement)("span", { className: "bt-connector-status" }, t("Finish signing in in your browser."))- (0, import_react26.createElement)("span", { className: "bt-connector-name" }, pending.address ?? "Google"),- (0, import_react26.createElement)("span", { className: "bt-connector-status" }, t("Waiting for sign-in…"))++ (0, import_react26.createElement)("span", { className: "bt-connector-name" }, pending.address ?? "Gmail"),++ (0, import_react26.createElement)("span", { className: "bt-connector-status" }, t("Finish signing in in your browser."))),- (0, import_react25.createElement)(+ (0, import_react26.createElement)("span",{ className: "bt-connector-actions" },- (0, import_react25.createElement)("button", { type: "button", className: "bt-connector-link", onClick: () => openPage(pending.url) }, t("Open again"))- (0, import_react26.createElement)("a", { className: "bt-soft bt-soft-sm bt-mail-open", href: pending.url, target: "_blank", rel: "noopener noreferrer" }, t("Open the sign-in page"))++ (0, import_react26.createElement)("button", { type: "button", className: "bt-connector-link", onClick: () => openPage(pending.url) }, t("Open again")))));}-function MailForm({ mail, actions, mailRun, busy, error, fields, setField, onClose }) {- const { address, password, provider, imapHost, smtpHost } = fields;- const setAddress = (value) => setField("address", value);- const setPassword = (value) => setField("password", value);- const setProvider = (value) => setField("provider", value);- const setImapHost = (value) => setField("imapHost", value);- const setSmtpHost = (value) => setField("smtpHost", value);+function MailRules({ mail, bots, actions, run: run2 }) {+ const allowed2 = mail?.allowedRecipients ?? [];+ const direct = mail?.noDraftFor ?? [];+ if (allowed2.length === 0 && direct.length === 0) return null;- const rule = (key, name, kind, onRemove) => (0, import_react25.createElement)(++ const rule = (key, name, kind, onRemove) => (0, import_react26.createElement)(+ "div",+ { key, className: "bt-mail-rule" },- (0, import_react25.createElement)(++ (0, import_react26.createElement)(+ "span",+ { className: "bt-connector-text" },- (0, import_react25.createElement)("span", { className: "bt-mail-rule-name" }, name),- (0, import_react25.createElement)("span", { className: "bt-connector-status" }, kind)++ (0, import_react26.createElement)("span", { className: "bt-mail-rule-name" }, name),++ (0, import_react26.createElement)("span", { className: "bt-connector-status" }, kind)+ ),- (0, import_react25.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: onRemove }, t("Remove"))++ (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: onRemove }, t("Remove"))+ );- return (0, import_react25.createElement)(++ return (0, import_react26.createElement)(+ "div",+ { className: "bt-connector bt-mail-rules", "data-state": "ready" },- (0, import_react25.createElement)("div", { className: "bt-mail-rules-title" }, t("Sending rules")),++ (0, import_react26.createElement)("div", { className: "bt-mail-rules-title" }, t("Sending rules")),+ allowed2.map((addr) => rule(`r:${addr}`, addr, t("Allow recipient"), () => void run2(actions.mailRuleSet({ removeRecipient: addr })))),+ direct.map((botId) => rule(`b:${botId}`, (bots ?? []).find((b) => b.id === botId)?.name ?? botId, t("Allow this Bot to send directly"), () => void run2(actions.mailRuleSet({ botId, noDraft: false }))))+ );+}+var PROVIDERS = [["qq", "QQ"], ["163", "163"], ["126", "126"], ["gmail", "Gmail"], ["icloud", "iCloud"], ["other", "Other"]];+var guessProvider = (address) => {const domain = address.split("@")[1]?.toLowerCase() ?? "";- const guessed = ["qq.com", "foxmail.com"].includes(domain) ? "qq" : ["163.com", "126.com", "gmail.com", "googlemail.com"].includes(domain) ? domain.replace(/\..*/, "").replace("googlemail", "gmail") : ["icloud.com", "me.com", "mac.com"].includes(domain) ? "icloud" : "";- const chosen = provider || guessed || "other";+ if (["qq.com", "foxmail.com"].includes(domain)) return "qq";+ if (["163.com", "126.com"].includes(domain)) return domain.slice(0, 3);+ if (["gmail.com", "googlemail.com"].includes(domain)) return "gmail";+ if (["icloud.com", "me.com", "mac.com"].includes(domain)) return "icloud";+ return "";+};+function MailForm({ mail, actions, onClose }) {- const [fields, setFields] = (0, import_react25.useState)({ address: "", password: "", provider: "", imapHost: "", smtpHost: "" });- const [busy, setBusy] = (0, import_react25.useState)(false);- const [error, setError] = (0, import_react25.useState)(null);- const busyRef = (0, import_react25.useRef)(false);++ const [fields, setFields] = (0, import_react26.useState)({ address: "", password: "", provider: "", imapHost: "", smtpHost: "" });++ const [busy, setBusy] = (0, import_react26.useState)(false);++ const [error, setError] = (0, import_react26.useState)(null);++ const busyRef = (0, import_react26.useRef)(false);+ const set = (key, value) => setFields((current) => ({ ...current, [key]: value }));+ const chosen = fields.provider || guessProvider(fields.address) || "qq";const guide = MAIL_GUIDES[chosen];- const add = () => void mailRun(() => actions.mailAccountAdd({ address: address.trim(), password, provider: chosen, imapHost: imapHost.trim(), smtpHost: smtpHost.trim() }), onClose);+ const google = chosen === "gmail" && mail?.google === true;+ const go = (task, done) => {+ if (busyRef.current) return;+ busyRef.current = true;+ setBusy(true);+ setError(null);+ void Promise.resolve().then(task).then(done, (failure) => {+ setError(failure?.message ?? String(failure));+ }).finally(() => {+ busyRef.current = false;+ setBusy(false);+ });+ };+ const add = () => go(() => actions.mailAccountAdd({ address: fields.address.trim(), password: fields.password, provider: chosen, imapHost: fields.imapHost.trim(), smtpHost: fields.smtpHost.trim() }), onClose);+ const signInWithGoogle = () => {+ const win = reserveWindow();+ go(() => actions.mailAccountAdd({ address: fields.address.trim(), google: true }).catch((failure) => {+ win.close();+ throw failure;+ }), (view) => {+ const url = view?.mail?.pending?.at(-1)?.url ?? view?.pending?.at(-1)?.url;+ if (url) win.go(url);+ else win.close();+ onClose();+ });+ };- const input = (key, label, extra = {}) => (0, import_react25.createElement)("input", { className: "bt-input", "aria-label": label, placeholder: label, value: fields[key], autoComplete: "off", spellCheck: false, disabled: busy, onChange: (e) => set(key, e.target.value), ...extra });- return (0, import_react25.createElement)(++ const input = (key, label, extra = {}) => (0, import_react26.createElement)("input", { className: "bt-input", "aria-label": label, placeholder: label, value: fields[key], autoComplete: "off", spellCheck: false, disabled: busy, onChange: (e) => set(key, e.target.value), ...extra });+ return (0, import_react26.createElement)("div",- { className: "bt-set-row bt-set-paste bt-mail-form" },+ { className: "bt-connector-form bt-mail-form" },- (0, import_react25.createElement)(+ (0, import_react26.createElement)(- "div",- { className: "bt-mail-providers", role: "radiogroup", "aria-label": t("Provider") },- [["qq", "QQ"], ["163", "163"], ["126", "126"], ["gmail", "Gmail"], ["icloud", "iCloud"], ["other", t("Other")]].map(([id, label]) => (0, import_react26.createElement)("button", { key: id, type: "button", role: "radio", "aria-checked": chosen === id, className: "bt-secret-seg", disabled: busy, onClick: () => setProvider(id) }, label))+ Segmented,+ { label: t("Provider"), value: chosen, className: "bt-mail-seg" },- PROVIDERS.map(([id, label]) => (0, import_react25.createElement)("button", { key: id, type: "button", "aria-pressed": chosen === id, disabled: busy, onClick: () => set("provider", id) }, id === "other" ? t(label) : label))++ PROVIDERS.map(([id, label]) => (0, import_react26.createElement)("button", { key: id, type: "button", "aria-pressed": chosen === id, disabled: busy, onClick: () => set("provider", id) }, id === "other" ? t(label) : label))),- guide ? (0, import_react25.createElement)(- guide ? [- (0, import_react26.createElement)("ol", { key: "guide", className: "bt-mail-guide" }, guide.steps.map((step) => (0, import_react26.createElement)("li", { key: step }, t(step, { host: guide.host })))),++ guide ? (0, import_react26.createElement)(+ "div",+ { className: "bt-mail-guide" },- (0, import_react25.createElement)("ol", null, guide.steps.map((step) => (0, import_react25.createElement)("li", { key: step }, t(step, { host: guide.host })))),- (0, import_react25.createElement)(++ (0, import_react26.createElement)("ol", null, guide.steps.map((step) => (0, import_react26.createElement)("li", { key: step }, t(step, { host: guide.host })))),+ (0, import_react26.createElement)("div",- { key: "links", className: "bt-connector-form-row bt-mail-links" },- (0, import_react26.createElement)("a", { className: "bt-connector-link", href: guide.open, target: "_blank", rel: "noopener noreferrer" }, t("Open {host}", { host: guide.host })),- (0, import_react26.createElement)("a", { className: "bt-connector-link", href: guide.help, target: "_blank", rel: "noopener noreferrer" }, t("Official help"))+ { className: "bt-mail-links" },- (0, import_react25.createElement)("button", { type: "button", className: "bt-connector-link", onClick: () => openPage(guide.open) }, t("Open {host}", { host: guide.host })),- (0, import_react25.createElement)("button", { type: "button", className: "bt-connector-link", onClick: () => openPage(guide.help) }, t("Official help"))++ (0, import_react26.createElement)("button", { type: "button", className: "bt-connector-link", onClick: () => openPage(guide.open) }, t("Open {host}", { host: guide.host })),++ (0, import_react26.createElement)("button", { type: "button", className: "bt-connector-link", onClick: () => openPage(guide.help) }, t("Official help")))- ] : null,- (0, import_react26.createElement)("input", { className: "bt-input", "aria-label": t("Email address"), placeholder: t("Email address"), value: address, autoComplete: "off", disabled: busy, onChange: (e) => setAddress(e.target.value) }),- (0, import_react26.createElement)("label", { className: "bt-q-field bt-secret-field" }, (0, import_react26.createElement)(MaskedInput, { value: password, onChange: setPassword, label: t(guide?.label ?? "Password or app password"), disabled: busy })),- chosen === "other" ? [- (0, import_react26.createElement)("input", { key: "ih", className: "bt-input", "aria-label": t("IMAP host"), placeholder: t("IMAP host"), value: imapHost, disabled: busy, onChange: (e) => setImapHost(e.target.value) }),- (0, import_react26.createElement)("input", { key: "sh", className: "bt-input", "aria-label": t("SMTP host"), placeholder: t("SMTP host"), value: smtpHost, disabled: busy, onChange: (e) => setSmtpHost(e.target.value) })- ] : null,- error ? (0, import_react26.createElement)("div", { className: "bt-connector-error", role: "alert" }, hostText(error)) : null,+ ) : null,+ input("address", t("Email address"), { type: "email" }),- (0, import_react25.createElement)("label", { className: "bt-q-field bt-secret-field" }, (0, import_react25.createElement)(MaskedInput, { value: fields.password, onChange: (value) => set("password", value), onEnter: add, label: t(guide?.label ?? "Password or app password"), disabled: busy })),- chosen === "other" ? (0, import_react25.createElement)("div", { className: "bt-provider-pair" }, input("imapHost", t("IMAP host")), input("smtpHost", t("SMTP host"))) : null,- error ? (0, import_react25.createElement)("div", { className: "bt-mail-error", role: "alert" }, hostText(error)) : null,- (0, import_react25.createElement)(++ (0, import_react26.createElement)("label", { className: "bt-q-field bt-secret-field" }, (0, import_react26.createElement)(MaskedInput, { value: fields.password, onChange: (value) => set("password", value), onEnter: add, label: t(guide?.label ?? "Password or app password"), disabled: busy })),++ chosen === "other" ? (0, import_react26.createElement)("div", { className: "bt-provider-pair" }, input("imapHost", t("IMAP host")), input("smtpHost", t("SMTP host"))) : null,++ error ? (0, import_react26.createElement)("div", { className: "bt-mail-error", role: "alert" }, hostText(error)) : null,+ (0, import_react26.createElement)("div",{ className: "bt-secret-row-actions" },- google ? (0, import_react25.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: busy, onClick: signInWithGoogle }, t("Sign in with Google")) : null,- (0, import_react25.createElement)("span", { className: "bt-set-hint" }),- (0, import_react25.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: busy, onClick: onClose }, t("Cancel")),- (0, import_react25.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: busy || !fields.address.includes("@") || fields.password === "" || chosen === "other" && (fields.imapHost.trim() === "" || fields.smtpHost.trim() === ""), onClick: add }, busy ? t("Verifying…") : t("Add"))- mail?.google ? (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: busy, onClick: () => void mailRun(() => actions.mailAccountAdd({ address: address.trim(), google: true }), onClose) }, t("Sign in with Google")) : (0, import_react26.createElement)("span", { className: "bt-connector-link" }),++ google ? (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: busy, onClick: signInWithGoogle }, t("Sign in with Google")) : null,++ (0, import_react26.createElement)("span", { className: "bt-set-hint" }),+ (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: busy, onClick: onClose }, t("Cancel")),- (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: busy || !address.includes("@") || password === "", onClick: add }, busy ? t("Verifying…") : t("Add account"))++ (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: busy || !fields.address.includes("@") || fields.password === "" || chosen === "other" && (fields.imapHost.trim() === "" || fields.smtpHost.trim() === ""), onClick: add }, busy ? t("Verifying…") : t("Add"))));}-var EMPTY_MAIL = { address: "", password: "", provider: "", imapHost: "", smtpHost: "" };-function MailRules({ mail, bots, actions, run: run2 }) {- const [recipient, setRecipient] = (0, import_react26.useState)("");- const allowed2 = mail?.allowedRecipients ?? [];- const noDraft = mail?.noDraftFor ?? [];- const add = () => {- const addr = recipient.trim();- if (!addr.includes("@")) return;- void run2(actions.mailRuleSet({ addRecipient: addr }), () => setRecipient(""));- };+function MailCatalogRow({ mail, actions }) {- const [open, setOpen] = (0, import_react25.useState)(false);- const row = (0, import_react25.useRef)(null);++ const [open, setOpen] = (0, import_react26.useState)(false);++ const row = (0, import_react26.useRef)(null);+ useMorph(row, String(open));- return (0, import_react25.createElement)(+ return (0, import_react26.createElement)("div",- { className: "bt-set-row bt-set-paste bt-mail-rules" },- (0, import_react26.createElement)("div", { className: "bt-connector-name" }, t("Sending rules")),- allowed2.map((addr) => (0, import_react26.createElement)(+ { ref: row, className: "bt-connector", "data-state": "off" },- (0, import_react25.createElement)(++ (0, import_react26.createElement)("div",- { key: `r:${addr}`, className: "bt-connector-head" },+ { className: "bt-connector-head" },- (0, import_react25.createElement)("span", { className: "bt-connector-mark" }, (0, import_react25.createElement)(ConnectorMark, { connector: { id: "mail", name: t("Mailbox") } })),- (0, import_react25.createElement)(++ (0, import_react26.createElement)("span", { className: "bt-connector-mark" }, (0, import_react26.createElement)(ConnectorMark, { connector: { id: "mail", name: t("Mailbox") } })),+ (0, import_react26.createElement)("span",{ className: "bt-connector-text" },- (0, import_react25.createElement)("span", { className: "bt-connector-name" }, t("Mailbox")),- (0, import_react25.createElement)("span", { className: "bt-connector-status" }, t("QQ, 163, 126, Gmail, iCloud, and other IMAP mail"))- (0, import_react26.createElement)("span", { className: "bt-connector-name" }, addr),- (0, import_react26.createElement)("span", { className: "bt-connector-status" }, t("Allow recipient"))++ (0, import_react26.createElement)("span", { className: "bt-connector-name" }, t("Mailbox")),++ (0, import_react26.createElement)("span", { className: "bt-connector-status" }, t("QQ, 163, 126, Gmail, iCloud, and other IMAP mail"))),- open ? null : (0, import_react25.createElement)(- (0, import_react26.createElement)(++ open ? null : (0, import_react26.createElement)("span",{ className: "bt-connector-actions" },- (0, import_react25.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => setOpen(true) }, (mail?.accounts?.length ?? 0) > 0 ? t("Add another") : t("Connect"))- (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => void run2(actions.mailRuleSet({ removeRecipient: addr })) }, t("Remove"))++ (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => setOpen(true) }, (mail?.accounts?.length ?? 0) > 0 ? t("Add another") : t("Connect")))- )),- noDraft.map((botId) => {- const botName = (bots ?? []).find((b) => b.id === botId)?.name ?? botId;- return (0, import_react26.createElement)(- "div",- { key: `b:${botId}`, className: "bt-connector-head" },- (0, import_react26.createElement)(- "span",- { className: "bt-connector-text" },- (0, import_react26.createElement)("span", { className: "bt-connector-name" }, botName),- (0, import_react26.createElement)("span", { className: "bt-connector-status" }, t("Allow this Bot to send directly"))- ),- (0, import_react26.createElement)(- "span",- { className: "bt-connector-actions" },- (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => void run2(actions.mailRuleSet({ botId, noDraft: false })) }, t("Needs approval"))- )- );- }),- (0, import_react26.createElement)(- "div",- { className: "bt-connector-form-row" },- (0, import_react26.createElement)("input", { className: "bt-input", "aria-label": t("Allow recipient"), placeholder: "[email protected]", value: recipient, autoComplete: "off", onChange: (e) => setRecipient(e.target.value) }),- (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: !recipient.includes("@"), onClick: add }, t("Add"))- )- );-}-function MailSection({ mail, bots, actions, run: run2 }) {- const [form, setForm] = (0, import_react26.useState)(false);- const [rulesOpen, setRulesOpen] = (0, import_react26.useState)(false);- const [busy, setBusy] = (0, import_react26.useState)(false);- const [error, setError] = (0, import_react26.useState)(null);- const [fields, setFields] = (0, import_react26.useState)(EMPTY_MAIL);- const busyRef = (0, import_react26.useRef)(false);- const accounts = mail?.accounts ?? [];- const hasRules = (mail?.allowedRecipients?.length ?? 0) > 0 || (mail?.noDraftFor?.length ?? 0) > 0;- const setField = (key, value) => setFields((current) => ({ ...current, [key]: value }));- const close = () => {- setError(null);- setForm(false);- setFields(EMPTY_MAIL);- };- const mailRun = (task, onDone) => {- if (busyRef.current || busy) return false;- busyRef.current = true;- setBusy(true);- setError(null);- void Promise.resolve().then(task).then(() => {- onDone?.();- }, (failure) => {- setError(failure?.message ?? String(failure));- }).finally(() => {- busyRef.current = false;- setBusy(false);- });- return true;- };- return [- (0, import_react26.createElement)("div", { key: "title", className: "bt-section-title" }, t("Mailbox")),- (0, import_react26.createElement)(- "div",- { key: "card", className: "bt-set-card bt-connectors-card" },- accounts.length === 0 && !form ? (0, import_react26.createElement)("div", { className: "bt-set-row" }, (0, import_react26.createElement)("span", { className: "bt-set-hint" }, t("No mail accounts yet"))) : null,- accounts.map((account) => (0, import_react26.createElement)(MailAccount, { key: account.id, account, actions, run: run2 })),- (mail?.pending ?? []).map((p) => (0, import_react26.createElement)(MailPending, { key: p.address ?? "google", pending: p })),- form ? (0, import_react26.createElement)(MailForm, { mail, actions, mailRun, busy, error, fields, setField, onClose: close }) : null,- hasRules || rulesOpen ? (0, import_react26.createElement)(MailRules, { mail, bots, actions, run: run2 }) : null),- open ? (0, import_react25.createElement)(MailForm, { mail, actions, onClose: () => setOpen(false) }) : null- form ? null : (0, import_react26.createElement)(- "div",- { key: "add", className: "bt-actions" },- (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => {- setError(null);- setForm(true);- } }, t("Add an account")),- mail?.google ? (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: busy, onClick: () => void run2(actions.mailAccountAdd({ google: true })) }, t("Sign in with Google")) : null,- !hasRules && accounts.length > 0 ? (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => setRulesOpen((v) => !v) }, t("Manage rules")) : null- )- ];++ open ? (0, import_react26.createElement)(MailForm, { mail, actions, onClose: () => setOpen(false) }) : null+ );}function AddMenu({ actions, run: run2 }) {- const [kind, setKind] = (0, import_react25.useState)(null);- const [name, setName] = (0, import_react25.useState)("");- const [url, setUrl] = (0, import_react25.useState)("");- const [command, setCommand] = (0, import_react25.useState)("");- const [found, setFound] = (0, import_react25.useState)(null);- const [picked, setPicked] = (0, import_react25.useState)([]);- const row = (0, import_react25.useRef)(null);+ const [kind, setKind] = (0, import_react26.useState)(null);+ const [name, setName] = (0, import_react26.useState)("");+ const [url, setUrl] = (0, import_react26.useState)("");+ const [command, setCommand] = (0, import_react26.useState)("");+ const [found, setFound] = (0, import_react26.useState)(null);+ const [picked, setPicked] = (0, import_react26.useState)([]);++ const row = (0, import_react26.useRef)(null);+ useMorph(row, `${kind}:${found === null}`);const reset = () => {setKind(null);setName("");@@@ -11238,55 -11662,93 +11760,55 @@@setFound(null);setPicked([]);};- if (kind === "import" && found === null) {- void Promise.resolve(actions.connectorImportScan()).then((list) => setFound(Array.isArray(list) ? list : list?.items ?? []), () => setFound([]));- }+ const choose = (next) => {+ setKind(next);+ if (next === "import" && found === null) void Promise.resolve(actions.connectorImportScan()).then((list) => setFound(Array.isArray(list) ? list : list?.items ?? []), () => setFound([]));+ };+ const key = (item) => `${item.source}:${item.name}`;+ const ready = name.trim() !== "" && (kind === "url" ? url.trim() !== "" : command.trim() !== "");- return (0, import_react25.createElement)(+ return (0, import_react26.createElement)("div",- { className: "bt-connector-add" },- kind === null ? (0, import_react26.createElement)(+ { ref: row, className: "bt-connector", "data-state": "off" },- (0, import_react25.createElement)(++ (0, import_react26.createElement)("div",- { className: "bt-connector-form-row" },- (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => setKind("url") }, t("Add an address")),- (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => setKind("command") }, t("Add a command")),- (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => setKind("import") }, t("Import from other apps"))- ) : null,- kind === "url" || kind === "command" ? (0, import_react26.createElement)(+ { className: "bt-connector-head" },- (0, import_react25.createElement)("span", { className: "bt-connector-mark" }, (0, import_react25.createElement)(ConnectorMark, { connector: { id: "custom", name: "+" } })),- (0, import_react25.createElement)(++ (0, import_react26.createElement)("span", { className: "bt-connector-mark" }, (0, import_react26.createElement)(ConnectorMark, { connector: { id: "custom", name: "+" } })),++ (0, import_react26.createElement)(+ "span",+ { className: "bt-connector-text" },- (0, import_react25.createElement)("span", { className: "bt-connector-name" }, t("Other MCP server")),- (0, import_react25.createElement)("span", { className: "bt-connector-status" }, t("An address, a command, or one from Claude Desktop, Cursor, or VS Code"))++ (0, import_react26.createElement)("span", { className: "bt-connector-name" }, t("Other MCP server")),++ (0, import_react26.createElement)("span", { className: "bt-connector-status" }, t("An address, a command, or one from Claude Desktop, Cursor, or VS Code"))+ ),- kind === null ? (0, import_react25.createElement)("span", { className: "bt-connector-actions" }, (0, import_react25.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => choose("url") }, t("Add"))) : null++ kind === null ? (0, import_react26.createElement)("span", { className: "bt-connector-actions" }, (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => choose("url") }, t("Add"))) : null+ ),- kind === null ? null : (0, import_react25.createElement)(++ kind === null ? null : (0, import_react26.createElement)("div",{ className: "bt-connector-form" },- (0, import_react25.createElement)(- (0, import_react26.createElement)("input", { className: "bt-input", "aria-label": t("Name"), placeholder: t("Name"), value: name, onChange: (e) => setName(e.target.value) }),- kind === "url" ? (0, import_react26.createElement)("input", { className: "bt-input", "aria-label": t("Server address"), placeholder: "https://…", value: url, onChange: (e) => setUrl(e.target.value) }) : (0, import_react26.createElement)("input", { className: "bt-input", "aria-label": t("Command"), placeholder: t("Command, e.g. npx -y some-mcp"), value: command, onChange: (e) => setCommand(e.target.value) }),+ (0, import_react26.createElement)(+ Segmented,+ { label: t("Kind of server"), value: kind },- [["url", t("Address")], ["command", t("Command")], ["import", t("Import from other apps")]].map(([id, label]) => (0, import_react25.createElement)("button", { key: id, type: "button", "aria-pressed": kind === id, onClick: () => choose(id) }, label))++ [["url", t("Address")], ["command", t("Command")], ["import", t("Import from other apps")]].map(([id, label]) => (0, import_react26.createElement)("button", { key: id, type: "button", "aria-pressed": kind === id, onClick: () => choose(id) }, label))+ ),- kind === "import" ? found === null ? (0, import_react25.createElement)("span", { className: "bt-set-hint" }, t("Scanning…")) : found.length === 0 ? (0, import_react25.createElement)("span", { className: "bt-set-hint" }, t("No MCP servers found in Claude Desktop, Cursor, or VS Code settings.")) : (0, import_react25.createElement)("div", { className: "bt-mail-rules" }, found.map((item) => (0, import_react25.createElement)(++ kind === "import" ? found === null ? (0, import_react26.createElement)("span", { className: "bt-set-hint" }, t("Scanning…")) : found.length === 0 ? (0, import_react26.createElement)("span", { className: "bt-set-hint" }, t("No MCP servers found in Claude Desktop, Cursor, or VS Code settings.")) : (0, import_react26.createElement)("div", { className: "bt-mail-rules" }, found.map((item) => (0, import_react26.createElement)("div",- { className: "bt-connector-form-row" },- (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: reset }, t("Cancel")),- (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: name.trim() === "" || (kind === "url" ? url.trim() === "" : command.trim() === ""), onClick: () => void run2(kind === "url" ? actions.connectorAdd({ name: name.trim(), url: url.trim() }) : actions.connectorAdd({ name: name.trim(), command: command.trim() }), reset) }, t("Add"))- )- ) : null,- kind === "import" ? (0, import_react26.createElement)(- "div",- { className: "bt-connector-form" },- found === null ? (0, import_react26.createElement)("span", { className: "bt-set-hint" }, t("Scanning…")) : found.length === 0 ? (0, import_react26.createElement)("span", { className: "bt-set-hint" }, t("No MCP servers found in Claude Desktop, Cursor, or VS Code settings.")) : [- found.map((item) => (0, import_react26.createElement)(- "label",- { key: `${item.source}:${item.name}`, className: "bt-connector-import" },- (0, import_react26.createElement)("input", { type: "checkbox", checked: picked.some((p) => p.source === item.source && p.name === item.name), onChange: (e) => setPicked((list) => e.target.checked ? [...list, { source: item.source, name: item.name }] : list.filter((p) => !(p.source === item.source && p.name === item.name))) }),- (0, import_react26.createElement)("span", null, item.name),- (0, import_react26.createElement)("span", { className: "bt-set-hint" }, `${item.source} · ${item.url ?? item.command}${item.envNames?.length ? ` · ${item.envNames.length} env` : ""}`)- )),+ { key: key(item), className: "bt-mail-rule" },- (0, import_react25.createElement)(+ (0, import_react26.createElement)(- "div",- { key: "go", className: "bt-connector-form-row" },- (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: reset }, t("Cancel")),- (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: picked.length === 0, onClick: () => void run2(actions.connectorImport(picked), reset) }, t("Import {count}", { count: picked.length }))- )- ]- ) : null- );-}-function ConnectorsPage({ roster, actions }) {- const [query, setQuery] = (0, import_react26.useState)("");- const [category, setCategory] = (0, import_react26.useState)("");- const [error, setError] = (0, import_react26.useState)(null);- const run2 = (task, onDone) => Promise.resolve(task).then(() => {- setError(null);- onDone?.();- }, (failure) => setError(failure?.message ?? String(failure)));- const data = roster?.connectors ?? { connectors: [], mail: { accounts: [], google: false } };- const list = data.connectors ?? [];- const connected = list.filter((c) => c.state !== "off" || c.pending);- const catalog = list.filter((c) => c.state === "off" && !c.pending).filter((c) => category === "" || c.category === category).filter((c) => query === "" || `${c.name} ${c.about}`.toLowerCase().includes(query.toLowerCase()));- return (0, import_react26.createElement)(- "section",- { className: "bt-set-section" },- error ? (0, import_react26.createElement)("div", { className: "bt-connector-error", role: "alert" }, error) : null,- (0, import_react26.createElement)("div", { className: "bt-section-title" }, t("Connected")),- (0, import_react26.createElement)(- "div",- { className: "bt-set-card bt-connectors-card" },- connected.length === 0 ? (0, import_react26.createElement)("div", { className: "bt-set-row" }, (0, import_react26.createElement)("span", { className: "bt-set-hint" }, t("No connectors connected"))) : null,- connected.map((connector) => (0, import_react26.createElement)(ConnectorRow, { key: connector.id, connector, actions }))- ),- (0, import_react26.createElement)(MailSection, { mail: data.mail, bots: roster?.bots, actions, run: run2 }),- (0, import_react26.createElement)("div", { className: "bt-section-title" }, t("Catalog")),- (0, import_react26.createElement)(- "div",- { className: "bt-set-card bt-connectors-card" },+ "span",+ { className: "bt-connector-text" },- (0, import_react25.createElement)("span", { className: "bt-mail-rule-name" }, item.name),- (0, import_react25.createElement)("span", { className: "bt-connector-status" }, `${item.source} · ${item.url ?? item.command}`)++ (0, import_react26.createElement)("span", { className: "bt-mail-rule-name" }, item.name),++ (0, import_react26.createElement)("span", { className: "bt-connector-status" }, `${item.source} · ${item.url ?? item.command}`)+ ),- (0, import_react25.createElement)(Switch, { label: item.name, on: picked.some((p) => key(p) === key(item)), onChange: (on) => setPicked((list) => on ? [...list, { source: item.source, name: item.name }] : list.filter((p) => key(p) !== key(item))) })++ (0, import_react26.createElement)(Switch, { label: item.name, on: picked.some((p) => key(p) === key(item)), onChange: (on) => setPicked((list) => on ? [...list, { source: item.source, name: item.name }] : list.filter((p) => key(p) !== key(item))) })+ ))) : [- (0, import_react25.createElement)("input", { key: "name", className: "bt-input", "aria-label": t("Name"), placeholder: t("Name"), value: name, onChange: (e) => setName(e.target.value) }),- kind === "url" ? (0, import_react25.createElement)("input", { key: "url", className: "bt-input", "aria-label": t("Server address"), placeholder: "https://…", value: url, spellCheck: false, onChange: (e) => setUrl(e.target.value) }) : (0, import_react25.createElement)("input", { key: "cmd", className: "bt-input", "aria-label": t("Command"), placeholder: t("Command, e.g. npx -y some-mcp"), value: command, spellCheck: false, onChange: (e) => setCommand(e.target.value) })++ (0, import_react26.createElement)("input", { key: "name", className: "bt-input", "aria-label": t("Name"), placeholder: t("Name"), value: name, onChange: (e) => setName(e.target.value) }),++ kind === "url" ? (0, import_react26.createElement)("input", { key: "url", className: "bt-input", "aria-label": t("Server address"), placeholder: "https://…", value: url, spellCheck: false, onChange: (e) => setUrl(e.target.value) }) : (0, import_react26.createElement)("input", { key: "cmd", className: "bt-input", "aria-label": t("Command"), placeholder: t("Command, e.g. npx -y some-mcp"), value: command, spellCheck: false, onChange: (e) => setCommand(e.target.value) })+ ],- (0, import_react25.createElement)(+ (0, import_react26.createElement)("div",- { className: "bt-connector-search" },- (0, import_react26.createElement)("input", { className: "bt-input", "aria-label": t("Search connectors"), placeholder: t("Search"), value: query, onChange: (e) => setQuery(e.target.value) }),- (0, import_react26.createElement)(- "div",- { className: "bt-connector-chips" },- (0, import_react26.createElement)("button", { type: "button", className: "bt-secret-seg", "aria-pressed": category === "", onClick: () => setCategory("") }, t("All")),- CATEGORIES.map((id) => (0, import_react26.createElement)("button", { key: id, type: "button", className: "bt-secret-seg", "aria-pressed": category === id, onClick: () => setCategory(category === id ? "" : id) }, t(CATEGORY_LABEL[id])))- )- ),- catalog.map((connector) => (0, import_react26.createElement)(ConnectorRow, { key: connector.id, connector, actions })),- (0, import_react26.createElement)(AddMenu, { actions, run: run2 })+ { className: "bt-secret-row-actions" },- (0, import_react25.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: reset }, t("Cancel")),- kind === "import" ? (0, import_react25.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: picked.length === 0, onClick: () => void run2(actions.connectorImport(picked), reset) }, t("Import {count}", { count: picked.length })) : (0, import_react25.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: !ready, onClick: () => void run2(kind === "url" ? actions.connectorAdd({ name: name.trim(), url: url.trim() }) : actions.connectorAdd({ name: name.trim(), command: command.trim() }), reset) }, t("Add"))++ (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: reset }, t("Cancel")),++ kind === "import" ? (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: picked.length === 0, onClick: () => void run2(actions.connectorImport(picked), reset) }, t("Import {count}", { count: picked.length })) : (0, import_react26.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: !ready, onClick: () => void run2(kind === "url" ? actions.connectorAdd({ name: name.trim(), url: url.trim() }) : actions.connectorAdd({ name: name.trim(), command: command.trim() }), reset) }, t("Add"))+ )));}@@@ -16948,10 -17446,10 +17499,10 @@@ function NewChat({ mode, roster, action}) });}}- for (const bot of matches) {+ for (const bot of matches2) {options.push({ key: bot.id, bot, label: bot.name, hint: choosingAdmin ? t("Make admin") : group || picked.length > 0 ? t("Add to group chat") : void 0, run: () => openBot(bot) });}- if (wanted !== "" && !exact && mode !== "search") options.push({ key: "create", icon: (0, import_react38.createElement)(PlusIcon), label: t("Create new Bot “{name}”", { name: query.trim() }), run: createBot });+ if (wanted !== "" && !exact && mode !== "search") options.push({ key: "create", icon: (0, import_react39.createElement)(PlusIcon), label: t("Create new Bot “{name}”", { name: query.trim() }), run: createBot });const active = Math.min(cursor, Math.max(options.length - 1, 0));const listed = options.map((option) => option.key).join("\n");const glide = useGlide(`${active}@@@ -17844,11 -18342,11 +18395,11 @@@ var GROUP_SETTINGS_CSS =`;// src/client/kept-private.js- var import_react43 = require("react");+ var import_react44 = require("react");-function KeptPrivateSection({ roster, actions, run: run2, Section, Row: Row3 }) {+function KeptPrivateSection({ roster, actions, run: run2, Section: Section2, Row: Row3 }) {const kept = roster.privateArchives ?? [];- const [confirming, setConfirming] = (0, import_react43.useState)(null);- (0, import_react43.useEffect)(() => {+ const [confirming, setConfirming] = (0, import_react44.useState)(null);+ (0, import_react44.useEffect)(() => {if (confirming === null) return void 0;const timer = setTimeout(() => setConfirming(null), 4e3);return () => clearTimeout(timer);@@@ -17862,10 -18360,10 +18413,10 @@@setConfirming(null);void run2(actions.releasePrivate(entry.id));};- return (0, import_react43.createElement)(+ return (0, import_react44.createElement)(- Section,+ Section2,{ title: t("Closed after deletion · {count}", { count: kept.length }) },- kept.map((entry) => (0, import_react43.createElement)(Row3, {+ kept.map((entry) => (0, import_react44.createElement)(Row3, {key: entry.id,label: entry.name,hint: confirming === entry.id ? t("Click again to remove. Other Bots can then read its folder, memory and chats.") : entry.workDir@@@ -18881,352 -19379,58 +19432,352 @@@ button.bt-us-row:hover{background:var(-}`;-// node_modules/qrcode-generator/dist/qrcode.mjs-var qrcode = function(typeNumber, errorCorrectionLevel) {- const PAD0 = 236;- const PAD1 = 17;- let _typeNumber = typeNumber;- const _errorCorrectionLevel = QRErrorCorrectionLevel[errorCorrectionLevel];- let _modules = null;- let _moduleCount = 0;- let _dataCache = null;- const _dataList = [];- const _this = {};- const makeImpl = function(test, maskPattern) {- _moduleCount = _typeNumber * 4 + 17;- _modules = (function(moduleCount) {- const modules = new Array(moduleCount);- for (let row = 0; row < moduleCount; row += 1) {- modules[row] = new Array(moduleCount);- for (let col = 0; col < moduleCount; col += 1) {- modules[row][col] = null;- }- }- return modules;- })(_moduleCount);- setupPositionProbePattern(0, 0);- setupPositionProbePattern(_moduleCount - 7, 0);- setupPositionProbePattern(0, _moduleCount - 7);- setupPositionAdjustPattern();- setupTimingPattern();- setupTypeInfo(test, maskPattern);- if (_typeNumber >= 7) {- setupTypeNumber(test);- }- if (_dataCache == null) {- _dataCache = createData(_typeNumber, _errorCorrectionLevel, _dataList);- }- mapData(_dataCache, maskPattern);+// src/client/connectors-page.js- var import_react45 = require("react");++var import_react46 = require("react");+var CATEGORIES = [["dev", "Developer"], ["docs", "Docs & files"], ["work", "Work"], ["design", "Design"], ["data", "Data"], ["commerce", "Commerce"], ["search", "Search"]];+var FEATURED = ["github", "mail", "notion", "linear", "figma", "slack"];+var PREVIEW = 6;+var matches = (query, ...texts2) => query === "" || texts2.join(" ").toLowerCase().includes(query.toLowerCase());+function useJustConnected(state) {- const last = (0, import_react45.useRef)(state);- const [fresh, setFresh] = (0, import_react45.useState)(false);- (0, import_react45.useEffect)(() => {++ const last = (0, import_react46.useRef)(state);++ const [fresh, setFresh] = (0, import_react46.useState)(false);++ (0, import_react46.useEffect)(() => {+ const was = last.current;+ last.current = state;+ if (state !== "ready" || was === "ready") return void 0;+ setFresh(true);+ const timer = setTimeout(() => setFresh(false), 1100);+ return () => clearTimeout(timer);+ }, [state]);+ return fresh;+}+function AppIcon({ app, size = 36 }) {- return (0, import_react45.createElement)("span", { className: "bt-app-icon", style: { width: size, height: size } }, (0, import_react45.createElement)(ConnectorMark, { connector: app }));++ return (0, import_react46.createElement)("span", { className: "bt-app-icon", style: { width: size, height: size } }, (0, import_react46.createElement)(ConnectorMark, { connector: app }));+}+function tileStatus(app) {+ if (app.state === "ready") return app.account ?? null;+ if (app.state === "connecting") return app.pending ? t("Waiting for sign-in…") : t("Connecting…");+ if (app.state === "needs-sign-in") return t("Sign in again");+ if (app.state === "needs-client") return t("This service needs an app client ID");+ if (app.state === "error") return t("Could not connect: {error}", { error: hostText(app.error ?? "") });+ return null;+}+function AppTile({ app, actions, onOpen }) {- const [busy, setBusy] = (0, import_react45.useState)(false);- const [error, setError] = (0, import_react45.useState)(null);++ const [busy, setBusy] = (0, import_react46.useState)(false);++ const [error, setError] = (0, import_react46.useState)(null);+ const fresh = useJustConnected(app.state);+ const run2 = (task, after, failed) => {+ setBusy(true);+ setError(null);+ return Promise.resolve(task).then((value) => after?.(value), (failure) => {+ failed?.();+ setError(failure?.message ?? String(failure));+ }).finally(() => setBusy(false));};- const setupPositionProbePattern = function(row, col) {- for (let r = -1; r <= 7; r += 1) {- if (row + r <= -1 || _moduleCount <= row + r) continue;- for (let c = -1; c <= 7; c += 1) {- if (col + c <= -1 || _moduleCount <= col + c) continue;- if (0 <= r && r <= 6 && (c == 0 || c == 6) || 0 <= c && c <= 6 && (r == 0 || r == 6) || 2 <= r && r <= 4 && 2 <= c && c <= 4) {- _modules[row + r][col + c] = true;- } else {- _modules[row + r][col + c] = false;- }- }- }+ const connect = () => {+ const auth = app.auth ?? {};+ if (app.id === "mail" || auth.kind === "key" || auth.kind === "oauth" && auth.token && !auth.client?.id) return onOpen();+ if (auth.kind === "oauth") {+ const win = reserveWindow();+ return void run2(actions.connectorConnect(app.id, {}), (view) => openSignIn(win, app.id, view), () => win.close());+ }+ return void run2(actions.connectorConnect(app.id, {}));+ };+ const ready = app.state === "ready";+ const off = app.state === "off";+ const status = error ? hostText(error) : tileStatus(app);+ const label = busy ? t("Connecting…") : ready ? t("Connected") : off ? t("Connect") : app.state === "error" ? t("Try again") : app.state === "needs-sign-in" ? t("Sign in again") : t("Open");+ const press = () => {+ if (off) return connect();+ if (app.state === "error") return void run2(actions.connectorRetry(app.id));+ return onOpen();};- return (0, import_react45.createElement)(- const getBestMaskPattern = function() {- let minLostPoint = 0;++ return (0, import_react46.createElement)(+ "div",+ { className: "bt-app", "data-state": app.state, "data-fresh": fresh ? "" : void 0, "data-error": error ? "" : void 0 },- (0, import_react45.createElement)(++ (0, import_react46.createElement)(+ "button",+ { type: "button", className: "bt-app-main", onClick: onOpen },- (0, import_react45.createElement)(AppIcon, { app }),- (0, import_react45.createElement)(++ (0, import_react46.createElement)(AppIcon, { app }),++ (0, import_react46.createElement)(+ "span",+ { className: "bt-app-text" },- (0, import_react45.createElement)("span", { className: "bt-app-name" }, app.name, app.custom ? (0, import_react45.createElement)("span", { className: "bt-tag" }, t("Added")) : null),- status ? (0, import_react45.createElement)("span", { className: "bt-app-status" }, status) : null++ (0, import_react46.createElement)("span", { className: "bt-app-name" }, app.name, app.custom ? (0, import_react46.createElement)("span", { className: "bt-tag" }, t("Added")) : null),++ status ? (0, import_react46.createElement)("span", { className: "bt-app-status" }, status) : null+ )+ ),- (0, import_react45.createElement)(++ (0, import_react46.createElement)(+ "button",+ { type: "button", className: ready ? "bt-app-btn bt-app-btn-done" : "bt-app-btn", disabled: busy, onClick: press },- ready ? (0, import_react45.createElement)(CheckIcon) : null,++ ready ? (0, import_react46.createElement)(CheckIcon) : null,+ label+ )+ );+}+function Grid({ apps, actions, open }) {- return (0, import_react45.createElement)("div", { className: "bt-app-grid" }, apps.map((app) => (0, import_react45.createElement)(AppTile, { key: app.id, app, actions, onOpen: () => open(app.id) })));++ return (0, import_react46.createElement)("div", { className: "bt-app-grid" }, apps.map((app) => (0, import_react46.createElement)(AppTile, { key: app.id, app, actions, onOpen: () => open(app.id) })));+}+function Section({ title, apps, actions, open, onAll }) {+ if (apps.length === 0) return null;- return (0, import_react45.createElement)(++ return (0, import_react46.createElement)(+ "section",+ { className: "bt-app-section" },- (0, import_react45.createElement)(++ (0, import_react46.createElement)(+ "div",+ { className: "bt-app-section-head" },- (0, import_react45.createElement)("h3", null, title),- onAll && apps.length > PREVIEW ? (0, import_react45.createElement)("button", { type: "button", className: "bt-app-all", onClick: onAll }, t("See all")) : null++ (0, import_react46.createElement)("h3", null, title),++ onAll && apps.length > PREVIEW ? (0, import_react46.createElement)("button", { type: "button", className: "bt-app-all", onClick: onAll }, t("See all")) : null+ ),- (0, import_react45.createElement)(Grid, { apps: onAll ? apps.slice(0, PREVIEW) : apps, actions, open })++ (0, import_react46.createElement)(Grid, { apps: onAll ? apps.slice(0, PREVIEW) : apps, actions, open })+ );+}+function Subview({ title, onBack, children }) {- return (0, import_react45.createElement)(++ return (0, import_react46.createElement)(+ "div",+ { className: "bt-app-sub" },- (0, import_react45.createElement)(++ (0, import_react46.createElement)(+ "div",+ { className: "bt-app-sub-head" },- (0, import_react45.createElement)("button", { type: "button", className: "bt-icon-btn", "aria-label": t("Back"), onClick: onBack }, (0, import_react45.createElement)(ChevronLeftIcon)),- (0, import_react45.createElement)("h3", null, title)++ (0, import_react46.createElement)("button", { type: "button", className: "bt-icon-btn", "aria-label": t("Back"), onClick: onBack }, (0, import_react46.createElement)(ChevronLeftIcon)),++ (0, import_react46.createElement)("h3", null, title)+ ),+ children+ );+}+function ConnectedSummary({ apps, count, onClick }) {+ if (count === 0) return null;- return (0, import_react45.createElement)(++ return (0, import_react46.createElement)(+ "button",+ { type: "button", className: "bt-app-summary", onClick },- (0, import_react45.createElement)("span", { className: "bt-app-stack" }, apps.slice(0, 3).map((app) => (0, import_react45.createElement)(AppIcon, { key: app.id, app, size: 22 }))),++ (0, import_react46.createElement)("span", { className: "bt-app-stack" }, apps.slice(0, 3).map((app) => (0, import_react46.createElement)(AppIcon, { key: app.id, app, size: 22 }))),+ t("{count} connected", { count }),- (0, import_react45.createElement)(ChevronRightIcon)++ (0, import_react46.createElement)(ChevronRightIcon)+ );+}+function ConnectorsPage({ roster, actions }) {- const [query, setQuery] = (0, import_react45.useState)("");- const [category, setCategory] = (0, import_react45.useState)("");- const [view, setView] = (0, import_react45.useState)(null);- const [error, setError] = (0, import_react45.useState)(null);++ const [query, setQuery] = (0, import_react46.useState)("");++ const [category, setCategory] = (0, import_react46.useState)("");++ const [view, setView] = (0, import_react46.useState)(null);++ const [error, setError] = (0, import_react46.useState)(null);+ const run2 = (task, onDone) => Promise.resolve(task).then((value) => {+ setError(null);+ onDone?.(value);+ }, (failure) => setError(failure?.message ?? String(failure)));+ const data = roster?.connectors ?? { connectors: [], mail: { accounts: [], google: false } };+ const mail = data.mail ?? { accounts: [] };+ const accounts = mail.accounts ?? [];+ const mailbox = {+ id: "mail",+ name: t("Mailbox"),+ category: "work",+ about: t("QQ, 163, 126, Gmail, iCloud, and other IMAP mail"),+ state: accounts.length > 0 ? "ready" : (mail.pending?.length ?? 0) > 0 ? "connecting" : "off",+ account: accounts.length === 1 ? accounts[0].address : accounts.length > 1 ? t("{count} accounts", { count: accounts.length }) : null+ };+ const apps = [mailbox, ...(data.connectors ?? []).filter((c) => c.id !== "mail")];+ const connected = apps.filter((app) => app.state !== "off" || app.pending);+ const marks = [...accounts.map((account) => ({ id: `mail-${account.provider}`, name: account.address })), ...connected.filter((app) => app.id !== "mail")];+ const count = accounts.length + connected.filter((app) => app.id !== "mail").length;+ const open = (id) => setView({ app: id });+ const back = () => setView(null);- const banner = error ? (0, import_react45.createElement)("div", { className: "bt-connector-error bt-connector-banner", role: "alert" }, hostText(error)) : null;++ const banner = error ? (0, import_react46.createElement)("div", { className: "bt-connector-error bt-connector-banner", role: "alert" }, hostText(error)) : null;+ if (view?.app === "mail") {- return (0, import_react45.createElement)(++ return (0, import_react46.createElement)(+ Subview,+ { title: t("Mailbox"), onBack: back },+ banner,- (0, import_react45.createElement)(++ (0, import_react46.createElement)(+ "div",+ { className: "bt-set-card bt-connectors-card" },- accounts.map((account) => (0, import_react45.createElement)(MailAccount, { key: account.id, account, actions, run: run2 })),- (mail.pending ?? []).map((p) => (0, import_react45.createElement)(MailPending, { key: p.address ?? "google", pending: p })),- (0, import_react45.createElement)(MailCatalogRow, { mail, actions }),- (0, import_react45.createElement)(MailRules, { mail, bots: roster?.bots, actions, run: run2 })++ accounts.map((account) => (0, import_react46.createElement)(MailAccount, { key: account.id, account, actions, run: run2 })),++ (mail.pending ?? []).map((p) => (0, import_react46.createElement)(MailPending, { key: p.address ?? "google", pending: p })),++ (0, import_react46.createElement)(MailCatalogRow, { mail, actions }),++ (0, import_react46.createElement)(MailRules, { mail, bots: roster?.bots, actions, run: run2 })+ )+ );+ }+ const shown = view?.app ? apps.find((app) => app.id === view.app) : null;+ if (shown) {- return (0, import_react45.createElement)(++ return (0, import_react46.createElement)(+ Subview,+ { title: shown.name, onBack: back },- (0, import_react45.createElement)("div", { className: "bt-set-card bt-connectors-card bt-app-detail" }, (0, import_react45.createElement)(ConnectorRow, { connector: shown, actions })),- shown.about ? (0, import_react45.createElement)("p", { className: "bt-app-about" }, t(shown.about)) : null++ (0, import_react46.createElement)("div", { className: "bt-set-card bt-connectors-card bt-app-detail" }, (0, import_react46.createElement)(ConnectorRow, { connector: shown, actions })),++ shown.about ? (0, import_react46.createElement)("p", { className: "bt-app-about" }, t(shown.about)) : null+ );+ }+ if (view === "connected") {+ const rows2 = connected.filter((app) => app.id !== "mail");- return (0, import_react45.createElement)(++ return (0, import_react46.createElement)(+ Subview,+ { title: t("Connected"), onBack: back },+ banner,- (0, import_react45.createElement)(++ (0, import_react46.createElement)(+ "div",+ { className: "bt-set-card bt-connectors-card" },- count === 0 ? (0, import_react45.createElement)("div", { className: "bt-set-row" }, (0, import_react45.createElement)("span", { className: "bt-set-hint" }, t("No connectors connected"))) : null,- rows2.map((app) => (0, import_react45.createElement)(ConnectorRow, { key: app.id, connector: app, actions })),- accounts.map((account) => (0, import_react45.createElement)(MailAccount, { key: account.id, account, actions, run: run2 })),- (mail.pending ?? []).map((p) => (0, import_react45.createElement)(MailPending, { key: p.address ?? "google", pending: p })),- (0, import_react45.createElement)(MailRules, { mail, bots: roster?.bots, actions, run: run2 })++ count === 0 ? (0, import_react46.createElement)("div", { className: "bt-set-row" }, (0, import_react46.createElement)("span", { className: "bt-set-hint" }, t("No connectors connected"))) : null,++ rows2.map((app) => (0, import_react46.createElement)(ConnectorRow, { key: app.id, connector: app, actions })),++ accounts.map((account) => (0, import_react46.createElement)(MailAccount, { key: account.id, account, actions, run: run2 })),++ (mail.pending ?? []).map((p) => (0, import_react46.createElement)(MailPending, { key: p.address ?? "google", pending: p })),++ (0, import_react46.createElement)(MailRules, { mail, bots: roster?.bots, actions, run: run2 })+ )+ );+ }+ if (view === "custom") {- return (0, import_react45.createElement)(++ return (0, import_react46.createElement)(+ Subview,+ { title: t("Other MCP server"), onBack: back },+ banner,- (0, import_react45.createElement)("div", { className: "bt-set-card bt-connectors-card" }, (0, import_react45.createElement)(AddMenu, { actions, run: run2 }))++ (0, import_react46.createElement)("div", { className: "bt-set-card bt-connectors-card" }, (0, import_react46.createElement)(AddMenu, { actions, run: run2 }))+ );+ }+ const inCategory = (id) => apps.filter((app) => app.category === id);+ const searching = query.trim() !== "";+ const found = apps.filter((app) => (category === "" || app.category === category) && matches(query.trim(), app.name, app.about ?? ""));+ let body;+ if (searching || category !== "") {- body = found.length === 0 ? (0, import_react45.createElement)("p", { className: "bt-app-empty" }, t("Nothing matches")) : (0, import_react45.createElement)(Grid, { apps: found, actions, open });++ body = found.length === 0 ? (0, import_react46.createElement)("p", { className: "bt-app-empty" }, t("Nothing matches")) : (0, import_react46.createElement)(Grid, { apps: found, actions, open });+ } else {+ const featured = FEATURED.map((id) => apps.find((app) => app.id === id)).filter(Boolean);+ body = [- (0, import_react45.createElement)(Section, { key: "featured", title: t("Recommended"), apps: featured, actions, open }),- ...CATEGORIES.map(([id, label]) => (0, import_react45.createElement)(Section, { key: id, title: t(label), apps: inCategory(id), actions, open, onAll: () => setCategory(id) }))++ (0, import_react46.createElement)(Section, { key: "featured", title: t("Recommended"), apps: featured, actions, open }),++ ...CATEGORIES.map(([id, label]) => (0, import_react46.createElement)(Section, { key: id, title: t(label), apps: inCategory(id), actions, open, onAll: () => setCategory(id) }))+ ];+ }- return (0, import_react45.createElement)(++ return (0, import_react46.createElement)(+ "div",+ { className: "bt-apps" },+ banner,- (0, import_react45.createElement)(++ (0, import_react46.createElement)(+ "div",+ { className: "bt-app-bar" },- (0, import_react45.createElement)(++ (0, import_react46.createElement)(+ "label",+ { className: "bt-app-search" },- (0, import_react45.createElement)(SearchIcon),- (0, import_react45.createElement)("input", { type: "search", "aria-label": t("Search connectors"), placeholder: t("Search connectors"), value: query, onChange: (e) => setQuery(e.target.value) })++ (0, import_react46.createElement)(SearchIcon),++ (0, import_react46.createElement)("input", { type: "search", "aria-label": t("Search connectors"), placeholder: t("Search connectors"), value: query, onChange: (e) => setQuery(e.target.value) })+ ),- (0, import_react45.createElement)("button", { type: "button", className: "bt-app-pill", onClick: () => setView("custom") }, (0, import_react45.createElement)(PlusIcon), t("Custom")),- (0, import_react45.createElement)(ConnectedSummary, { apps: marks, count, onClick: () => setView("connected") })++ (0, import_react46.createElement)("button", { type: "button", className: "bt-app-pill", onClick: () => setView("custom") }, (0, import_react46.createElement)(PlusIcon), t("Custom")),++ (0, import_react46.createElement)(ConnectedSummary, { apps: marks, count, onClick: () => setView("connected") })+ ),- (0, import_react45.createElement)(++ (0, import_react46.createElement)(+ "div",+ { className: "bt-app-chips", role: "group", "aria-label": t("Category") },- [["", "All"], ...CATEGORIES].map(([id, label]) => (0, import_react45.createElement)("button", { key: id || "all", type: "button", "aria-pressed": category === id, onClick: () => setCategory(id) }, t(label)))++ [["", "All"], ...CATEGORIES].map(([id, label]) => (0, import_react46.createElement)("button", { key: id || "all", type: "button", "aria-pressed": category === id, onClick: () => setCategory(id) }, t(label)))+ ),+ body+ );+}+var CONNECTORS_PAGE_CSS = `+.bt-apps{display:flex;flex-direction:column;gap:14px;container-type:inline-size}+.bt-app-bar{display:flex;align-items:center;gap:8px}+.bt-app-search{flex:1;min-width:0;display:flex;align-items:center;gap:8px;height:36px;padding:0 14px;border:1px solid var(--bt-line);border-radius:999px;background:var(--bt-card);color:var(--bt-ink-3);cursor:text}+.bt-app-search:focus-within{border-color:var(--bt-line-2)}+.bt-app-search svg{flex:none;width:15px;height:15px}+.bt-app-search input{flex:1;min-width:0;border:0;outline:none;background:none;color:var(--bt-ink);font:inherit;font-size:13px}+.bt-app-search input::-webkit-search-cancel-button{display:none}+.bt-app-pill,.bt-app-summary{flex:none;display:inline-flex;align-items:center;gap:6px;height:36px;padding:0 14px;border:1px solid var(--bt-line);border-radius:999px;background:var(--bt-card);color:var(--bt-ink);font:inherit;font-size:13px;cursor:pointer;transition:background-color .12s ease}+.bt-app-pill:hover,.bt-app-summary:hover{background:var(--bt-hover)}+.bt-app-pill svg{width:14px;height:14px}+.bt-app-summary{padding:0 10px 0 6px;border-color:transparent;background:none;color:var(--bt-ink-2)}+.bt-app-summary svg{width:12px;height:12px}+.bt-app-stack{display:inline-flex}+.bt-app-stack .bt-app-icon{border-radius:6px;box-shadow:0 0 0 1.5px var(--bt-main)}+.bt-app-stack .bt-app-icon+.bt-app-icon{margin-left:-6px}+.bt-app-stack .bt-app-icon svg,.bt-app-stack .bt-connector-mono{width:13px;height:13px;font-size:9px}+.bt-app-chips{display:flex;flex-wrap:wrap;gap:6px}+.bt-app-chips button{height:28px;padding:0 12px;border:0;border-radius:999px;background:var(--bt-hover);color:var(--bt-ink);font:inherit;font-size:13px;cursor:pointer;transition:background-color .12s ease,color .12s ease}+.bt-app-chips button:hover{background:var(--bt-active)}+.bt-app-chips button[aria-pressed=true]{background:var(--bt-ink);color:var(--bt-main)}+.bt-app-section{display:flex;flex-direction:column;gap:4px;margin-top:6px}+.bt-app-section-head{display:flex;align-items:center;justify-content:space-between;min-height:24px}+.bt-app-section-head h3{margin:0;font-size:14px;line-height:20px;font-weight:600}+.bt-app-all{border:0;background:none;padding:2px 4px;color:var(--bt-ink-3);font:inherit;font-size:12px;cursor:pointer}+.bt-app-all:hover{color:var(--bt-ink)}+.bt-app-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:28px}+@container (max-width:520px){.bt-app-grid{grid-template-columns:minmax(0,1fr)}}+.bt-app{position:relative;display:flex;align-items:center;gap:10px;min-height:60px;border-radius:12px}+.bt-app-main{flex:1;min-width:0;display:flex;align-items:center;gap:12px;padding:0;border:0;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}+.bt-app-icon{--bt-mark-ink:var(--bt-ink);flex:none;display:inline-flex;align-items:center;justify-content:center;border-radius:10px;background:var(--bt-card);box-shadow:inset 0 0 0 .5px var(--bt-line-2)}+.bt-app-icon svg{width:22px;height:22px}+.bt-app-text{min-width:0;display:flex;flex-direction:column;gap:1px}+.bt-app-name{display:inline-flex;align-items:center;gap:6px;font-size:14px;line-height:20px;color:var(--bt-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}+.bt-app-status{font-size:12px;line-height:16px;color:var(--bt-ink-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}+.bt-app[data-state=error] .bt-app-status,.bt-app[data-error] .bt-app-status{color:var(--bt-danger)}+.bt-app-btn{flex:none;display:inline-flex;align-items:center;justify-content:center;gap:4px;min-width:72px;height:28px;padding:0 14px;border:0;border-radius:999px;background:var(--bt-hover);color:var(--bt-ink);font:inherit;font-size:13px;cursor:pointer;transition:background-color .12s ease,color .12s ease}+.bt-app-btn:hover:not(:disabled){background:var(--bt-active)}+.bt-app-btn:disabled{opacity:.5;cursor:default}+.bt-app-btn svg{width:13px;height:13px}+.bt-app-btn-done{background:none;color:var(--bt-ink-2);box-shadow:inset 0 0 0 1px var(--bt-line)}+.bt-app-icon svg{transition:filter .6s ease,opacity .6s ease}+.bt-app:not([data-state=ready]) .bt-app-icon svg{filter:grayscale(1);opacity:.5}+.bt-app[data-fresh] .bt-app-icon{animation:bt-app-pop .5s cubic-bezier(.3,1.5,.5,1)}+.bt-app[data-fresh]::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(105deg,transparent 28%,color-mix(in srgb,var(--bt-ink) 7%,transparent) 44%,color-mix(in srgb,var(--bt-ink) 2%,transparent) 50%,color-mix(in srgb,var(--bt-ink) 7%,transparent) 56%,transparent 72%);background-size:300% 100%;border-radius:inherit;animation:bt-app-shine .9s cubic-bezier(.25,.8,.3,1) both}+.bt-app[data-fresh] .bt-app-btn-done{animation:bt-app-done .4s ease-out}+@keyframes bt-app-pop{0%{transform:scale(.86)}55%{transform:scale(1.07)}100%{transform:scale(1)}}+@keyframes bt-app-shine{0%{background-position:100% 0}100%{background-position:0 0}}+@keyframes bt-app-done{0%{opacity:.4;transform:scale(.94)}100%{opacity:1;transform:none}}+.bt-app-empty{margin:24px 0;text-align:center;font-size:13px;color:var(--bt-ink-3)}+.bt-app-sub{display:flex;flex-direction:column;gap:12px}+.bt-app-sub-head{display:flex;align-items:center;gap:4px;margin-left:-6px}+.bt-app-sub-head h3{margin:0;font-size:14px;line-height:20px;font-weight:600}+.bt-app-about{margin:0 4px;font-size:13px;line-height:20px;color:var(--bt-ink-2)}+.bt-connector-mark{--bt-mark-ink:var(--bt-ink)}+[data-bt-motion=off] .bt-app,[data-bt-motion=off] .bt-app *,[data-bt-motion=off] .bt-app::after{animation:none!important;transition:none!important}+@media (prefers-reduced-motion:reduce){.bt-app[data-fresh]::after,.bt-app[data-fresh] .bt-app-icon,.bt-app[data-fresh] .bt-app-btn-done{animation:none}}+`;++// node_modules/qrcode-generator/dist/qrcode.mjs+var qrcode = function(typeNumber, errorCorrectionLevel) {+ const PAD0 = 236;+ const PAD1 = 17;+ let _typeNumber = typeNumber;+ const _errorCorrectionLevel = QRErrorCorrectionLevel[errorCorrectionLevel];+ let _modules = null;+ let _moduleCount = 0;+ let _dataCache = null;+ const _dataList = [];+ const _this = {};+ const makeImpl = function(test, maskPattern) {+ _moduleCount = _typeNumber * 4 + 17;+ _modules = (function(moduleCount) {+ const modules = new Array(moduleCount);+ for (let row = 0; row < moduleCount; row += 1) {+ modules[row] = new Array(moduleCount);+ for (let col = 0; col < moduleCount; col += 1) {+ modules[row][col] = null;+ }+ }+ return modules;+ })(_moduleCount);+ setupPositionProbePattern(0, 0);+ setupPositionProbePattern(_moduleCount - 7, 0);+ setupPositionProbePattern(0, _moduleCount - 7);+ setupPositionAdjustPattern();+ setupTimingPattern();+ setupTypeInfo(test, maskPattern);+ if (_typeNumber >= 7) {+ setupTypeNumber(test);+ }+ if (_dataCache == null) {+ _dataCache = createData(_typeNumber, _errorCorrectionLevel, _dataList);+ }+ mapData(_dataCache, maskPattern);+ };+ const setupPositionProbePattern = function(row, col) {+ for (let r = -1; r <= 7; r += 1) {+ if (row + r <= -1 || _moduleCount <= row + r) continue;+ for (let c = -1; c <= 7; c += 1) {+ if (col + c <= -1 || _moduleCount <= col + c) continue;+ if (0 <= r && r <= 6 && (c == 0 || c == 6) || 0 <= c && c <= 6 && (r == 0 || r == 6) || 2 <= r && r <= 4 && 2 <= c && c <= 4) {+ _modules[row + r][col + c] = true;+ } else {+ _modules[row + r][col + c] = false;+ }+ }+ }+ };+ const getBestMaskPattern = function() {+ let minLostPoint = 0;let pattern = 0;for (let i = 0; i < 8; i += 1) {makeImpl(true, i);@@@ -20810,7 -21014,7 +21361,7 @@@ var qrcode_default = qrcodevar stringToBytes = qrcode.stringToBytes;// src/client/im-page.js--var import_react46 = require("react");++var import_react47 = require("react");var SHORT = {telegram: "Tg",weixin: "微",@@@ -20831,7 -21035,7 +21382,7 @@@ var LINKS =discord: ["https://discord.com/developers/applications", "discord.com"],slack: ["https://api.slack.com/apps", "api.slack.com"]};--var Mark = ({ id }) => (0, import_react46.createElement)("span", { className: "bt-im-mark", style: { background: `var(--bt-im-${id}, var(--bt-hover))` } }, SHORT[id] ?? id.slice(0, 2));++var Mark = ({ id }) => (0, import_react47.createElement)("span", { className: "bt-im-mark", style: { background: `var(--bt-im-${id}, var(--bt-hover))` } }, SHORT[id] ?? id.slice(0, 2));var QUIET = 4;function QrCode({ text }) {const qr = qrcode_default(0, "M");@@@ -20843,18 -21047,18 +21394,18 @@@for (let y = 0; y < count; y += 1) {for (let x = 0; x < count; x += 1) if (qr.isDark(y, x)) path2 += `M${x + QUIET} ${y + QUIET}h1v1h-1z`;}-- return (0, import_react46.createElement)(++ return (0, import_react47.createElement)("svg",{ className: "bt-im-qr", viewBox: `0 0 ${size} ${size}`, role: "img", "aria-label": t("Pairing QR code"), shapeRendering: "crispEdges" },-- (0, import_react46.createElement)("rect", { width: size, height: size }),-- (0, import_react46.createElement)("path", { d: path2 })++ (0, import_react47.createElement)("rect", { width: size, height: size }),++ (0, import_react47.createElement)("path", { d: path2 }));}function QrPanel({ actions, platform, botId, onDone }) {-- const [login, setLogin] = (0, import_react46.useState)(null);-- const [status, setStatus] = (0, import_react46.useState)("waiting");-- const [error, setError] = (0, import_react46.useState)(null);-- (0, import_react46.useEffect)(() => {++ const [login, setLogin] = (0, import_react47.useState)(null);++ const [status, setStatus] = (0, import_react47.useState)("waiting");++ const [error, setError] = (0, import_react47.useState)(null);++ (0, import_react47.useEffect)(() => {let live = true;let loginId;void (async () => {@@@ -20881,18 -21085,18 +21432,18 @@@live = false;};}, []);-- return (0, import_react46.createElement)(++ return (0, import_react47.createElement)("div",{ className: "bt-im-qr-panel" },-- login === null && error === null ? (0, import_react46.createElement)("p", { className: "bt-mid" }, t("Connecting…")) : null,-- login !== null && status !== "expired" ? (0, import_react46.createElement)(QrCode, { text: login.qr }) : null,-- login !== null && status === "scanned" ? (0, import_react46.createElement)("p", { className: "bt-mid" }, t("Scanned — confirm on the phone")) : null,-- status === "expired" ? (0, import_react46.createElement)("p", { className: "bt-mid" }, t("Code expired")) : null,-- error ? (0, import_react46.createElement)("div", { className: "bt-connector-error", role: "alert" }, error) : null,-- (0, import_react46.createElement)(++ login === null && error === null ? (0, import_react47.createElement)("p", { className: "bt-mid" }, t("Connecting…")) : null,++ login !== null && status !== "expired" ? (0, import_react47.createElement)(QrCode, { text: login.qr }) : null,++ login !== null && status === "scanned" ? (0, import_react47.createElement)("p", { className: "bt-mid" }, t("Scanned — confirm on the phone")) : null,++ status === "expired" ? (0, import_react47.createElement)("p", { className: "bt-mid" }, t("Code expired")) : null,++ error ? (0, import_react47.createElement)("div", { className: "bt-connector-error", role: "alert" }, error) : null,++ (0, import_react47.createElement)("div",{ className: "bt-connector-form-row" },-- status === "expired" ? (0, import_react46.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: onDone }, t("Done")) : (0, import_react46.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: onDone }, t("Cancel"))++ status === "expired" ? (0, import_react47.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: onDone }, t("Done")) : (0, import_react47.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: onDone }, t("Cancel"))));}@@@ -20901,23 -21105,23 +21452,23 @@@ function statusText3(status)if (status.state === "connecting") return t("Connecting…");if (status.state === "error") return t("Could not connect: {error}", { error: status.error ?? "" });if (status.state === "ready") return t("Connected");- return t("Off");+ return t("Not connected");}function TargetPicker({ value, roster, onChange, label }) {-- return (0, import_react46.createElement)(++ return (0, import_react47.createElement)("select",{ className: "bt-select", "aria-label": label ?? t("Bound to"), value: value ?? "", onChange: (event) => onChange(event.target.value || null) },-- (0, import_react46.createElement)("option", { value: "" }, t("Not bound")),-- roster.bots.map((bot) => (0, import_react46.createElement)("option", { key: bot.id, value: `b:${bot.id}` }, bot.name)),-- roster.rooms.map((room2) => (0, import_react46.createElement)("option", { key: room2.id, value: `r:${room2.id}` }, `${room2.name}`))++ (0, import_react47.createElement)("option", { value: "" }, t("Not bound")),++ roster.bots.map((bot) => (0, import_react47.createElement)("option", { key: bot.id, value: `b:${bot.id}` }, bot.name)),++ roster.rooms.map((room2) => (0, import_react47.createElement)("option", { key: room2.id, value: `r:${room2.id}` }, `${room2.name}`)));}var targetValue = (chat) => chat.target?.roomId !== void 0 ? `r:${chat.target.roomId}` : chat.target?.botId !== void 0 ? `b:${chat.target.botId}` : "";function ConnectionRow({ conn, status, roster, actions }) {-- const [open, setOpen] = (0, import_react46.useState)(false);-- const [busy, setBusy] = (0, import_react46.useState)(false);-- const [confirmRemove, setConfirmRemove] = (0, import_react46.useState)(false);-- const [error, setError] = (0, import_react46.useState)(null);++ const [open, setOpen] = (0, import_react47.useState)(false);++ const [busy, setBusy] = (0, import_react47.useState)(false);++ const [confirmRemove, setConfirmRemove] = (0, import_react47.useState)(false);++ const [error, setError] = (0, import_react47.useState)(null);const platform = IM_PLATFORMS.find((entry) => entry.id === conn.platform) ?? { name: conn.platform, fields: [] };const run2 = (task) => {setBusy(true);@@@ -20934,40 -21138,40 +21485,40 @@@void run2(actions.imChat(conn.id, { chatKey, target }));};const chats = Object.entries(conn.chats ?? {});-- return (0, import_react46.createElement)(++ return (0, import_react47.createElement)("div",{ className: "bt-connector", "data-state": status?.state ?? "off" },-- (0, import_react46.createElement)(++ (0, import_react47.createElement)("div",{ className: "bt-connector-head" },-- (0, import_react46.createElement)("span", { className: "bt-connector-mark" }, (0, import_react46.createElement)(Mark, { id: conn.platform })),-- (0, import_react46.createElement)(++ (0, import_react47.createElement)("span", { className: "bt-connector-mark" }, (0, import_react47.createElement)(Mark, { id: conn.platform })),++ (0, import_react47.createElement)("span",{ className: "bt-connector-text" },-- (0, import_react46.createElement)("span", { className: "bt-connector-name" }, conn.account?.name ?? platform.name),-- (0, import_react46.createElement)("span", { className: "bt-connector-status" }, conn.enabled ? `${platform.name} · ${statusText3(status)}` : `${platform.name} · ${t("Disabled")}`)++ (0, import_react47.createElement)("span", { className: "bt-connector-name" }, conn.account?.name ?? platform.name),++ (0, import_react47.createElement)("span", { className: "bt-connector-status" }, conn.enabled ? `${platform.name} · ${statusText3(status)}` : `${platform.name} · ${t("Disabled")}`)),-- (0, import_react46.createElement)(++ (0, import_react47.createElement)("span",{ className: "bt-connector-actions" },-- status?.state === "error" ? (0, import_react46.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: busy, onClick: () => void run2(actions.imRetry(conn.id)) }, t("Try again")) : null,-- (0, import_react46.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => setOpen((value) => !value) }, open ? t("Collapse") : t("Manage"))++ status?.state === "error" ? (0, import_react47.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: busy, onClick: () => void run2(actions.imRetry(conn.id)) }, t("Try again")) : null,++ (0, import_react47.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => setOpen((value) => !value) }, open ? t("Collapse") : t("Manage")))),-- open ? (0, import_react46.createElement)(++ open ? (0, import_react47.createElement)("div",{ className: "bt-connector-form" },-- (0, import_react46.createElement)(++ (0, import_react47.createElement)("div",{ className: "bt-im-line" },-- (0, import_react46.createElement)("span", { className: "bt-im-label" }, t("Talks to")),-- (0, import_react46.createElement)(++ (0, import_react47.createElement)("span", { className: "bt-im-label" }, t("Talks to")),++ (0, import_react47.createElement)("select",{ className: "bt-select", "aria-label": t("Talks to"), value: conn.botId ?? "", onChange: (event) => setBot(`b:${event.target.value}`) },-- roster.bots.map((bot) => (0, import_react46.createElement)("option", { key: bot.id, value: bot.id }, bot.name))++ roster.bots.map((bot) => (0, import_react47.createElement)("option", { key: bot.id, value: bot.id }, bot.name))),-- (0, import_react46.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: busy, onClick: () => void run2(actions.imUpdate(conn.id, { enabled: !conn.enabled })) }, conn.enabled ? t("Disable") : t("Enable")),-- (0, import_react46.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: busy, onClick: () => {++ (0, import_react47.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: busy, onClick: () => void run2(actions.imUpdate(conn.id, { enabled: !conn.enabled })) }, conn.enabled ? t("Disable") : t("Enable")),++ (0, import_react47.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: busy, onClick: () => {if (!confirmRemove) {setConfirmRemove(true);return;@@@ -20975,52 -21179,52 +21526,52 @@@void run2(actions.imRemove(conn.id));} }, confirmRemove ? t("Remove?") : t("Remove"))),-- conn.requests.length > 0 ? (0, import_react46.createElement)(++ conn.requests.length > 0 ? (0, import_react47.createElement)("div",{ className: "bt-im-block" },-- (0, import_react46.createElement)("div", { className: "bt-im-label" }, t("Wants to connect")),-- conn.requests.map((request) => (0, import_react46.createElement)(++ (0, import_react47.createElement)("div", { className: "bt-im-label" }, t("Wants to connect")),++ conn.requests.map((request) => (0, import_react47.createElement)("div",{ key: request.id, className: "bt-im-line" },-- (0, import_react46.createElement)("span", { className: "bt-im-name" }, request.name),-- (0, import_react46.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: busy, onClick: () => void run2(actions.imPair(conn.id, request.id, true)) }, t("Allow")),-- (0, import_react46.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: busy, onClick: () => void run2(actions.imPair(conn.id, request.id, false)) }, t("Deny"))++ (0, import_react47.createElement)("span", { className: "bt-im-name" }, request.name),++ (0, import_react47.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: busy, onClick: () => void run2(actions.imPair(conn.id, request.id, true)) }, t("Allow")),++ (0, import_react47.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: busy, onClick: () => void run2(actions.imPair(conn.id, request.id, false)) }, t("Deny"))))) : null,-- conn.paired.length > 0 ? (0, import_react46.createElement)(++ conn.paired.length > 0 ? (0, import_react47.createElement)("div",{ className: "bt-im-block" },-- (0, import_react46.createElement)("div", { className: "bt-im-label" }, t("Connected accounts")),-- conn.paired.map((entry) => (0, import_react46.createElement)(++ (0, import_react47.createElement)("div", { className: "bt-im-label" }, t("Connected accounts")),++ conn.paired.map((entry) => (0, import_react47.createElement)("div",{ key: entry.id, className: "bt-im-line" },-- (0, import_react46.createElement)("span", { className: "bt-im-name" }, entry.name),-- (0, import_react46.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: busy, onClick: () => void run2(actions.imUnpair(conn.id, entry.id)) }, t("Remove"))++ (0, import_react47.createElement)("span", { className: "bt-im-name" }, entry.name),++ (0, import_react47.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: busy, onClick: () => void run2(actions.imUnpair(conn.id, entry.id)) }, t("Remove"))))) : null,-- chats.length > 0 ? (0, import_react46.createElement)(++ chats.length > 0 ? (0, import_react47.createElement)("div",{ className: "bt-im-block" },-- (0, import_react46.createElement)("div", { className: "bt-im-label" }, t("Chats")),-- chats.map(([chatKey, chat]) => (0, import_react46.createElement)(++ (0, import_react47.createElement)("div", { className: "bt-im-label" }, t("Chats")),++ chats.map(([chatKey, chat]) => (0, import_react47.createElement)("div",{ key: chatKey, className: "bt-im-line" },-- (0, import_react46.createElement)("span", { className: "bt-im-name" }, chat.title ?? chatKey),-- chat.kind === "group" ? (0, import_react46.createElement)(TargetPicker, { roster, value: targetValue(chat), label: t("Bound to"), onChange: (value) => setChatTarget(chatKey, value) }) : (0, import_react46.createElement)("span", { className: "bt-im-label" }, t("Direct")),-- (0, import_react46.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: busy, onClick: removeChat(chatKey) }, t("Remove"))++ (0, import_react47.createElement)("span", { className: "bt-im-name" }, chat.title ?? chatKey),++ chat.kind === "group" ? (0, import_react47.createElement)(TargetPicker, { roster, value: targetValue(chat), label: t("Bound to"), onChange: (value) => setChatTarget(chatKey, value) }) : (0, import_react47.createElement)("span", { className: "bt-im-label" }, t("Direct")),++ (0, import_react47.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: busy, onClick: removeChat(chatKey) }, t("Remove"))))) : null) : null,-- error ? (0, import_react46.createElement)("div", { className: "bt-connector-error", role: "alert" }, error) : null++ error ? (0, import_react47.createElement)("div", { className: "bt-connector-error", role: "alert" }, error) : null);}function AddForm({ roster, actions, onDone }) {const platforms = (roster.im?.platforms ?? []).map((id) => IM_PLATFORMS.find((entry) => entry.id === id)).filter(Boolean);-- const [platform, setPlatform] = (0, import_react46.useState)(platforms[0]?.id ?? "");-- const [fields, setFields] = (0, import_react46.useState)({});-- const [botId, setBotId] = (0, import_react46.useState)(roster.bots[0]?.id ?? "");-- const [busy, setBusy] = (0, import_react46.useState)(false);-- const [error, setError] = (0, import_react46.useState)(null);++ const [platform, setPlatform] = (0, import_react47.useState)(platforms[0]?.id ?? "");++ const [fields, setFields] = (0, import_react47.useState)({});++ const [botId, setBotId] = (0, import_react47.useState)(roster.bots[0]?.id ?? "");++ const [busy, setBusy] = (0, import_react47.useState)(false);++ const [error, setError] = (0, import_react47.useState)(null);const shown = IM_PLATFORMS.find((entry) => entry.id === platform);const link = platform === "feishu" && fields.domain === "lark" ? LINKS.lark : LINKS[platform];const add = () => {@@@ -21033,67 -21237,67 +21584,67 @@@}).catch((failure) => setError(failure?.message ?? String(failure))).finally(() => setBusy(false));};if (platforms.length === 0) return null;-- return (0, import_react46.createElement)(++ return (0, import_react47.createElement)("div",{ className: "bt-connector-form" },-- (0, import_react46.createElement)(++ (0, import_react47.createElement)("div",{ className: "bt-im-line" },-- (0, import_react46.createElement)(++ (0, import_react47.createElement)("select",{ className: "bt-select", "aria-label": t("Platform"), value: platform, onChange: (event) => {setPlatform(event.target.value);setFields({});} },-- platforms.map((entry) => (0, import_react46.createElement)("option", { key: entry.id, value: entry.id }, entry.name))++ platforms.map((entry) => (0, import_react47.createElement)("option", { key: entry.id, value: entry.id }, entry.name))),-- (0, import_react46.createElement)(++ (0, import_react47.createElement)("select",{ className: "bt-select", "aria-label": t("Talks to"), value: botId, onChange: (event) => setBotId(event.target.value) },-- roster.bots.map((bot) => (0, import_react46.createElement)("option", { key: bot.id, value: bot.id }, bot.name))++ roster.bots.map((bot) => (0, import_react47.createElement)("option", { key: bot.id, value: bot.id }, bot.name)))),-- shown?.login === "qr" ? (0, import_react46.createElement)(QrPanel, { key: `${platform}:${botId}`, actions, platform, botId, onDone }) : (shown?.fields ?? []).map((field) => field.options !== void 0 ? (0, import_react46.createElement)(++ shown?.login === "qr" ? (0, import_react47.createElement)(QrPanel, { key: `${platform}:${botId}`, actions, platform, botId, onDone }) : (shown?.fields ?? []).map((field) => field.options !== void 0 ? (0, import_react47.createElement)("div",{ key: field.key, className: "bt-im-line" },-- (0, import_react46.createElement)("span", { className: "bt-im-label" }, field.label),-- (0, import_react46.createElement)(++ (0, import_react47.createElement)("span", { className: "bt-im-label" }, field.label),++ (0, import_react47.createElement)("select",{ className: "bt-select", "aria-label": field.label, value: fields[field.key] ?? field.options[0][0], onChange: (event) => setFields((current) => ({ ...current, [field.key]: event.target.value })) },-- field.options.map(([id, label]) => (0, import_react46.createElement)("option", { key: id, value: id }, label))++ field.options.map(([id, label]) => (0, import_react47.createElement)("option", { key: id, value: id }, label)))-- ) : (0, import_react46.createElement)(++ ) : (0, import_react47.createElement)("label",{ key: field.key, className: "bt-q-field bt-secret-field" },-- field.secret ? (0, import_react46.createElement)(MaskedInput, { value: fields[field.key] ?? "", onChange: (value) => setFields((current) => ({ ...current, [field.key]: value })), onEnter: add, label: field.hint ? `${field.label} (${field.hint}…)` : field.label }) : (0, import_react46.createElement)("input", { className: "bt-input", "aria-label": field.label, placeholder: field.label, value: fields[field.key] ?? "", onChange: (event) => setFields((current) => ({ ...current, [field.key]: event.target.value })) })++ field.secret ? (0, import_react47.createElement)(MaskedInput, { value: fields[field.key] ?? "", onChange: (value) => setFields((current) => ({ ...current, [field.key]: value })), onEnter: add, label: field.hint ? `${field.label} (${field.hint}…)` : field.label }) : (0, import_react47.createElement)("input", { className: "bt-input", "aria-label": field.label, placeholder: field.label, value: fields[field.key] ?? "", onChange: (event) => setFields((current) => ({ ...current, [field.key]: event.target.value })) }))),-- shown?.login === "qr" ? null : (0, import_react46.createElement)(++ shown?.login === "qr" ? null : (0, import_react47.createElement)("div",{ className: "bt-connector-form-row" },-- link ? (0, import_react46.createElement)("a", { className: "bt-connector-link", href: link[0], target: "_blank", rel: "noopener noreferrer" }, link[1]) : null,-- (0, import_react46.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: onDone }, t("Cancel")),-- (0, import_react46.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: busy, onClick: add }, busy ? t("Connecting…") : t("Connect"))++ link ? (0, import_react47.createElement)("a", { className: "bt-connector-link", href: link[0], target: "_blank", rel: "noopener noreferrer" }, link[1]) : null,++ (0, import_react47.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: onDone }, t("Cancel")),++ (0, import_react47.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: busy, onClick: add }, busy ? t("Connecting…") : t("Connect"))),-- shown?.login === "qr" ? null : error ? (0, import_react46.createElement)("div", { className: "bt-connector-error", role: "alert" }, error) : null++ shown?.login === "qr" ? null : error ? (0, import_react47.createElement)("div", { className: "bt-connector-error", role: "alert" }, error) : null);}function ImPage({ roster, actions }) {-- const [adding, setAdding] = (0, import_react46.useState)(false);++ const [adding, setAdding] = (0, import_react47.useState)(false);const list = roster.im?.connections ?? [];const statuses = roster.imStatus ?? {};const pending = list.reduce((count, conn) => count + (conn.requests?.length ?? 0), 0);return [-- (0, import_react46.createElement)(++ (0, import_react47.createElement)("div",{ key: "new", className: "bt-actions" },-- adding ? null : (0, import_react46.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm bt-with-icon", onClick: () => setAdding(true) }, t("Add IM bot"))++ adding ? null : (0, import_react47.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm bt-with-icon", onClick: () => setAdding(true) }, t("Add IM bot"))),-- adding ? (0, import_react46.createElement)("section", { key: "add", className: "bt-set-section" }, (0, import_react46.createElement)("div", { className: "bt-set-card bt-connectors-card" }, (0, import_react46.createElement)(AddForm, { roster, actions, onDone: () => setAdding(false) }))) : null,-- (0, import_react46.createElement)(++ adding ? (0, import_react47.createElement)("section", { key: "add", className: "bt-set-section" }, (0, import_react47.createElement)("div", { className: "bt-set-card bt-connectors-card" }, (0, import_react47.createElement)(AddForm, { roster, actions, onDone: () => setAdding(false) }))) : null,++ (0, import_react47.createElement)("section",{ key: "list", className: "bt-set-section" },-- (0, import_react46.createElement)("h3", null, pending > 0 ? t("IM · {count} requests", { count: pending }) : t("IM bots")),-- (0, import_react46.createElement)("div", { className: "bt-set-card bt-connectors-card" }, list.length === 0 ? (0, import_react46.createElement)("div", { className: "bt-set-row" }, (0, import_react46.createElement)("span", { className: "bt-set-hint" }, t("No IM bots"))) : list.map((conn) => (0, import_react46.createElement)(ConnectionRow, { key: conn.id, conn, status: statuses[conn.id], roster, actions })))++ (0, import_react47.createElement)("h3", null, pending > 0 ? t("IM · {count} requests", { count: pending }) : t("IM bots")),++ (0, import_react47.createElement)("div", { className: "bt-set-card bt-connectors-card" }, list.length === 0 ? (0, import_react47.createElement)("div", { className: "bt-set-row" }, (0, import_react47.createElement)("span", { className: "bt-set-hint" }, t("No IM bots"))) : list.map((conn) => (0, import_react47.createElement)(ConnectionRow, { key: conn.id, conn, status: statuses[conn.id], roster, actions }))))];}@@@ -21108,7 -21312,7 +21659,7 @@@ var IM_CSS =`;// src/client/browser-settings.js--var import_react47 = require("react");++var import_react48 = require("react");var ACTIONS = [["post", "Post"], ["upload", "Upload"], ["download", "Download"], ["delete", "Delete"]];var DURATIONS = [["hour", "1 hour"], ["today", "Today"], ["week", "7 days"], ["permanent", "Permanent"]];var expired = (grant) => Number.isFinite(grant.until) && grant.until <= Date.now();@@@ -21125,15 -21329,15 +21676,15 @@@ function grantKinds(grant)if (grant.kinds.includes("*")) return [t("All four")];return ACTIONS.filter(([kind]) => grant.kinds.includes(kind)).map(([, label]) => t(label));}-function BrowserPage({ roster, actions, run: run2, Section, Row: Row3 }) {+function BrowserPage({ roster, actions, run: run2, Section: Section2, Row: Row3 }) {const bots = roster.bots ?? [];-- const [botId, setBotId] = (0, import_react47.useState)(bots[0]?.id ?? "");-- const [site, setSite] = (0, import_react47.useState)("");-- const [kinds, setKinds] = (0, import_react47.useState)(["post"]);-- const [duration, setDuration] = (0, import_react47.useState)("hour");-- const [busy, setBusy] = (0, import_react47.useState)(false);++ const [botId, setBotId] = (0, import_react48.useState)(bots[0]?.id ?? "");++ const [site, setSite] = (0, import_react48.useState)("");++ const [kinds, setKinds] = (0, import_react48.useState)(["post"]);++ const [duration, setDuration] = (0, import_react48.useState)("hour");++ const [busy, setBusy] = (0, import_react48.useState)(false);const selectedBot = bots.find((bot) => bot.id === botId);-- (0, import_react47.useEffect)(() => {++ (0, import_react48.useEffect)(() => {if (!bots.some((bot) => bot.id === botId)) setBotId(bots[0]?.id ?? "");}, [bots, botId]);const grants = bots.flatMap((bot) => (bot.browserGrants ?? []).map((grant, index) => ({@@@ -21166,37 -21370,37 +21717,37 @@@const toggleKind = (kind, checked) => {setKinds((current) => checked ? current.includes(kind) ? current : [...current, kind] : current.filter((value) => value !== kind));};-- return (0, import_react47.createElement)(++ return (0, import_react48.createElement)("div",{ className: "bt-browser-settings" },-- (0, import_react47.createElement)(- Section,++ (0, import_react48.createElement)(+ Section2,{ title: t("Browser access") },-- (0, import_react47.createElement)("p", { className: "bt-browser-note" }, t("Bots browse, click and fill in forms freely. Posting, uploading, downloading and deleting ask you first unless you allow them here. Payments are always yours: the Bot hands the page to you."))++ (0, import_react48.createElement)("p", { className: "bt-browser-note" }, t("Bots browse, click and fill in forms freely. Posting, uploading, downloading and deleting ask you first unless you allow them here. Payments are always yours: the Bot hands the page to you."))),-- (0, import_react47.createElement)(- Section,++ (0, import_react48.createElement)(+ Section2,{ title: t("Allowed actions") },-- grants.length === 0 ? (0, import_react47.createElement)(Row3, { label: t("Nothing allowed yet.") }) : grants.map(({ bot, grant, index, expired: expired2 }) => (0, import_react47.createElement)(++ grants.length === 0 ? (0, import_react48.createElement)(Row3, { label: t("Nothing allowed yet.") }) : grants.map(({ bot, grant, index, expired: expired2 }) => (0, import_react48.createElement)("div",{key: `${bot.id}:${index}`,className: `bt-browser-grant${expired2 ? " bt-browser-grant-expired" : ""}`},-- (0, import_react47.createElement)(++ (0, import_react48.createElement)("div",{ className: "bt-browser-grant-who" },-- (0, import_react47.createElement)(BotAvatar, { bot, size: 28 }),-- (0, import_react47.createElement)("span", null, bot.name)++ (0, import_react48.createElement)(BotAvatar, { bot, size: 28 }),++ (0, import_react48.createElement)("span", null, bot.name)),-- (0, import_react47.createElement)(++ (0, import_react48.createElement)("div",{ className: "bt-browser-grant-meta" },-- (0, import_react47.createElement)("span", { className: "bt-browser-grant-site" }, grant.site === "*" ? t("All sites") : grant.site),-- (0, import_react47.createElement)("div", { className: "bt-browser-grant-kinds" }, grantKinds(grant).map((label) => (0, import_react47.createElement)("span", { key: label, className: "bt-chip" }, label))),-- (0, import_react47.createElement)("span", { className: "bt-set-hint" }, grantTime(grant))++ (0, import_react48.createElement)("span", { className: "bt-browser-grant-site" }, grant.site === "*" ? t("All sites") : grant.site),++ (0, import_react48.createElement)("div", { className: "bt-browser-grant-kinds" }, grantKinds(grant).map((label) => (0, import_react48.createElement)("span", { key: label, className: "bt-chip" }, label))),++ (0, import_react48.createElement)("span", { className: "bt-set-hint" }, grantTime(grant))),-- (0, import_react47.createElement)("button", {++ (0, import_react48.createElement)("button", {type: "button",className: "bt-soft bt-soft-sm",onClick: () => remove(bot, index),@@@ -21204,25 -21408,25 +21755,25 @@@}, t("Remove grant"))))),-- (0, import_react47.createElement)(- Section,++ (0, import_react48.createElement)(+ Section2,{ title: t("Allow an action") },-- (0, import_react47.createElement)(++ (0, import_react48.createElement)("form",{ className: "bt-browser-form", onSubmit: add },-- (0, import_react47.createElement)(++ (0, import_react48.createElement)(Row3,{ label: t("Bot") },-- (0, import_react47.createElement)(++ (0, import_react48.createElement)("select",{ className: "bt-select", value: botId, onChange: (event) => setBotId(event.target.value), disabled: bots.length === 0 },-- bots.map((bot) => (0, import_react47.createElement)("option", { key: bot.id, value: bot.id }, bot.name))++ bots.map((bot) => (0, import_react48.createElement)("option", { key: bot.id, value: bot.id }, bot.name)))),-- (0, import_react47.createElement)(++ (0, import_react48.createElement)(Row3,{ label: t("Site") },-- (0, import_react47.createElement)("input", {++ (0, import_react48.createElement)("input", {className: "bt-input bt-browser-site",type: "text",value: site,@@@ -21230,16 -21434,16 +21781,16 @@@onChange: (event) => setSite(event.target.value)})),-- (0, import_react47.createElement)(++ (0, import_react48.createElement)(Row3,{ label: t("Actions") },-- (0, import_react47.createElement)(++ (0, import_react48.createElement)("div",{ className: "bt-browser-action-list" },-- ACTIONS.map(([kind, label]) => (0, import_react47.createElement)(++ ACTIONS.map(([kind, label]) => (0, import_react48.createElement)("label",{ key: kind, className: "bt-browser-action-choice" },-- (0, import_react47.createElement)("input", {++ (0, import_react48.createElement)("input", {type: "checkbox",checked: kinds.includes(kind),onChange: (event) => toggleKind(kind, event.target.checked)@@@ -21248,13 -21452,13 +21799,13 @@@)))),-- (0, import_react47.createElement)(++ (0, import_react48.createElement)(Row3,{ label: t("Duration") },-- (0, import_react47.createElement)(++ (0, import_react48.createElement)("div",{ className: "bt-browser-duration", role: "group", "aria-label": t("Duration") },-- DURATIONS.map(([key, label]) => (0, import_react47.createElement)("button", {++ DURATIONS.map(([key, label]) => (0, import_react48.createElement)("button", {key,type: "button",className: "bt-browser-duration-choice",@@@ -21263,10 -21467,10 +21814,10 @@@}, t(label))))),-- (0, import_react47.createElement)(++ (0, import_react48.createElement)("div",{ className: "bt-browser-form-foot" },-- (0, import_react47.createElement)("button", {++ (0, import_react48.createElement)("button", {type: "submit",className: "bt-soft bt-soft-sm",disabled: busy || !selectedBot || kinds.length === 0@@@ -21278,12 -21482,12 +21829,12 @@@}// src/client/feedback.js--var import_react48 = require("react");--var FeedbackIcon = () => (0, import_react48.createElement)(++var import_react49 = require("react");++var FeedbackIcon = () => (0, import_react49.createElement)("svg",{ width: 15, height: 15, viewBox: "0 0 20 20", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true },-- (0, import_react48.createElement)("path", { d: "M4 4.5h12a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1H9l-3.5 3v-3H4a1 1 0 0 1-1-1v-7a1 1 0 0 1 1-1z" }),-- (0, import_react48.createElement)("path", { d: "M10 7v2.6M10 11.4h.01" })++ (0, import_react49.createElement)("path", { d: "M4 4.5h12a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1H9l-3.5 3v-3H4a1 1 0 0 1-1-1v-7a1 1 0 0 1 1-1z" }),++ (0, import_react49.createElement)("path", { d: "M10 7v2.6M10 11.4h.01" }));function download(name, text) {const url = URL.createObjectURL(new Blob([text], { type: "text/plain;charset=utf-8" }));@@@ -21305,18 -21509,32 +21856,18 @@@ function entrySummary(entry)return entry.text;}var SOURCES = { turn: "Model call", host: "DS Bot", api: "DS Bot", browser: "This window" };-function issueWindow() {- if (window.dshDesktop !== void 0) return { go: (url) => {- window.open(url, "_blank");- return true;- } };- const reserved = window.open("", "_blank");- if (reserved !== null) reserved.opener = null;- return {- go: (url) => {- if (reserved === null) return false;- reserved.location.href = url;- return true;- }- };-}-function FeedbackPage({ actions, run: run2, Section, Row: Row3 }) {- const [what, setWhat] = (0, import_react48.useState)("");- const [report, setReport] = (0, import_react48.useState)(null);- const [preview, setPreview] = (0, import_react48.useState)(false);- const [note, setNote] = (0, import_react48.useState)("");+var issueWindow = reserveWindow;+function FeedbackPage({ actions, run: run2, Section: Section2, Row: Row3 }) {- const [what, setWhat] = (0, import_react48.useState)("");- const [report, setReport] = (0, import_react48.useState)(null);- const [preview, setPreview] = (0, import_react48.useState)(false);- const [note, setNote] = (0, import_react48.useState)("");++ const [what, setWhat] = (0, import_react49.useState)("");++ const [report, setReport] = (0, import_react49.useState)(null);++ const [preview, setPreview] = (0, import_react49.useState)(false);++ const [note, setNote] = (0, import_react49.useState)("");const fetchReport = () => actions.diagnostics({ client: clientFacts(), clientErrors: clientErrors() }).then((next) => {setReport(next);return next;});const load = () => fetchReport().then(() => void 0);-- (0, import_react48.useEffect)(() => {++ (0, import_react49.useEffect)(() => {void run2(load());}, []);const copyReport = () => run2(fetchReport().then(async (next) => {@@@ -21324,7 -21542,7 +21875,7 @@@setNote(copied ? t("Copied the diagnostics.") : t("Could not copy. Select the text below and copy it."));if (!copied) setPreview(true);}));-- const [issueLink, setIssueLink] = (0, import_react48.useState)(null);++ const [issueLink, setIssueLink] = (0, import_react49.useState)(null);const openIssue = () => {const target = issueWindow();run2(fetchReport().then(async (next) => {@@@ -21350,59 -21568,59 +21901,59 @@@const total = (report?.total ?? 0) + browserErrors.length;const shown = entries2.slice(0, 8);return [-- (0, import_react48.createElement)(- Section,++ (0, import_react49.createElement)(+ Section2,{ key: "report", title: t("Report a problem") },-- (0, import_react48.createElement)(++ (0, import_react49.createElement)("div",{ className: "bt-set-row bt-set-paste bt-fb-what" },-- (0, import_react48.createElement)(++ (0, import_react49.createElement)("label",{ className: "bt-set-copy", htmlFor: "bt-fb-what" },-- (0, import_react48.createElement)("span", null, t("What happened?")),-- (0, import_react48.createElement)("span", { className: "bt-set-hint" }, t("What you did, what you expected, and what happened instead. It goes into the issue."))++ (0, import_react49.createElement)("span", null, t("What happened?")),++ (0, import_react49.createElement)("span", { className: "bt-set-hint" }, t("What you did, what you expected, and what happened instead. It goes into the issue."))),-- (0, import_react48.createElement)("textarea", { id: "bt-fb-what", className: "bt-input bt-input-area", value: what, maxLength: WHAT_MAX, placeholder: t("For example: I asked Writer in the group chat and it showed an error."), onChange: (event) => setWhat(event.target.value) })++ (0, import_react49.createElement)("textarea", { id: "bt-fb-what", className: "bt-input bt-input-area", value: what, maxLength: WHAT_MAX, placeholder: t("For example: I asked Writer in the group chat and it showed an error."), onChange: (event) => setWhat(event.target.value) })),-- (0, import_react48.createElement)(++ (0, import_react49.createElement)(Row3,{ label: t("Diagnostics"), hint: t("Versions, system, models, and the latest errors. Saved keys, tokens, and your home folder are hidden.") },-- (0, import_react48.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => setPreview(!preview), "aria-expanded": preview }, preview ? t("Hide") : t("Show")),-- (0, import_react48.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: copyReport }, t("Copy"))++ (0, import_react49.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => setPreview(!preview), "aria-expanded": preview }, preview ? t("Hide") : t("Show")),++ (0, import_react49.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: copyReport }, t("Copy"))),-- preview ? (0, import_react48.createElement)("div", { className: "bt-set-row bt-fb-preview" }, (0, import_react48.createElement)("pre", { tabIndex: 0, "aria-label": t("Diagnostics") }, report?.markdown || t("Loading…"))) : null,-- (0, import_react48.createElement)(++ preview ? (0, import_react49.createElement)("div", { className: "bt-set-row bt-fb-preview" }, (0, import_react49.createElement)("pre", { tabIndex: 0, "aria-label": t("Diagnostics") }, report?.markdown || t("Loading…"))) : null,++ (0, import_react49.createElement)(Row3,{ label: t("GitHub issue"), hint: t("Opens a new issue in the DS Bot repository with all of this filled in. Nothing is sent until you submit it there.") },-- (0, import_react48.createElement)("button", { type: "button", className: "bt-fb-primary", onClick: openIssue }, t("Report on GitHub"))++ (0, import_react49.createElement)("button", { type: "button", className: "bt-fb-primary", onClick: openIssue }, t("Report on GitHub")))),-- note ? (0, import_react48.createElement)(++ note ? (0, import_react49.createElement)("div",{ key: "note", className: "bt-note bt-fb-note", role: "status" },note,-- issueLink ? [" ", (0, import_react48.createElement)("a", { key: "link", href: issueLink, target: "_blank", rel: "noopener noreferrer" }, t("Open the issue"))] : null++ issueLink ? [" ", (0, import_react49.createElement)("a", { key: "link", href: issueLink, target: "_blank", rel: "noopener noreferrer" }, t("Open the issue"))] : null) : null,-- (0, import_react48.createElement)(- Section,++ (0, import_react49.createElement)(+ Section2,{ key: "errors", title: report ? t("Recent errors · {count}", { count: total }) : t("Recent errors") },-- shown.length === 0 ? (0, import_react48.createElement)(Row3, { label: t("No errors recorded."), hint: t("Failed model calls and DS Bot problems show here, newest first.") }) : shown.map((entry, index) => (0, import_react48.createElement)(++ shown.length === 0 ? (0, import_react49.createElement)(Row3, { label: t("No errors recorded."), hint: t("Failed model calls and DS Bot problems show here, newest first.") }) : shown.map((entry, index) => (0, import_react49.createElement)("div",{ key: `${entry.time}-${index}`, className: "bt-set-row bt-fb-entry", title: entry.text },-- (0, import_react48.createElement)("span", { className: "bt-fb-dot", "data-level": entry.level, "aria-hidden": true }),-- (0, import_react48.createElement)(++ (0, import_react49.createElement)("span", { className: "bt-fb-dot", "data-level": entry.level, "aria-hidden": true }),++ (0, import_react49.createElement)("div",{ className: "bt-set-copy" },-- (0, import_react48.createElement)("span", { className: "bt-fb-text" }, entrySummary(entry)),-- (0, import_react48.createElement)("span", { className: "bt-set-hint" }, [whenText(entry.time), entry.bot, entry.where, t(SOURCES[entry.source] ?? "DS Bot")].filter(Boolean).join(" · "))++ (0, import_react49.createElement)("span", { className: "bt-fb-text" }, entrySummary(entry)),++ (0, import_react49.createElement)("span", { className: "bt-set-hint" }, [whenText(entry.time), entry.bot, entry.where, t(SOURCES[entry.source] ?? "DS Bot")].filter(Boolean).join(" · "))),-- entry.code ? (0, import_react48.createElement)("span", { className: "bt-tag bt-fb-code" }, entry.status ? `${entry.code} ${entry.status}` : entry.code) : null++ entry.code ? (0, import_react49.createElement)("span", { className: "bt-tag bt-fb-code" }, entry.status ? `${entry.code} ${entry.status}` : entry.code) : null)),-- (0, import_react48.createElement)(++ (0, import_react49.createElement)(Row3,{ label: t("Error log"), hint: t("Kept on this computer across restarts, up to about 1 MB.") },-- (0, import_react48.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: downloadLog }, t("Download")),-- (0, import_react48.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: clearLog, disabled: !report || total === 0 }, t("Clear"))++ (0, import_react49.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: downloadLog }, t("Download")),++ (0, import_react49.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: clearLog, disabled: !report || total === 0 }, t("Clear"))))];@@@ -21410,8 -21628,8 +21961,8 @@@var TOAST_MS = 6e3;function ErrorToast({ useUi, actions }) {const toast = useUi((state) => state.toast);-- const [leaving, setLeaving] = (0, import_react48.useState)(false);-- (0, import_react48.useEffect)(() => {++ const [leaving, setLeaving] = (0, import_react49.useState)(false);++ (0, import_react49.useEffect)(() => {if (!toast) return void 0;setLeaving(false);const fade = setTimeout(() => setLeaving(true), TOAST_MS);@@@ -21422,15 -21640,15 +21973,15 @@@};}, [toast?.token]);if (!toast) return null;-- return (0, import_react48.createElement)(++ return (0, import_react49.createElement)("div",{ className: "bt-toast", role: "alert", "data-leaving": leaving || void 0 },-- (0, import_react48.createElement)("span", { className: "bt-toast-text" }, toast.text),-- (0, import_react48.createElement)("button", { type: "button", className: "bt-toast-link", onClick: () => {++ (0, import_react49.createElement)("span", { className: "bt-toast-text" }, toast.text),++ (0, import_react49.createElement)("button", { type: "button", className: "bt-toast-link", onClick: () => {actions.dismissToast(toast.token);actions.openSettings("feedback");} }, t("Details")),-- (0, import_react48.createElement)("button", { type: "button", className: "bt-icon-btn bt-toast-close", "aria-label": t("Dismiss"), onClick: () => actions.dismissToast(toast.token) }, (0, import_react48.createElement)(CloseIcon))++ (0, import_react49.createElement)("button", { type: "button", className: "bt-icon-btn bt-toast-close", "aria-label": t("Dismiss"), onClick: () => actions.dismissToast(toast.token) }, (0, import_react49.createElement)(CloseIcon)));}var FEEDBACK_CSS = `@@@ -21462,7 -21680,7 +22013,7 @@@`;// src/client/about.js--var import_react49 = require("react");++var import_react50 = require("react");var CHEER_MS = 1800;var starCount = (count) => new Intl.NumberFormat(dateLocale(), { notation: "compact", maximumFractionDigits: 1 }).format(count);function botHint(update) {@@@ -21508,11 -21726,11 +22059,11 @@@ function dshHint(dsh, shown)return t("Version {version}", { version: dsh.current });}var linkProps = (href) => ({ className: "bt-soft bt-soft-sm bt-about-link", href, target: "_blank", rel: "noopener noreferrer" });-function AboutPage({ useUpdate, actions, run: run2, Section, Row: Row3 }) {+function AboutPage({ useUpdate, actions, run: run2, Section: Section2, Row: Row3 }) {const update = useUpdate((value) => value) ?? {};-- const [checking, setChecking] = (0, import_react49.useState)(false);-- const [stars, setStars] = (0, import_react49.useState)(null);-- (0, import_react49.useEffect)(() => {++ const [checking, setChecking] = (0, import_react50.useState)(false);++ const [stars, setStars] = (0, import_react50.useState)(null);++ (0, import_react50.useEffect)(() => {let live = true;actions.repoStars().then((count) => {if (live && Number.isInteger(count)) setStars(count);@@@ -21522,8 -21740,8 +22073,8 @@@live = false;};}, []);-- const [cheer, setCheer] = (0, import_react49.useState)(true);-- (0, import_react49.useEffect)(() => {++ const [cheer, setCheer] = (0, import_react50.useState)(true);++ (0, import_react50.useEffect)(() => {if (!cheer) return void 0;const timer = setTimeout(() => setCheer(false), CHEER_MS);return () => clearTimeout(timer);@@@ -21538,37 -21756,37 +22089,37 @@@const phase = update.phase ?? "idle";const dsh = update.dsh;const dshPhase = dsh?.phase ?? "idle";-- (0, import_react49.useEffect)(() => {++ (0, import_react50.useEffect)(() => {if (phase === "installed" || phase === "updated" || dshPhase === "installed") setCheer(true);}, [phase, dshPhase]);const markState = checking ? "searching" : phase === "installing" || dshPhase === "installing" ? "working" : cheer ? "done" : "idle";const dshNew = showsDshRow(dsh, update.app);const dshShown = dshNew && dsh.available;const ownRow = update.source === "app" ? ownAppRow(update.ownApp) : null;-- const ownControl = ownRow?.button === "restart" ? (0, import_react49.createElement)("button", { type: "button", className: "bt-fb-primary", onClick: () => run2(actions.installOwnApp()) }, t("Restart to update")) : ownRow?.button === "check" ? (0, import_react49.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => run2(actions.checkOwnApp()) }, t("Check for updates")) : ownRow?.button === "open" ? (0, import_react49.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => run2(actions.openOwnApp()) }, t("Download")) : null;-- const botControl = ownRow !== null ? ownControl : phase === "installed" || phase === "updated" || update.source === "app" ? null : update.available || phase === "installing" ? (0, import_react49.createElement)(++ const ownControl = ownRow?.button === "restart" ? (0, import_react50.createElement)("button", { type: "button", className: "bt-fb-primary", onClick: () => run2(actions.installOwnApp()) }, t("Restart to update")) : ownRow?.button === "check" ? (0, import_react50.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => run2(actions.checkOwnApp()) }, t("Check for updates")) : ownRow?.button === "open" ? (0, import_react50.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => run2(actions.openOwnApp()) }, t("Download")) : null;++ const botControl = ownRow !== null ? ownControl : phase === "installed" || phase === "updated" || update.source === "app" ? null : update.available || phase === "installing" ? (0, import_react50.createElement)("button",{ type: "button", className: "bt-fb-primary", disabled: phase === "installing", onClick: () => run2(actions.installUpdate()) },phase === "installing" ? t("Updating…") : phase === "failed" ? t("Try again") : t("Update")-- ) : (0, import_react49.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: checking || update.enabled === false, onClick: check }, checking ? t("Checking…") : t("Check for updates"));-- const dshControl = !dshNew || dshPhase === "installed" ? null : dsh.kind === "app" ? dsh.available ? (0, import_react49.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => run2(actions.openAppUpdates(dsh.verified)) }, t("Open updates")) : null : dsh.available || dshPhase !== "idle" ? (0, import_react49.createElement)(++ ) : (0, import_react50.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: checking || update.enabled === false, onClick: check }, checking ? t("Checking…") : t("Check for updates"));++ const dshControl = !dshNew || dshPhase === "installed" ? null : dsh.kind === "app" ? dsh.available ? (0, import_react50.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => run2(actions.openAppUpdates(dsh.verified)) }, t("Open updates")) : null : dsh.available || dshPhase !== "idle" ? (0, import_react50.createElement)("button",{ type: "button", className: "bt-fb-primary", disabled: dshPhase === "installing", onClick: () => run2(actions.installDshUpdate()) },dshPhase === "installing" ? t("Updating…") : dshPhase === "failed" ? t("Try again") : t("Update")) : null;const repo = update.repoUrl;return [-- (0, import_react49.createElement)(++ (0, import_react50.createElement)("div",{ key: "hero", className: "bt-about-hero" },-- (0, import_react49.createElement)("span", { className: "bt-about-mark" }, (0, import_react49.createElement)(BotMark, { look: MAIN_LOOK, bot: { id: "about" }, size: 52, state: markState, live: true, gaze: true, pokeable: true })),-- (0, import_react49.createElement)(++ (0, import_react50.createElement)("span", { className: "bt-about-mark" }, (0, import_react50.createElement)(BotMark, { look: MAIN_LOOK, bot: { id: "about" }, size: 52, state: markState, live: true, gaze: true, pokeable: true })),++ (0, import_react50.createElement)("div",{ className: "bt-about-copy" },-- (0, import_react49.createElement)("span", { className: "bt-about-name" }, "DS Bot"),-- update.current ? (0, import_react49.createElement)("span", { className: "bt-about-version" }, t("Version {version}", { version: update.current })) : null++ (0, import_react50.createElement)("span", { className: "bt-about-name" }, "DS Bot"),++ update.current ? (0, import_react50.createElement)("span", { className: "bt-about-version" }, t("Version {version}", { version: update.current })) : null),-- repo ? (0, import_react49.createElement)(++ repo ? (0, import_react50.createElement)("a",{className: "bt-star",@@@ -21578,23 -21796,23 +22129,23 @@@title: t("Star DS Bot on GitHub"),"aria-label": stars === null ? t("Star DS Bot on GitHub") : `${t("Star DS Bot on GitHub")} · ${t("{count} stars", { count: stars })}`},-- (0, import_react49.createElement)("span", { className: "bt-star-main" }, (0, import_react49.createElement)("span", { className: "bt-star-icon" }, (0, import_react49.createElement)(StarLineIcon)), "Star"),-- stars === null ? null : (0, import_react49.createElement)("span", { className: "bt-star-count" }, starCount(stars))++ (0, import_react50.createElement)("span", { className: "bt-star-main" }, (0, import_react50.createElement)("span", { className: "bt-star-icon" }, (0, import_react50.createElement)(StarLineIcon)), "Star"),++ stars === null ? null : (0, import_react50.createElement)("span", { className: "bt-star-count" }, starCount(stars))) : null),-- repo ? (0, import_react49.createElement)("p", { key: "ask", className: "bt-about-ask" }, t("If DS Bot helps you, a star on GitHub helps more people find it.")) : null,-- (0, import_react49.createElement)(- Section,++ repo ? (0, import_react50.createElement)("p", { key: "ask", className: "bt-about-ask" }, t("If DS Bot helps you, a star on GitHub helps more people find it.")) : null,++ (0, import_react50.createElement)(+ Section2,{ key: "updates", title: t("Updates") },-- (0, import_react49.createElement)(Row3, { label: "DS Bot", hint: ownRow?.hint ?? botHint(update) }, botControl, update.available && update.notesUrl ? (0, import_react49.createElement)("a", linkProps(update.notesUrl), t("What's new")) : null),-- dsh?.current ? (0, import_react49.createElement)(Row3, { label: "DeepSeek Harness", hint: dshHint(dsh, dshShown) }, dshControl) : null++ (0, import_react50.createElement)(Row3, { label: "DS Bot", hint: ownRow?.hint ?? botHint(update) }, botControl, update.available && update.notesUrl ? (0, import_react50.createElement)("a", linkProps(update.notesUrl), t("What's new")) : null),++ dsh?.current ? (0, import_react50.createElement)(Row3, { label: "DeepSeek Harness", hint: dshHint(dsh, dshShown) }, dshControl) : null),-- (0, import_react49.createElement)(- Section,++ (0, import_react50.createElement)(+ Section2,{ key: "links", title: t("Links") },-- repo ? (0, import_react49.createElement)(Row3, { label: t("Source code"), hint: repo.replace(/^https:\/\//, "") }, (0, import_react49.createElement)("a", linkProps(repo), (0, import_react49.createElement)(GitHubMark), t("Open"))) : null,-- update.notesUrl ? (0, import_react49.createElement)(Row3, { label: t("Release notes") }, (0, import_react49.createElement)("a", linkProps(update.notesUrl), t("Open"))) : null,-- (0, import_react49.createElement)(Row3, { label: t("Report a problem") }, (0, import_react49.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => actions.openSettings("feedback") }, t("Open")))++ repo ? (0, import_react50.createElement)(Row3, { label: t("Source code"), hint: repo.replace(/^https:\/\//, "") }, (0, import_react50.createElement)("a", linkProps(repo), (0, import_react50.createElement)(GitHubMark), t("Open"))) : null,++ update.notesUrl ? (0, import_react50.createElement)(Row3, { label: t("Release notes") }, (0, import_react50.createElement)("a", linkProps(update.notesUrl), t("Open"))) : null,++ (0, import_react50.createElement)(Row3, { label: t("Report a problem") }, (0, import_react50.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => actions.openSettings("feedback") }, t("Open"))))];}@@@ -21627,30 -21845,30 +22178,30 @@@ body:not([data-bt-motion=quiet]) .bt-ab`;// src/client/providers-page.js--var import_react50 = require("react");++var import_react51 = require("react");var PROTOCOL_NAMES = { "openai-completions": "OpenAI Chat Completions", "openai-responses": "OpenAI Responses", "anthropic-messages": "Anthropic Messages" };var ENDPOINT_HINTS = { "anthropic-messages": "https://gateway.example" };var SHOWN_MODELS = 8;var translated = (promise) => Promise.resolve(promise).catch((failure) => {throw new Error(hostText(failure?.message ?? String(failure)));});-function ProvidersPage({ actions, run: run2, Section }) {- const [view, setView] = (0, import_react50.useState)(null);- const [open, setOpen] = (0, import_react50.useState)(null);- const [adding, setAdding] = (0, import_react50.useState)(false);+function ProvidersPage({ actions, run: run2, Section: Section2 }) {- const [view, setView] = (0, import_react50.useState)(null);- const [open, setOpen] = (0, import_react50.useState)(null);- const [adding, setAdding] = (0, import_react50.useState)(false);++ const [view, setView] = (0, import_react51.useState)(null);++ const [open, setOpen] = (0, import_react51.useState)(null);++ const [adding, setAdding] = (0, import_react51.useState)(false);const apply2 = (promise) => run2(translated(promise).then((next) => {if (next?.providers) setView(next);}));-- (0, import_react50.useEffect)(() => {++ (0, import_react51.useEffect)(() => {void apply2(actions.providers());}, []);if (view === null) return null;-- if (!view.available) return (0, import_react50.createElement)("p", { className: "bt-set-hint" }, t("This DSH cannot set up model providers."));++ if (!view.available) return (0, import_react51.createElement)("p", { className: "bt-set-hint" }, t("This DSH cannot set up model providers."));return [-- (0, import_react50.createElement)(- Section,++ (0, import_react51.createElement)(+ Section2,{ key: "list", title: t("Model providers · {count}", { count: view.providers.length }) },-- view.providers.map((provider) => (0, import_react50.createElement)(ProviderRow, {++ view.providers.map((provider) => (0, import_react51.createElement)(ProviderRow, {key: provider.id,provider,apply: apply2,@@@ -21658,9 -21876,9 +22209,9 @@@open: open === provider.id,onToggle: () => setOpen(open === provider.id ? null : provider.id)})),-- adding ? (0, import_react50.createElement)(AddProvider, { key: "add", view, apply: apply2, actions, onDone: () => setAdding(false) }) : null++ adding ? (0, import_react51.createElement)(AddProvider, { key: "add", view, apply: apply2, actions, onDone: () => setAdding(false) }) : null),-- adding ? null : (0, import_react50.createElement)("div", { key: "add", className: "bt-actions" }, (0, import_react50.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => setAdding(true) }, t("Add a provider")))++ adding ? null : (0, import_react51.createElement)("div", { key: "add", className: "bt-actions" }, (0, import_react51.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => setAdding(true) }, t("Add a provider")))];}function keyState(key) {@@@ -21669,58 -21887,58 +22220,58 @@@return key.writable ? ["set", t("Key set")] : ["outside", t("Key set outside DS Bot")];}function ProviderRow({ provider, apply: apply2, actions, open, onToggle }) {-- const [confirm, setConfirm] = (0, import_react50.useState)(false);-- (0, import_react50.useEffect)(() => {++ const [confirm, setConfirm] = (0, import_react51.useState)(false);++ (0, import_react51.useEffect)(() => {if (!open) setConfirm(false);}, [open]);const state = keyState(provider.key);const shown = provider.models.slice(0, SHOWN_MODELS);const hint = provider.error ?? (provider.models.length === 0 ? t("No models") : t("{count} models", { count: provider.models.length }));-- return (0, import_react50.createElement)(++ return (0, import_react51.createElement)("div",{ className: "bt-secret-item bt-provider", "data-open": open ? "" : void 0 },-- (0, import_react50.createElement)(++ (0, import_react51.createElement)("button",{ type: "button", className: "bt-set-row bt-secret-summary", "aria-expanded": open, onClick: onToggle },-- (0, import_react50.createElement)(++ (0, import_react51.createElement)("span",{ className: "bt-set-copy" },-- (0, import_react50.createElement)("span", { className: "bt-secret-title" }, provider.name, provider.name !== provider.id ? (0, import_react50.createElement)("span", { className: "bt-provider-id" }, provider.id) : null),-- (0, import_react50.createElement)("span", { className: "bt-set-hint", "data-error": provider.error ? "" : void 0 }, hint)++ (0, import_react51.createElement)("span", { className: "bt-secret-title" }, provider.name, provider.name !== provider.id ? (0, import_react51.createElement)("span", { className: "bt-provider-id" }, provider.id) : null),++ (0, import_react51.createElement)("span", { className: "bt-set-hint", "data-error": provider.error ? "" : void 0 }, hint)),-- state ? (0, import_react50.createElement)("span", { className: "bt-set-control" }, (0, import_react50.createElement)("span", { className: "bt-provider-state", "data-state": state[0] }, state[1])) : null++ state ? (0, import_react51.createElement)("span", { className: "bt-set-control" }, (0, import_react51.createElement)("span", { className: "bt-provider-state", "data-state": state[0] }, state[1])) : null),-- open ? (0, import_react50.createElement)(++ open ? (0, import_react51.createElement)("div",{ className: "bt-secret-edit" },-- provider.key?.writable ? (0, import_react50.createElement)(KeyEditor, { provider, apply: apply2, actions }) : null,-- provider.key && !provider.key.writable ? (0, import_react50.createElement)("div", { className: "bt-set-hint" }, t("This key comes from outside DS Bot, such as an environment variable, and cannot be changed here.")) : null,-- provider.models.length > 0 ? (0, import_react50.createElement)(++ provider.key?.writable ? (0, import_react51.createElement)(KeyEditor, { provider, apply: apply2, actions }) : null,++ provider.key && !provider.key.writable ? (0, import_react51.createElement)("div", { className: "bt-set-hint" }, t("This key comes from outside DS Bot, such as an environment variable, and cannot be changed here.")) : null,++ provider.models.length > 0 ? (0, import_react51.createElement)("div",{ className: "bt-secret-edit-block" },-- (0, import_react50.createElement)("div", { className: "bt-secret-edit-label" }, t("Models")),-- (0, import_react50.createElement)(++ (0, import_react51.createElement)("div", { className: "bt-secret-edit-label" }, t("Models")),++ (0, import_react51.createElement)("div",{ className: "bt-provider-models" },-- shown.map((model) => (0, import_react50.createElement)("span", { key: model.ref, className: "bt-tag", title: model.ref }, model.name)),-- provider.models.length > shown.length ? (0, import_react50.createElement)("span", { className: "bt-set-hint" }, t("and {count} more", { count: provider.models.length - shown.length })) : null++ shown.map((model) => (0, import_react51.createElement)("span", { key: model.ref, className: "bt-tag", title: model.ref }, model.name)),++ provider.models.length > shown.length ? (0, import_react51.createElement)("span", { className: "bt-set-hint" }, t("and {count} more", { count: provider.models.length - shown.length })) : null)) : null,-- provider.removable ? (0, import_react50.createElement)(++ provider.removable ? (0, import_react51.createElement)("div",{ className: "bt-secret-row-actions" },confirm ? [-- (0, import_react50.createElement)("span", { key: "q", className: "bt-set-hint" }, t("Remove {name}? Bots on its models need another model.", { name: provider.name })),-- (0, import_react50.createElement)("button", { key: "no", type: "button", className: "bt-soft bt-soft-sm", onClick: () => setConfirm(false) }, t("Keep")),-- (0, import_react50.createElement)("button", { key: "yes", type: "button", className: "bt-soft bt-soft-sm bt-secret-danger", onClick: () => apply2(actions.removeProvider(provider.id)) }, t("Remove"))-- ] : (0, import_react50.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm bt-secret-danger", onClick: () => setConfirm(true) }, (0, import_react50.createElement)(TrashIcon), t("Remove provider"))++ (0, import_react51.createElement)("span", { key: "q", className: "bt-set-hint" }, t("Remove {name}? Bots on its models need another model.", { name: provider.name })),++ (0, import_react51.createElement)("button", { key: "no", type: "button", className: "bt-soft bt-soft-sm", onClick: () => setConfirm(false) }, t("Keep")),++ (0, import_react51.createElement)("button", { key: "yes", type: "button", className: "bt-soft bt-soft-sm bt-secret-danger", onClick: () => apply2(actions.removeProvider(provider.id)) }, t("Remove"))++ ] : (0, import_react51.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm bt-secret-danger", onClick: () => setConfirm(true) }, (0, import_react51.createElement)(TrashIcon), t("Remove provider"))) : null) : null);}function KeyEditor({ provider, apply: apply2, actions }) {-- const [value, setValue] = (0, import_react50.useState)("");-- const [saved, setSaved] = (0, import_react50.useState)(false);++ const [value, setValue] = (0, import_react51.useState)("");++ const [saved, setSaved] = (0, import_react51.useState)(false);const ready = value.trim() !== "";const save = () => {if (!ready) return;@@@ -21736,29 -21954,29 +22287,29 @@@setSaved(false);};const label = t("{provider} API key", { provider: provider.name });-- return (0, import_react50.createElement)(++ return (0, import_react51.createElement)("div",{ className: "bt-secret-edit-block" },-- (0, import_react50.createElement)("div", { className: "bt-secret-edit-label" }, provider.key.configured ? t("Replace the API key") : t("API key")),-- (0, import_react50.createElement)(++ (0, import_react51.createElement)("div", { className: "bt-secret-edit-label" }, provider.key.configured ? t("Replace the API key") : t("API key")),++ (0, import_react51.createElement)("div",{ className: "bt-secret-inline" },-- (0, import_react50.createElement)("label", { className: "bt-q-field bt-secret-field" }, (0, import_react50.createElement)(KeyIcon), (0, import_react50.createElement)(MaskedInput, { value, onChange: edit, onEnter: save, label })),-- (0, import_react50.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: !ready, onClick: save }, t("Save")),-- provider.key.configured ? (0, import_react50.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm bt-secret-danger", onClick: () => apply2(actions.setProviderKey(provider.id, null)) }, t("Remove key")) : null++ (0, import_react51.createElement)("label", { className: "bt-q-field bt-secret-field" }, (0, import_react51.createElement)(KeyIcon), (0, import_react51.createElement)(MaskedInput, { value, onChange: edit, onEnter: save, label })),++ (0, import_react51.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: !ready, onClick: save }, t("Save")),++ provider.key.configured ? (0, import_react51.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm bt-secret-danger", onClick: () => apply2(actions.setProviderKey(provider.id, null)) }, t("Remove key")) : null),-- saved ? (0, import_react50.createElement)("div", { className: "bt-set-hint bt-secret-ok", role: "status" }, (0, import_react50.createElement)(CheckIcon), t("Saved.")) : null++ saved ? (0, import_react51.createElement)("div", { className: "bt-set-hint bt-secret-ok", role: "status" }, (0, import_react51.createElement)(CheckIcon), t("Saved.")) : null);}function AddProvider({ view, apply: apply2, actions, onDone }) {-- const [mode, setMode] = (0, import_react50.useState)(view.addable.length > 0 ? "known" : "custom");-- return (0, import_react50.createElement)(++ const [mode, setMode] = (0, import_react51.useState)(view.addable.length > 0 ? "known" : "custom");++ return (0, import_react51.createElement)("div",{ className: "bt-set-row bt-set-paste bt-provider-add" },-- (0, import_react50.createElement)(++ (0, import_react51.createElement)(Segmented,{ label: t("Kind of provider"), value: mode },-- [["known", t("Known provider")], ["custom", t("Custom API")]].map(([id, label]) => (0, import_react50.createElement)("button", {++ [["known", t("Known provider")], ["custom", t("Custom API")]].map(([id, label]) => (0, import_react51.createElement)("button", {key: id,type: "button","aria-pressed": mode === id,@@@ -21767,13 -21985,13 +22318,13 @@@}, label))),// Both forms stay mounted, so switching keeps what is typed in the other.-- (0, import_react50.createElement)("div", { hidden: mode !== "known" }, (0, import_react50.createElement)(KnownForm, { view, apply: apply2, actions, onDone })),-- (0, import_react50.createElement)("div", { hidden: mode !== "custom" }, (0, import_react50.createElement)(CustomForm, { view, apply: apply2, actions, onDone }))++ (0, import_react51.createElement)("div", { hidden: mode !== "known" }, (0, import_react51.createElement)(KnownForm, { view, apply: apply2, actions, onDone })),++ (0, import_react51.createElement)("div", { hidden: mode !== "custom" }, (0, import_react51.createElement)(CustomForm, { view, apply: apply2, actions, onDone })));}function KnownForm({ view, apply: apply2, actions, onDone }) {-- const [provider, setProvider] = (0, import_react50.useState)("");-- const [key, setKey] = (0, import_react50.useState)("");++ const [provider, setProvider] = (0, import_react51.useState)("");++ const [key, setKey] = (0, import_react51.useState)("");const options = [...view.addable].sort((a, b) => a.name.localeCompare(b.name));const add = () => {if (provider === "") return;@@@ -21781,24 -21999,24 +22332,24 @@@if (ok) onDone();});};-- return (0, import_react50.createElement)(++ return (0, import_react51.createElement)("div",{ className: "bt-provider-form" },-- (0, import_react50.createElement)(++ (0, import_react51.createElement)("select",{ className: "bt-select", "aria-label": t("Provider"), value: provider, onChange: (event) => setProvider(event.target.value) },-- (0, import_react50.createElement)("option", { value: "", disabled: true }, t("Choose a provider")),-- options.map((option) => (0, import_react50.createElement)("option", { key: option.id, value: option.id }, option.name))++ (0, import_react51.createElement)("option", { value: "", disabled: true }, t("Choose a provider")),++ options.map((option) => (0, import_react51.createElement)("option", { key: option.id, value: option.id }, option.name))),-- (0, import_react50.createElement)("label", { className: "bt-q-field bt-secret-field" }, (0, import_react50.createElement)(KeyIcon), (0, import_react50.createElement)(MaskedInput, { value: key, onChange: setKey, onEnter: add, label: t("API key") })),-- (0, import_react50.createElement)(FormActions, { onCancel: onDone, onAdd: add, ready: provider !== "" })++ (0, import_react51.createElement)("label", { className: "bt-q-field bt-secret-field" }, (0, import_react51.createElement)(KeyIcon), (0, import_react51.createElement)(MaskedInput, { value: key, onChange: setKey, onEnter: add, label: t("API key") })),++ (0, import_react51.createElement)(FormActions, { onCancel: onDone, onAdd: add, ready: provider !== "" }));}function CustomForm({ view, apply: apply2, actions, onDone }) {-- const [draft, setDraft] = (0, import_react50.useState)({ provider: "", name: "", baseURL: "", api: view.protocols[0], key: "", typed: "" });-- const [found, setFound] = (0, import_react50.useState)(null);-- const [picked, setPicked] = (0, import_react50.useState)([]);-- const [asking, setAsking] = (0, import_react50.useState)(false);++ const [draft, setDraft] = (0, import_react51.useState)({ provider: "", name: "", baseURL: "", api: view.protocols[0], key: "", typed: "" });++ const [found, setFound] = (0, import_react51.useState)(null);++ const [picked, setPicked] = (0, import_react51.useState)([]);++ const [asking, setAsking] = (0, import_react51.useState)(false);const set = (field, value) => setDraft((current) => ({ ...current, [field]: value }));const typed = draft.typed.split(/[\s,]+/).map((id) => id.trim()).filter(Boolean);const models = [...(found ?? []).filter((model) => picked.includes(model.id)), ...typed.filter((id) => !picked.includes(id)).map((id) => ({ id }))];@@@ -21817,7 -22035,7 +22368,7 @@@if (ok) onDone();});};-- const input = (field, label, placeholder) => (0, import_react50.createElement)("input", {++ const input = (field, label, placeholder) => (0, import_react51.createElement)("input", {className: "bt-input","aria-label": label,placeholder,@@@ -21826,55 -22044,55 +22377,55 @@@autoComplete: "off",onChange: (event) => set(field, event.target.value)});-- return (0, import_react50.createElement)(++ return (0, import_react51.createElement)("div",{ className: "bt-provider-form" },-- (0, import_react50.createElement)(++ (0, import_react51.createElement)("div",{ className: "bt-provider-pair" },input("provider", t("Provider ID"), t("Provider ID, e.g. my-gateway")),input("name", t("Name"), t("Name (optional)"))),-- (0, import_react50.createElement)(++ (0, import_react51.createElement)("div",{ className: "bt-provider-pair" },input("baseURL", t("Endpoint"), ENDPOINT_HINTS[draft.api] ?? "https://gateway.example/v1"),-- (0, import_react50.createElement)(++ (0, import_react51.createElement)("select",{ className: "bt-select", "aria-label": t("Protocol"), value: draft.api, onChange: (event) => set("api", event.target.value) },-- view.protocols.map((api) => (0, import_react50.createElement)("option", { key: api, value: api }, PROTOCOL_NAMES[api] ?? api))++ view.protocols.map((api) => (0, import_react51.createElement)("option", { key: api, value: api }, PROTOCOL_NAMES[api] ?? api)))),-- (0, import_react50.createElement)("label", { className: "bt-q-field bt-secret-field" }, (0, import_react50.createElement)(KeyIcon), (0, import_react50.createElement)(MaskedInput, { value: draft.key, onChange: (value) => set("key", value), label: t("API key") })),-- (0, import_react50.createElement)(++ (0, import_react51.createElement)("label", { className: "bt-q-field bt-secret-field" }, (0, import_react51.createElement)(KeyIcon), (0, import_react51.createElement)(MaskedInput, { value: draft.key, onChange: (value) => set("key", value), label: t("API key") })),++ (0, import_react51.createElement)("div",{ className: "bt-secret-edit-block" },-- (0, import_react50.createElement)(++ (0, import_react51.createElement)("div",{ className: "bt-provider-models-head" },-- (0, import_react50.createElement)("span", { className: "bt-secret-edit-label" }, t("Models")),-- (0, import_react50.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: asking || draft.baseURL.trim() === "", onClick: fetchModels }, asking ? t("Asking…") : t("Fetch models"))++ (0, import_react51.createElement)("span", { className: "bt-secret-edit-label" }, t("Models")),++ (0, import_react51.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: asking || draft.baseURL.trim() === "", onClick: fetchModels }, asking ? t("Asking…") : t("Fetch models"))),-- found !== null && found.length === 0 ? (0, import_react50.createElement)("div", { className: "bt-set-hint" }, t("The endpoint lists no models. Enter their ids below.")) : null,-- found !== null && found.length > 0 ? (0, import_react50.createElement)("div", { className: "bt-secret-bots bt-provider-found" }, found.map((model) => (0, import_react50.createElement)("button", {++ found !== null && found.length === 0 ? (0, import_react51.createElement)("div", { className: "bt-set-hint" }, t("The endpoint lists no models. Enter their ids below.")) : null,++ found !== null && found.length > 0 ? (0, import_react51.createElement)("div", { className: "bt-secret-bots bt-provider-found" }, found.map((model) => (0, import_react51.createElement)("button", {key: model.id,type: "button",className: "bt-secret-bot","aria-pressed": picked.includes(model.id),title: model.name && model.name !== model.id ? model.name : void 0,onClick: () => toggle(model.id)-- }, (0, import_react50.createElement)("code", null, model.id), picked.includes(model.id) ? (0, import_react50.createElement)(CheckIcon) : null))) : null,++ }, (0, import_react51.createElement)("code", null, model.id), picked.includes(model.id) ? (0, import_react51.createElement)(CheckIcon) : null))) : null,input("typed", t("Model ids"), t("Model ids, separated by commas"))),-- (0, import_react50.createElement)(FormActions, { onCancel: onDone, onAdd: add, ready })++ (0, import_react51.createElement)(FormActions, { onCancel: onDone, onAdd: add, ready }));}function FormActions({ onCancel, onAdd, ready }) {-- return (0, import_react50.createElement)(++ return (0, import_react51.createElement)("div",{ className: "bt-secret-row-actions" },-- (0, import_react50.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: onCancel }, t("Cancel")),-- (0, import_react50.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: !ready, onClick: onAdd }, t("Add"))++ (0, import_react51.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: onCancel }, t("Cancel")),++ (0, import_react51.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: !ready, onClick: onAdd }, t("Add")));}var PROVIDERS_CSS = `@@@ -21905,24 -22123,24 +22456,24 @@@`;// src/client/settings.js--var import_react51 = require("react");++var import_react52 = require("react");var capitalize2 = (word) => word[0].toUpperCase() + word.slice(1);- var SETTINGS_PAGES = [["general", "General"], ["models", "Models"], ["bots", "Bots"], ["groups", "Group chats"], ["connectors", "Connectors"], ["im", "IM"], ["capabilities", "Capabilities"], ["browser", "Browser"], ["schedules", "Scheduled tasks"], ["usage", "Usage"], ["secrets", "Secrets"], ["feedback", "Feedback"], ["about", "About DS Bot"]];- var PAGE_ICONS = { ...SETTINGS_ICONS, models: SlidersIcon, connectors: ConnectorIcon, im: ChatsIcon, capabilities: PlugIcon, browser: GlobeIcon, schedules: ClockIcon, secrets: KeyIcon, feedback: FeedbackIcon, about: InfoIcon };+ var SETTINGS_PAGES = [["general", "General"], ["models", "Models"], ["bots", "Bots"], ["groups", "Group chats"], ["connectors", "Connectors"], ["im", "IM"], ["capabilities", "Capabilities"], ["browser", "Browser"], ["computer", "Computer use"], ["schedules", "Scheduled tasks"], ["usage", "Usage"], ["secrets", "Secrets"], ["feedback", "Feedback"], ["about", "About DS Bot"]];+ var PAGE_ICONS = { ...SETTINGS_ICONS, models: SlidersIcon, connectors: ConnectorIcon, im: ChatsIcon, capabilities: PlugIcon, browser: GlobeIcon, computer: MonitorIcon, schedules: ClockIcon, secrets: KeyIcon, feedback: FeedbackIcon, about: InfoIcon };function SetSection({ title, className = "", children }) {-- return (0, import_react51.createElement)("section", { className: `bt-set-section ${className}`.trim() }, (0, import_react51.createElement)("h3", null, title), (0, import_react51.createElement)("div", { className: "bt-set-card" }, children));++ return (0, import_react52.createElement)("section", { className: `bt-set-section ${className}`.trim() }, (0, import_react52.createElement)("h3", null, title), (0, import_react52.createElement)("div", { className: "bt-set-card" }, children));}function SetRow({ label, hint, children, className = "" }) {-- return (0, import_react51.createElement)(++ return (0, import_react52.createElement)("div",{ className: `bt-set-row ${className}`.trim() },-- (0, import_react51.createElement)("div", { className: "bt-set-copy" }, (0, import_react51.createElement)("span", null, label), hint ? (0, import_react51.createElement)("span", { className: "bt-set-hint" }, hint) : null),-- children ? (0, import_react51.createElement)("div", { className: "bt-set-control" }, children) : null++ (0, import_react52.createElement)("div", { className: "bt-set-copy" }, (0, import_react52.createElement)("span", null, label), hint ? (0, import_react52.createElement)("span", { className: "bt-set-hint" }, hint) : null),++ children ? (0, import_react52.createElement)("div", { className: "bt-set-control" }, children) : null);}var LAYOUTS = [["bubble", "Bubble"], ["flat", "Flat"]];function Choice({ label, value, options, pick: pick2 }) {-- return (0, import_react51.createElement)(Segmented, { label, value, className: "bt-look-seg" }, options.map(([id, text]) => (0, import_react51.createElement)("button", {++ return (0, import_react52.createElement)(Segmented, { label, value, className: "bt-look-seg" }, options.map(([id, text]) => (0, import_react52.createElement)("button", {key: id,type: "button","aria-pressed": value === id,@@@ -21932,12 -22150,12 +22483,12 @@@}, t(text))));}function WidthSlider({ label, value, save }) {-- const [width, setWidth] = (0, import_react51.useState)(value);-- const pending = (0, import_react51.useRef)(null);-- const timer = (0, import_react51.useRef)(0);-- const saveRef = (0, import_react51.useRef)(save);++ const [width, setWidth] = (0, import_react52.useState)(value);++ const pending = (0, import_react52.useRef)(null);++ const timer = (0, import_react52.useRef)(0);++ const saveRef = (0, import_react52.useRef)(save);saveRef.current = save;-- (0, import_react51.useEffect)(() => {++ (0, import_react52.useEffect)(() => {if (pending.current === null) setWidth(value);}, [value]);const flush = () => {@@@ -21945,7 -22163,7 +22496,7 @@@pending.current = null;if (next !== null) saveRef.current(next);};-- (0, import_react51.useEffect)(() => () => {++ (0, import_react52.useEffect)(() => () => {clearTimeout(timer.current);flush();}, []);@@@ -21956,46 -22174,46 +22507,46 @@@timer.current = setTimeout(flush, 350);};const { min, max, step } = MESSAGE_WIDTH;-- return (0, import_react51.createElement)(++ return (0, import_react52.createElement)("div",{ className: "bt-range", style: { "--bt-fill": `${(width - min) / (max - min) * 100}%` } },-- (0, import_react51.createElement)("input", { type: "range", min, max, step, value: width, "aria-label": label, "aria-valuetext": `${width}%`, onChange: (event) => pick2(Number(event.target.value)) }),-- (0, import_react51.createElement)("output", null, `${width}%`)++ (0, import_react52.createElement)("input", { type: "range", min, max, step, value: width, "aria-label": label, "aria-valuetext": `${width}%`, onChange: (event) => pick2(Number(event.target.value)) }),++ (0, import_react52.createElement)("output", null, `${width}%`));}function GeneralPage({ roster, actions, run: run2 }) {const prefs = roster.prefs ?? {};const themes = allThemes();const current = themes[prefs.theme] ? prefs.theme : "deepseek";-- const [custom, setCustom] = (0, import_react51.useState)(prefs.accent ?? "#4d6bfe");-- const timer = (0, import_react51.useRef)(0);-- (0, import_react51.useEffect)(() => () => clearTimeout(timer.current), []);++ const [custom, setCustom] = (0, import_react52.useState)(prefs.accent ?? "#4d6bfe");++ const timer = (0, import_react52.useRef)(0);++ (0, import_react52.useEffect)(() => () => clearTimeout(timer.current), []);const pickCustom = (value) => {setCustom(value);clearTimeout(timer.current);timer.current = setTimeout(() => run2(actions.setPrefs({ accent: value })), 350);};return [-- (0, import_react51.createElement)(++ (0, import_react52.createElement)(SetSection,{ key: "look", title: t("Appearance") },-- (0, import_react51.createElement)(++ (0, import_react52.createElement)(SetRow,{ label: t("Theme"), hint: t("Colors for the whole team, on every device.") },-- (0, import_react51.createElement)(++ (0, import_react52.createElement)("select",{ className: "bt-select", "aria-label": t("Theme"), value: current, onChange: (event) => run2(actions.setPrefs({ theme: event.target.value })) },-- Object.entries(themes).map(([id, theme]) => (0, import_react51.createElement)("option", { key: id, value: id }, t(theme.label)))++ Object.entries(themes).map(([id, theme]) => (0, import_react52.createElement)("option", { key: id, value: id }, t(theme.label))))),-- (0, import_react51.createElement)(++ (0, import_react52.createElement)(SetRow,{ label: t("Accent"), hint: t("Unread marks, badges, and the brand mark.") },-- (0, import_react51.createElement)(++ (0, import_react52.createElement)("div",{ className: "bt-swatches" },-- (0, import_react51.createElement)("button", { type: "button", className: "bt-swatch bt-swatch-default", title: t("Theme accent"), "aria-label": t("Theme accent"), "aria-pressed": !prefs.accent, onClick: () => run2(actions.setPrefs({ accent: null })) }),-- ACCENT_INKS.map((ink) => (0, import_react51.createElement)("button", {++ (0, import_react52.createElement)("button", { type: "button", className: "bt-swatch bt-swatch-default", title: t("Theme accent"), "aria-label": t("Theme accent"), "aria-pressed": !prefs.accent, onClick: () => run2(actions.setPrefs({ accent: null })) }),++ ACCENT_INKS.map((ink) => (0, import_react52.createElement)("button", {key: ink,type: "button",className: "bt-swatch",@@@ -22005,26 -22223,26 +22556,26 @@@style: { background: INKS[ink][0] },onClick: () => run2(actions.setPrefs({ accent: INKS[ink][0] }))})),-- (0, import_react51.createElement)(++ (0, import_react52.createElement)("label",{ className: "bt-swatch bt-swatch-custom", title: t("Custom accent"), "data-on": Boolean(prefs.accent) && !ACCENT_INKS.some((ink) => INKS[ink][0] === prefs.accent) },-- (0, import_react51.createElement)("input", { type: "color", value: custom, "aria-label": t("Custom accent"), onChange: (event) => pickCustom(event.target.value) })++ (0, import_react52.createElement)("input", { type: "color", value: custom, "aria-label": t("Custom accent"), onChange: (event) => pickCustom(event.target.value) })))),-- (0, import_react51.createElement)(SetRow, { label: t("Message layout") }, (0, import_react51.createElement)(Choice, { label: t("Message layout"), value: layoutOf(prefs), options: LAYOUTS, pick: (id) => run2(actions.setPrefs({ layout: id })) })),++ (0, import_react52.createElement)(SetRow, { label: t("Message layout") }, (0, import_react52.createElement)(Choice, { label: t("Message layout"), value: layoutOf(prefs), options: LAYOUTS, pick: (id) => run2(actions.setPrefs({ layout: id })) })),// The flat layout's text has a width of its own; the bubble width stays for the user's messages.-- layoutOf(prefs) === "flat" ? (0, import_react51.createElement)(SetRow, { label: t("Text width") }, (0, import_react51.createElement)(WidthSlider, { label: t("Text width"), value: flatWidthOf(prefs), save: (flatWidth) => run2(actions.setPrefs({ flatWidth })) })) : null,-- (0, import_react51.createElement)(SetRow, { label: t("Bubble width") }, (0, import_react51.createElement)(WidthSlider, { label: t("Bubble width"), value: widthOf(prefs), save: (width) => run2(actions.setPrefs({ width })) })),-- (0, import_react51.createElement)(SetRow, { label: t("Show thinking") }, (0, import_react51.createElement)(Switch, { label: t("Show thinking"), on: thinkingShown(prefs), onChange: (thinking) => run2(actions.setPrefs({ thinking })) }))++ layoutOf(prefs) === "flat" ? (0, import_react52.createElement)(SetRow, { label: t("Text width") }, (0, import_react52.createElement)(WidthSlider, { label: t("Text width"), value: flatWidthOf(prefs), save: (flatWidth) => run2(actions.setPrefs({ flatWidth })) })) : null,++ (0, import_react52.createElement)(SetRow, { label: t("Bubble width") }, (0, import_react52.createElement)(WidthSlider, { label: t("Bubble width"), value: widthOf(prefs), save: (width) => run2(actions.setPrefs({ width })) })),++ (0, import_react52.createElement)(SetRow, { label: t("Show thinking") }, (0, import_react52.createElement)(Switch, { label: t("Show thinking"), on: thinkingShown(prefs), onChange: (thinking) => run2(actions.setPrefs({ thinking })) }))),-- (0, import_react51.createElement)(++ (0, import_react52.createElement)(SetSection,{ key: "new", title: t("New Bots") },-- (0, import_react51.createElement)(++ (0, import_react52.createElement)(SetRow,{ label: t("Default model"), className: "bt-set-model" },-- (0, import_react51.createElement)(ModelMenu, {++ (0, import_react52.createElement)(ModelMenu, {bot: { id: "new-bots", name: t("New Bots"), model: prefs.defaultBotModel },roster,actions,@@@ -22033,37 -22251,37 +22584,37 @@@withEfforts: false,onPick: (ref) => run2(actions.setPrefs({ defaultBotModel: ref }))}),-- prefs.defaultBotModel ? (0, import_react51.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => run2(actions.setPrefs({ defaultBotModel: null })) }, t("Reset")) : null++ prefs.defaultBotModel ? (0, import_react52.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => run2(actions.setPrefs({ defaultBotModel: null })) }, t("Reset")) : null)),-- (0, import_react51.createElement)(++ (0, import_react52.createElement)(SetSection,{ key: "input", title: t("Input") },-- (0, import_react51.createElement)(++ (0, import_react52.createElement)(SetRow,{ label: t("Enter sends message") },-- (0, import_react51.createElement)(Switch, { label: t("Enter sends message"), on: prefs.enterToSend !== false, onChange: (enterToSend) => run2(actions.setPrefs({ enterToSend })) })++ (0, import_react52.createElement)(Switch, { label: t("Enter sends message"), on: prefs.enterToSend !== false, onChange: (enterToSend) => run2(actions.setPrefs({ enterToSend })) }))),-- actions.setSurface ? (0, import_react51.createElement)(++ actions.setSurface ? (0, import_react52.createElement)(SetSection,{ key: "mode", title: t("Mode") },-- (0, import_react51.createElement)(++ (0, import_react52.createElement)(SetRow,{ label: t("Classic Agent mode") },-- (0, import_react51.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => actions.setSurface("agent") }, t("Switch"))++ (0, import_react52.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => actions.setSurface("agent") }, t("Switch")))) : null,-- (0, import_react51.createElement)(LocationsSection, { key: "places", actions, run: run2 })++ (0, import_react52.createElement)(LocationsSection, { key: "places", actions, run: run2 })];}function LocationsSection({ actions, run: run2 }) {const app = globalThis.dsBotApp;-- const [team, setTeam] = (0, import_react51.useState)(null);-- const [data, setData] = (0, import_react51.useState)(null);-- const [moving, setMoving] = (0, import_react51.useState)(false);-- const busy = (0, import_react51.useRef)(false);-- (0, import_react51.useEffect)(() => {++ const [team, setTeam] = (0, import_react52.useState)(null);++ const [data, setData] = (0, import_react52.useState)(null);++ const [moving, setMoving] = (0, import_react52.useState)(false);++ const busy = (0, import_react52.useRef)(false);++ (0, import_react52.useEffect)(() => {void Promise.resolve(actions.folders()).then((info) => setTeam(info?.team ?? null)).catch(() => {});if (app !== void 0) void Promise.resolve(app.dataLocation()).then(setData).catch(() => {@@@ -22081,18 -22299,18 +22632,18 @@@setMoving(false);}));};-- return (0, import_react51.createElement)(++ return (0, import_react52.createElement)(SetSection,{ title: t("Locations"), className: "bt-set-places" },-- (0, import_react51.createElement)(++ (0, import_react52.createElement)(SetRow,{ label: t("Team workspace"), hint: t("Where Bots without a folder of their own work.") },-- team === null ? null : (0, import_react51.createElement)(FolderMenu, { value: team, team: true, actions, run: run2, onPick: pickTeam, disabled: moving })++ team === null ? null : (0, import_react52.createElement)(FolderMenu, { value: team, team: true, actions, run: run2, onPick: pickTeam, disabled: moving })),-- data === null ? null : (0, import_react51.createElement)(++ data === null ? null : (0, import_react52.createElement)(SetRow,{ label: t("Data location"), hint: data.path },-- data.fixed ? null : (0, import_react51.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: moving, onClick: () => {++ data.fixed ? null : (0, import_react52.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: moving, onClick: () => {if (!busy.current) void run2(app.moveData(team ?? void 0));} }, t("Change…")))@@@ -22102,52 -22320,52 +22653,52 @@@ function MainBotsSection({ roster, acticonst mains = (roster.mainBotIds ?? []).map((id) => roster.byId[id]).filter(Boolean);const [first, ...others] = mains;const candidates = roster.bots.filter((bot) => !isMainOf(roster, bot.id));-- return (0, import_react51.createElement)(++ return (0, import_react52.createElement)(SetSection,{ title: t("Main Bot") },-- (0, import_react51.createElement)(++ (0, import_react52.createElement)(SetRow,{label: t("Main Bot"),hint: first ? t("First in the sidebar. Pick another Bot to hand it the role; {name} then stops being a Main Bot.", { name: first.name }) : void 0},-- (0, import_react51.createElement)("select", {++ (0, import_react52.createElement)("select", {className: "bt-select","aria-label": t("Main Bot"),value: first?.id ?? "",onChange: (event) => run2(actions.setMain(event.target.value, true, first ? { replace: first.id } : {}))-- }, first ? null : (0, import_react51.createElement)("option", { value: "" }, t("Choose a Bot…")), roster.bots.map((bot) => (0, import_react51.createElement)("option", { key: bot.id, value: bot.id }, bot.name)))++ }, first ? null : (0, import_react52.createElement)("option", { value: "" }, t("Choose a Bot…")), roster.bots.map((bot) => (0, import_react52.createElement)("option", { key: bot.id, value: bot.id }, bot.name)))),-- others.map((bot) => (0, import_react51.createElement)(++ others.map((bot) => (0, import_react52.createElement)(SetRow,{ key: bot.id, label: bot.name, hint: t("Also a Main Bot.") },-- (0, import_react51.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => run2(actions.setMain(bot.id, true, { primary: true })) }, t("Move to first")),-- (0, import_react51.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => run2(actions.setMain(bot.id, false)) }, t("Remove Main Bot role"))++ (0, import_react52.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => run2(actions.setMain(bot.id, true, { primary: true })) }, t("Move to first")),++ (0, import_react52.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", onClick: () => run2(actions.setMain(bot.id, false)) }, t("Remove Main Bot role")))),-- candidates.length > 0 ? (0, import_react51.createElement)(++ candidates.length > 0 ? (0, import_react52.createElement)(SetRow,{ label: t("Add a Main Bot"), hint: t("Main Bots can create and change Bots, and run every group chat.") },-- (0, import_react51.createElement)("select", {++ (0, import_react52.createElement)("select", {className: "bt-select","aria-label": t("Add a Main Bot"),value: "",onChange: (event) => {if (event.target.value) void run2(actions.setMain(event.target.value, true));}-- }, (0, import_react51.createElement)("option", { value: "" }, t("Choose a Bot…")), candidates.map((bot) => (0, import_react51.createElement)("option", { key: bot.id, value: bot.id }, bot.name)))++ }, (0, import_react52.createElement)("option", { value: "" }, t("Choose a Bot…")), candidates.map((bot) => (0, import_react52.createElement)("option", { key: bot.id, value: bot.id }, bot.name)))) : null);}var MOTIONS = [["quiet", "Quiet"], ["normal", "Normal"], ["lively", "Lively"]];function MotionSection({ roster, actions, run: run2 }) {const motion = roster.prefs?.motion === "quiet" || roster.prefs?.motion === "lively" ? roster.prefs.motion : "normal";-- return (0, import_react51.createElement)(++ return (0, import_react52.createElement)(SetSection,{ title: t("Animation") },-- (0, import_react51.createElement)(++ (0, import_react52.createElement)(SetRow,{ label: t("Bot animation") },-- (0, import_react51.createElement)(Segmented, { label: t("Bot animation"), value: motion, className: "bt-motion-seg" }, MOTIONS.map(([id, label]) => (0, import_react51.createElement)("button", {++ (0, import_react52.createElement)(Segmented, { label: t("Bot animation"), value: motion, className: "bt-motion-seg" }, MOTIONS.map(([id, label]) => (0, import_react52.createElement)("button", {key: id,type: "button","aria-pressed": motion === id,@@@ -22159,70 -22377,70 +22710,70 @@@);}function BotsPage({ roster, actions, run: run2 }) {-- const [creating, setCreating] = (0, import_react51.useState)(false);++ const [creating, setCreating] = (0, import_react52.useState)(false);return [-- (0, import_react51.createElement)(MainBotsSection, { key: "main", roster, actions, run: run2 }),-- (0, import_react51.createElement)(MotionSection, { key: "motion", roster, actions, run: run2 }),-- creating ? (0, import_react51.createElement)(CreateBot, { key: "create", roster, actions, inline: true, onBack: () => setCreating(false), onCreated: (bot) => actions.openSettings("bots", bot.id) }) : (0, import_react51.createElement)(++ (0, import_react52.createElement)(MainBotsSection, { key: "main", roster, actions, run: run2 }),++ (0, import_react52.createElement)(MotionSection, { key: "motion", roster, actions, run: run2 }),++ creating ? (0, import_react52.createElement)(CreateBot, { key: "create", roster, actions, inline: true, onBack: () => setCreating(false), onCreated: (bot) => actions.openSettings("bots", bot.id) }) : (0, import_react52.createElement)("div",{ key: "new", className: "bt-actions" },-- (0, import_react51.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm bt-with-icon", onClick: () => setCreating(true) }, (0, import_react51.createElement)(PlusIcon), t("New Bot"))++ (0, import_react52.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm bt-with-icon", onClick: () => setCreating(true) }, (0, import_react52.createElement)(PlusIcon), t("New Bot"))),-- (0, import_react51.createElement)(++ (0, import_react52.createElement)(SetSection,{ key: "bots", title: t("Bots · {count}", { count: roster.bots.length }) },-- roster.bots.map((bot) => (0, import_react51.createElement)(++ roster.bots.map((bot) => (0, import_react52.createElement)("button",{ key: bot.id, type: "button", className: "bt-set-row", onClick: () => actions.openSettings("bots", bot.id) },-- (0, import_react51.createElement)(++ (0, import_react52.createElement)("span",{ className: "bt-set-bot" },-- (0, import_react51.createElement)(BotAvatar, { bot, size: 28, badge: false, live: false }),-- (0, import_react51.createElement)("span", { className: "bt-row-title" }, bot.name),-- bot.role ? (0, import_react51.createElement)("span", { className: "bt-tag" }, bot.role) : null,-- isMainOf(roster, bot.id) ? (0, import_react51.createElement)("span", { className: "bt-tag" }, t("Main Bot")) : null,-- bot.hidden && !isMainOf(roster, bot.id) ? (0, import_react51.createElement)("span", { className: "bt-tag" }, t("Hidden")) : null++ (0, import_react52.createElement)(BotAvatar, { bot, size: 28, badge: false, live: false }),++ (0, import_react52.createElement)("span", { className: "bt-row-title" }, bot.name),++ bot.role ? (0, import_react52.createElement)("span", { className: "bt-tag" }, bot.role) : null,++ isMainOf(roster, bot.id) ? (0, import_react52.createElement)("span", { className: "bt-tag" }, t("Main Bot")) : null,++ bot.hidden && !isMainOf(roster, bot.id) ? (0, import_react52.createElement)("span", { className: "bt-tag" }, t("Hidden")) : null),-- (0, import_react51.createElement)("span", { className: "bt-chevron" }, (0, import_react51.createElement)(ChevronRightIcon))++ (0, import_react52.createElement)("span", { className: "bt-chevron" }, (0, import_react52.createElement)(ChevronRightIcon))))),-- (0, import_react51.createElement)(KeptPrivateSection, { key: "kept", roster, actions, run: run2, Section: SetSection, Row: SetRow })++ (0, import_react52.createElement)(KeptPrivateSection, { key: "kept", roster, actions, run: run2, Section: SetSection, Row: SetRow })];}function GroupsPage({ roster, actions, run: run2 }) {-- const [creating, setCreating] = (0, import_react51.useState)(false);++ const [creating, setCreating] = (0, import_react52.useState)(false);return [-- creating ? (0, import_react51.createElement)(NewGroupForm, { key: "create", roster, actions, run: run2, onCancel: () => setCreating(false), onCreated: (room2) => actions.openSettings("groups", room2.id) }) : (0, import_react51.createElement)(++ creating ? (0, import_react52.createElement)(NewGroupForm, { key: "create", roster, actions, run: run2, onCancel: () => setCreating(false), onCreated: (room2) => actions.openSettings("groups", room2.id) }) : (0, import_react52.createElement)("div",{ key: "new", className: "bt-actions" },-- (0, import_react51.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm bt-with-icon", disabled: roster.bots.length < 2, title: roster.bots.length < 2 ? t("A group chat needs at least two Bots") : void 0, onClick: () => setCreating(true) }, (0, import_react51.createElement)(PlusIcon), t("Create group chat"))++ (0, import_react52.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm bt-with-icon", disabled: roster.bots.length < 2, title: roster.bots.length < 2 ? t("A group chat needs at least two Bots") : void 0, onClick: () => setCreating(true) }, (0, import_react52.createElement)(PlusIcon), t("Create group chat"))),-- (0, import_react51.createElement)(++ (0, import_react52.createElement)(SetSection,{ key: "groups", title: t("Group chats · {count}", { count: roster.rooms.length }) },-- roster.rooms.length === 0 ? (0, import_react51.createElement)(SetRow, { label: t("No group chats yet."), hint: t("A group chat lets several Bots work on one thing with you.") }) : roster.rooms.map((room2) => {++ roster.rooms.length === 0 ? (0, import_react52.createElement)(SetRow, { label: t("No group chats yet."), hint: t("A group chat lets several Bots work on one thing with you.") }) : roster.rooms.map((room2) => {const admin = roster.byId[room2.admin];-- return (0, import_react51.createElement)(++ return (0, import_react52.createElement)("button",{ key: room2.id, type: "button", className: "bt-set-row", onClick: () => actions.openSettings("groups", room2.id) },-- (0, import_react51.createElement)(++ (0, import_react52.createElement)("span",{ className: "bt-set-bot" },-- (0, import_react51.createElement)(RoomAvatar, { room: room2, roster, size: 28 }),-- (0, import_react51.createElement)("span", { className: "bt-row-title" }, room2.name),-- (0, import_react51.createElement)("span", { className: "bt-tag" }, t("{count} members", { count: room2.members.length })),-- admin ? (0, import_react51.createElement)("span", { className: "bt-tag bt-tag-admin" }, (0, import_react51.createElement)(AdminStar), admin.name) : null,-- room2.hidden ? (0, import_react51.createElement)("span", { className: "bt-tag" }, t("Hidden")) : null++ (0, import_react52.createElement)(RoomAvatar, { room: room2, roster, size: 28 }),++ (0, import_react52.createElement)("span", { className: "bt-row-title" }, room2.name),++ (0, import_react52.createElement)("span", { className: "bt-tag" }, t("{count} members", { count: room2.members.length })),++ admin ? (0, import_react52.createElement)("span", { className: "bt-tag bt-tag-admin" }, (0, import_react52.createElement)(AdminStar), admin.name) : null,++ room2.hidden ? (0, import_react52.createElement)("span", { className: "bt-tag" }, t("Hidden")) : null),-- (0, import_react51.createElement)("span", { className: "bt-chevron" }, (0, import_react51.createElement)(ChevronRightIcon))++ (0, import_react52.createElement)("span", { className: "bt-chevron" }, (0, import_react52.createElement)(ChevronRightIcon)));}))];}function SettingsDialog({ page, id, roster, actions, useUpdate, leaving = false }) {-- const [error, setError] = (0, import_react51.useState)("");-- const close = (0, import_react51.useCallback)(() => actions.closeSettings(), []);++ const [error, setError] = (0, import_react52.useState)("");++ const close = (0, import_react52.useCallback)(() => actions.closeSettings(), []);useEscape(close);const run2 = (promise) => Promise.resolve(promise).then(() => {setError("");@@@ -22241,32 -22459,32 +22792,32 @@@const nav = useGlide(shown, { axis: "y" });const pageKey = `${shown}:${bot?.id ?? room2?.id ?? ""}`;const depth = bot || room2 ? 1 : 0;-- const last = (0, import_react51.useRef)({ key: pageKey, depth, move: "up" });++ const last = (0, import_react52.useRef)({ key: pageKey, depth, move: "up" });if (last.current.key !== pageKey) {last.current = { key: pageKey, depth, move: depth > last.current.depth ? "in" : depth < last.current.depth ? "out" : "up" };}-- const [usageOpened, setUsageOpened] = (0, import_react51.useState)(shown === "usage");++ const [usageOpened, setUsageOpened] = (0, import_react52.useState)(shown === "usage");if (shown === "usage" && !usageOpened) setUsageOpened(true);-- const errorLine = error ? (0, import_react51.createElement)("div", { className: "bt-error", role: "alert", style: { padding: 0 } }, error) : null;-- return (0, import_react51.createElement)(++ const errorLine = error ? (0, import_react52.createElement)("div", { className: "bt-error", role: "alert", style: { padding: 0 } }, error) : null;++ return (0, import_react52.createElement)("div",{ className: "bt-settings-layer", "data-leaving": leaving || void 0 },-- (0, import_react51.createElement)("div", { className: "bt-scrim", onMouseDown: close }),-- (0, import_react51.createElement)(++ (0, import_react52.createElement)("div", { className: "bt-scrim", onMouseDown: close }),++ (0, import_react52.createElement)("div",{ className: "bt-settings", role: "dialog", "aria-modal": true, "aria-label": t("DS Bot settings") },-- (0, import_react51.createElement)(++ (0, import_react52.createElement)("nav",{ ref: nav.box, className: "bt-settings-nav", "aria-label": t("Settings pages") },-- (0, import_react51.createElement)("span", { ref: nav.thumb, className: "bt-thumb", "aria-hidden": true }),-- pages.map(([key, text]) => (0, import_react51.createElement)("button", {++ (0, import_react52.createElement)("span", { ref: nav.thumb, className: "bt-thumb", "aria-hidden": true }),++ pages.map(([key, text]) => (0, import_react52.createElement)("button", {key,type: "button",className: "bt-settings-item","aria-current": shown === key ? "page" : void 0,onClick: () => actions.openSettings(key)-- }, (0, import_react51.createElement)(PAGE_ICONS[key]), t(text))),-- actions.openHarnessSettings ? (0, import_react51.createElement)("button", {++ }, (0, import_react52.createElement)(PAGE_ICONS[key]), t(text))),++ actions.openHarnessSettings ? (0, import_react52.createElement)("button", {type: "button",className: "bt-settings-item bt-settings-shell",title: t("Models, providers, and the rest of DeepSeek Harness"),@@@ -22274,55 -22492,56 +22825,56 @@@close();actions.openHarnessSettings();}-- }, (0, import_react51.createElement)(SlidersIcon), t("Harness settings")) : null++ }, (0, import_react52.createElement)(SlidersIcon), t("Harness settings")) : null),-- (0, import_react51.createElement)(++ (0, import_react52.createElement)("div",{ className: "bt-settings-main" },-- (0, import_react51.createElement)(++ (0, import_react52.createElement)("div",{ className: "bt-settings-head" },-- back ? (0, import_react51.createElement)("button", { type: "button", className: "bt-icon-btn", "aria-label": back, title: back, onClick: () => actions.openSettings(shown) }, (0, import_react51.createElement)(ChevronLeftIcon)) : null,-- (0, import_react51.createElement)("h2", { key: bot?.id ?? room2?.id ?? shown }, bot?.name ?? room2?.name ?? label)++ back ? (0, import_react52.createElement)("button", { type: "button", className: "bt-icon-btn", "aria-label": back, title: back, onClick: () => actions.openSettings(shown) }, (0, import_react52.createElement)(ChevronLeftIcon)) : null,++ (0, import_react52.createElement)("h2", { key: bot?.id ?? room2?.id ?? shown }, bot?.name ?? room2?.name ?? label)),-- shown === "usage" ? null : (0, import_react51.createElement)(++ shown === "usage" ? null : (0, import_react52.createElement)("div",{ key: pageKey, className: "bt-settings-scroll bt-settings-page", "data-move": last.current.move },errorLine,- shown === "computer" ? (0, import_react51.createElement)(ComputerPage, { roster, actions, run: run2, Section: SetSection, Row: SetRow, Switch }) : null,-- shown === "general" ? (0, import_react51.createElement)(GeneralPage, { roster, actions, run: run2 }) : null,-- shown === "models" ? (0, import_react51.createElement)(ProvidersPage, { actions, run: run2, Section: SetSection }) : null,-- bot ? (0, import_react51.createElement)("div", { className: "bt-settings-form" }, (0, import_react51.createElement)(BotSettingsForm, { key: bot.id, bot, roster, actions, run: run2 })) : null,-- shown === "bots" && !bot ? (0, import_react51.createElement)(BotsPage, { roster, actions, run: run2 }) : null,-- room2 ? (0, import_react51.createElement)("div", { className: "bt-settings-form" }, (0, import_react51.createElement)(GroupSettingsForm, { key: room2.id, room: room2, roster, actions, run: run2 })) : null,-- shown === "groups" && !room2 ? (0, import_react51.createElement)(GroupsPage, { roster, actions, run: run2 }) : null,-- shown === "connectors" ? (0, import_react51.createElement)(ConnectorsPage, { roster, actions }) : null,-- shown === "im" ? (0, import_react51.createElement)(ImPage, { roster, actions }) : null,-- shown === "capabilities" ? (0, import_react51.createElement)(CapabilitiesPage, { roster, actions, run: run2 }) : null,-- shown === "browser" ? (0, import_react51.createElement)(BrowserPage, { roster, actions, run: run2, Section: SetSection, Row: SetRow }) : null,-- shown === "schedules" ? (0, import_react51.createElement)(SchedulesPage, { roster, actions, start: id ?? void 0 }) : null,-- shown === "secrets" ? (0, import_react51.createElement)(SecretsPage, { roster, actions, run: run2, Section: SetSection }) : null,-- shown === "feedback" ? (0, import_react51.createElement)(FeedbackPage, { actions, run: run2, Section: SetSection, Row: SetRow }) : null,-- shown === "about" ? (0, import_react51.createElement)(AboutPage, { useUpdate, actions, run: run2, Section: SetSection, Row: SetRow }) : null++ shown === "computer" ? (0, import_react52.createElement)(ComputerPage, { roster, actions, run: run2, Section: SetSection, Row: SetRow, Switch }) : null,++ shown === "general" ? (0, import_react52.createElement)(GeneralPage, { roster, actions, run: run2 }) : null,++ shown === "models" ? (0, import_react52.createElement)(ProvidersPage, { actions, run: run2, Section: SetSection }) : null,++ bot ? (0, import_react52.createElement)("div", { className: "bt-settings-form" }, (0, import_react52.createElement)(BotSettingsForm, { key: bot.id, bot, roster, actions, run: run2 })) : null,++ shown === "bots" && !bot ? (0, import_react52.createElement)(BotsPage, { roster, actions, run: run2 }) : null,++ room2 ? (0, import_react52.createElement)("div", { className: "bt-settings-form" }, (0, import_react52.createElement)(GroupSettingsForm, { key: room2.id, room: room2, roster, actions, run: run2 })) : null,++ shown === "groups" && !room2 ? (0, import_react52.createElement)(GroupsPage, { roster, actions, run: run2 }) : null,++ shown === "connectors" ? (0, import_react52.createElement)(ConnectorsPage, { roster, actions }) : null,++ shown === "im" ? (0, import_react52.createElement)(ImPage, { roster, actions }) : null,++ shown === "capabilities" ? (0, import_react52.createElement)(CapabilitiesPage, { roster, actions, run: run2 }) : null,++ shown === "browser" ? (0, import_react52.createElement)(BrowserPage, { roster, actions, run: run2, Section: SetSection, Row: SetRow }) : null,++ shown === "schedules" ? (0, import_react52.createElement)(SchedulesPage, { roster, actions, start: id ?? void 0 }) : null,++ shown === "secrets" ? (0, import_react52.createElement)(SecretsPage, { roster, actions, run: run2, Section: SetSection }) : null,++ shown === "feedback" ? (0, import_react52.createElement)(FeedbackPage, { actions, run: run2, Section: SetSection, Row: SetRow }) : null,++ shown === "about" ? (0, import_react52.createElement)(AboutPage, { useUpdate, actions, run: run2, Section: SetSection, Row: SetRow }) : null),-- usageOpened ? (0, import_react51.createElement)(++ usageOpened ? (0, import_react52.createElement)("div",{ key: "usage", className: "bt-settings-scroll bt-settings-usage", "data-off": shown === "usage" ? void 0 : "", "aria-hidden": shown === "usage" ? void 0 : true },shown === "usage" ? errorLine : null,-- (0, import_react51.createElement)(UsagePage, { roster, actions, focusId: usageFocus })++ (0, import_react52.createElement)(UsagePage, { roster, actions, focusId: usageFocus })) : null),-- (0, import_react51.createElement)("button", { type: "button", className: "bt-settings-close", "aria-label": t("Close settings"), onClick: close }, (0, import_react51.createElement)(CloseIcon))++ (0, import_react52.createElement)("button", { type: "button", className: "bt-settings-close", "aria-label": t("Close settings"), onClick: close }, (0, import_react52.createElement)(CloseIcon))));}// src/client/context-menu.js--var import_react52 = require("react");++var import_react53 = require("react");function ContextMenu({ menu, roster, actions, leaving = false }) {useEscape(() => actions.closeMenu());-- const ref = (0, import_react52.useRef)(null);-- const trigger = (0, import_react52.useRef)(typeof document === "undefined" ? null : document.activeElement);-- (0, import_react52.useEffect)(() => {++ const ref = (0, import_react53.useRef)(null);++ const trigger = (0, import_react53.useRef)(typeof document === "undefined" ? null : document.activeElement);++ (0, import_react53.useEffect)(() => {const onDown = (event) => {if (!(event.target instanceof Element) || !event.target.closest(".bt-menu")) actions.closeMenu();};@@@ -22336,14 -22555,14 +22888,14 @@@window.removeEventListener("keydown", onKey, true);};}, []);-- const [place, setPlace] = (0, import_react52.useState)({ left: menu.x, top: menu.y });++ const [place, setPlace] = (0, import_react53.useState)({ left: menu.x, top: menu.y });const tick = useViewport();-- (0, import_react52.useLayoutEffect)(() => {++ (0, import_react53.useLayoutEffect)(() => {const box = ref.current?.getBoundingClientRect();if (!box) return;setPlace({ left: Math.max(8, Math.min(menu.x, window.innerWidth - box.width - 8)), top: Math.max(8, Math.min(menu.y, viewBottom() - box.height - 8)) });}, [menu.x, menu.y, tick]);-- if (menu.kind === "agent" || menu.kind === "agent-session") return (0, import_react52.createElement)(AgentMenu, { menu, roster, actions, leaving });++ if (menu.kind === "agent" || menu.kind === "agent-session") return (0, import_react53.createElement)(AgentMenu, { menu, roster, actions, leaving });const bot = roster.byId[menu.id];const room2 = roster.roomsById[menu.id];const entry = bot ?? room2;@@@ -22374,14 -22593,14 +22926,14 @@@isMainBot ? null : [room2 ? t("Delete group") : t("Delete"), TrashIcon, () => bot ? actions.deleteBot(bot.id) : actions.deleteRoom(menu.id), true]]].map((group) => group.filter(Boolean)).filter((group) => group.length > 0);-- return (0, import_react52.createElement)(++ return (0, import_react53.createElement)("div",{ ref, className: "bt-menu", role: "menu", "aria-label": t("{name} actions", { name: bot?.name ?? room2.name }), style: place, "data-leaving": leaving || void 0 },-- groups.map((group, index) => (0, import_react52.createElement)(-- import_react52.Fragment,++ groups.map((group, index) => (0, import_react53.createElement)(++ import_react53.Fragment,{ key: index },-- index > 0 ? (0, import_react52.createElement)("div", { className: "bt-menu-sep", role: "separator" }) : null,-- group.map(([label, Icon, run2, danger]) => (0, import_react52.createElement)("button", {++ index > 0 ? (0, import_react53.createElement)("div", { className: "bt-menu-sep", role: "separator" }) : null,++ group.map(([label, Icon, run2, danger]) => (0, import_react53.createElement)("button", {key: label,type: "button",role: "menuitem",@@@ -22390,23 -22609,23 +22942,23 @@@actions.closeMenu();void Promise.resolve(run2()).catch((error) => actions.reportError(error, "menu"));}-- }, (0, import_react52.createElement)(Icon), label))++ }, (0, import_react53.createElement)(Icon), label)))));}function AgentMenu({ menu, roster, actions, leaving }) {-- const ref = (0, import_react52.useRef)(null);-- const trigger = (0, import_react52.useRef)(typeof document === "undefined" ? null : document.activeElement);-- (0, import_react52.useEffect)(() => {++ const ref = (0, import_react53.useRef)(null);++ const trigger = (0, import_react53.useRef)(typeof document === "undefined" ? null : document.activeElement);++ (0, import_react53.useEffect)(() => {const onKey = (event) => {stepMenuFocus(ref.current, event, trigger.current);};window.addEventListener("keydown", onKey, true);return () => window.removeEventListener("keydown", onKey, true);}, []);-- const [place, setPlace] = (0, import_react52.useState)({ left: menu.x, top: menu.y });++ const [place, setPlace] = (0, import_react53.useState)({ left: menu.x, top: menu.y });const tick = useViewport();-- (0, import_react52.useLayoutEffect)(() => {++ (0, import_react53.useLayoutEffect)(() => {const box = ref.current?.getBoundingClientRect();if (!box) return;setPlace({ left: Math.max(8, Math.min(menu.x, window.innerWidth - box.width - 8)), top: Math.max(8, Math.min(menu.y, viewBottom() - box.height - 8)) });@@@ -22428,14 -22647,14 +22980,14 @@@[t("Archive"), TrashIcon, () => actions.archiveAgentSession(agent.id, menu.id), true]]];-- return (0, import_react52.createElement)(++ return (0, import_react53.createElement)("div",{ ref, className: "bt-menu", role: "menu", "aria-label": menu.kind === "agent" ? "DSH Agent" : t("Session actions"), style: place, "data-leaving": leaving || void 0 },-- groups.map((group, index) => (0, import_react52.createElement)(-- import_react52.Fragment,++ groups.map((group, index) => (0, import_react53.createElement)(++ import_react53.Fragment,{ key: index },-- index > 0 ? (0, import_react52.createElement)("div", { className: "bt-menu-sep", role: "separator" }) : null,-- group.map(([label, Icon, run2, danger]) => (0, import_react52.createElement)("button", {++ index > 0 ? (0, import_react53.createElement)("div", { className: "bt-menu-sep", role: "separator" }) : null,++ group.map(([label, Icon, run2, danger]) => (0, import_react53.createElement)("button", {key: label,type: "button",role: "menuitem",@@@ -22444,13 -22663,13 +22996,13 @@@actions.closeMenu();void Promise.resolve(run2()).catch((error) => console.warn("[ds-bot]", error));}-- }, (0, import_react52.createElement)(Icon), label))++ }, (0, import_react53.createElement)(Icon), label)))));}// src/client/member-status.js--var import_react53 = require("react");++var import_react54 = require("react");var NO_WORK = { bots: {}, rooms: {}, approvals: [] };var FACES_MAX2 = 3;var DOCK_EXIT_MS = 160;@@@ -22511,15 -22730,15 +23063,15 @@@ function dockModel(sessionId, roster, w};}function Face({ bot, ask, state }) {-- return (0, import_react53.createElement)(++ return (0, import_react54.createElement)("span",{ className: "bt-mw-face", "data-ask": ask || void 0 },-- (0, import_react53.createElement)(BotMark, { bot, size: 20, state: ask ? "alert" : state })++ (0, import_react54.createElement)(BotMark, { bot, size: 20, state: ask ? "alert" : state }));}function useFitWidth(inner, key) {-- const [width, setWidth] = (0, import_react53.useState)(null);-- (0, import_react53.useLayoutEffect)(() => {++ const [width, setWidth] = (0, import_react54.useState)(null);++ (0, import_react54.useLayoutEffect)(() => {setWidth(key && inner.current ? inner.current.offsetWidth : null);}, [key]);return width;@@@ -22530,93 -22749,93 +23082,93 @@@ function MemberDock({ sessionId, useRosconst live = dockModel(sessionId, roster, work);const [kept, leaving] = useLinger(live ? JSON.stringify(live) : null, DOCK_EXIT_MS);const model = kept ? JSON.parse(kept) : null;-- const inner = (0, import_react53.useRef)(null);++ const inner = (0, import_react54.useRef)(null);const width = useFitWidth(inner, kept);if (!model) return null;const faces = model.faces.map((face) => ({ ...face, bot: roster.byId[face.id] })).filter((face) => face.bot);const label = [model.waiting, model.doing].filter(Boolean).join(" · ");const open = () => model.open.details ? actions.showDetails(model.open.details) : actions.openSession(model.open.session);-- return (0, import_react53.createElement)(++ return (0, import_react54.createElement)("div",{ className: "bt-mw-dock", "data-leaving": leaving || void 0 },-- (0, import_react53.createElement)(++ (0, import_react54.createElement)("button",{ type: "button", className: "bt-mw-pill", "aria-label": label, onClick: open, disabled: leaving, style: width ? { width } : void 0 },-- (0, import_react53.createElement)(++ (0, import_react54.createElement)("span",{ ref: inner, className: "bt-mw-pill-in" },-- (0, import_react53.createElement)("span", { className: "bt-mw-faces", "aria-hidden": true }, faces.map((face) => (0, import_react53.createElement)(Face, { key: face.id, ...face }))),-- (0, import_react53.createElement)(++ (0, import_react54.createElement)("span", { className: "bt-mw-faces", "aria-hidden": true }, faces.map((face) => (0, import_react54.createElement)(Face, { key: face.id, ...face }))),++ (0, import_react54.createElement)("span",{ key: label, className: "bt-mw-label", "aria-hidden": true },-- model.waiting ? (0, import_react53.createElement)("span", { className: "bt-mw-ask" }, model.waiting) : null,-- model.waiting && model.doing ? (0, import_react53.createElement)("span", { className: "bt-mw-dot" }, "·") : null,-- model.doing ? (0, import_react53.createElement)("span", { className: "bt-mw-doing" }, (0, import_react53.createElement)(Shimmer, null, model.doing)) : null++ model.waiting ? (0, import_react54.createElement)("span", { className: "bt-mw-ask" }, model.waiting) : null,++ model.waiting && model.doing ? (0, import_react54.createElement)("span", { className: "bt-mw-dot" }, "·") : null,++ model.doing ? (0, import_react54.createElement)("span", { className: "bt-mw-doing" }, (0, import_react54.createElement)(Shimmer, null, model.doing)) : null))));}--var stateLine = (className, at, ...what) => (0, import_react53.createElement)(++var stateLine = (className, at, ...what) => (0, import_react54.createElement)("span",{ className },-- (0, import_react53.createElement)("span", { className: "bt-member-what" }, ...what),-- typeof at === "number" ? (0, import_react53.createElement)(Elapsed, { at, className: "bt-member-time" }) : null++ (0, import_react54.createElement)("span", { className: "bt-member-what" }, ...what),++ typeof at === "number" ? (0, import_react54.createElement)(Elapsed, { at, className: "bt-member-time" }) : null);function ApprovalCard({ approval, bot, actions }) {-- const [busy, setBusy] = (0, import_react53.useState)(false);++ const [busy, setBusy] = (0, import_react54.useState)(false);const answer = (choice) => {setBusy(true);void Promise.resolve(actions.answerApproval(approval.id, choice)).catch((error) => actions.reportError(error, "approval")).finally(() => setBusy(false));};-- return (0, import_react53.createElement)(++ return (0, import_react54.createElement)("div",{ className: "bt-mw-card", role: "group", "aria-label": t("{name} is waiting for your approval", { name: bot.name }) },-- (0, import_react53.createElement)("div", { className: "bt-mw-tool" }, approval.tool),-- approval.detail?.text ? (0, import_react53.createElement)("div", { className: "bt-mw-text" }, approval.detail.text) : null,-- approval.reason ? (0, import_react53.createElement)("div", { className: "bt-mw-reason" }, approval.reason) : null,-- approval.detail?.code ? (0, import_react53.createElement)("code", { className: "bt-mw-code", title: approval.detail.code }, approval.detail.code) : null,++ (0, import_react54.createElement)("div", { className: "bt-mw-tool" }, approval.tool),++ approval.detail?.text ? (0, import_react54.createElement)("div", { className: "bt-mw-text" }, approval.detail.text) : null,++ approval.reason ? (0, import_react54.createElement)("div", { className: "bt-mw-reason" }, approval.reason) : null,++ approval.detail?.code ? (0, import_react54.createElement)("code", { className: "bt-mw-code", title: approval.detail.code }, approval.detail.code) : null,// Own-chat approvals are answerable for IM and the phone app; here the Bot's// own DSH card stays the place to answer, so the row still opens that chat.-- approval.answerable && approval.roomId !== void 0 ? (0, import_react53.createElement)(++ approval.answerable && approval.roomId !== void 0 ? (0, import_react54.createElement)("div",{ className: "bt-mw-actions" },-- (0, import_react53.createElement)("button", { type: "button", className: "bt-q-btn", disabled: busy, onClick: () => answer("reject") }, t("Reject")),-- (0, import_react53.createElement)("button", { type: "button", className: "bt-q-submit", disabled: busy, onClick: () => answer("allow") }, t("Allow once"))-- ) : (0, import_react53.createElement)(++ (0, import_react54.createElement)("button", { type: "button", className: "bt-q-btn", disabled: busy, onClick: () => answer("reject") }, t("Reject")),++ (0, import_react54.createElement)("button", { type: "button", className: "bt-q-submit", disabled: busy, onClick: () => answer("allow") }, t("Allow once"))++ ) : (0, import_react54.createElement)("div",{ className: "bt-mw-actions" },-- (0, import_react53.createElement)("button", { type: "button", className: "bt-q-btn", onClick: () => actions.openSession(bot.id) }, t("Open {name}'s chat", { name: bot.name }))++ (0, import_react54.createElement)("button", { type: "button", className: "bt-q-btn", onClick: () => actions.openSession(bot.id) }, t("Open {name}'s chat", { name: bot.name }))));}function MemberState({ entry, bot }) {if (entry?.state === "ask") return stateLine("bt-member-state bt-mw-ask", entry.approvals[0].at, t("Waiting for your approval"));if (entry?.state !== "work") return bot.role ? stateLine("bt-member-state", void 0, bot.role) : null;-- return stateLine("bt-member-state", entry.doing.since, (0, import_react53.createElement)(Shimmer, null, `${workPhrase(entry.doing)}…`));++ return stateLine("bt-member-state", entry.doing.since, (0, import_react54.createElement)(Shimmer, null, `${workPhrase(entry.doing)}…`));}function StopMemberWork({ entry, bot, room: room2, actions }) {-- const [stopping, setStopping] = (0, import_react53.useState)(false);++ const [stopping, setStopping] = (0, import_react54.useState)(false);if (!entry?.here || entry.state !== "work" && entry.state !== "ask") return null;const stop = () => {setStopping(true);void Promise.resolve(actions.stopMemberWork(room2.id, bot.id)).catch((error) => actions.reportError(error, "stop")).finally(() => setStopping(false));};-- return (0, import_react53.createElement)("button", { type: "button", className: "bt-member-stop", disabled: stopping, "aria-label": `${t("Stop")} · ${bot.name}`, onClick: stop }, t("Stop"));++ return (0, import_react54.createElement)("button", { type: "button", className: "bt-member-stop", disabled: stopping, "aria-label": `${t("Stop")} · ${bot.name}`, onClick: stop }, t("Stop"));}function StopRoomWork({ room: room2, entries: entries2, actions }) {-- const [stopping, setStopping] = (0, import_react53.useState)(false);++ const [stopping, setStopping] = (0, import_react54.useState)(false);if (!entries2.some((entry) => entry.here)) return null;const stop = () => {setStopping(true);void Promise.resolve(actions.stopRoomWork(room2.id)).catch((error) => actions.reportError(error, "stop")).finally(() => setStopping(false));};const label = t("Stop all work in this group");-- return (0, import_react53.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: stopping, "aria-label": label, title: label, onClick: stop }, t("Stop all"));++ return (0, import_react54.createElement)("button", { type: "button", className: "bt-soft bt-soft-sm", disabled: stopping, "aria-label": label, title: label, onClick: stop }, t("Stop all"));}function MemberApprovals({ entry, bot, actions }) {if (entry?.state !== "ask") return null;-- return (0, import_react53.createElement)("div", { className: "bt-member-cards" }, entry.approvals.map((approval) => (0, import_react53.createElement)(ApprovalCard, { key: approval.id, approval, bot, actions })));++ return (0, import_react54.createElement)("div", { className: "bt-member-cards" }, entry.approvals.map((approval) => (0, import_react54.createElement)(ApprovalCard, { key: approval.id, approval, bot, actions })));}function useMemberWork(room2, useWork) {const work = useWork?.((value) => value) ?? NO_WORK;@@@ -22680,7 -22899,7 +23232,7 @@@ body[data-ds-dark-theme] .bt-member-sta`;// src/client/details-drawer.js--var import_react54 = require("react");++var import_react55 = require("react");function transcriptOf(list, id, name, hiddenTurns = []) {const outline = list.projectionsBySession?.[id]?.values?.turnOutline ?? list.byId[id]?.projectionValues?.turnOutline;if (!Array.isArray(outline)) return "";@@@ -22705,17 -22924,17 +23257,17 @@@ var EMPTY_TABS = { ids: [], active: nulfunction PermissionRow({ bot, roster, actions, run: run2 }) {const catalog = roster.permissions;if (!catalog?.options?.length) return null;-- return (0, import_react54.createElement)(++ return (0, import_react55.createElement)("div",{ className: "bt-drawer-permission" },-- (0, import_react54.createElement)("div", { className: "bt-section-title" }, t("Permissions")),++ (0, import_react55.createElement)("div", { className: "bt-section-title" }, t("Permissions")),// A Bot without its own preset may run on another one set in DSH, so its first pick always applies.-- (0, import_react54.createElement)(PermissionPicker, { catalog, saved: bot.permission ?? catalog.defaultPreset, repick: bot.permission === void 0, onPick: (permission) => run2(actions.updateBot(bot.id, { permission })) })++ (0, import_react55.createElement)(PermissionPicker, { catalog, saved: bot.permission ?? catalog.defaultPreset, repick: bot.permission === void 0, onPick: (permission) => run2(actions.updateBot(bot.id, { permission })) }));}function RunStats({ bot, part, running, actions }) {-- const [values, setValues] = (0, import_react54.useState)(null);-- (0, import_react54.useEffect)(() => {++ const [values, setValues] = (0, import_react55.useState)(null);++ (0, import_react55.useEffect)(() => {if (!actions.runStats) return void 0;let current = true;actions.runStats(bot.id).then(@@@ -22732,56 -22951,56 +23284,56 @@@}, [bot.id, part, running]);const shown = runStatsOf(values);if (shown.length === 0) return null;-- return (0, import_react54.createElement)(++ return (0, import_react55.createElement)("div",{ className: "bt-run-stats" },-- shown.map((entry, index) => (0, import_react54.createElement)(-- import_react54.Fragment,++ shown.map((entry, index) => (0, import_react55.createElement)(++ import_react55.Fragment,{ key: entry.key },-- index > 0 ? (0, import_react54.createElement)("span", { className: "bt-run-sep", "aria-hidden": true }, "·") : null,-- (0, import_react54.createElement)("span", { title: entry.title }, entry.text)++ index > 0 ? (0, import_react55.createElement)("span", { className: "bt-run-sep", "aria-hidden": true }, "·") : null,++ (0, import_react55.createElement)("span", { title: entry.title }, entry.text))));}function BrowserCards({ bot, sessionId, roster, actions, useBrowserTabs, useBrowserPages }) {const state = useBrowserTabs((map) => map[bot.id] ?? EMPTY_TABS);const pages = useBrowserPages((map) => map);-- (0, import_react54.useEffect)(() => {++ (0, import_react55.useEffect)(() => {actions.browserEnsure?.(bot.id);}, [bot.id]);if (roster.browser !== true || !actions.browserShow) {-- return (0, import_react54.createElement)("div", { className: "bt-muted" }, t("The browser is in DSH Desktop and the DS Bot app."));++ return (0, import_react55.createElement)("div", { className: "bt-muted" }, t("The browser is in DSH Desktop and the DS Bot app."));}if (state.ids.length === 0) {-- return (0, import_react54.createElement)(++ return (0, import_react55.createElement)("div",{ className: "bt-browser-empty-mark" },-- (0, import_react54.createElement)(BotMark, { bot, size: 40, state: "idle", live: true }),-- (0, import_react54.createElement)("div", { className: "bt-browser-empty-title" }, t("{name}'s browser", { name: bot.name })),-- (0, import_react54.createElement)("div", { className: "bt-muted" }, t("Open a page here and {name} can read it with you. Logins and cookies stay with {name}; other Bots never see them.", { name: bot.name })),-- (0, import_react54.createElement)("button", { type: "button", className: "bt-browser-retry", onClick: () => actions.openBrowser(sessionId) }, t("Open browser"))++ (0, import_react55.createElement)(BotMark, { bot, size: 40, state: "idle", live: true }),++ (0, import_react55.createElement)("div", { className: "bt-browser-empty-title" }, t("{name}'s browser", { name: bot.name })),++ (0, import_react55.createElement)("div", { className: "bt-muted" }, t("Open a page here and {name} can read it with you. Logins and cookies stay with {name}; other Bots never see them.", { name: bot.name })),++ (0, import_react55.createElement)("button", { type: "button", className: "bt-browser-retry", onClick: () => actions.openBrowser(sessionId) }, t("Open browser")));}-- return (0, import_react54.createElement)(++ return (0, import_react55.createElement)("div",{ className: "bt-bcards" },state.ids.map((tabId, index) => {const page = pages[tabId] ?? {};const label = page.title || shortUrl(page.url) || t("New tab");-- return (0, import_react54.createElement)(++ return (0, import_react55.createElement)("div",{ key: tabId, className: "bt-bcard", "data-active": state.active === tabId || void 0, style: { animationDelay: `${index * 30}ms` } },-- (0, import_react54.createElement)(++ (0, import_react55.createElement)("button",{ type: "button", className: "bt-bcard-shot", "aria-label": t("Open {title}", { title: label }), title: page.url, onClick: () => actions.browserPick(sessionId, tabId) },-- page.excerpt ? (0, import_react54.createElement)(++ page.excerpt ? (0, import_react55.createElement)("span",{ className: "bt-bcard-preview" },-- (0, import_react54.createElement)("span", { className: "bt-bcard-ptitle" }, label),-- (0, import_react54.createElement)("span", { className: "bt-bcard-excerpt" }, page.excerpt)-- ) : (0, import_react54.createElement)("span", { className: "bt-bcard-blank" }, (0, import_react54.createElement)(GlobeIcon2), (0, import_react54.createElement)("span", null, label))++ (0, import_react55.createElement)("span", { className: "bt-bcard-ptitle" }, label),++ (0, import_react55.createElement)("span", { className: "bt-bcard-excerpt" }, page.excerpt)++ ) : (0, import_react55.createElement)("span", { className: "bt-bcard-blank" }, (0, import_react55.createElement)(GlobeIcon2), (0, import_react55.createElement)("span", null, label))),-- (0, import_react54.createElement)("button", {++ (0, import_react55.createElement)("button", {type: "button",className: "bt-bcard-x","aria-label": t("Close tab"),@@@ -22790,29 -23009,29 +23342,29 @@@void actions.browserCloseTab(bot.id, tabId);}}, "×"),-- (0, import_react54.createElement)(++ (0, import_react55.createElement)("div",{ className: "bt-bcard-row" },-- (0, import_react54.createElement)(Favicon, { src: page.favicon, className: "bt-bcard-fav" }),-- (0, import_react54.createElement)("span", { className: "bt-bcard-title" }, label),-- page.url ? (0, import_react54.createElement)("span", { className: "bt-bcard-host" }, hostOf2(page.url)) : null++ (0, import_react55.createElement)(Favicon, { src: page.favicon, className: "bt-bcard-fav" }),++ (0, import_react55.createElement)("span", { className: "bt-bcard-title" }, label),++ page.url ? (0, import_react55.createElement)("span", { className: "bt-bcard-host" }, hostOf2(page.url)) : null));}),-- (0, import_react54.createElement)("button", { type: "button", className: "bt-bcard-new", style: { animationDelay: `${state.ids.length * 30}ms` }, onClick: () => actions.browserNewTab(sessionId) }, (0, import_react54.createElement)(PlusIcon), t("New tab"))++ (0, import_react55.createElement)("button", { type: "button", className: "bt-bcard-new", style: { animationDelay: `${state.ids.length * 30}ms` }, onClick: () => actions.browserNewTab(sessionId) }, (0, import_react55.createElement)(PlusIcon), t("New tab")));}function About({ text, title = "About" }) {-- const [open, setOpen] = (0, import_react54.useState)(false);++ const [open, setOpen] = (0, import_react55.useState)(false);const long = text.split("\n").length > 5 || text.length > 240;-- const body = (0, import_react54.useRef)(null);++ const body = (0, import_react55.useRef)(null);useMorph(body, open);-- return (0, import_react54.createElement)(++ return (0, import_react55.createElement)("div",null,-- (0, import_react54.createElement)("div", { className: "bt-section-title" }, t(title)),-- (0, import_react54.createElement)("div", { ref: body, className: "bt-about", "data-open": open || void 0 }, text),-- long ? (0, import_react54.createElement)("button", { type: "button", className: "bt-more", onClick: () => setOpen((value) => !value) }, open ? t("Show less") : t("Show more")) : null++ (0, import_react55.createElement)("div", { className: "bt-section-title" }, t(title)),++ (0, import_react55.createElement)("div", { ref: body, className: "bt-about", "data-open": open || void 0 }, text),++ long ? (0, import_react55.createElement)("button", { type: "button", className: "bt-more", onClick: () => setOpen((value) => !value) }, open ? t("Show less") : t("Show more")) : null);}var PILE_MAX = 4;@@@ -22820,57 -23039,57 +23372,57 @@@ function MemberPile({ room: room2, rostconst members = room2.members.map((id) => roster.byId[id]).filter(Boolean);const shown = members.length > PILE_MAX ? members.slice(0, PILE_MAX - 1) : members;const more = members.length - shown.length;-- return (0, import_react54.createElement)(++ return (0, import_react55.createElement)("span",{ className: "bt-pile", "aria-hidden": true },-- shown.map((bot, index) => (0, import_react54.createElement)("span", { key: bot.id, className: "bt-pile-face", style: { animationDelay: `${index * 40}ms` } }, (0, import_react54.createElement)(BotMark, { bot, size: 44, live: true }))),-- more > 0 ? (0, import_react54.createElement)("span", { key: "more", className: "bt-pile-face bt-pile-more", style: { animationDelay: `${shown.length * 40}ms` } }, `+${more}`) : null++ shown.map((bot, index) => (0, import_react55.createElement)("span", { key: bot.id, className: "bt-pile-face", style: { animationDelay: `${index * 40}ms` } }, (0, import_react55.createElement)(BotMark, { bot, size: 44, live: true }))),++ more > 0 ? (0, import_react55.createElement)("span", { key: "more", className: "bt-pile-face bt-pile-more", style: { animationDelay: `${shown.length * 40}ms` } }, `+${more}`) : null);}var markOf = (entry) => entry?.state === "ask" ? "alert" : entry?.state === "work" ? workState(entry.doing) : "idle";function MemberRow({ member, entry, room: room2, roster, actions }) {-- return (0, import_react54.createElement)(++ return (0, import_react55.createElement)("div",{ role: "listitem", className: "bt-member" },-- (0, import_react54.createElement)(++ (0, import_react55.createElement)("div",{ className: "bt-member-row" },-- (0, import_react54.createElement)(++ (0, import_react55.createElement)("button",{ type: "button", className: "bt-member-open", title: t("Open {name}'s chat", { name: member.name }), onClick: () => actions.openSession(member.id) },-- (0, import_react54.createElement)(BotMark, { bot: member, size: 32, state: markOf(entry) }),-- (0, import_react54.createElement)(++ (0, import_react55.createElement)(BotMark, { bot: member, size: 32, state: markOf(entry) }),++ (0, import_react55.createElement)("span",{ className: "bt-member-text" },-- (0, import_react54.createElement)(++ (0, import_react55.createElement)("span",{ className: "bt-member-line" },-- (0, import_react54.createElement)("span", { className: "bt-member-name" }, member.name),-- room2.admin === member.id ? (0, import_react54.createElement)("span", { className: "bt-tag" }, t("Admin")) : null++ (0, import_react55.createElement)("span", { className: "bt-member-name" }, member.name),++ room2.admin === member.id ? (0, import_react55.createElement)("span", { className: "bt-tag" }, t("Admin")) : null),-- (0, import_react54.createElement)(MemberState, { entry, bot: member, room: room2, roster })++ (0, import_react55.createElement)(MemberState, { entry, bot: member, room: room2, roster }))),-- (0, import_react54.createElement)(StopMemberWork, { entry, bot: member, room: room2, actions })++ (0, import_react55.createElement)(StopMemberWork, { entry, bot: member, room: room2, actions })),-- (0, import_react54.createElement)(MemberApprovals, { entry, bot: member, actions })++ (0, import_react55.createElement)(MemberApprovals, { entry, bot: member, actions }));}function GroupOverview({ room: room2, roster, actions, usage, useWork, openSettings }) {const members = room2.members.map((id) => roster.byId[id]).filter(Boolean);const { entries: entries2 } = useMemberWork(room2, useWork);return [-- room2.notice ? (0, import_react54.createElement)(About, { key: "notice", title: "Notice", text: room2.notice }) : (0, import_react54.createElement)("button", { key: "notice", type: "button", className: "bt-more", onClick: openSettings }, t("Add a notice in group settings")),-- (0, import_react54.createElement)(++ room2.notice ? (0, import_react55.createElement)(About, { key: "notice", title: "Notice", text: room2.notice }) : (0, import_react55.createElement)("button", { key: "notice", type: "button", className: "bt-more", onClick: openSettings }, t("Add a notice in group settings")),++ (0, import_react55.createElement)("div",{ key: "members" },-- (0, import_react54.createElement)(++ (0, import_react55.createElement)("div",{ className: "bt-members-head" },-- (0, import_react54.createElement)("div", { className: "bt-section-title" }, t("Members · {count}", { count: members.length })),-- (0, import_react54.createElement)(StopRoomWork, { room: room2, entries: entries2, actions })++ (0, import_react55.createElement)("div", { className: "bt-section-title" }, t("Members · {count}", { count: members.length })),++ (0, import_react55.createElement)(StopRoomWork, { room: room2, entries: entries2, actions })),-- (0, import_react54.createElement)("div", { className: "bt-members", role: "list" }, members.map((member) => (0, import_react54.createElement)(MemberRow, {++ (0, import_react55.createElement)("div", { className: "bt-members", role: "list" }, members.map((member) => (0, import_react55.createElement)(MemberRow, {key: member.id,member,entry: entries2.find((item) => item.id === member.id),@@@ -22879,16 -23098,16 +23431,16 @@@actions})))),-- (0, import_react54.createElement)(++ (0, import_react55.createElement)("div",{ key: "goal" },-- (0, import_react54.createElement)("div", { className: "bt-section-title" }, t("Goal")),-- (0, import_react54.createElement)(++ (0, import_react55.createElement)("div", { className: "bt-section-title" }, t("Goal")),++ (0, import_react55.createElement)("div",{ className: "bt-kv" },room2.goal ? [-- (0, import_react54.createElement)("span", { key: "t" }, room2.goal.title, " ", (0, import_react54.createElement)("span", { className: "bt-note" }, goalView(room2.goal, { roster })?.barLabel ?? "")),-- (0, import_react54.createElement)("button", {++ (0, import_react55.createElement)("span", { key: "t" }, room2.goal.title, " ", (0, import_react55.createElement)("span", { className: "bt-note" }, goalView(room2.goal, { roster })?.barLabel ?? "")),++ (0, import_react55.createElement)("button", {key: "s",type: "button",className: "bt-soft bt-soft-sm",@@@ -22897,7 -23116,7 +23449,7 @@@if (typeof document !== "undefined" && document.querySelector("[data-rightbar-fullscreen]")) actions.closeOverlay();}}, t("Show"))-- ] : (0, import_react54.createElement)("button", {++ ] : (0, import_react55.createElement)("button", {type: "button",className: "bt-soft bt-soft-sm",disabled: !canSetGoal(room2, roster),@@@ -22906,24 -23125,24 +23458,24 @@@}, t("Set a goal")))),-- (0, import_react54.createElement)(++ (0, import_react55.createElement)("div",{ key: "mode" },-- (0, import_react54.createElement)("div", { className: "bt-section-title" }, t("Who answers")),-- (0, import_react54.createElement)("div", { className: "bt-kv" }, (0, import_react54.createElement)("span", null, t(ROOM_MODES.find(([id]) => id === shownMode(room2, roster))?.[1] ?? "Everyone")))++ (0, import_react55.createElement)("div", { className: "bt-section-title" }, t("Who answers")),++ (0, import_react55.createElement)("div", { className: "bt-kv" }, (0, import_react55.createElement)("span", null, t(ROOM_MODES.find(([id]) => id === shownMode(room2, roster))?.[1] ?? "Everyone")))),-- room2.permission ? (0, import_react54.createElement)(++ room2.permission ? (0, import_react55.createElement)("div",{ key: "permission" },-- (0, import_react54.createElement)("div", { className: "bt-section-title" }, t("Permissions")),-- (0, import_react54.createElement)("div", { className: "bt-kv" }, (0, import_react54.createElement)("span", { className: presetDanger(room2.permission) ? "bt-perm-danger" : void 0 }, presetName(room2.permission, roster.permissions)))++ (0, import_react55.createElement)("div", { className: "bt-section-title" }, t("Permissions")),++ (0, import_react55.createElement)("div", { className: "bt-kv" }, (0, import_react55.createElement)("span", { className: presetDanger(room2.permission) ? "bt-perm-danger" : void 0 }, presetName(room2.permission, roster.permissions)))) : null,-- roster.memory === false ? null : (0, import_react54.createElement)(MemoryRow, { key: "memory", owner: { id: room2.id, name: room2.name, group: true }, actions }),-- usage ? (0, import_react54.createElement)(++ roster.memory === false ? null : (0, import_react55.createElement)(MemoryRow, { key: "memory", owner: { id: room2.id, name: room2.name, group: true }, actions }),++ usage ? (0, import_react55.createElement)("div",{ key: "usage" },-- (0, import_react54.createElement)("div", { className: "bt-section-title" }, t("Usage")),-- (0, import_react54.createElement)("div", { className: "bt-kv" }, (0, import_react54.createElement)("span", null, room2.name), (0, import_react54.createElement)("span", null, usage))++ (0, import_react55.createElement)("div", { className: "bt-section-title" }, t("Usage")),++ (0, import_react55.createElement)("div", { className: "bt-kv" }, (0, import_react55.createElement)("span", null, room2.name), (0, import_react55.createElement)("span", null, usage))) : null];}@@@ -22931,15 -23150,15 +23483,15 @@@ function DetailsDrawer({ sessionId, staconst owner = roster.byId[sessionId];const part = owner ? currentPart(owner) : sessionId;const isMainBot = isMainOf(roster, owner?.id);-- const [tab, setTab] = (0, import_react54.useState)("details");++ const [tab, setTab] = (0, import_react55.useState)("details");const room2 = roster.roomsById[sessionId];-- const [view, setView] = (0, import_react54.useState)(startTab === "settings" && (owner || room2) ? "settings" : "overview");-- const [editing, setEditing] = (0, import_react54.useState)(Boolean(startRenaming && (roster.byId[sessionId] || roster.roomsById[sessionId])));-- const [draftName, setDraftName] = (0, import_react54.useState)(roster.byId[sessionId]?.name ?? (roster.roomsById[sessionId]?.named ? roster.roomsById[sessionId].name : ""));-- const [copied, setCopied] = (0, import_react54.useState)(false);-- const [error, setError] = (0, import_react54.useState)("");++ const [view, setView] = (0, import_react55.useState)(startTab === "settings" && (owner || room2) ? "settings" : "overview");++ const [editing, setEditing] = (0, import_react55.useState)(Boolean(startRenaming && (roster.byId[sessionId] || roster.roomsById[sessionId])));++ const [draftName, setDraftName] = (0, import_react55.useState)(roster.byId[sessionId]?.name ?? (roster.roomsById[sessionId]?.named ? roster.roomsById[sessionId].name : ""));++ const [copied, setCopied] = (0, import_react55.useState)(false);++ const [error, setError] = (0, import_react55.useState)("");const glide = useGlide(tab);-- const last = (0, import_react54.useRef)({ view, tab, move: void 0 });++ const last = (0, import_react55.useRef)({ view, tab, move: void 0 });if (last.current.view !== view) last.current = { view, tab, move: view === "settings" ? "in" : "out" };else if (last.current.tab !== tab) last.current = { view, tab, move: "tab" };const move = last.current.move;@@@ -22964,21 -23183,21 +23516,21 @@@setTimeout(() => setCopied(false), 1600);});};-- const errorLine = error ? (0, import_react54.createElement)("div", { className: "bt-error", role: "alert", style: { padding: 0 } }, error) : null;++ const errorLine = error ? (0, import_react55.createElement)("div", { className: "bt-error", role: "alert", style: { padding: 0 } }, error) : null;if ((bot || room2) && view === "settings") {return [-- (0, import_react54.createElement)(++ (0, import_react55.createElement)("div",{ key: "head", className: "bt-subhead", "data-move": move },-- (0, import_react54.createElement)("button", { type: "button", className: "bt-icon-btn", "aria-label": t("Back to details"), onClick: () => setView("overview") }, (0, import_react54.createElement)(ChevronLeftIcon)),-- (0, import_react54.createElement)("span", { className: "bt-subhead-title" }, bot ? t("Settings") : t("Group settings")),-- hasStrip ? null : (0, import_react54.createElement)("button", { type: "button", className: "bt-icon-btn", "aria-label": t("Close details"), onClick: close }, (0, import_react54.createElement)(CloseIcon))++ (0, import_react55.createElement)("button", { type: "button", className: "bt-icon-btn", "aria-label": t("Back to details"), onClick: () => setView("overview") }, (0, import_react55.createElement)(ChevronLeftIcon)),++ (0, import_react55.createElement)("span", { className: "bt-subhead-title" }, bot ? t("Settings") : t("Group settings")),++ hasStrip ? null : (0, import_react55.createElement)("button", { type: "button", className: "bt-icon-btn", "aria-label": t("Close details"), onClick: close }, (0, import_react55.createElement)(CloseIcon))),-- (0, import_react54.createElement)(++ (0, import_react55.createElement)("div",{ key: "set-body", className: "bt-drawer-body bt-set-body", "data-move": move },errorLine,-- bot ? (0, import_react54.createElement)(BotSettingsForm, { bot, roster, actions, run: run2 }) : (0, import_react54.createElement)(GroupSettingsForm, { room: room2, roster, actions, run: run2, onDeleted: close })++ bot ? (0, import_react55.createElement)(BotSettingsForm, { bot, roster, actions, run: run2 }) : (0, import_react55.createElement)(GroupSettingsForm, { room: room2, roster, actions, run: run2, onDeleted: close }))];}@@@ -22989,18 -23208,18 +23541,18 @@@canTerminal: actions.canOpenTerminal?.() === true,canFiles: actions.canOpenFiles?.() === true}).map((key) => menuItemFor(key, actions, sessionId));-- const top = (0, import_react54.createElement)(++ const top = (0, import_react55.createElement)("div",{ className: "bt-drawer-top", "data-move": side },-- bot || room2 ? (0, import_react54.createElement)("button", { type: "button", className: "bt-round", "aria-label": bot ? t("Edit Bot") : t("Group settings"), title: bot ? t("Edit Bot") : t("Group settings"), "data-info-row": "settings", onClick: () => setView("settings") }, (0, import_react54.createElement)(GearIcon)) : null,-- more.length > 0 ? (0, import_react54.createElement)("span", { "data-info-row": "more" }, (0, import_react54.createElement)(PanelMenu, { items: more, className: "bt-round", "aria-label": t("More") })) : null,-- bot || room2 ? (0, import_react54.createElement)("button", { type: "button", className: "bt-round", "aria-label": copied ? t("Copied conversation") : t("Share conversation"), title: copied ? t("Copied") : t("Copy conversation as Markdown"), onClick: share }, copied ? (0, import_react54.createElement)("span", { key: "copied", className: "bt-pop-in" }, "✓") : (0, import_react54.createElement)(ShareIcon)) : null,-- hasStrip ? null : (0, import_react54.createElement)("button", { type: "button", className: "bt-round", "aria-label": t("Close details"), onClick: close }, (0, import_react54.createElement)(CloseIcon))++ bot || room2 ? (0, import_react55.createElement)("button", { type: "button", className: "bt-round", "aria-label": bot ? t("Edit Bot") : t("Group settings"), title: bot ? t("Edit Bot") : t("Group settings"), "data-info-row": "settings", onClick: () => setView("settings") }, (0, import_react55.createElement)(GearIcon)) : null,++ more.length > 0 ? (0, import_react55.createElement)("span", { "data-info-row": "more" }, (0, import_react55.createElement)(PanelMenu, { items: more, className: "bt-round", "aria-label": t("More") })) : null,++ bot || room2 ? (0, import_react55.createElement)("button", { type: "button", className: "bt-round", "aria-label": copied ? t("Copied conversation") : t("Share conversation"), title: copied ? t("Copied") : t("Copy conversation as Markdown"), onClick: share }, copied ? (0, import_react55.createElement)("span", { key: "copied", className: "bt-pop-in" }, "✓") : (0, import_react55.createElement)(ShareIcon)) : null,++ hasStrip ? null : (0, import_react55.createElement)("button", { type: "button", className: "bt-round", "aria-label": t("Close details"), onClick: close }, (0, import_react55.createElement)(CloseIcon)));if (!bot && !room2) {return [-- (0, import_react54.createElement)(import_react54.Fragment, { key: "top" }, top),-- (0, import_react54.createElement)("div", { key: "body", className: "bt-drawer-body" }, (0, import_react54.createElement)("div", { className: "bt-muted" }, t("This conversation is not part of your Bot team.")))++ (0, import_react55.createElement)(import_react55.Fragment, { key: "top" }, top),++ (0, import_react55.createElement)("div", { key: "body", className: "bt-drawer-body" }, (0, import_react55.createElement)("div", { className: "bt-muted" }, t("This conversation is not part of your Bot team.")))];}const current = bot?.name ?? room2.name;@@@ -23012,14 -23231,14 +23564,14 @@@if (room2) await run2(actions.updateRoom(room2.id, { name: next }));};const subtitle = bot ? bot.role : roomSubtitle(room2, roster);- const tabs = bot ? ["details", "browser"] : ["details"];+ const tabs = bot ? roster.computer?.enabled === true ? ["details", "browser", "computer"] : ["details", "browser"] : ["details"];return [-- (0, import_react54.createElement)(import_react54.Fragment, { key: "top" }, top),-- (0, import_react54.createElement)(++ (0, import_react55.createElement)(import_react55.Fragment, { key: "top" }, top),++ (0, import_react55.createElement)("div",{ key: "id", className: "bt-drawer-id", "data-move": side },-- bot ? (0, import_react54.createElement)(BotAvatar, { bot, size: 64, state: botState(running, doing, roster.questions?.[part] !== void 0), main: isMainBot, badge: false, gaze: true, pokeable: true }) : (0, import_react54.createElement)(MemberPile, { room: room2, roster }),-- editing ? (0, import_react54.createElement)("input", {++ bot ? (0, import_react55.createElement)(BotAvatar, { bot, size: 64, state: botState(running, doing, roster.questions?.[part] !== void 0), main: isMainBot, badge: false, gaze: true, pokeable: true }) : (0, import_react55.createElement)(MemberPile, { room: room2, roster }),++ editing ? (0, import_react55.createElement)("input", {className: "bt-drawer-name-input",autoFocus: true,value: draftName,@@@ -23034,51 -23253,52 +23586,52 @@@setEditing(false);}}-- }) : (0, import_react54.createElement)("button", { type: "button", className: "bt-drawer-name", "aria-label": t("Rename {name}", { name: current }), title: t("Rename"), onClick: () => {++ }) : (0, import_react55.createElement)("button", { type: "button", className: "bt-drawer-name", "aria-label": t("Rename {name}", { name: current }), title: t("Rename"), onClick: () => {setDraftName(room2 && !room2.named ? "" : current);setEditing(true);} }, current),-- subtitle ? (0, import_react54.createElement)("span", { className: "bt-drawer-role" }, subtitle) : null++ subtitle ? (0, import_react55.createElement)("span", { className: "bt-drawer-role" }, subtitle) : null),-- tabs.length > 1 ? (0, import_react54.createElement)(++ tabs.length > 1 ? (0, import_react55.createElement)("div",{ key: "tabs", ref: glide.box, className: "bt-tabs", role: "tablist", "data-move": side },-- (0, import_react54.createElement)("span", { ref: glide.thumb, className: "bt-thumb", "aria-hidden": true }),-- tabs.map((key) => (0, import_react54.createElement)("button", { key, type: "button", role: "tab", className: "bt-tab", "aria-selected": tab === key, onClick: () => setTab(key) }, t(TAB_LABELS[key])))++ (0, import_react55.createElement)("span", { ref: glide.thumb, className: "bt-thumb", "aria-hidden": true }),++ tabs.map((key) => (0, import_react55.createElement)("button", { key, type: "button", role: "tab", className: "bt-tab", "aria-selected": tab === key, onClick: () => setTab(key) }, t(TAB_LABELS[key])))) : null,-- (0, import_react54.createElement)(++ (0, import_react55.createElement)("div",{ key: `body:${tab}`, className: "bt-drawer-body", "data-move": move },errorLine,-- room2 && tab === "details" ? (0, import_react54.createElement)(GroupOverview, { room: room2, roster, actions, usage, useWork, openSettings: () => setView("settings") }) : null,- bot && tab === "computer" ? (0, import_react54.createElement)(ComputerView, { bot, actions, hooks: { useComputer } }) : null,++ room2 && tab === "details" ? (0, import_react55.createElement)(GroupOverview, { room: room2, roster, actions, usage, useWork, openSettings: () => setView("settings") }) : null,++ bot && tab === "computer" ? (0, import_react55.createElement)(ComputerView, { bot, actions, hooks: { useComputer } }) : null,bot && tab === "details" ? [-- (0, import_react54.createElement)(RunStats, { key: "stats", bot, part, running, actions }),-- (0, import_react54.createElement)(++ (0, import_react55.createElement)(RunStats, { key: "stats", bot, part, running, actions }),++ (0, import_react55.createElement)("div",{ key: "model", className: "bt-drawer-model" },-- (0, import_react54.createElement)("div", { className: "bt-section-title" }, t("Model")),-- (0, import_react54.createElement)(ModelMenu, { bot, roster, actions, run: run2, wide: true }),-- modelOf(bot, roster) ? null : (0, import_react54.createElement)("div", { className: "bt-note" }, t("Pick a model and {name} can start.", { name: bot.name }))++ (0, import_react55.createElement)("div", { className: "bt-section-title" }, t("Model")),++ (0, import_react55.createElement)(ModelMenu, { bot, roster, actions, run: run2, wide: true }),++ modelOf(bot, roster) ? null : (0, import_react55.createElement)("div", { className: "bt-note" }, t("Pick a model and {name} can start.", { name: bot.name }))),-- (0, import_react54.createElement)(PermissionRow, { key: "permission", bot, roster, actions, run: run2 }),-- (0, import_react54.createElement)(BotConnectors, { key: "connectors", bot, roster, actions, run: run2 }),-- (0, import_react54.createElement)(++ (0, import_react55.createElement)(PermissionRow, { key: "permission", bot, roster, actions, run: run2 }),++ (0, import_react55.createElement)(BotConnectors, { key: "connectors", bot, roster, actions, run: run2 }),++ (0, import_react55.createElement)("div",{ key: "folder", className: "bt-drawer-model" },-- (0, import_react54.createElement)("div", { className: "bt-section-title" }, t("Working folder")),-- (0, import_react54.createElement)(FolderMenu, { value: bot.workDir, actions, run: run2, wide: true, onPick: (workDir) => run2(actions.updateBot(bot.id, { workDir })) })++ (0, import_react55.createElement)("div", { className: "bt-section-title" }, t("Working folder")),++ (0, import_react55.createElement)(FolderMenu, { value: bot.workDir, actions, run: run2, wide: true, onPick: (workDir) => run2(actions.updateBot(bot.id, { workDir })) })),-- bot.instructions ? (0, import_react54.createElement)(About, { key: "about", text: bot.instructions }) : (0, import_react54.createElement)("button", { key: "about", type: "button", className: "bt-more", onClick: () => setView("settings") }, t("Add instructions in Bot settings")),-- roster.memory === false ? null : (0, import_react54.createElement)(MemoryRow, { key: "memory", owner: { id: bot.id, name: bot.name }, actions }),-- usage ? (0, import_react54.createElement)(++ bot.instructions ? (0, import_react55.createElement)(About, { key: "about", text: bot.instructions }) : (0, import_react55.createElement)("button", { key: "about", type: "button", className: "bt-more", onClick: () => setView("settings") }, t("Add instructions in Bot settings")),++ roster.memory === false ? null : (0, import_react55.createElement)(MemoryRow, { key: "memory", owner: { id: bot.id, name: bot.name }, actions }),++ usage ? (0, import_react55.createElement)("div",{ key: "usage" },-- (0, import_react54.createElement)("div", { className: "bt-section-title" }, t("Usage")),-- (0, import_react54.createElement)("div", { className: "bt-kv" }, (0, import_react54.createElement)("span", null, bot.name), (0, import_react54.createElement)("span", null, usage))++ (0, import_react55.createElement)("div", { className: "bt-section-title" }, t("Usage")),++ (0, import_react55.createElement)("div", { className: "bt-kv" }, (0, import_react55.createElement)("span", null, bot.name), (0, import_react55.createElement)("span", null, usage))) : null,-- (0, import_react54.createElement)(ScheduleSummary, { key: "routines", bot, actions })++ (0, import_react55.createElement)(ScheduleSummary, { key: "routines", bot, actions })] : null,-- bot && tab === "browser" ? (0, import_react54.createElement)(BrowserCards, { bot, sessionId, roster, actions, useBrowserTabs, useBrowserPages }) : null++ bot && tab === "browser" ? (0, import_react55.createElement)(BrowserCards, { bot, sessionId, roster, actions, useBrowserTabs, useBrowserPages }) : null)];}@@@ -23089,7 -23309,7 +23642,7 @@@ function rectsOverlap(a, b)}// src/client/browser-pane.js--var import_react55 = require("react");++var import_react56 = require("react");var import_react_dom8 = require("react-dom");var PANEL_LINGER_MS = 300;var WIDTH_KEY = STORAGE.browserWidth;@@@ -23101,10 -23321,10 +23654,10 @@@ var READ_FLASH_MS = 2400var EMPTY_PAGE = { url: "", title: "", favicon: null, loading: false, canGoBack: false, canGoForward: false, error: null, excerpt: "" };var EMPTY_TABS2 = { ids: [], active: null };var icon = (paths) => function BrowserIcon() {-- return (0, import_react55.createElement)(++ return (0, import_react56.createElement)("svg",{ width: 16, height: 16, viewBox: "0 0 20 20", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true },-- paths.map((d, index) => (0, import_react55.createElement)("path", { key: index, d }))++ paths.map((d, index) => (0, import_react56.createElement)("path", { key: index, d })));};var GlobeIcon2 = icon(["M10 3a7 7 0 1 0 0 14 7 7 0 0 0 0-14z", "M3 10h14", "M10 3c2 2.2 2.9 4.5 2.9 7S12 14.8 10 17c-2-2.2-2.9-4.5-2.9-7S8 5.2 10 3z"]);@@@ -23119,9 -23339,9 +23672,9 @@@ var ImportIcon = icon(["M10 3.5v8.5", "var FileIcon = icon(["M6 3.5h5.5L14.5 6.5v10H6z", "M11 3.5v3.5h3.5"]);var WindowIcon = icon(["M4 5h12v9.5H4z", "M4 7.5h12"]);function Favicon({ src, className }) {-- const [failed, setFailed] = (0, import_react55.useState)(null);-- if (!src || failed === src) return (0, import_react55.createElement)("span", { className: `${className} bt-ptab-globe` }, (0, import_react55.createElement)(GlobeIcon2));-- return (0, import_react55.createElement)("img", { className, src, alt: "", "aria-hidden": true, onError: () => setFailed(src) });++ const [failed, setFailed] = (0, import_react56.useState)(null);++ if (!src || failed === src) return (0, import_react56.createElement)("span", { className: `${className} bt-ptab-globe` }, (0, import_react56.createElement)(GlobeIcon2));++ return (0, import_react56.createElement)("img", { className, src, alt: "", "aria-hidden": true, onError: () => setFailed(src) });}var savedWidth = () => {try {@@@ -23137,11 -23357,11 +23690,11 @@@ var shortAddress = (url) => String(urlvar reducedMotion2 = () => typeof matchMedia === "function" && matchMedia("(prefers-reduced-motion: reduce)").matches;var tabLabel = (page) => page.title || shortAddress(page.url) || t("New tab");function PanelMenu({ items, className, "aria-label": label }) {-- const [open, setOpen] = (0, import_react55.useState)(false);++ const [open, setOpen] = (0, import_react56.useState)(false);const [shown, leaving] = useLinger(open, 120);-- const wrap = (0, import_react55.useRef)(null);-- const button = (0, import_react55.useRef)(null);-- (0, import_react55.useEffect)(() => {++ const wrap = (0, import_react56.useRef)(null);++ const button = (0, import_react56.useRef)(null);++ (0, import_react56.useEffect)(() => {if (!open) return void 0;const onDown = (event) => {if (wrap.current && !wrap.current.contains(event.target)) setOpen(false);@@@ -23160,10 -23380,10 +23713,10 @@@};}, [open]);if (items.length === 0) return null;-- return (0, import_react55.createElement)(++ return (0, import_react56.createElement)("span",{ className: "bt-pmenu", ref: wrap },-- (0, import_react55.createElement)("button", {++ (0, import_react56.createElement)("button", {ref: button,type: "button",className,@@@ -23172,11 -23392,11 +23725,11 @@@"aria-haspopup": "menu","aria-expanded": open,onClick: () => setOpen((value) => !value)-- }, (0, import_react55.createElement)(DotsIcon)),-- shown ? (0, import_react55.createElement)(++ }, (0, import_react56.createElement)(DotsIcon)),++ shown ? (0, import_react56.createElement)("div",{ className: "bt-pmenu-pop", role: "menu", "data-leaving": leaving || void 0 },-- items.map((item, index) => item.sep ? (0, import_react55.createElement)("span", { key: `sep-${index}`, className: "bt-pmenu-sep", role: "separator" }) : (0, import_react55.createElement)("button", {++ items.map((item, index) => item.sep ? (0, import_react56.createElement)("span", { key: `sep-${index}`, className: "bt-pmenu-sep", role: "separator" }) : (0, import_react56.createElement)("button", {key: item.key,type: "button",role: "menuitem",@@@ -23185,7 -23405,7 +23738,7 @@@setOpen(false);item.onPick();}-- }, (0, import_react55.createElement)(item.icon), (0, import_react55.createElement)("span", null, item.label)))++ }, (0, import_react56.createElement)(item.icon), (0, import_react56.createElement)("span", null, item.label)))) : null);}@@@ -23211,12 -23431,12 +23764,12 @@@ function menuItemFor(key, actions, subjvar sideTitle = (chat) => chat?.entries?.[0]?.question?.trim() || t("Side chat");function PanelStrip({ bot, subject, view, ids, active, sides, side, canBrowse, reading, onView, actions, useBrowserPages }) {const pages = useBrowserPages((map) => map);-- const wrap = (0, import_react55.useRef)(null);-- const ind = (0, import_react55.useRef)(null);-- const spot = (0, import_react55.useRef)(null);-- const under = (0, import_react55.useRef)(null);-- const watcher = (0, import_react55.useRef)(null);-- (0, import_react55.useLayoutEffect)(() => {++ const wrap = (0, import_react56.useRef)(null);++ const ind = (0, import_react56.useRef)(null);++ const spot = (0, import_react56.useRef)(null);++ const under = (0, import_react56.useRef)(null);++ const watcher = (0, import_react56.useRef)(null);++ (0, import_react56.useLayoutEffect)(() => {const box = wrap.current;const capsule = ind.current;if (!box || !capsule) return void 0;@@@ -23249,7 -23469,7 +23802,7 @@@trail.cancel();};});-- (0, import_react55.useEffect)(() => {++ (0, import_react56.useEffect)(() => {const box = wrap.current;if (!box) return void 0;const observer = new ResizeObserver(() => {@@@ -23273,13 -23493,13 +23826,13 @@@canTerminal: actions.canOpenTerminal?.() === true,canFiles: actions.canOpenFiles?.() === true}).map((key) => menuItemFor(key, actions, subject));-- return (0, import_react55.createElement)(++ return (0, import_react56.createElement)("div",{ className: "bt-ptabs", role: "tablist", "aria-label": t("Panel tabs") },-- (0, import_react55.createElement)(++ (0, import_react56.createElement)("div",{ className: "bt-ptabs-in", ref: wrap },-- (0, import_react55.createElement)(++ (0, import_react56.createElement)("button",{type: "button",@@@ -23289,13 -23509,13 +23842,13 @@@title: bot.name,onClick: () => onView("details")},-- (0, import_react55.createElement)(BotMark, { bot, size: 20, state: reading ? "searching" : "idle" }),-- view === "details" ? (0, import_react55.createElement)("span", { className: "bt-ptab-name" }, bot.name) : null++ (0, import_react56.createElement)(BotMark, { bot, size: 20, state: reading ? "searching" : "idle" }),++ view === "details" ? (0, import_react56.createElement)("span", { className: "bt-ptab-name" }, bot.name) : null),ids.map((tabId) => {const page = pages[tabId] ?? EMPTY_PAGE;const on = view === "browser" && tabId === active;-- return (0, import_react55.createElement)(++ return (0, import_react56.createElement)("button",{key: tabId,@@@ -23316,9 -23536,9 +23869,9 @@@}}},-- (0, import_react55.createElement)(Favicon, { src: page.favicon, className: "bt-ptab-fav" }),-- (0, import_react55.createElement)("span", { className: "bt-ptab-title" }, tabLabel(page)),-- (0, import_react55.createElement)("span", {++ (0, import_react56.createElement)(Favicon, { src: page.favicon, className: "bt-ptab-fav" }),++ (0, import_react56.createElement)("span", { className: "bt-ptab-title" }, tabLabel(page)),++ (0, import_react56.createElement)("span", {className: "bt-ptab-x",role: "button","aria-label": t("Close tab"),@@@ -23332,7 -23552,7 +23885,7 @@@}),sides.map((chat) => {const on = view === "side" && chat.id === side;-- return (0, import_react55.createElement)(++ return (0, import_react56.createElement)("button",{key: chat.id,@@@ -23350,9 -23570,9 +23903,9 @@@}}},-- (0, import_react55.createElement)("span", { className: "bt-ptab-globe", "aria-hidden": true }, (0, import_react55.createElement)(SideIcon)),-- (0, import_react55.createElement)("span", { className: "bt-ptab-title" }, sideTitle(chat)),-- (0, import_react55.createElement)("span", {++ (0, import_react56.createElement)("span", { className: "bt-ptab-globe", "aria-hidden": true }, (0, import_react56.createElement)(SideIcon)),++ (0, import_react56.createElement)("span", { className: "bt-ptab-title" }, sideTitle(chat)),++ (0, import_react56.createElement)("span", {className: "bt-ptab-x",role: "button","aria-label": t("Close side chat"),@@@ -23364,30 -23584,30 +23917,30 @@@}, "×"));}),-- (0, import_react55.createElement)("span", { ref: ind, className: "bt-ptab-ind", "aria-hidden": true })++ (0, import_react56.createElement)("span", { ref: ind, className: "bt-ptab-ind", "aria-hidden": true })),// The `···` and Close stay outside the scrolling tabs, so a narrow panel keeps both.-- (0, import_react55.createElement)(PanelMenu, { items, className: "bt-ptab-new", "aria-label": t("More") }),-- (0, import_react55.createElement)("button", { type: "button", className: "bt-icon-btn bt-ptab-close", "aria-label": t("Close panel"), title: t("Close panel"), onClick: () => actions.closePanel() }, (0, import_react55.createElement)(CloseIcon3))++ (0, import_react56.createElement)(PanelMenu, { items, className: "bt-ptab-new", "aria-label": t("More") }),++ (0, import_react56.createElement)("button", { type: "button", className: "bt-icon-btn bt-ptab-close", "aria-label": t("Close panel"), title: t("Close panel"), onClick: () => actions.closePanel() }, (0, import_react56.createElement)(CloseIcon3)));}function BrowserView({ bot, tabId, leaving, landed, actions, useBrowserPages, hold }) {const page = useBrowserPages((pages) => pages[tabId ?? ""]) ?? EMPTY_PAGE;-- const frame = (0, import_react55.useRef)(null);-- const input = (0, import_react55.useRef)(null);-- const [draft, setDraft] = (0, import_react55.useState)(null);-- const [covered, setCovered] = (0, import_react55.useState)(false);++ const frame = (0, import_react56.useRef)(null);++ const input = (0, import_react56.useRef)(null);++ const [draft, setDraft] = (0, import_react56.useState)(null);++ const [covered, setCovered] = (0, import_react56.useState)(false);const imports = actions.browserImport;-- const [flow, setFlow] = (0, import_react55.useState)(null);-- const flowRef = (0, import_react55.useRef)(null);-- const [sources, setSources] = (0, import_react55.useState)(null);-- const [busy, setBusy] = (0, import_react55.useState)(false);++ const [flow, setFlow] = (0, import_react56.useState)(null);++ const flowRef = (0, import_react56.useRef)(null);++ const [sources, setSources] = (0, import_react56.useState)(null);++ const [busy, setBusy] = (0, import_react56.useState)(false);const setFlowTracked = (next) => {flowRef.current = typeof next === "function" ? next(flowRef.current) : next;setFlow(flowRef.current);};const showGuest = landed && !leaving && !covered && Boolean(page.url) && !page.error && flow === null;-- (0, import_react55.useEffect)(() => {++ (0, import_react56.useEffect)(() => {const update = () => {const panel = frame.current?.getBoundingClientRect();const overlaps2 = panel && [...document.querySelectorAll('[role="dialog"],[role="menu"],[role="listbox"]')].some((element) => rectsOverlap(panel, element.getBoundingClientRect()));@@@ -23402,7 -23622,7 +23955,7 @@@window.removeEventListener("resize", update);};}, []);-- (0, import_react55.useEffect)(() => {++ (0, import_react56.useEffect)(() => {setFlowTracked(null);return () => {const id = typeof flowRef.current === "object" && flowRef.current !== null ? flowRef.current.id : null;@@@ -23446,7 -23666,7 +23999,7 @@@if (id) void imports?.cancel(id).catch(() => {});};-- (0, import_react55.useLayoutEffect)(() => {++ (0, import_react56.useLayoutEffect)(() => {const element = frame.current;if (!element || leaving || !tabId) {void actions.browserShow(null);@@@ -23472,7 -23692,7 +24025,7 @@@window.removeEventListener("resize", schedule);};}, [tabId, showGuest, leaving]);-- (0, import_react55.useEffect)(() => {++ (0, import_react56.useEffect)(() => {setDraft(null);if (landed && !page.url) input.current?.focus();}, [tabId, landed]);@@@ -23488,38 -23708,38 +24041,38 @@@};const editing = draft !== null;const secure = /^https:/i.test(page.url);-- return (0, import_react55.createElement)(++ return (0, import_react56.createElement)("div",{ className: "bt-panel-view bt-panel-browser", "aria-label": t("{name}'s browser", { name: bot.name }) },-- actions.browserTakeover ? (0, import_react55.createElement)(++ actions.browserTakeover ? (0, import_react56.createElement)("div",{ className: "bt-browser-takeover", "data-held": hold?.by === "user" || void 0 },-- (0, import_react55.createElement)("span", null, hold?.by === "user" ? t("You control this browser") : hold?.by === "bot" ? t("The Bot handed this browser to you: {reason}", { reason: hold.reason }) : t("The Bot controls this browser")),-- hold?.by ? (0, import_react55.createElement)("button", { type: "button", onClick: () => void actions.browserGiveBack(bot.id) }, t("Give back")) : (0, import_react55.createElement)(++ (0, import_react56.createElement)("span", null, hold?.by === "user" ? t("You control this browser") : hold?.by === "bot" ? t("The Bot handed this browser to you: {reason}", { reason: hold.reason }) : t("The Bot controls this browser")),++ hold?.by ? (0, import_react56.createElement)("button", { type: "button", onClick: () => void actions.browserGiveBack(bot.id) }, t("Give back")) : (0, import_react56.createElement)("span",{ className: "bt-browser-takeover-actions" },-- (0, import_react55.createElement)("button", { type: "button", onClick: () => void actions.browserTakeover(bot.id) }, t("Take over")),-- (0, import_react55.createElement)("button", { type: "button", onClick: () => void actions.browserStop(bot.id) }, t("Stop"))++ (0, import_react56.createElement)("button", { type: "button", onClick: () => void actions.browserTakeover(bot.id) }, t("Take over")),++ (0, import_react56.createElement)("button", { type: "button", onClick: () => void actions.browserStop(bot.id) }, t("Stop")))) : null,-- (0, import_react55.createElement)(++ (0, import_react56.createElement)("div",{ className: "bt-browser-bar" },-- (0, import_react55.createElement)("button", { type: "button", className: "bt-icon-btn", "aria-label": t("Back"), title: t("Back"), disabled: !page.canGoBack, onClick: () => actions.browserCommand(tabId, "back") }, (0, import_react55.createElement)(BackIcon)),-- (0, import_react55.createElement)("button", { type: "button", className: "bt-icon-btn", "aria-label": t("Forward"), title: t("Forward"), disabled: !page.canGoForward, onClick: () => actions.browserCommand(tabId, "forward") }, (0, import_react55.createElement)(ForwardIcon)),-- (0, import_react55.createElement)("button", {++ (0, import_react56.createElement)("button", { type: "button", className: "bt-icon-btn", "aria-label": t("Back"), title: t("Back"), disabled: !page.canGoBack, onClick: () => actions.browserCommand(tabId, "back") }, (0, import_react56.createElement)(BackIcon)),++ (0, import_react56.createElement)("button", { type: "button", className: "bt-icon-btn", "aria-label": t("Forward"), title: t("Forward"), disabled: !page.canGoForward, onClick: () => actions.browserCommand(tabId, "forward") }, (0, import_react56.createElement)(ForwardIcon)),++ (0, import_react56.createElement)("button", {type: "button",className: "bt-icon-btn",disabled: !page.url,"aria-label": page.loading ? t("Stop") : t("Reload"),title: page.loading ? t("Stop") : t("Reload"),onClick: () => actions.browserCommand(tabId, page.loading ? "stop" : "reload")-- }, (0, import_react55.createElement)(page.loading ? StopIcon : ReloadIcon)),-- (0, import_react55.createElement)(++ }, (0, import_react56.createElement)(page.loading ? StopIcon : ReloadIcon)),++ (0, import_react56.createElement)("form",{ className: "bt-browser-address", onSubmit: go, "data-editing": editing || void 0 },-- (0, import_react55.createElement)("span", { className: "bt-browser-scheme", "aria-hidden": true }, (0, import_react55.createElement)(secure && !editing ? LockIcon2 : GlobeIcon2)),-- (0, import_react55.createElement)("input", {++ (0, import_react56.createElement)("span", { className: "bt-browser-scheme", "aria-hidden": true }, (0, import_react56.createElement)(secure && !editing ? LockIcon2 : GlobeIcon2)),++ (0, import_react56.createElement)("input", {ref: input,type: "text",spellCheck: false,@@@ -23543,14 -23763,14 +24096,14 @@@}})),-- (0, import_react55.createElement)("button", {++ (0, import_react56.createElement)("button", {type: "button",className: "bt-icon-btn","aria-label": t("New browser tab"),title: t("New browser tab"),onClick: () => actions.browserNewTab(bot.id)-- }, (0, import_react55.createElement)(PlusTabIcon)),-- imports ? (0, import_react55.createElement)("button", {++ }, (0, import_react56.createElement)(PlusTabIcon)),++ imports ? (0, import_react56.createElement)("button", {type: "button",className: "bt-icon-btn bt-import-btn","aria-label": t("Import cookies"),@@@ -23561,29 -23781,29 +24114,29 @@@if (flow === "menu") setFlowTracked(null);else openImport();}-- }, (0, import_react55.createElement)(ImportIcon)) : null,-- page.loading ? (0, import_react55.createElement)("span", { className: "bt-browser-progress", "aria-hidden": true }) : null++ }, (0, import_react56.createElement)(ImportIcon)) : null,++ page.loading ? (0, import_react56.createElement)("span", { className: "bt-browser-progress", "aria-hidden": true }) : null),-- (0, import_react55.createElement)(++ (0, import_react56.createElement)("div",{ ref: frame, className: "bt-browser-frame", "data-guest": showGuest || void 0 },-- flow === "menu" ? (0, import_react55.createElement)(ImportMenu, { sources, busy, onFile: pickFile, onSource: pickSource, onClose: () => setFlowTracked(null) }) : null,-- typeof flow === "object" && flow !== null ? (0, import_react55.createElement)(ImportCard, { flow, page, busy, onApply: applyImport, onCancel: cancelImport, onCloseAndImport: closeAndImport, onDone: () => setFlowTracked(null), onReload: () => actions.browserCommand(tabId, "reload") }) : null,-- flow === null && page.error ? (0, import_react55.createElement)(++ flow === "menu" ? (0, import_react56.createElement)(ImportMenu, { sources, busy, onFile: pickFile, onSource: pickSource, onClose: () => setFlowTracked(null) }) : null,++ typeof flow === "object" && flow !== null ? (0, import_react56.createElement)(ImportCard, { flow, page, busy, onApply: applyImport, onCancel: cancelImport, onCloseAndImport: closeAndImport, onDone: () => setFlowTracked(null), onReload: () => actions.browserCommand(tabId, "reload") }) : null,++ flow === null && page.error ? (0, import_react56.createElement)("div",{ className: "bt-browser-empty" },-- (0, import_react55.createElement)("div", { className: "bt-browser-empty-title" }, t("This page didn’t load")),-- (0, import_react55.createElement)("div", { className: "bt-browser-empty-text" }, t(page.error)),-- page.url ? (0, import_react55.createElement)("button", { type: "button", className: "bt-browser-retry", onClick: () => {++ (0, import_react56.createElement)("div", { className: "bt-browser-empty-title" }, t("This page didn’t load")),++ (0, import_react56.createElement)("div", { className: "bt-browser-empty-text" }, t(page.error)),++ page.url ? (0, import_react56.createElement)("button", { type: "button", className: "bt-browser-retry", onClick: () => {void actions.browserNavigate(tabId, page.url);} }, t("Try again")) : null-- ) : flow === null && !page.url ? (0, import_react55.createElement)(++ ) : flow === null && !page.url ? (0, import_react56.createElement)("div",{ className: "bt-browser-empty" },-- (0, import_react55.createElement)(BotMark, { bot, size: 48, state: "idle", live: true }),-- (0, import_react55.createElement)("div", { className: "bt-browser-empty-title" }, t("{name}'s browser", { name: bot.name })),-- (0, import_react55.createElement)("div", { className: "bt-browser-empty-text" }, t("Open a page here and {name} can read it with you. Logins and cookies stay with {name}; other Bots never see them.", { name: bot.name })),-- imports ? (0, import_react55.createElement)("button", { type: "button", className: "bt-browser-retry", onClick: openImport }, t("Import cookies")) : null++ (0, import_react56.createElement)(BotMark, { bot, size: 48, state: "idle", live: true }),++ (0, import_react56.createElement)("div", { className: "bt-browser-empty-title" }, t("{name}'s browser", { name: bot.name })),++ (0, import_react56.createElement)("div", { className: "bt-browser-empty-text" }, t("Open a page here and {name} can read it with you. Logins and cookies stay with {name}; other Bots never see them.", { name: bot.name })),++ imports ? (0, import_react56.createElement)("button", { type: "button", className: "bt-browser-retry", onClick: openImport }, t("Import cookies")) : null) : null));@@@ -23595,25 -23815,25 +24148,25 @@@ function importError(error)return String(error);}function ImportMenu({ sources, busy, onFile, onSource, onClose }) {-- (0, import_react55.useEffect)(() => {++ (0, import_react56.useEffect)(() => {const close = (event) => {if (event.key === "Escape") onClose();};window.addEventListener("keydown", close);return () => window.removeEventListener("keydown", close);}, [onClose]);-- return (0, import_react55.createElement)(++ return (0, import_react56.createElement)("div",{ className: "bt-import-menu", role: "menu", "aria-label": t("Import cookies") },-- (0, import_react55.createElement)("div", { className: "bt-import-menu-title" }, t("Import cookies")),-- (0, import_react55.createElement)(++ (0, import_react56.createElement)("div", { className: "bt-import-menu-title" }, t("Import cookies")),++ (0, import_react56.createElement)("button",{ type: "button", className: "bt-import-item", role: "menuitem", disabled: busy, onClick: onFile },-- (0, import_react55.createElement)(FileIcon, { className: "bt-import-item-icon" }),-- (0, import_react55.createElement)("span", { className: "bt-import-item-name" }, t("From a file…")),-- (0, import_react55.createElement)("span", { className: "bt-import-item-sub" }, t("cookies.txt, JSON, storageState"))++ (0, import_react56.createElement)(FileIcon, { className: "bt-import-item-icon" }),++ (0, import_react56.createElement)("span", { className: "bt-import-item-name" }, t("From a file…")),++ (0, import_react56.createElement)("span", { className: "bt-import-item-sub" }, t("cookies.txt, JSON, storageState"))),-- sources === null ? (0, import_react55.createElement)("div", { className: "bt-import-menu-note" }, t("Loading…")) : sources.length === 0 ? (0, import_react55.createElement)("div", { className: "bt-import-menu-note" }, t("No browsers found")) : sources.map((source) => (0, import_react55.createElement)(++ sources === null ? (0, import_react56.createElement)("div", { className: "bt-import-menu-note" }, t("Loading…")) : sources.length === 0 ? (0, import_react56.createElement)("div", { className: "bt-import-menu-note" }, t("No browsers found")) : sources.map((source) => (0, import_react56.createElement)("button",{key: source.id,@@@ -23623,83 -23843,83 +24176,83 @@@disabled: busy,onClick: () => onSource(source)},-- (0, import_react55.createElement)(WindowIcon, { className: "bt-import-item-icon" }),-- (0, import_react55.createElement)("span", { className: "bt-import-item-name" }, source.label),-- (0, import_react55.createElement)("span", { className: "bt-import-item-sub" }, t("Copy of its cookies"))++ (0, import_react56.createElement)(WindowIcon, { className: "bt-import-item-icon" }),++ (0, import_react56.createElement)("span", { className: "bt-import-item-name" }, source.label),++ (0, import_react56.createElement)("span", { className: "bt-import-item-sub" }, t("Copy of its cookies")))));}function ImportCard({ flow, page, busy, onApply, onCancel, onCloseAndImport, onDone, onReload }) {const { stage } = flow;if (stage === "running") {-- return (0, import_react55.createElement)("div", { className: "bt-import-card" }, (0, import_react55.createElement)(++ return (0, import_react56.createElement)("div", { className: "bt-import-card" }, (0, import_react56.createElement)("div",{ className: "bt-import-box" },-- (0, import_react55.createElement)("div", { className: "bt-import-title" }, t("{name} is running", { name: flow.source.name })),-- (0, import_react55.createElement)("div", { className: "bt-import-text" }, t("It must close for a moment so its cookies can be copied. It will reopen with your tabs.")),-- (0, import_react55.createElement)(++ (0, import_react56.createElement)("div", { className: "bt-import-title" }, t("{name} is running", { name: flow.source.name })),++ (0, import_react56.createElement)("div", { className: "bt-import-text" }, t("It must close for a moment so its cookies can be copied. It will reopen with your tabs.")),++ (0, import_react56.createElement)("div",{ className: "bt-import-actions" },-- (0, import_react55.createElement)("button", { type: "button", className: "bt-import-primary", disabled: busy, onClick: onCloseAndImport }, busy ? t("Closing…") : t("Close {name} and import", { name: flow.source.name })),-- (0, import_react55.createElement)("button", { type: "button", className: "bt-import-plain", disabled: busy, onClick: onCancel }, t("Cancel"))++ (0, import_react56.createElement)("button", { type: "button", className: "bt-import-primary", disabled: busy, onClick: onCloseAndImport }, busy ? t("Closing…") : t("Close {name} and import", { name: flow.source.name })),++ (0, import_react56.createElement)("button", { type: "button", className: "bt-import-plain", disabled: busy, onClick: onCancel }, t("Cancel")))));}if (stage === "error") {-- return (0, import_react55.createElement)("div", { className: "bt-import-card" }, (0, import_react55.createElement)(++ return (0, import_react56.createElement)("div", { className: "bt-import-card" }, (0, import_react56.createElement)("div",{ className: "bt-import-box" },-- (0, import_react55.createElement)("div", { className: "bt-import-title" }, t("Import failed")),-- (0, import_react55.createElement)("div", { className: "bt-import-text" }, flow.message),-- (0, import_react55.createElement)("div", { className: "bt-import-actions" }, (0, import_react55.createElement)("button", { type: "button", className: "bt-import-plain", onClick: onCancel }, t("Close")))++ (0, import_react56.createElement)("div", { className: "bt-import-title" }, t("Import failed")),++ (0, import_react56.createElement)("div", { className: "bt-import-text" }, flow.message),++ (0, import_react56.createElement)("div", { className: "bt-import-actions" }, (0, import_react56.createElement)("button", { type: "button", className: "bt-import-plain", onClick: onCancel }, t("Close")))));}if (stage === "result") {const { report } = flow;const problems = [...report.dropped ?? [], ...report.failed ?? []];-- return (0, import_react55.createElement)("div", { className: "bt-import-card" }, (0, import_react55.createElement)(++ return (0, import_react56.createElement)("div", { className: "bt-import-card" }, (0, import_react56.createElement)("div",{ className: "bt-import-box" },-- (0, import_react55.createElement)("div", { className: "bt-import-title" }, report.stored > 0 ? t("Imported {count} cookies", { count: report.stored }) : t("No cookies were stored")),-- flow.label ? (0, import_react55.createElement)("div", { className: "bt-import-sub" }, flow.label) : null,-- problems.length ? (0, import_react55.createElement)(++ (0, import_react56.createElement)("div", { className: "bt-import-title" }, report.stored > 0 ? t("Imported {count} cookies", { count: report.stored }) : t("No cookies were stored")),++ flow.label ? (0, import_react56.createElement)("div", { className: "bt-import-sub" }, flow.label) : null,++ problems.length ? (0, import_react56.createElement)("div",{ className: "bt-import-list" },-- problems.slice(0, 8).map((item, index) => (0, import_react55.createElement)(++ problems.slice(0, 8).map((item, index) => (0, import_react56.createElement)("div",{ key: index, className: "bt-import-line" },-- (0, import_react55.createElement)("span", { className: "bt-import-line-name" }, item.name ?? "—"),-- (0, import_react55.createElement)("span", { className: "bt-import-line-reason" }, item.reason)++ (0, import_react56.createElement)("span", { className: "bt-import-line-name" }, item.name ?? "—"),++ (0, import_react56.createElement)("span", { className: "bt-import-line-reason" }, item.reason))),-- problems.length > 8 ? (0, import_react55.createElement)("div", { className: "bt-import-line" }, (0, import_react55.createElement)("span", { className: "bt-import-line-reason" }, t("and {count} more", { count: problems.length - 8 }))) : null++ problems.length > 8 ? (0, import_react56.createElement)("div", { className: "bt-import-line" }, (0, import_react56.createElement)("span", { className: "bt-import-line-reason" }, t("and {count} more", { count: problems.length - 8 }))) : null) : null,-- (0, import_react55.createElement)(++ (0, import_react56.createElement)("div",{ className: "bt-import-actions" },-- page.url ? (0, import_react55.createElement)("button", { type: "button", className: "bt-import-plain", onClick: onReload }, t("Reload the page")) : null,-- (0, import_react55.createElement)("button", { type: "button", className: "bt-import-primary", onClick: onDone }, t("Done"))++ page.url ? (0, import_react56.createElement)("button", { type: "button", className: "bt-import-plain", onClick: onReload }, t("Reload the page")) : null,++ (0, import_react56.createElement)("button", { type: "button", className: "bt-import-primary", onClick: onDone }, t("Done")))));}const { preview } = flow;-- return (0, import_react55.createElement)("div", { className: "bt-import-card" }, (0, import_react55.createElement)(++ return (0, import_react56.createElement)("div", { className: "bt-import-card" }, (0, import_react56.createElement)("div",{ className: "bt-import-box" },-- (0, import_react55.createElement)("div", { className: "bt-import-title" }, t("Import {count} cookies", { count: preview.cookies })),-- (0, import_react55.createElement)(++ (0, import_react56.createElement)("div", { className: "bt-import-title" }, t("Import {count} cookies", { count: preview.cookies })),++ (0, import_react56.createElement)("div",{ className: "bt-import-sub" },preview.source?.label ?? "",flow.restarted ? ` · ${t("the browser was restarted")}` : ""),-- preview.sites.length ? (0, import_react55.createElement)(++ preview.sites.length ? (0, import_react56.createElement)("div",{ className: "bt-import-list" },-- preview.sites.map((site) => (0, import_react55.createElement)(++ preview.sites.map((site) => (0, import_react56.createElement)("div",{ key: site.site, className: "bt-import-line" },-- (0, import_react55.createElement)("span", { className: "bt-import-line-name" }, site.site),-- (0, import_react55.createElement)(++ (0, import_react56.createElement)("span", { className: "bt-import-line-name" }, site.site),++ (0, import_react56.createElement)("span",{ className: "bt-import-line-count" },t("{count}", { count: site.cookies }),@@@ -23707,35 -23927,35 +24260,35 @@@)))) : null,-- preview.skipped.length ? (0, import_react55.createElement)(++ preview.skipped.length ? (0, import_react56.createElement)("div",{ className: "bt-import-list" },-- (0, import_react55.createElement)("div", { className: "bt-import-note" }, t("{count} skipped", { count: preview.skipped.length })),-- preview.skipped.slice(0, 5).map((item, index) => (0, import_react55.createElement)(++ (0, import_react56.createElement)("div", { className: "bt-import-note" }, t("{count} skipped", { count: preview.skipped.length })),++ preview.skipped.slice(0, 5).map((item, index) => (0, import_react56.createElement)("div",{ key: index, className: "bt-import-line" },-- (0, import_react55.createElement)("span", { className: "bt-import-line-name" }, item.name ?? item.where),-- (0, import_react55.createElement)("span", { className: "bt-import-line-reason" }, item.reason)++ (0, import_react56.createElement)("span", { className: "bt-import-line-name" }, item.name ?? item.where),++ (0, import_react56.createElement)("span", { className: "bt-import-line-reason" }, item.reason))),-- preview.skipped.length > 5 ? (0, import_react55.createElement)("div", { className: "bt-import-line" }, (0, import_react55.createElement)("span", { className: "bt-import-line-reason" }, t("and {count} more", { count: preview.skipped.length - 5 }))) : null++ preview.skipped.length > 5 ? (0, import_react56.createElement)("div", { className: "bt-import-line" }, (0, import_react56.createElement)("span", { className: "bt-import-line-reason" }, t("and {count} more", { count: preview.skipped.length - 5 }))) : null) : null,-- preview.warnings.length ? (0, import_react55.createElement)(++ preview.warnings.length ? (0, import_react56.createElement)("details",{ className: "bt-import-warns" },-- (0, import_react55.createElement)("summary", null, t("{count} adjusted", { count: preview.warnings.reduce((n, w) => n + w.count, 0) })),-- preview.warnings.map((w, index) => (0, import_react55.createElement)(++ (0, import_react56.createElement)("summary", null, t("{count} adjusted", { count: preview.warnings.reduce((n, w) => n + w.count, 0) })),++ preview.warnings.map((w, index) => (0, import_react56.createElement)("div",{ key: index, className: "bt-import-line" },-- (0, import_react55.createElement)("span", { className: "bt-import-line-reason" }, `${w.count} × ${w.message}`)++ (0, import_react56.createElement)("span", { className: "bt-import-line-reason" }, `${w.count} × ${w.message}`)))) : null,-- preview.notes.includes("session-cookies") ? (0, import_react55.createElement)("div", { className: "bt-import-note" }, t("Cookies without an expiry stay until the app closes.")) : null,-- preview.notes.includes("local-storage-left") ? (0, import_react55.createElement)("div", { className: "bt-import-note" }, t("Some sites also keep sign-in outside cookies; you may need to sign in again there.")) : null,-- (0, import_react55.createElement)(++ preview.notes.includes("session-cookies") ? (0, import_react56.createElement)("div", { className: "bt-import-note" }, t("Cookies without an expiry stay until the app closes.")) : null,++ preview.notes.includes("local-storage-left") ? (0, import_react56.createElement)("div", { className: "bt-import-note" }, t("Some sites also keep sign-in outside cookies; you may need to sign in again there.")) : null,++ (0, import_react56.createElement)("div",{ className: "bt-import-actions" },-- (0, import_react55.createElement)("button", { type: "button", className: "bt-import-primary", disabled: busy, onClick: onApply }, busy ? t("Importing…") : t("Import")),-- (0, import_react55.createElement)("button", { type: "button", className: "bt-import-plain", disabled: busy, onClick: onCancel }, t("Cancel"))++ (0, import_react56.createElement)("button", { type: "button", className: "bt-import-primary", disabled: busy, onClick: onApply }, busy ? t("Importing…") : t("Import")),++ (0, import_react56.createElement)("button", { type: "button", className: "bt-import-plain", disabled: busy, onClick: onCancel }, t("Cancel")))));}@@@ -23749,41 -23969,41 +24302,41 @@@ function BotPanel({ pane, leaving, roomconst active = tabState.active;const page = useBrowserPages((pages) => (active ? pages[active] : null) ?? EMPTY_PAGE);const hold = useBrowserHolds?.((map) => bot ? map[bot.id] ?? null : null) ?? null;-- const root = (0, import_react55.useRef)(null);-- const fly = (0, import_react55.useRef)(null);-- const [landed, setLanded] = (0, import_react55.useState)(false);-- const [settling, setSettling] = (0, import_react55.useState)(false);-- const [width, setWidth] = (0, import_react55.useState)(savedWidth);-- const [dragging, setDragging] = (0, import_react55.useState)(false);-- const [resizing, setResizing] = (0, import_react55.useState)(false);++ const root = (0, import_react56.useRef)(null);++ const fly = (0, import_react56.useRef)(null);++ const [landed, setLanded] = (0, import_react56.useState)(false);++ const [settling, setSettling] = (0, import_react56.useState)(false);++ const [width, setWidth] = (0, import_react56.useState)(savedWidth);++ const [dragging, setDragging] = (0, import_react56.useState)(false);++ const [resizing, setResizing] = (0, import_react56.useState)(false);const instant = dragging || resizing;-- const [reading, setReading] = (0, import_react55.useState)(false);++ const [reading, setReading] = (0, import_react56.useState)(false);const panelWidth = fitWidth(width ?? (view === "browser" ? DEFAULT_WIDTH : DETAILS_WIDTH), widthRange(view, room2));-- (0, import_react55.useLayoutEffect)(() => {++ (0, import_react56.useLayoutEffect)(() => {if (view === "browser" && width === null) setWidth(DEFAULT_WIDTH);}, [view, width]);-- (0, import_react55.useLayoutEffect)(() => {++ (0, import_react56.useLayoutEffect)(() => {chatRoom.hold(instant);}, [instant]);-- const [last, setLast] = (0, import_react55.useState)({ view, width: panelWidth });++ const [last, setLast] = (0, import_react56.useState)({ view, width: panelWidth });if (last.view !== view || last.width !== panelWidth) {setLast({ view, width: panelWidth });if (last.view !== view) setSettling(last.width !== panelWidth && !instant);}-- const shownView = (0, import_react55.useRef)(view);-- (0, import_react55.useLayoutEffect)(() => {++ const shownView = (0, import_react56.useRef)(view);++ (0, import_react56.useLayoutEffect)(() => {const switched = settling && shownView.current !== view;shownView.current = view;if (switched) chatRoom.hold(true);chatRoom.setRight(leaving || overlay ? null : panelWidth);if (switched) chatRoom.hold(false);}, [view, panelWidth, leaving, overlay]);-- (0, import_react55.useEffect)(() => () => {++ (0, import_react56.useEffect)(() => () => {chatRoom.setRight(null);chatRoom.hold(false);}, []);-- const mounted = (0, import_react55.useRef)(false);-- (0, import_react55.useEffect)(() => {++ const mounted = (0, import_react56.useRef)(false);++ (0, import_react56.useEffect)(() => {if (!mounted.current) {mounted.current = true;return void 0;@@@ -23792,31 -24012,31 +24345,31 @@@const timer = setTimeout(() => setResizing(false), 160);return () => clearTimeout(timer);}, [room2]);-- (0, import_react55.useEffect)(() => {++ (0, import_react56.useEffect)(() => {if (!settling) return void 0;const timer = setTimeout(() => setSettling(false), SPRING_SHAPE.duration + 40);return () => clearTimeout(timer);}, [settling, view]);-- (0, import_react55.useEffect)(() => {++ (0, import_react56.useEffect)(() => {const timer = setTimeout(() => setLanded(true), 360);return () => clearTimeout(timer);}, []);-- (0, import_react55.useEffect)(() => {++ (0, import_react56.useEffect)(() => {if (canBrowse) actions.browserEnsure(bot.id);}, [bot?.id, canBrowse]);-- (0, import_react55.useEffect)(() => {++ (0, import_react56.useEffect)(() => {if (view === "browser" && (active === null || !tabState.ids.includes(active))) actions.setPanelView("details");}, [view, active, tabState.ids.length]);-- (0, import_react55.useEffect)(() => {++ (0, import_react56.useEffect)(() => {if (pane.view === "side" && sideChat === void 0) actions.setPanelView("details");}, [pane.view, sideChat]);-- (0, import_react55.useEffect)(() => {++ (0, import_react56.useEffect)(() => {if (view !== "browser" || leaving) void actions.browserShow?.(null);}, [view, leaving]);-- (0, import_react55.useEffect)(() => () => {++ (0, import_react56.useEffect)(() => () => {void actions.browserShow?.(null);}, []);-- (0, import_react55.useEffect)(() => {++ (0, import_react56.useEffect)(() => {if (!page.readAt || Date.now() - page.readAt > READ_FLASH_MS) return void 0;setReading(true);const timer = setTimeout(() => setReading(false), READ_FLASH_MS);@@@ -23860,7 -24080,7 +24413,7 @@@return actions[name](...args);};}-- (0, import_react55.useLayoutEffect)(() => {++ (0, import_react56.useLayoutEffect)(() => {const move = fly.current;if (!move) return;fly.current = null;@@@ -23943,7 -24163,7 +24496,7 @@@for (const name of ends) grip.addEventListener(name, onEnd);};const hasStrip = panelHasStrip(canBrowse, tabState.ids.length, sideChats.length);-- return (0, import_react55.createElement)(++ return (0, import_react56.createElement)("aside",{ref: root,@@@ -23961,15 -24181,15 +24514,15 @@@if (event.target === event.currentTarget) setLanded(true);}},-- leaving || overlay ? null : (0, import_react55.createElement)("div", { className: "bt-panel-grip", role: "separator", "aria-orientation": "vertical", "aria-label": t("Resize panel"), onPointerDown: startResize }),++ leaving || overlay ? null : (0, import_react56.createElement)("div", { className: "bt-panel-grip", role: "separator", "aria-orientation": "vertical", "aria-label": t("Resize panel"), onPointerDown: startResize }),// Over the whole window while dragging: the cursor stays a resize cursor and the// pages underneath (the chat, the guest) see no pointer.-- dragging ? (0, import_react_dom8.createPortal)((0, import_react55.createElement)("div", { className: "bt-drag-shield", "aria-hidden": true }), document.body) : null,-- hasStrip ? (0, import_react55.createElement)(PanelStrip, { bot, subject: pane.id, view, ids: tabState.ids, active, sides: sideChats, side: pane.side, canBrowse, reading, onView: switchView, actions: panelActions, useBrowserPages }) : null,-- view === "browser" && bot ? (0, import_react55.createElement)(BrowserView, { key: `browser:${active}`, bot, tabId: active, leaving, landed: landed && !settling, actions, useBrowserPages, hold }) : view === "side" && sideChat ? (0, import_react55.createElement)("div", { key: `side:${sideChat.id}`, className: "bt-panel-view" }, (0, import_react55.createElement)(SideChatView, { subject: pane.id, chat: sideChat, roster, actions: panelActions })) : (0, import_react55.createElement)(++ dragging ? (0, import_react_dom8.createPortal)((0, import_react56.createElement)("div", { className: "bt-drag-shield", "aria-hidden": true }), document.body) : null,++ hasStrip ? (0, import_react56.createElement)(PanelStrip, { bot, subject: pane.id, view, ids: tabState.ids, active, sides: sideChats, side: pane.side, canBrowse, reading, onView: switchView, actions: panelActions, useBrowserPages }) : null,++ view === "browser" && bot ? (0, import_react56.createElement)(BrowserView, { key: `browser:${active}`, bot, tabId: active, leaving, landed: landed && !settling, actions, useBrowserPages, hold }) : view === "side" && sideChat ? (0, import_react56.createElement)("div", { key: `side:${sideChat.id}`, className: "bt-panel-view" }, (0, import_react56.createElement)(SideChatView, { subject: pane.id, chat: sideChat, roster, actions: panelActions })) : (0, import_react56.createElement)("div",{ key: `details:${pane.id}:${pane.renaming ? "rename" : ""}:${pane.tab ?? ""}`, className: "bt-panel-view" },-- (0, import_react55.createElement)(DetailsDrawer, {++ (0, import_react56.createElement)(DetailsDrawer, {sessionId: pane.id,startRenaming: pane.renaming,startTab: pane.tab,@@@ -24111,7 -24332,7 +24665,7 @@@ var BROWSER_CSS =`;// src/client/overlays.js--var import_react56 = require("react");++var import_react57 = require("react");var import_react_dom9 = require("react-dom");var DIALOG_EXIT_MS = 160;var MENU_EXIT_MS3 = 120;@@@ -24122,8 -24343,8 +24676,8 @@@ function Overlays({ useRoster, useUi, uconst frameSnap = useFrame ? useFrame((value) => value) : { viewport: window.innerWidth, sidebarWidth: FALLBACK_SIDEBAR_WIDTH, collapsedWidth: 0 };const pref = useSidebarPref ? useSidebarPref((value) => value) : "open";const current = useSessions((list) => Object.values(list.byId).find((session) => (session?.retainedBy?.mainView ?? 0) > 0)?.id ?? null);-- const previous = (0, import_react56.useRef)(current);-- (0, import_react56.useEffect)(() => {++ const previous = (0, import_react57.useRef)(current);++ (0, import_react57.useEffect)(() => {if (previous.current === current) return;previous.current = current;if (current) actions.followPanel?.(current);@@@ -24137,8 -24358,8 +24691,8 @@@panel: open ? { view: open.view, yielded: ui2.panelYield === true } : null});const shown = open !== null && layout.panel !== "folded" ? open : null;-- const [kept, setKept] = (0, import_react56.useState)(shown);-- (0, import_react56.useEffect)(() => {++ const [kept, setKept] = (0, import_react57.useState)(shown);++ (0, import_react57.useEffect)(() => {if (shown) {setKept(shown);return void 0;@@@ -24157,17 -24378,17 +24711,17 @@@const [memory, memoryLeaving] = useLinger(ui2.memory && memoryOwner(ui2.memory) ? ui2.memory : null, DIALOG_EXIT_MS);const owner = memory ? memoryOwner(memory) : null;const [menu, menuLeaving] = useLinger(ui2.menu, MENU_EXIT_MS3);-- return (0, import_react56.createElement)(-- import_react56.Fragment,++ return (0, import_react57.createElement)(++ import_react57.Fragment,null,-- pane ? (0, import_react_dom9.createPortal)((0, import_react56.createElement)(BotPanel, { pane, leaving: shown === null, room: layout.room, overlay: layout.panel === "overlay", roster, actions, useSessions, useSessionStatus, useActivity, useWork, useBrowserTabs, useBrowserPages, useBrowserHolds }), document.body) : null,-- ui2.newChat ? (0, import_react_dom9.createPortal)((0, import_react56.createElement)(NewChat, { key: ui2.newChat, mode: ui2.newChat, roster, actions }), document.body) : null,-- ui2.palette ? (0, import_react_dom9.createPortal)((0, import_react56.createElement)(CommandPalette, { key: ui2.palette.token, start: ui2.palette.query, token: ui2.palette.token, roster, actions, useSessions }), document.body) : null,-- ui2.exchange ? (0, import_react_dom9.createPortal)((0, import_react56.createElement)(ExchangeDialog, { pair: ui2.exchange, roster, actions }), document.body) : null,-- ui2.voice ? (0, import_react_dom9.createPortal)((0, import_react56.createElement)(VoiceMode, { key: ui2.voice, sessionId: ui2.voice, roster, actions, useSessions, useSessionStatus }), document.body) : null,-- menu ? (0, import_react_dom9.createPortal)((0, import_react56.createElement)(ContextMenu, { key: `${menu.kind ?? ""}:${menu.id}:${menu.x}:${menu.y}`, menu, roster, actions, leaving: menuLeaving }), document.body) : null,-- settings ? (0, import_react_dom9.createPortal)((0, import_react56.createElement)(SettingsDialog, { page: settings.page, id: settings.id, roster, actions, useUpdate, leaving: settingsLeaving }), document.body) : null,-- owner ? (0, import_react_dom9.createPortal)((0, import_react56.createElement)(MemoryDialog, { key: owner.id, owner, actions, leaving: memoryLeaving }), document.body) : null++ pane ? (0, import_react_dom9.createPortal)((0, import_react57.createElement)(BotPanel, { pane, leaving: shown === null, room: layout.room, overlay: layout.panel === "overlay", roster, actions, useSessions, useSessionStatus, useActivity, useWork, useBrowserTabs, useBrowserPages, useBrowserHolds }), document.body) : null,++ ui2.newChat ? (0, import_react_dom9.createPortal)((0, import_react57.createElement)(NewChat, { key: ui2.newChat, mode: ui2.newChat, roster, actions }), document.body) : null,++ ui2.palette ? (0, import_react_dom9.createPortal)((0, import_react57.createElement)(CommandPalette, { key: ui2.palette.token, start: ui2.palette.query, token: ui2.palette.token, roster, actions, useSessions }), document.body) : null,++ ui2.exchange ? (0, import_react_dom9.createPortal)((0, import_react57.createElement)(ExchangeDialog, { pair: ui2.exchange, roster, actions }), document.body) : null,++ ui2.voice ? (0, import_react_dom9.createPortal)((0, import_react57.createElement)(VoiceMode, { key: ui2.voice, sessionId: ui2.voice, roster, actions, useSessions, useSessionStatus }), document.body) : null,++ menu ? (0, import_react_dom9.createPortal)((0, import_react57.createElement)(ContextMenu, { key: `${menu.kind ?? ""}:${menu.id}:${menu.x}:${menu.y}`, menu, roster, actions, leaving: menuLeaving }), document.body) : null,++ settings ? (0, import_react_dom9.createPortal)((0, import_react57.createElement)(SettingsDialog, { page: settings.page, id: settings.id, roster, actions, useUpdate, leaving: settingsLeaving }), document.body) : null,++ owner ? (0, import_react_dom9.createPortal)((0, import_react57.createElement)(MemoryDialog, { key: owner.id, owner, actions, leaving: memoryLeaving }), document.body) : null);}@@@ -25225,13 -25448,14 +25781,14 @@@ function lineDiff(before, after)}// src/client/learning-card.js--var import_react57 = require("react");++var import_react58 = require("react");var failedAnswers = /* @__PURE__ */ new Map();function ProposalCard({ proposal, initialError = "", onFailure, onResolved, actions }) {- const [busy, setBusy] = (0, import_react57.useState)(false);- const [error, setError] = (0, import_react57.useState)(initialError);- const busyRef = (0, import_react57.useRef)(false);- const titleId = (0, import_react57.useId)();+ const outcome = proposal.outcome;- const [busy, setBusy] = (0, import_react57.useState)(false);- const [error, setError] = (0, import_react57.useState)(initialError);- const busyRef = (0, import_react57.useRef)(false);- const titleId = (0, import_react57.useId)();++ const [busy, setBusy] = (0, import_react58.useState)(false);++ const [error, setError] = (0, import_react58.useState)(initialError);++ const busyRef = (0, import_react58.useRef)(false);++ const titleId = (0, import_react58.useId)();const answer = (approve) => {if (busyRef.current) return;busyRef.current = true;@@@ -25247,58 -25471,58 +25804,58 @@@});};const update = proposal.action === "update";-- const rows2 = (0, import_react57.useMemo)(() => lineDiff(update ? proposal.previous?.content : "", proposal.content), [update, proposal.previous?.content, proposal.content]);++ const rows2 = (0, import_react58.useMemo)(() => lineDiff(update ? proposal.previous?.content : "", proposal.content), [update, proposal.previous?.content, proposal.content]);if (proposal.kind === "agents") {const blocks = proposal.edits.map((edit) => [...(edit.op === "add" ? [] : editLines(edit.old)).map((line) => ({ kind: "removed", line })),...(edit.op === "remove" ? [] : editLines(edit.text)).map((line) => ({ kind: "added", line }))]);-- return (0, import_react57.createElement)(++ return (0, import_react58.createElement)("section",- { className: "bt-q bt-learning-card", role: "group", "aria-labelledby": titleId, "aria-busy": busy },- (0, import_react57.createElement)(ProposalHead, { titleId, icon: PencilIcon, title: t("AGENTS.md update") }),- (0, import_react57.createElement)(FileBox, { name: "AGENTS.md", path: proposal.folder, state: proposal.exists === false ? "Added" : "Modified", blocks }),- proposal.edits.map((edit, index) => edit.why ? (0, import_react57.createElement)("p", { className: "bt-learning-why", key: index }, edit.why) : null),- error ? (0, import_react57.createElement)("div", { className: "bt-learning-error", role: "alert" }, error) : null,- (0, import_react57.createElement)(ProposalFoot, { busy, answer })+ { className: "bt-q bt-learning-card", role: "group", "aria-labelledby": titleId, "aria-busy": busy, "data-outcome": outcome },- (0, import_react57.createElement)(ProposalHead, { titleId, icon: PencilIcon, title: t("AGENTS.md update"), outcome }),- (0, import_react57.createElement)(FileBox, { name: "AGENTS.md", path: proposal.folder, state: proposal.exists === false ? "Added" : "Modified", blocks }),- proposal.edits.map((edit, index) => edit.why ? (0, import_react57.createElement)("p", { className: "bt-learning-why", key: index }, edit.why) : null),- error ? (0, import_react57.createElement)("div", { className: "bt-learning-error", role: "alert" }, error) : null,- outcome ? null : (0, import_react57.createElement)(ProposalFoot, { busy, answer })++ (0, import_react58.createElement)(ProposalHead, { titleId, icon: PencilIcon, title: t("AGENTS.md update"), outcome }),++ (0, import_react58.createElement)(FileBox, { name: "AGENTS.md", path: proposal.folder, state: proposal.exists === false ? "Added" : "Modified", blocks }),++ proposal.edits.map((edit, index) => edit.why ? (0, import_react58.createElement)("p", { className: "bt-learning-why", key: index }, edit.why) : null),++ error ? (0, import_react58.createElement)("div", { className: "bt-learning-error", role: "alert" }, error) : null,++ outcome ? null : (0, import_react58.createElement)(ProposalFoot, { busy, answer }));}const oldDetail = update && typeof proposal.previous?.description === "string" && proposal.previous.description !== proposal.description ? proposal.previous.description : void 0;-- return (0, import_react57.createElement)(++ return (0, import_react58.createElement)("section",- { className: "bt-q bt-learning-card", role: "group", "aria-labelledby": titleId, "aria-busy": busy },- (0, import_react57.createElement)(ProposalHead, { titleId, title: proposal.name, kind: t(update ? "Skill update" : "New skill"), detail: proposal.description, oldDetail }),- (0, import_react57.createElement)(FileBox, { name: "SKILL.md", path: `skills/${proposal.name}`, state: update ? "Updated" : "Added", blocks: [rows2] }),- proposal.why ? (0, import_react57.createElement)("p", { className: "bt-learning-why" }, proposal.why) : null,- error ? (0, import_react57.createElement)("div", { className: "bt-learning-error", role: "alert" }, error) : null,- (0, import_react57.createElement)(ProposalFoot, { busy, answer })+ { className: "bt-q bt-learning-card", role: "group", "aria-labelledby": titleId, "aria-busy": busy, "data-outcome": outcome },- (0, import_react57.createElement)(ProposalHead, { titleId, title: proposal.name, kind: t(update ? "Skill update" : "New skill"), detail: proposal.description, oldDetail, outcome }),- (0, import_react57.createElement)(FileBox, { name: "SKILL.md", path: `skills/${proposal.name}`, state: update ? "Updated" : "Added", blocks: [rows2] }),- proposal.why ? (0, import_react57.createElement)("p", { className: "bt-learning-why" }, proposal.why) : null,- error ? (0, import_react57.createElement)("div", { className: "bt-learning-error", role: "alert" }, error) : null,- outcome ? null : (0, import_react57.createElement)(ProposalFoot, { busy, answer })++ (0, import_react58.createElement)(ProposalHead, { titleId, title: proposal.name, kind: t(update ? "Skill update" : "New skill"), detail: proposal.description, oldDetail, outcome }),++ (0, import_react58.createElement)(FileBox, { name: "SKILL.md", path: `skills/${proposal.name}`, state: update ? "Updated" : "Added", blocks: [rows2] }),++ proposal.why ? (0, import_react58.createElement)("p", { className: "bt-learning-why" }, proposal.why) : null,++ error ? (0, import_react58.createElement)("div", { className: "bt-learning-error", role: "alert" }, error) : null,++ outcome ? null : (0, import_react58.createElement)(ProposalFoot, { busy, answer }));}- function ProposalHead({ titleId, icon: icon2 = MemoryIcon, title, kind, detail, oldDetail }) {- return (0, import_react57.createElement)(+ function ProposalHead({ titleId, icon: icon2 = MemoryIcon, title, kind, detail, oldDetail, outcome }) {- return (0, import_react57.createElement)(++ return (0, import_react58.createElement)("div",{ className: "bt-q-head" },-- (0, import_react57.createElement)("span", { className: "bt-learning-icon", "aria-hidden": true }, (0, import_react57.createElement)(icon2)),-- (0, import_react57.createElement)(++ (0, import_react58.createElement)("span", { className: "bt-learning-icon", "aria-hidden": true }, (0, import_react58.createElement)(icon2)),++ (0, import_react58.createElement)("div",{ className: "bt-q-text" },-- (0, import_react57.createElement)("p", { className: "bt-q-title", id: titleId }, title),-- kind ? (0, import_react57.createElement)("div", { className: "bt-q-detail" }, kind) : null,-- oldDetail ? (0, import_react57.createElement)("p", { className: "bt-learning-description bt-learning-old" }, (0, import_react57.createElement)("del", null, oldDetail)) : null,-- detail ? (0, import_react57.createElement)("p", { className: "bt-learning-description" }, detail) : null++ (0, import_react58.createElement)("p", { className: "bt-q-title", id: titleId }, title),++ kind ? (0, import_react58.createElement)("div", { className: "bt-q-detail" }, kind) : null,++ oldDetail ? (0, import_react58.createElement)("p", { className: "bt-learning-description bt-learning-old" }, (0, import_react58.createElement)("del", null, oldDetail)) : null,++ detail ? (0, import_react58.createElement)("p", { className: "bt-learning-description" }, detail) : null),- (0, import_react57.createElement)("span", { className: "bt-q-badge bt-learning-status" }, (0, import_react57.createElement)("span", { className: "bt-learning-dot", "aria-hidden": true }), t("Awaiting approval"))- outcome ? (0, import_react57.createElement)("span", { className: "bt-q-badge" }, t(outcome === "approved" ? "Approved" : "Declined")) : (0, import_react57.createElement)("span", { className: "bt-q-badge bt-learning-status" }, (0, import_react57.createElement)("span", { className: "bt-learning-dot", "aria-hidden": true }), t("Awaiting approval"))++ outcome ? (0, import_react58.createElement)("span", { className: "bt-q-badge" }, t(outcome === "approved" ? "Approved" : "Declined")) : (0, import_react58.createElement)("span", { className: "bt-q-badge bt-learning-status" }, (0, import_react58.createElement)("span", { className: "bt-learning-dot", "aria-hidden": true }), t("Awaiting approval")));}function ProposalFoot({ busy, answer }) {-- return (0, import_react57.createElement)(++ return (0, import_react58.createElement)("div",{ className: "bt-q-foot bt-learning-foot" },-- (0, import_react57.createElement)("button", { type: "button", className: "bt-learning-btn bt-learning-decline", disabled: busy, onClick: () => answer(false) }, t("Decline")),-- (0, import_react57.createElement)(++ (0, import_react58.createElement)("button", { type: "button", className: "bt-learning-btn bt-learning-decline", disabled: busy, onClick: () => answer(false) }, t("Decline")),++ (0, import_react58.createElement)("button",{ type: "button", className: "bt-learning-btn bt-learning-approve", disabled: busy, onClick: () => answer(true) },-- (0, import_react57.createElement)(CheckIcon),++ (0, import_react58.createElement)(CheckIcon),t("Approve")));@@@ -25306,43 -25530,43 +25863,43 @@@var COLLAPSE_ROWS = 8;var SIGNS = { added: "+", removed: "−", same: "" };function FileBox({ name, path: path2, state, blocks }) {-- const [open, setOpen] = (0, import_react57.useState)(false);++ const [open, setOpen] = (0, import_react58.useState)(false);const all = blocks.flat();const added = all.filter((row) => row.kind === "added").length;const removed = all.filter((row) => row.kind === "removed").length;const folds = all.length > COLLAPSE_ROWS;const shut = folds && !open;-- return (0, import_react57.createElement)(++ return (0, import_react58.createElement)("div",{ className: "bt-learning-file" },-- (0, import_react57.createElement)(++ (0, import_react58.createElement)("div",{ className: "bt-learning-filehead" },-- (0, import_react57.createElement)("span", { className: "bt-learning-name" }, name),-- path2 ? (0, import_react57.createElement)("span", { className: "bt-learning-path" }, path2) : null,-- (0, import_react57.createElement)("span", { className: "bt-learning-spacer" }),-- added > 0 ? (0, import_react57.createElement)("span", { className: "bt-learning-plus" }, `+${added}`) : null,-- removed > 0 ? (0, import_react57.createElement)("span", { className: "bt-learning-minus" }, `−${removed}`) : null,-- (0, import_react57.createElement)("span", { className: `bt-learning-state bt-learning-state-${state.toLowerCase()}` }, t(state))++ (0, import_react58.createElement)("span", { className: "bt-learning-name" }, name),++ path2 ? (0, import_react58.createElement)("span", { className: "bt-learning-path" }, path2) : null,++ (0, import_react58.createElement)("span", { className: "bt-learning-spacer" }),++ added > 0 ? (0, import_react58.createElement)("span", { className: "bt-learning-plus" }, `+${added}`) : null,++ removed > 0 ? (0, import_react58.createElement)("span", { className: "bt-learning-minus" }, `−${removed}`) : null,++ (0, import_react58.createElement)("span", { className: `bt-learning-state bt-learning-state-${state.toLowerCase()}` }, t(state))),-- (0, import_react57.createElement)(++ (0, import_react58.createElement)("div",{ className: shut ? "bt-learning-code bt-learning-shut" : "bt-learning-code" },blocks.map((rows2, blockIndex) => [-- blockIndex > 0 ? (0, import_react57.createElement)("div", { className: "bt-learning-gap", key: `gap-${blockIndex}` }) : null,-- ...rows2.map((row, rowIndex) => (0, import_react57.createElement)(++ blockIndex > 0 ? (0, import_react58.createElement)("div", { className: "bt-learning-gap", key: `gap-${blockIndex}` }) : null,++ ...rows2.map((row, rowIndex) => (0, import_react58.createElement)("div",{ className: `bt-learning-row bt-learning-${row.kind}`, key: `${blockIndex}-${rowIndex}` },-- (0, import_react57.createElement)("span", { className: "bt-learning-num", "aria-hidden": true }, row.number ?? ""),-- (0, import_react57.createElement)("span", { className: "bt-learning-sign", "aria-hidden": true }, SIGNS[row.kind]),-- (0, import_react57.createElement)("span", { className: "bt-learning-text" }, row.line || " ")++ (0, import_react58.createElement)("span", { className: "bt-learning-num", "aria-hidden": true }, row.number ?? ""),++ (0, import_react58.createElement)("span", { className: "bt-learning-sign", "aria-hidden": true }, SIGNS[row.kind]),++ (0, import_react58.createElement)("span", { className: "bt-learning-text" }, row.line || " ")))])),-- folds ? (0, import_react57.createElement)(++ folds ? (0, import_react58.createElement)("div",{ className: shut ? "bt-learning-morebar bt-learning-morebar-shut" : "bt-learning-morebar" },-- (0, import_react57.createElement)(++ (0, import_react58.createElement)("button",{ type: "button", className: "bt-learning-more", "aria-expanded": open, onClick: () => setOpen(!open) },t(open ? "Show less" : "Show all {count} lines", { count: all.length })@@@ -25353,7 -25577,7 +25910,7 @@@function LearningProposals({ turn, dock, sessionId, useRoster, actions }) {const roster = useRoster((value) => value);const facts = useTurnFacts(sessionId, actions);-- const [failed, setFailed] = (0, import_react57.useState)({});++ const [failed, setFailed] = (0, import_react58.useState)({});const bot = roster.byId?.[sessionId];if (!bot || currentPart(bot) !== sessionId) return null;const proposals = roster.learning?.[bot.id] ?? [];@@@ -25380,10 -25606,10 +25939,10 @@@delete next[id];return next;});-- return (0, import_react57.createElement)("div", { className: dock ? "bt-learning-stack bt-learning-dock" : "bt-learning-stack" }, cards.map((proposal) => (0, import_react57.createElement)(++ return (0, import_react58.createElement)("div", { className: dock ? "bt-learning-stack bt-learning-dock" : "bt-learning-stack" }, cards.map((proposal) => (0, import_react58.createElement)("div",{ className: "bt-q-inline", key: proposal.id },-- (0, import_react57.createElement)(ProposalCard, {++ (0, import_react58.createElement)(ProposalCard, {proposal,initialError: failed[proposal.id]?.error ?? failedAnswers.get(proposal.id)?.error,onFailure,@@@ -25393,10 -25619,10 +25952,10 @@@)));}function LearningTurnTail(props) {-- return (0, import_react57.createElement)(LearningProposals, { ...props, dock: false });++ return (0, import_react58.createElement)(LearningProposals, { ...props, dock: false });}function LearningDock(props) {-- return (0, import_react57.createElement)(LearningProposals, { ...props, dock: true });++ return (0, import_react58.createElement)(LearningProposals, { ...props, dock: true });}var LEARNING_CSS = `.bt-learning-stack{display:flex;flex-direction:column;gap:4px}