research-agent-ui 0.1.328 → 0.1.330

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,9 +5,9 @@ import v, { Suspense as y, createContext as b, forwardRef as x, lazy as S, useCa
5
5
  import { useParams as k, usePathname as A, useRouter as j, useSearchParams as M } from "next/navigation";
6
6
  import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
7
7
  import { AnimatePresence as I, motion as L } from "motion/react";
8
- import { AlertCircle as R, Archive as z, ArrowUp as B, BadgePercent as V, BookMarked as H, BookOpen as ee, Bot as te, Building2 as U, CalendarDays as ne, Check as re, CheckIcon as ie, ChevronDown as ae, ChevronRightIcon as oe, Clipboard as se, Clock as ce, Cloud as le, CloudIcon as ue, Copy as de, Cpu as fe, Download as pe, ExternalLink as me, EyeOff as he, File as ge, FileDown as _e, FileSpreadsheet as ve, FileText as ye, FileType as be, FolderOpen as xe, Globe as Se, HelpCircle as Ce, Highlighter as we, History as Te, Info as Ee, LayoutGrid as De, Link as Oe, Loader2 as W, Lock as ke, LogIn as Ae, LogOut as je, Mail as Me, MessageCircle as Ne, MessageCircleQuestion as Pe, MessageSquare as Fe, Mic as Ie, Newspaper as Le, Paperclip as Re, Pencil as ze, Pin as Be, Plus as Ve, Search as He, Settings as Ue, Settings2 as We, Share2 as Ge, SlidersHorizontal as Ke, Sparkles as qe, Square as Je, SquarePen as Ye, Star as Xe, Sun as Ze, SwatchBook as Qe, Trash as $e, Trash2 as et, Upload as tt, Volume2 as nt, X as rt, ZoomIn as it, ZoomOut as at } from "lucide-react";
9
- import { Toaster as ot, toast as G } from "sonner";
10
- import K from "grab-url";
8
+ import { AlertCircle as R, Archive as z, ArrowUp as B, BadgePercent as V, BookMarked as H, BookOpen as ee, Bot as te, Building2 as U, CalendarDays as ne, Check as re, CheckIcon as ie, ChevronDown as ae, ChevronRightIcon as oe, Clipboard as W, Clock as se, Cloud as ce, CloudIcon as le, Copy as ue, Cpu as de, Download as fe, ExternalLink as pe, EyeOff as me, File as he, FileDown as ge, FileSpreadsheet as _e, FileText as ve, FileType as ye, FolderOpen as be, Globe as xe, HelpCircle as Se, Highlighter as Ce, History as we, Info as Te, LayoutGrid as Ee, Link as De, Loader2 as G, Lock as Oe, LogIn as ke, LogOut as Ae, Mail as je, MessageCircle as Me, MessageCircleQuestion as Ne, MessageSquare as Pe, Mic as Fe, Newspaper as Ie, Paperclip as Le, Pencil as Re, Pin as ze, Plus as Be, Search as Ve, Settings as He, Settings2 as Ue, Share2 as We, SlidersHorizontal as Ge, Sparkles as Ke, Square as qe, SquarePen as Je, Star as Ye, Sun as Xe, SwatchBook as Ze, Trash as Qe, Trash2 as $e, Upload as et, Volume2 as tt, X as nt, ZoomIn as rt, ZoomOut as it } from "lucide-react";
9
+ import { Toaster as at, toast as K } from "sonner";
10
+ import ot from "grab-url";
11
11
  import { agentChat as st, autocomplete as ct, createDocument as lt, deleteAllChats as ut, deleteChatById as dt, deleteUploadedFile as ft, getChatById as pt, getGoogleDriveFile as mt, getGoogleToken as ht, googleDocsAuth as gt, googleDocsAuthStatus as _t, listChats as vt, listProviders as yt, saveMessage as bt, searchChats as xt, shareChat as St, uploadFiles as Ct } from "qwksearch-api-client";
12
12
  import { LiveTranscriber as wt } from "use-voice-control/client";
13
13
  import { SpokenPhraseOverlay as Tt } from "use-voice-control/react";
@@ -152,7 +152,7 @@ function qt({ open: e, suggestions: t, domains: n, placement: r, highlightedInde
152
152
  className: Kt,
153
153
  children: r + 1
154
154
  }),
155
- /* @__PURE__ */ P(He, { className: "w-4 h-4 text-text-400 shrink-0" }),
155
+ /* @__PURE__ */ P(Ve, { className: "w-4 h-4 text-text-400 shrink-0" }),
156
156
  /* @__PURE__ */ P("span", {
157
157
  className: "truncate",
158
158
  children: e
@@ -295,12 +295,12 @@ function $t(e) {
295
295
  }
296
296
  // src/components/MessageComposer/MessageInputIconSet.tsx
297
297
  var J = {
298
- Plus: Ve,
299
- Paperclip: Re,
300
- Cloud: le,
301
- Upload: tt,
302
- File: ge,
303
- SquarePen: Ye,
298
+ Plus: Be,
299
+ Paperclip: Le,
300
+ Cloud: ce,
301
+ Upload: et,
302
+ File: he,
303
+ SquarePen: Je,
304
304
  Thinking: (e) => /* @__PURE__ */ P("svg", {
305
305
  width: "20",
306
306
  height: "20",
@@ -312,13 +312,13 @@ var J = {
312
312
  }),
313
313
  SelectArrow: ae,
314
314
  ArrowUp: B,
315
- X: rt,
316
- FileText: ye,
317
- Loader2: W,
315
+ X: nt,
316
+ FileText: ve,
317
+ Loader2: G,
318
318
  Check: re,
319
319
  Archive: z,
320
- Mic: Ie,
321
- Stop: Je,
320
+ Mic: Fe,
321
+ Stop: qe,
322
322
  Clock: (e) => /* @__PURE__ */ P("svg", {
323
323
  xmlns: "http://www.w3.org/2000/svg",
324
324
  width: "20",
@@ -423,7 +423,7 @@ var J = {
423
423
  ]
424
424
  }), rn = async (e, t, n) => {
425
425
  try {
426
- let n = localStorage.getItem("chatModelKey"), r = localStorage.getItem("chatModelProviderId"), i = (await K("agent/providers"))?.providers || [];
426
+ let n = localStorage.getItem("chatModelKey"), r = localStorage.getItem("chatModelProviderId"), i = (await ot("agent/providers"))?.providers || [];
427
427
  if (!i || i.length === 0) {
428
428
  t(!0);
429
429
  return;
@@ -444,7 +444,7 @@ var J = {
444
444
  providerId: r
445
445
  }), t(!0);
446
446
  } catch (e) {
447
- console.error("An error occurred while checking the configuration:", e), G.error(`Could not load AI providers: ${e?.message ?? String(e)}`), t(!0);
447
+ console.error("An error occurred while checking the configuration:", e), K.error(`Could not load AI providers: ${e?.message ?? String(e)}`), t(!0);
448
448
  }
449
449
  }, an = "qwksearch_guest_chats", on = typeof window < "u";
450
450
  function Y() {
@@ -589,7 +589,7 @@ var fn = async (e, t, n, r, i, a, o, s, c) => {
589
589
  }, mn = async (e) => {
590
590
  let t = localStorage.getItem("chatModelKey"), n = localStorage.getItem("chatModelProviderId"), r = parseInt(localStorage.getItem("maxFollowupQuestions") || "4"), i = localStorage.getItem("followUpQuestionsPrompt")?.trim() || void 0, a = e.filter((e) => e.role === "user" || e.role === "assistant");
591
591
  try {
592
- let e = await K("agent/suggestions", {
592
+ let e = await ot("agent/suggestions", {
593
593
  method: "POST",
594
594
  body: JSON.stringify({
595
595
  chatHistory: a,
@@ -639,7 +639,7 @@ async function bn(e, n) {
639
639
  typeof t == "string" && (t.includes("no longer available") || t.includes("deprecated") || t.includes("410")) && (localStorage.removeItem("chatModelKey"), localStorage.removeItem("chatModelProviderId"), C?.({
640
640
  key: "",
641
641
  providerId: ""
642
- })), G.error(t), B(t), y(!1);
642
+ })), K.error(t), B(t), y(!1);
643
643
  } else {
644
644
  if (e.type === "searching") {
645
645
  let t = e.data;
@@ -685,7 +685,7 @@ async function bn(e, n) {
685
685
  createdAt: /* @__PURE__ */ new Date()
686
686
  }]), N.length > 0 && (b(!0), N.slice(0, hn).forEach((e) => {
687
687
  let t = e?.metadata?.url;
688
- t && t !== "File" && K(`doc/article?url=${encodeURIComponent(t)}`).catch(() => {});
688
+ t && t !== "File" && ot(`doc/article?url=${encodeURIComponent(t)}`).catch(() => {});
689
689
  }))), e.type === "message" && (A += e.data, F ? (I += e.data, L ||= e.messageId, j = !0) : j ? x((t) => t.map((t) => t.messageId === e.messageId && t.role === "assistant" ? {
690
690
  ...t,
691
691
  content: t.content + e.data
@@ -765,7 +765,7 @@ async function bn(e, n) {
765
765
  sseMaxRetryAttempts: 1,
766
766
  onSseError: (e) => {
767
767
  let t = e instanceof Error ? e.message : String(e);
768
- t.includes("401") && g ? (G.error("Your session has expired. Please sign in again."), y(!1), window.location.href = "/") : (G.error("Failed to send message. Please try again."), B(`${t}. Please try again.`), y(!1));
768
+ t.includes("401") && g ? (K.error("Your session has expired. Please sign in again."), y(!1), window.location.href = "/") : (K.error("Failed to send message. Please try again."), B(`${t}. Please try again.`), y(!1));
769
769
  }
770
770
  });
771
771
  for await (let t of e) await V(t);
@@ -846,7 +846,7 @@ var Sn = async (e, t) => {
846
846
  }));
847
847
  if (i.length === 0) return "";
848
848
  try {
849
- let t = await K("agent/chat-title", {
849
+ let t = await ot("agent/chat-title", {
850
850
  method: "POST",
851
851
  body: JSON.stringify({
852
852
  chatId: e,
@@ -989,7 +989,7 @@ function Cn({ children: e }) {
989
989
  let { error: t } = await ft({ query: { fileId: e } });
990
990
  if (t) throw Error(t.message ?? "Delete failed");
991
991
  } catch (e) {
992
- console.error("[ChatProvider] Failed to delete uploaded file:", e), G.error("Removed from the chat, but the file could not be deleted from storage.");
992
+ console.error("[ChatProvider] Failed to delete uploaded file:", e), K.error("Removed from the chat, but the file could not be deleted from storage.");
993
993
  }
994
994
  }, [l.files, l.fileIds]), S = C(() => {
995
995
  m.current &&= (m.current.abort(), null);
@@ -1064,19 +1064,19 @@ function Tn(e, t, n = {}) {
1064
1064
  o(""), c(e), u((e) => e + 1), m.current.onTranscript(e);
1065
1065
  },
1066
1066
  onError: () => {
1067
- G.error("Speech recognition stopped unexpectedly.");
1067
+ K.error("Speech recognition stopped unexpectedly.");
1068
1068
  }
1069
1069
  }), [n.language]), g = C(() => {
1070
1070
  let e = d.current;
1071
1071
  e && e.state !== "inactive" ? e.stop() : (f.current?.getTracks().forEach((e) => e.stop()), f.current = null, d.current = null);
1072
1072
  }, []), _ = async (e) => {
1073
1073
  let t = new FormData();
1074
- return t.append("file", e, "speech-input.webm"), t.append("languageCode", "en"), ((await K("agent/transcript", {
1074
+ return t.append("file", e, "speech-input.webm"), t.append("languageCode", "en"), ((await ot("agent/transcript", {
1075
1075
  method: "POST",
1076
1076
  body: t
1077
1077
  }))?.text ?? "").trim();
1078
1078
  }, v = C(async () => {
1079
- if (typeof navigator > "u" || !navigator.mediaDevices?.getUserMedia || typeof MediaRecorder > "u") G.error("Speech input is not supported in this browser", { duration: 5e3 }), i(!1), m.current.onEnd();
1079
+ if (typeof navigator > "u" || !navigator.mediaDevices?.getUserMedia || typeof MediaRecorder > "u") K.error("Speech input is not supported in this browser", { duration: 5e3 }), i(!1), m.current.onEnd();
1080
1080
  else try {
1081
1081
  let e = await navigator.mediaDevices.getUserMedia({ audio: !0 }), t = new MediaRecorder(e);
1082
1082
  p.current = [], f.current = e, d.current = t, t.ondataavailable = (e) => {
@@ -1088,15 +1088,15 @@ function Tn(e, t, n = {}) {
1088
1088
  let e = new Blob(p.current, { type: "audio/webm" });
1089
1089
  if (p.current = [], f.current?.getTracks().forEach((e) => e.stop()), f.current = null, d.current = null, i(!1), e.size === 0) return;
1090
1090
  let t = await _(e);
1091
- t ? (c(t), u((e) => e + 1), m.current.onTranscript(t)) : G.error("No speech detected. Please try again.");
1091
+ t ? (c(t), u((e) => e + 1), m.current.onTranscript(t)) : K.error("No speech detected. Please try again.");
1092
1092
  } catch {
1093
- G.error("Unable to transcribe audio.");
1093
+ K.error("Unable to transcribe audio.");
1094
1094
  } finally {
1095
1095
  m.current.onEnd();
1096
1096
  }
1097
1097
  }, t.start();
1098
1098
  } catch {
1099
- G.error("Microphone access is required for speech input."), i(!1), m.current.onEnd();
1099
+ K.error("Microphone access is required for speech input."), i(!1), m.current.onEnd();
1100
1100
  }
1101
1101
  }, []), y = C(async () => {
1102
1102
  h.isListening() ? (await h.stop(), o(""), m.current.onEnd()) : d.current ? g() : wn() ? await h.start() : await v();
@@ -1177,9 +1177,9 @@ var Fn = [
1177
1177
  function Vn({ setMessage: e, contextFiles: t, contextFileIds: n, setContextFiles: r, setContextFileIds: i }) {
1178
1178
  let [a, o] = O([]), [s, c] = O([]), [l, u] = O(!1), [d, f] = O(!1), p = C(async (e) => {
1179
1179
  let a = Array.from(e);
1180
- a.length > Rn && (G.error(`You can attach up to ${Rn} files at a time.`), a = a.slice(0, Rn));
1180
+ a.length > Rn && (K.error(`You can attach up to ${Rn} files at a time.`), a = a.slice(0, Rn));
1181
1181
  let s = a.filter((e) => e.size > zn);
1182
- if (s.length > 0 && (G.error(`${s.map((e) => e.name).join(", ")} exceed${s.length === 1 ? "s" : ""} the 50 MB per-file limit.`), a = a.filter((e) => e.size <= zn)), a.length === 0) return;
1182
+ if (s.length > 0 && (K.error(`${s.map((e) => e.name).join(", ")} exceed${s.length === 1 ? "s" : ""} the 50 MB per-file limit.`), a = a.filter((e) => e.size <= zn)), a.length === 0) return;
1183
1183
  let c = a.map((e) => {
1184
1184
  let t = e.type.startsWith("image/") || /\.(jpg|jpeg|png|gif|webp|svg)$/i.test(e.name), n = e.name.split(".").pop()?.toLowerCase() ?? "", r = Ln.includes(n);
1185
1185
  return {
@@ -1208,7 +1208,7 @@ function Vn({ setMessage: e, contextFiles: t, contextFileIds: n, setContextFiles
1208
1208
  uploadStatus: "complete"
1209
1209
  } : e)), r([...t, ...e.files]), i([...n, ...e.files.map((e) => e.fileId)]);
1210
1210
  } catch (e) {
1211
- G.error(Bn(e, "Failed to upload files.")), o((e) => e.map((e) => l.some((t) => t.id === e.id) ? {
1211
+ K.error(Bn(e, "Failed to upload files.")), o((e) => e.map((e) => l.some((t) => t.id === e.id) ? {
1212
1212
  ...e,
1213
1213
  uploadStatus: "error"
1214
1214
  } : e));
@@ -1230,7 +1230,7 @@ function Vn({ setMessage: e, contextFiles: t, contextFileIds: n, setContextFiles
1230
1230
  handleFiles: p,
1231
1231
  extractUrl: C(async (e) => {
1232
1232
  let a = e.trim();
1233
- if (!/^https?:\/\//i.test(a)) return G.error("Enter a valid http(s) URL."), !1;
1233
+ if (!/^https?:\/\//i.test(a)) return K.error("Enter a valid http(s) URL."), !1;
1234
1234
  f(!0);
1235
1235
  try {
1236
1236
  let e = await (await fetch("/api/doc/uploads", {
@@ -1239,9 +1239,9 @@ function Vn({ setMessage: e, contextFiles: t, contextFileIds: n, setContextFiles
1239
1239
  body: JSON.stringify({ url: a })
1240
1240
  })).json();
1241
1241
  if (!e?.files || e.files.length === 0) throw Error(Bn(e, `Could not extract content from ${a}`));
1242
- return r([...t, ...e.files]), i([...n, ...e.files.map((e) => e.fileId)]), G.success(`Added "${e.files[0].fileName}" as context.`), !0;
1242
+ return r([...t, ...e.files]), i([...n, ...e.files.map((e) => e.fileId)]), K.success(`Added "${e.files[0].fileName}" as context.`), !0;
1243
1243
  } catch (e) {
1244
- return G.error(Bn(e, "Failed to extract URL.")), !1;
1244
+ return K.error(Bn(e, "Failed to extract URL.")), !1;
1245
1245
  } finally {
1246
1246
  f(!1);
1247
1247
  }
@@ -2128,7 +2128,7 @@ var lr = [
2128
2128
  return /* @__PURE__ */ F(qn, { children: [/* @__PURE__ */ F(Jn, {
2129
2129
  className: "gap-2",
2130
2130
  children: [
2131
- /* @__PURE__ */ P(fe, { className: "w-4 h-4 flex-shrink-0 text-sky-500" }),
2131
+ /* @__PURE__ */ P(de, { className: "w-4 h-4 flex-shrink-0 text-sky-500" }),
2132
2132
  /* @__PURE__ */ P("span", { children: "Model" }),
2133
2133
  /* @__PURE__ */ P("span", {
2134
2134
  className: "ml-auto text-xs text-muted-foreground truncate max-w-[55px]",
@@ -2140,7 +2140,7 @@ var lr = [
2140
2140
  children: [
2141
2141
  i ? /* @__PURE__ */ P("div", {
2142
2142
  className: "flex items-center justify-center py-4",
2143
- children: /* @__PURE__ */ P(W, { className: "h-4 w-4 animate-spin text-muted-foreground" })
2143
+ children: /* @__PURE__ */ P(G, { className: "h-4 w-4 animate-spin text-muted-foreground" })
2144
2144
  }) : n.length === 0 ? /* @__PURE__ */ P("div", {
2145
2145
  className: "px-3 py-2 text-xs text-muted-foreground",
2146
2146
  children: "No models configured"
@@ -2153,7 +2153,7 @@ var lr = [
2153
2153
  onSelect: () => c(t.id, n.key),
2154
2154
  className: h("gap-2", e?.providerId === t.id && e?.key === n.key && "bg-secondary"),
2155
2155
  children: [
2156
- /* @__PURE__ */ P(fe, { className: h("h-3.5 w-3.5 flex-shrink-0", e?.providerId === t.id && e?.key === n.key ? "text-sky-500" : "text-muted-foreground") }),
2156
+ /* @__PURE__ */ P(de, { className: h("h-3.5 w-3.5 flex-shrink-0", e?.providerId === t.id && e?.key === n.key ? "text-sky-500" : "text-muted-foreground") }),
2157
2157
  /* @__PURE__ */ P("span", {
2158
2158
  className: "truncate",
2159
2159
  children: n.name
@@ -2178,7 +2178,7 @@ var lr = [
2178
2178
  /* @__PURE__ */ F(X, {
2179
2179
  onSelect: () => o.push("/settings?section=models"),
2180
2180
  className: "gap-2",
2181
- children: [/* @__PURE__ */ P(Ve, { className: "h-3.5 w-3.5 text-sky-500 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: "Add model" })]
2181
+ children: [/* @__PURE__ */ P(Be, { className: "h-3.5 w-3.5 text-sky-500 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: "Add model" })]
2182
2182
  })
2183
2183
  ]
2184
2184
  })] });
@@ -2249,7 +2249,7 @@ function hr(e) {
2249
2249
  // src/components/ChatHistoryDropdown/HistorySubmenu.tsx
2250
2250
  var gr = 10, _r = () => {
2251
2251
  let e = j(), { incognito: n, setIncognito: r } = u(), { recentChats: i, loading: a, load: o } = mr(gr), s = (e) => {
2252
- r(e), G.success(e ? "Private mode on — messages won't be saved" : "Private mode off");
2252
+ r(e), K.success(e ? "Private mode on — messages won't be saved" : "Private mode off");
2253
2253
  }, c = (n) => {
2254
2254
  t.onOpenChat?.(n) || e.push(`/c/${n}`);
2255
2255
  };
@@ -2259,7 +2259,7 @@ var gr = 10, _r = () => {
2259
2259
  },
2260
2260
  children: [/* @__PURE__ */ F(Jn, {
2261
2261
  className: "gap-2",
2262
- children: [/* @__PURE__ */ P(Te, { className: "w-4 h-4 flex-shrink-0 text-muted-foreground" }), /* @__PURE__ */ P("span", { children: "History" })]
2262
+ children: [/* @__PURE__ */ P(we, { className: "w-4 h-4 flex-shrink-0 text-muted-foreground" }), /* @__PURE__ */ P("span", { children: "History" })]
2263
2263
  }), /* @__PURE__ */ F(Yn, {
2264
2264
  className: "w-64 max-h-[70vh] overflow-y-auto",
2265
2265
  children: [
@@ -2268,13 +2268,13 @@ var gr = 10, _r = () => {
2268
2268
  onCheckedChange: s,
2269
2269
  onSelect: (e) => e.preventDefault(),
2270
2270
  className: "gap-2",
2271
- children: [/* @__PURE__ */ P(he, { className: "w-4 h-4 flex-shrink-0 text-muted-foreground" }), /* @__PURE__ */ P("span", { children: "Private" })]
2271
+ children: [/* @__PURE__ */ P(me, { className: "w-4 h-4 flex-shrink-0 text-muted-foreground" }), /* @__PURE__ */ P("span", { children: "Private" })]
2272
2272
  }),
2273
2273
  /* @__PURE__ */ P(Z, {}),
2274
2274
  a ? /* @__PURE__ */ F(X, {
2275
2275
  disabled: !0,
2276
2276
  className: "gap-2",
2277
- children: [/* @__PURE__ */ P(W, { className: "w-3.5 h-3.5 animate-spin flex-shrink-0" }), /* @__PURE__ */ P("span", { children: "Loading…" })]
2277
+ children: [/* @__PURE__ */ P(G, { className: "w-3.5 h-3.5 animate-spin flex-shrink-0" }), /* @__PURE__ */ P("span", { children: "Loading…" })]
2278
2278
  }) : i.length === 0 ? /* @__PURE__ */ P(X, {
2279
2279
  disabled: !0,
2280
2280
  children: /* @__PURE__ */ P("span", {
@@ -2300,7 +2300,7 @@ var gr = 10, _r = () => {
2300
2300
  /* @__PURE__ */ F(X, {
2301
2301
  onSelect: () => e.push("/library"),
2302
2302
  className: "gap-2",
2303
- children: [/* @__PURE__ */ P(Te, { className: "w-4 h-4 flex-shrink-0 text-muted-foreground" }), /* @__PURE__ */ P("span", { children: "All history" })]
2303
+ children: [/* @__PURE__ */ P(we, { className: "w-4 h-4 flex-shrink-0 text-muted-foreground" }), /* @__PURE__ */ P("span", { children: "All history" })]
2304
2304
  })
2305
2305
  ]
2306
2306
  })]
@@ -2619,7 +2619,7 @@ var kr = [
2619
2619
  className: "inline-flex items-center justify-center relative shrink-0 transition-colors duration-200 h-8 w-8 rounded-lg active:scale-95 text-text-400 hover:text-text-200 hover:bg-bg-200 disabled:opacity-50 disabled:cursor-not-allowed group-active:scale-95",
2620
2620
  type: "button",
2621
2621
  "aria-label": "Search options",
2622
- children: /* @__PURE__ */ P(Ke, { className: "w-5 h-5" })
2622
+ children: /* @__PURE__ */ P(Ge, { className: "w-5 h-5" })
2623
2623
  })
2624
2624
  }), /* @__PURE__ */ F(Wn, {
2625
2625
  align: "start",
@@ -2653,7 +2653,7 @@ var kr = [
2653
2653
  /* @__PURE__ */ F(qn, { children: [/* @__PURE__ */ F(Jn, {
2654
2654
  className: "gap-2",
2655
2655
  children: [
2656
- /* @__PURE__ */ P(ce, { className: "w-4 h-4 flex-shrink-0 text-muted-foreground" }),
2656
+ /* @__PURE__ */ P(se, { className: "w-4 h-4 flex-shrink-0 text-muted-foreground" }),
2657
2657
  /* @__PURE__ */ P("span", { children: "Speed" }),
2658
2658
  /* @__PURE__ */ P("span", {
2659
2659
  className: "ml-auto text-xs text-muted-foreground",
@@ -2684,20 +2684,20 @@ var kr = [
2684
2684
  /* @__PURE__ */ P(Z, {}),
2685
2685
  /* @__PURE__ */ F(qn, { children: [/* @__PURE__ */ F(Jn, {
2686
2686
  className: "gap-2",
2687
- children: [/* @__PURE__ */ P(tt, { className: "w-4 h-4 flex-shrink-0 text-muted-foreground" }), /* @__PURE__ */ P("span", { children: "Upload" })]
2687
+ children: [/* @__PURE__ */ P(et, { className: "w-4 h-4 flex-shrink-0 text-muted-foreground" }), /* @__PURE__ */ P("span", { children: "Upload" })]
2688
2688
  }), /* @__PURE__ */ F(Yn, {
2689
2689
  className: "w-44",
2690
2690
  children: [
2691
2691
  /* @__PURE__ */ F(X, {
2692
2692
  onSelect: I,
2693
2693
  className: "gap-2",
2694
- children: [/* @__PURE__ */ P(tt, { className: "h-3.5 w-3.5 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: "Your Device" })]
2694
+ children: [/* @__PURE__ */ P(et, { className: "h-3.5 w-3.5 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: "Your Device" })]
2695
2695
  }),
2696
2696
  /* @__PURE__ */ F(X, {
2697
2697
  onSelect: R,
2698
2698
  disabled: S,
2699
2699
  className: "gap-2",
2700
- children: [S ? /* @__PURE__ */ P(W, { className: "h-3.5 w-3.5 animate-spin flex-shrink-0" }) : /* @__PURE__ */ P(xe, { className: "h-3.5 w-3.5 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: S ? "Scanning…" : "Local Folder" })]
2700
+ children: [S ? /* @__PURE__ */ P(G, { className: "h-3.5 w-3.5 animate-spin flex-shrink-0" }) : /* @__PURE__ */ P(be, { className: "h-3.5 w-3.5 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: S ? "Scanning…" : "Local Folder" })]
2701
2701
  }),
2702
2702
  /* @__PURE__ */ P(Z, {}),
2703
2703
  /* @__PURE__ */ P(Kn, {
@@ -2708,38 +2708,38 @@ var kr = [
2708
2708
  onSelect: B,
2709
2709
  disabled: b,
2710
2710
  className: "gap-2",
2711
- children: [b ? /* @__PURE__ */ P(W, { className: "h-3.5 w-3.5 animate-spin flex-shrink-0" }) : /* @__PURE__ */ P(ue, { className: "h-3.5 w-3.5 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: b ? "Loading…" : "Google Drive" })]
2711
+ children: [b ? /* @__PURE__ */ P(G, { className: "h-3.5 w-3.5 animate-spin flex-shrink-0" }) : /* @__PURE__ */ P(le, { className: "h-3.5 w-3.5 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: b ? "Loading…" : "Google Drive" })]
2712
2712
  }) : /* @__PURE__ */ F(X, {
2713
2713
  onSelect: z,
2714
2714
  disabled: _,
2715
2715
  className: "gap-2",
2716
- children: [_ ? /* @__PURE__ */ P(W, { className: "h-3.5 w-3.5 animate-spin flex-shrink-0" }) : /* @__PURE__ */ P(ue, { className: "h-3.5 w-3.5 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: _ ? "Connecting…" : "Connect Google Drive" })]
2716
+ children: [_ ? /* @__PURE__ */ P(G, { className: "h-3.5 w-3.5 animate-spin flex-shrink-0" }) : /* @__PURE__ */ P(le, { className: "h-3.5 w-3.5 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: _ ? "Connecting…" : "Connect Google Drive" })]
2717
2717
  })
2718
2718
  ]
2719
2719
  })] }),
2720
2720
  /* @__PURE__ */ P(Z, {}),
2721
2721
  s.length > 0 && /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ F(qn, { children: [/* @__PURE__ */ F(Jn, {
2722
2722
  className: "gap-2",
2723
- children: [/* @__PURE__ */ P(Ge, { className: "w-4 h-4 flex-shrink-0 text-muted-foreground" }), /* @__PURE__ */ P("span", { children: "Share" })]
2723
+ children: [/* @__PURE__ */ P(We, { className: "w-4 h-4 flex-shrink-0 text-muted-foreground" }), /* @__PURE__ */ P("span", { children: "Share" })]
2724
2724
  }), /* @__PURE__ */ F(Yn, {
2725
2725
  className: "w-48",
2726
2726
  children: [
2727
2727
  /* @__PURE__ */ F(X, {
2728
2728
  onSelect: async () => {
2729
- if (!c) G.error("No chat to share");
2730
- else if (!l) G.error("Please sign in to share chats");
2729
+ if (!c) K.error("No chat to share");
2730
+ else if (!l) K.error("Please sign in to share chats");
2731
2731
  else try {
2732
2732
  let { data: e, error: t } = await St({ body: { chatId: c } });
2733
- if (!t && e?.success && e?.data?.shareUrl) await navigator.clipboard.writeText(e.data.shareUrl), G.success("Chat is now public - link copied to clipboard");
2733
+ if (!t && e?.success && e?.data?.shareUrl) await navigator.clipboard.writeText(e.data.shareUrl), K.success("Chat is now public - link copied to clipboard");
2734
2734
  else throw Error(t?.error || "Failed to share chat");
2735
2735
  } catch (e) {
2736
2736
  console.error("Error sharing chat:", e);
2737
2737
  let t = e instanceof Error ? e.message : "Failed to share chat";
2738
- G.error(t);
2738
+ K.error(t);
2739
2739
  }
2740
2740
  },
2741
2741
  className: "gap-2",
2742
- children: [/* @__PURE__ */ P(Oe, { className: "w-4 h-4 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: "Copy link" })]
2742
+ children: [/* @__PURE__ */ P(De, { className: "w-4 h-4 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: "Copy link" })]
2743
2743
  }),
2744
2744
  /* @__PURE__ */ F(X, {
2745
2745
  onSelect: async () => {
@@ -2753,9 +2753,9 @@ var kr = [
2753
2753
  source: "chat",
2754
2754
  chatId: window.location.pathname
2755
2755
  }
2756
- } }), G.success("Saved to QwkDocs");
2756
+ } }), K.success("Saved to QwkDocs");
2757
2757
  } catch {
2758
- G.error("Failed to save to QwkDocs");
2758
+ K.error("Failed to save to QwkDocs");
2759
2759
  }
2760
2760
  },
2761
2761
  className: "gap-2",
@@ -2767,28 +2767,28 @@ var kr = [
2767
2767
  wr(s[0]?.userMessage?.content || "Chat", s.map((e) => `<h2>${e.userMessage.content}</h2>${e.assistantMessage?.content || ""}`).join("\n"));
2768
2768
  },
2769
2769
  className: "gap-2",
2770
- children: [/* @__PURE__ */ P(ye, { className: "w-4 h-4 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: "Export as Markdown" })]
2770
+ children: [/* @__PURE__ */ P(ve, { className: "w-4 h-4 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: "Export as Markdown" })]
2771
2771
  }),
2772
2772
  /* @__PURE__ */ F(X, {
2773
2773
  onSelect: () => {
2774
2774
  Er(s[0]?.userMessage?.content || "Chat", s.map((e) => `<h2>${e.userMessage.content}</h2>${e.assistantMessage?.content || ""}`).join("\n"));
2775
2775
  },
2776
2776
  className: "gap-2",
2777
- children: [/* @__PURE__ */ P(be, { className: "w-4 h-4 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: "Export as PDF" })]
2777
+ children: [/* @__PURE__ */ P(ye, { className: "w-4 h-4 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: "Export as PDF" })]
2778
2778
  }),
2779
2779
  /* @__PURE__ */ F(X, {
2780
2780
  onSelect: () => {
2781
2781
  Tr(s[0]?.userMessage?.content || "Chat", s.map((e) => `<h2>${e.userMessage.content}</h2>${e.assistantMessage?.content || ""}`).join("\n"));
2782
2782
  },
2783
2783
  className: "gap-2",
2784
- children: [/* @__PURE__ */ P(_e, { className: "w-4 h-4 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: "Export as DOCX" })]
2784
+ children: [/* @__PURE__ */ P(ge, { className: "w-4 h-4 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: "Export as DOCX" })]
2785
2785
  }),
2786
2786
  /* @__PURE__ */ F(X, {
2787
2787
  onSelect: () => {
2788
2788
  Dr(s[0]?.userMessage?.content || "Chat", s.map((e) => `<h2>${e.userMessage.content}</h2>${e.assistantMessage?.content || ""}`).join("\n"));
2789
2789
  },
2790
2790
  className: "gap-2",
2791
- children: [/* @__PURE__ */ P(ve, { className: "w-4 h-4 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: "Export to Google Docs" })]
2791
+ children: [/* @__PURE__ */ P(_e, { className: "w-4 h-4 flex-shrink-0" }), /* @__PURE__ */ P("span", { children: "Export to Google Docs" })]
2792
2792
  })
2793
2793
  ]
2794
2794
  })] }), /* @__PURE__ */ P(Z, {})] }),
@@ -2798,7 +2798,7 @@ var kr = [
2798
2798
  t.onOpenSettings?.() || i.push("/settings");
2799
2799
  },
2800
2800
  className: "gap-2",
2801
- children: [/* @__PURE__ */ P(Ue, { className: "w-4 h-4 flex-shrink-0 text-muted-foreground" }), /* @__PURE__ */ P("span", { children: "Settings" })]
2801
+ children: [/* @__PURE__ */ P(He, { className: "w-4 h-4 flex-shrink-0 text-muted-foreground" }), /* @__PURE__ */ P("span", { children: "Settings" })]
2802
2802
  })
2803
2803
  ]
2804
2804
  })] }), /* @__PURE__ */ P("div", {
@@ -2817,7 +2817,7 @@ var kr = [
2817
2817
  onClick: I,
2818
2818
  "aria-label": "Attach files",
2819
2819
  className: "inline-flex items-center justify-center relative shrink-0 transition-colors duration-200 h-7 w-7 rounded-md active:scale-95 text-text-400 hover:text-text-200 hover:bg-bg-200 disabled:opacity-50 disabled:cursor-not-allowed group-active:scale-95",
2820
- children: /* @__PURE__ */ P(Re, { className: "w-[18px] h-[18px]" })
2820
+ children: /* @__PURE__ */ P(Le, { className: "w-[18px] h-[18px]" })
2821
2821
  }), /* @__PURE__ */ P("div", {
2822
2822
  className: "absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 bg-[#1F1E1D] dark:bg-[#EEEEEC] text-[11px] font-medium rounded-[6px] opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap pointer-events-none z-50 shadow-sm tracking-wide",
2823
2823
  children: /* @__PURE__ */ P("span", {
@@ -3097,7 +3097,7 @@ var Pr = async (e, { signal: t, limit: n }) => {
3097
3097
  t || (d.trim() || h.length !== 0 || _.length !== 0) && (n(d), k());
3098
3098
  }, oe = (e) => {
3099
3099
  re(e) || e.key === "Enter" && !e.shiftKey && (e.preventDefault(), ae());
3100
- }, se = !!(d.trim() || h.length > 0 || _.length > 0);
3100
+ }, W = !!(d.trim() || h.length > 0 || _.length > 0);
3101
3101
  return /* @__PURE__ */ F("div", {
3102
3102
  className: "relative w-full max-w-2xl mx-auto transition-all duration-300 font-sans",
3103
3103
  onDragOver: x,
@@ -3243,9 +3243,9 @@ var Pr = async (e, { signal: t, limit: n }) => {
3243
3243
  onClick: (e) => {
3244
3244
  e.stopPropagation(), ae();
3245
3245
  },
3246
- disabled: !se,
3246
+ disabled: !W,
3247
3247
  className: `inline-flex items-center justify-center shrink-0 transition-all duration-200 h-8 w-8 rounded-full active:scale-95
3248
- ${se ? "bg-accent text-bg-0 hover:bg-accent-hover shadow-md" : "bg-bg-300 text-text-400 cursor-default opacity-50"}
3248
+ ${W ? "bg-accent text-bg-0 hover:bg-accent-hover shadow-md" : "bg-bg-300 text-text-400 cursor-default opacity-50"}
3249
3249
  `,
3250
3250
  type: "button",
3251
3251
  "aria-label": "Send message",
@@ -3359,7 +3359,7 @@ function qr() {
3359
3359
  t(e);
3360
3360
  }
3361
3361
  } catch (e) {
3362
- console.error("Failed to fetch chat history:", e), t([]), G.error("Failed to load chat history");
3362
+ console.error("Failed to fetch chat history:", e), t([]), K.error("Failed to load chat history");
3363
3363
  } finally {
3364
3364
  i(!1);
3365
3365
  }
@@ -3378,9 +3378,9 @@ function qr() {
3378
3378
  let { error: e, response: t } = await dt({ path: { id: s } });
3379
3379
  if (e) throw Error(`Failed to delete chat: ${Hr(e, t?.status)}`);
3380
3380
  } else ln(s);
3381
- t((e) => e.filter((e) => e.id !== s)), G.success("Chat deleted");
3381
+ t((e) => e.filter((e) => e.id !== s)), K.success("Chat deleted");
3382
3382
  } catch (e) {
3383
- G.error(e.message || "Failed to delete chat");
3383
+ K.error(e.message || "Failed to delete chat");
3384
3384
  } finally {
3385
3385
  o(!1), c(null), d(!1);
3386
3386
  }
@@ -3394,14 +3394,14 @@ function qr() {
3394
3394
  let { error: e, response: t } = await ut();
3395
3395
  if (e) throw Error(`Failed to clear history: ${Hr(e, t?.status)}`);
3396
3396
  } else un();
3397
- t([]), G.success("All history cleared");
3397
+ t([]), K.success("All history cleared");
3398
3398
  } catch (e) {
3399
- G.error(e.message || "Failed to clear history");
3399
+ K.error(e.message || "Failed to clear history");
3400
3400
  } finally {
3401
3401
  p(!1), h(!1);
3402
3402
  }
3403
3403
  }, B = () => {
3404
- j(!A), G.success(A ? "Private mode off" : "Private mode on — messages won't be saved");
3404
+ j(!A), K.success(A ? "Private mode off" : "Private mode on — messages won't be saved");
3405
3405
  }, V = C(async (e) => {
3406
3406
  if (!e.trim()) x([]), w(!1);
3407
3407
  else {
@@ -3423,7 +3423,7 @@ function qr() {
3423
3423
  })));
3424
3424
  }
3425
3425
  } catch (e) {
3426
- console.error("Failed to search chat history:", e), x([]), G.error("Failed to search chat history");
3426
+ console.error("Failed to search chat history:", e), x([]), K.error("Failed to search chat history");
3427
3427
  } finally {
3428
3428
  w(!1);
3429
3429
  }
@@ -3478,18 +3478,18 @@ function Jr({ incognito: e, onToggleIncognito: t, showClearAll: n, onClearAll: r
3478
3478
  onClick: t,
3479
3479
  className: `flex items-center gap-1 px-2 py-1 text-xs rounded-lg transition-colors duration-200 ${e ? "text-primary bg-primary/10" : "text-muted-foreground hover:text-foreground hover:bg-secondary"}`,
3480
3480
  title: e ? "Private mode on" : "Private mode",
3481
- children: [/* @__PURE__ */ P(ke, { size: 12 }), /* @__PURE__ */ P("span", { children: "Private" })]
3481
+ children: [/* @__PURE__ */ P(Oe, { size: 12 }), /* @__PURE__ */ P("span", { children: "Private" })]
3482
3482
  }), n && /* @__PURE__ */ F("button", {
3483
3483
  onClick: r,
3484
3484
  className: "flex items-center gap-1 px-2 py-1 text-xs text-muted-foreground hover:text-red-500 hover:bg-red-500/10 rounded-lg transition-colors duration-200",
3485
3485
  title: "Clear all history",
3486
- children: [/* @__PURE__ */ P(et, { size: 12 }), /* @__PURE__ */ P("span", { children: "Clear All" })]
3486
+ children: [/* @__PURE__ */ P($e, { size: 12 }), /* @__PURE__ */ P("span", { children: "Clear All" })]
3487
3487
  })]
3488
3488
  })]
3489
3489
  }), /* @__PURE__ */ F("div", {
3490
3490
  className: "relative",
3491
3491
  children: [
3492
- /* @__PURE__ */ P(He, {
3492
+ /* @__PURE__ */ P(Ve, {
3493
3493
  className: "absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground",
3494
3494
  size: 14
3495
3495
  }),
@@ -3503,7 +3503,7 @@ function Jr({ incognito: e, onToggleIncognito: t, showClearAll: n, onClearAll: r
3503
3503
  i && /* @__PURE__ */ P("button", {
3504
3504
  onClick: () => a(""),
3505
3505
  className: "absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",
3506
- children: /* @__PURE__ */ P(rt, { size: 14 })
3506
+ children: /* @__PURE__ */ P(nt, { size: 14 })
3507
3507
  })
3508
3508
  ]
3509
3509
  })]
@@ -3552,7 +3552,7 @@ function Zr({ chat: e, isPinned: n, onTogglePin: r, onDelete: i }) {
3552
3552
  })]
3553
3553
  }), /* @__PURE__ */ F("p", {
3554
3554
  className: "text-xs text-popover-foreground truncate",
3555
- children: [n && /* @__PURE__ */ P(Be, {
3555
+ children: [n && /* @__PURE__ */ P(ze, {
3556
3556
  size: 10,
3557
3557
  className: "inline mr-1 text-primary"
3558
3558
  }), e.title]
@@ -3562,13 +3562,13 @@ function Zr({ chat: e, isPinned: n, onTogglePin: r, onDelete: i }) {
3562
3562
  onClick: (t) => r(t, e.id),
3563
3563
  className: `p-1.5 rounded-lg transition-all duration-200 ${n ? "opacity-100 text-primary hover:bg-primary/10" : "opacity-0 group-hover:opacity-100 text-muted-foreground hover:text-primary hover:bg-primary/10"}`,
3564
3564
  title: n ? "Unpin chat" : "Pin chat",
3565
- children: /* @__PURE__ */ P(Be, { size: 14 })
3565
+ children: /* @__PURE__ */ P(ze, { size: 14 })
3566
3566
  }),
3567
3567
  /* @__PURE__ */ P("button", {
3568
3568
  onClick: (t) => i(t, e.id),
3569
3569
  className: "opacity-0 group-hover:opacity-100 p-1.5 rounded-lg hover:bg-red-500/10 text-muted-foreground hover:text-red-500 transition-all duration-200",
3570
3570
  title: "Delete chat",
3571
- children: /* @__PURE__ */ P($e, { size: 14 })
3571
+ children: /* @__PURE__ */ P(Qe, { size: 14 })
3572
3572
  })
3573
3573
  ]
3574
3574
  });
@@ -3635,8 +3635,8 @@ function $r({ deleteDialogOpen: e, setDeleteDialogOpen: t, chatToDelete: n, setC
3635
3635
  }
3636
3636
  // src/components/ChatHistoryDropdown/HistoryDropdown.tsx
3637
3637
  var ei = {
3638
- Today: /* @__PURE__ */ P(Ze, { size: 12 }),
3639
- Yesterday: /* @__PURE__ */ P(ce, { size: 12 }),
3638
+ Today: /* @__PURE__ */ P(Xe, { size: 12 }),
3639
+ Yesterday: /* @__PURE__ */ P(se, { size: 12 }),
3640
3640
  "This Week": /* @__PURE__ */ P(ne, { size: 12 }),
3641
3641
  Older: /* @__PURE__ */ P(z, { size: 12 })
3642
3642
  };
@@ -3665,7 +3665,7 @@ var ni = ({ showLabel: e = !1 }) => {
3665
3665
  let t = qr();
3666
3666
  return /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ F(_, { children: [/* @__PURE__ */ F(d, {
3667
3667
  className: e ? "inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs text-muted-foreground bg-secondary hover:bg-secondary/80 hover:text-foreground transition-colors duration-150" : "p-2 text-muted-foreground rounded-2xl bg-background/60 backdrop-blur-md hover:bg-secondary/80 transition duration-200 hover:text-foreground border border-border/30",
3668
- children: [/* @__PURE__ */ P(Te, { size: e ? 14 : 18 }), e && /* @__PURE__ */ P("span", { children: "History" })]
3668
+ children: [/* @__PURE__ */ P(we, { size: e ? 14 : 18 }), e && /* @__PURE__ */ P("span", { children: "History" })]
3669
3669
  }), /* @__PURE__ */ F(m, {
3670
3670
  className: "max-w-[420px] p-3",
3671
3671
  children: [
@@ -3772,26 +3772,102 @@ function ii() {
3772
3772
  })]
3773
3773
  });
3774
3774
  }
3775
+ var ai = (/* @__PURE__ */ "hyZbH3n.mp4,iOeZcCk.mp4,dUZlxYE.mp4,GpWeP6E.gif,LuKUsLE.png,w7X11Dd.png,MHmVtCr.png,HmnUAee.png,vKP22VU.png,l1lsV39.png,Ku8F2qc.png,KUEXtwm.png,vvKFPmY.png,5p8eaEf.png,VAKuJcG.png,sTMPtQW.png,m0gHbZZ.png,cKu7dWQ.png,ogfefYD.png,ey5vAae.png,twuLrvk.png,ELILiYt.png,9el5qpP.png,Up6xTkk.png,W1XKBo0.png,1Y6xvW0.png,JXOytMz.png,DNiI6pp.png,XDv5s6p.jpeg,eRwiRJ9.jpeg,DRAfJoc.jpeg,ASVRQ1G.jpeg,35svwUT.jpeg,81xLiVI.jpeg,6kod2Em.jpeg,eU0C8zt.jpeg,Bv0PBY8.jpeg,DQNbjIZ.jpeg,2uACPqZ.jpeg,XEKltMF.jpeg,WHgLfBm.jpeg,QFYM0Fw.jpeg,K12HCao.jpeg,oN8rtsE.jpeg,9fGnrns.jpeg,2ONJJeW.jpeg,DO23Va7.jpeg,QaKeoXk.jpeg,QU5oCBR.jpeg,MhlYZmh.jpeg,ylL1ToB.jpeg,AWWsCv8.jpeg,Tk9Tzzj.jpeg".split(",")).map((e) => "https://i.imgur.com/" + e), oi = () => {
3776
+ let e = (/* @__PURE__ */ new Date()).getHours(), t = {
3777
+ morning: [
3778
+ "Good morning",
3779
+ "Rise and shine",
3780
+ "Top of the morning to you",
3781
+ "Have a great day ahead",
3782
+ "Wishing you a wonderful morning"
3783
+ ],
3784
+ afternoon: [
3785
+ "Good afternoon",
3786
+ "Hope your day is going well",
3787
+ "Enjoy your afternoon",
3788
+ "Greetings for a pleasant afternoon",
3789
+ "Wishing you a productive afternoon"
3790
+ ],
3791
+ evening: [
3792
+ "Good evening",
3793
+ "Hope you had a great day",
3794
+ "Wishing you a relaxing evening",
3795
+ "Pleasant evening to you",
3796
+ "Enjoy your evening"
3797
+ ],
3798
+ night: [
3799
+ "Greetings at this late hour",
3800
+ "Fancy seeing you up so late",
3801
+ "Burning the midnight oil, I see",
3802
+ "Hope your late-night work is going well",
3803
+ "Wishing you a productive night shift"
3804
+ ]
3805
+ }, n;
3806
+ n = e >= 5 && e < 12 ? "morning" : e >= 12 && e < 17 ? "afternoon" : e >= 17 && e < 22 ? "evening" : "night";
3807
+ let r = Math.floor(Math.random() * t[n].length);
3808
+ return t[n][r];
3809
+ };
3810
+ // src/components/ChatConversation/MascotWidget.tsx
3811
+ function si({ src: e, onDismiss: t, className: n, style: r }) {
3812
+ let [i] = O(oi);
3813
+ return /* @__PURE__ */ F("div", {
3814
+ className: `relative flex items-center gap-3 overflow-hidden px-3 py-2 ${n ?? ""}`,
3815
+ style: r,
3816
+ "data-testid": "mascot-widget",
3817
+ children: [
3818
+ /* @__PURE__ */ P("img", {
3819
+ src: e,
3820
+ alt: "",
3821
+ "aria-hidden": !0,
3822
+ decoding: "async",
3823
+ loading: "lazy",
3824
+ className: "h-16 w-14 shrink-0 object-contain object-bottom"
3825
+ }),
3826
+ /* @__PURE__ */ F("div", {
3827
+ className: "min-w-0 flex-1 pr-6",
3828
+ children: [/* @__PURE__ */ F("p", {
3829
+ className: "text-sm font-semibold leading-tight",
3830
+ children: [i, "!"]
3831
+ }), /* @__PURE__ */ P("p", {
3832
+ className: "mt-0.5 text-xs leading-snug opacity-75",
3833
+ children: "Ask me anything: I search 100+ sites, read the sources and cite every one."
3834
+ })]
3835
+ }),
3836
+ /* @__PURE__ */ P("button", {
3837
+ type: "button",
3838
+ "aria-label": "Hide mascot widget",
3839
+ className: "absolute top-1.5 right-1.5 rounded-full p-1 opacity-60 transition-opacity hover:opacity-100",
3840
+ onClick: () => {
3841
+ try {
3842
+ localStorage.setItem("showMascotWidget", "false");
3843
+ } catch {}
3844
+ t?.();
3845
+ },
3846
+ children: /* @__PURE__ */ P(nt, { className: "size-3.5" })
3847
+ })
3848
+ ]
3849
+ });
3850
+ }
3775
3851
  // src/components/Footer.tsx
3776
- var ai = {
3852
+ var ci = {
3777
3853
  Bot: te,
3778
3854
  BookOpen: ee,
3779
3855
  Building2: U,
3780
- Download: pe,
3781
- HelpCircle: Ce,
3782
- Info: Ee,
3783
- Lock: ke,
3784
- Mail: Me,
3785
- MessageCircle: Ne,
3786
- Newspaper: Le,
3787
- Sparkles: qe
3856
+ Download: fe,
3857
+ HelpCircle: Se,
3858
+ Info: Te,
3859
+ Lock: Oe,
3860
+ Mail: je,
3861
+ MessageCircle: Me,
3862
+ Newspaper: Ie,
3863
+ Sparkles: Ke
3788
3864
  };
3789
- function oi({ name: e }) {
3790
- let t = ai[e];
3865
+ function li({ name: e }) {
3866
+ let t = ci[e];
3791
3867
  return t ? /* @__PURE__ */ P(t, { size: 14 }) : null;
3792
3868
  }
3793
- var si = "relative group inline-flex items-center gap-1 px-[3px] sm:px-1.5 py-0.5 rounded-md whitespace-nowrap transition-all duration-300 ease-[cubic-bezier(0.34,1.56,0.64,1)] hover:text-white hover:bg-white/10 hover:-translate-y-0.5 hover:scale-110 hover:drop-shadow-[0_0_8px_rgba(255,255,255,0.8)] active:scale-95 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-white/60";
3794
- function ci({ listFooterLinks: e = [], optionShowIcons: t = !0, optionBackgroundColor: n = "bg-black/40" }) {
3869
+ var ui = "relative group inline-flex items-center gap-1 px-[3px] sm:px-1.5 py-0.5 rounded-md whitespace-nowrap transition-all duration-300 ease-[cubic-bezier(0.34,1.56,0.64,1)] hover:text-white hover:bg-white/10 hover:-translate-y-0.5 hover:scale-110 hover:drop-shadow-[0_0_8px_rgba(255,255,255,0.8)] active:scale-95 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-white/60";
3870
+ function di({ listFooterLinks: e = [], optionShowIcons: t = !0, optionBackgroundColor: n = "bg-black/40" }) {
3795
3871
  return e.length === 0 ? null : /* @__PURE__ */ P("nav", {
3796
3872
  "aria-label": "Footer",
3797
3873
  className: `relative z-20 mx-auto flex w-max flex-nowrap items-center justify-center gap-0 sm:gap-1 max-w-full text-slate-200 ${n} backdrop-blur-sm rounded-full px-1 sm:px-1.5 py-0.5 shadow-lg hover:shadow-xl transition-shadow duration-300`,
@@ -3802,7 +3878,7 @@ function ci({ listFooterLinks: e = [], optionShowIcons: t = !0, optionBackground
3802
3878
  } : {}, s = /* @__PURE__ */ F(N, { children: [
3803
3879
  t && r && /* @__PURE__ */ P("span", {
3804
3880
  className: "hidden sm:inline-flex transition-transform duration-300 group-hover:-rotate-12 group-hover:scale-125",
3805
- children: /* @__PURE__ */ P(oi, { name: r })
3881
+ children: /* @__PURE__ */ P(li, { name: r })
3806
3882
  }),
3807
3883
  /* @__PURE__ */ P("span", {
3808
3884
  className: "font-semibold tracking-wide text-[11px] sm:text-xs",
@@ -3814,83 +3890,84 @@ function ci({ listFooterLinks: e = [], optionShowIcons: t = !0, optionBackground
3814
3890
  return i ? /* @__PURE__ */ P("button", {
3815
3891
  type: "button",
3816
3892
  onClick: i,
3817
- className: si,
3893
+ className: ui,
3818
3894
  children: s
3819
3895
  }, e) : a ? /* @__PURE__ */ P("a", {
3820
3896
  href: e,
3821
3897
  ...o,
3822
- className: si,
3898
+ className: ui,
3823
3899
  children: s
3824
3900
  }, e) : /* @__PURE__ */ P(Et, {
3825
3901
  href: e,
3826
- className: si,
3902
+ className: ui,
3827
3903
  children: s
3828
3904
  }, e);
3829
3905
  })
3830
3906
  });
3831
3907
  }
3832
3908
  // src/components/ArticleReader/ArticleReaderMount.tsx
3833
- var li = S(() => import("./ArticleExtractPanel-BiUxXcIA.js"));
3834
- function ui() {
3909
+ var fi = S(() => import("./ArticleExtractPanel-BzkK_N4J.js"));
3910
+ function pi() {
3835
3911
  let e = o()?.isOpen ?? !1, [t, n] = O(!1);
3836
3912
  return T(() => {
3837
3913
  e && n(!0);
3838
3914
  }, [e]), !t && !e ? null : /* @__PURE__ */ P(y, {
3839
3915
  fallback: null,
3840
- children: /* @__PURE__ */ P(li, {})
3916
+ children: /* @__PURE__ */ P(fi, {})
3841
3917
  });
3842
3918
  }
3843
- var di = (/* @__PURE__ */ "hyZbH3n.mp4,iOeZcCk.mp4,dUZlxYE.mp4,GpWeP6E.gif,LuKUsLE.png,w7X11Dd.png,MHmVtCr.png,HmnUAee.png,vKP22VU.png,l1lsV39.png,Ku8F2qc.png,KUEXtwm.png,vvKFPmY.png,5p8eaEf.png,VAKuJcG.png,sTMPtQW.png,m0gHbZZ.png,cKu7dWQ.png,ogfefYD.png,ey5vAae.png,twuLrvk.png,ELILiYt.png,9el5qpP.png,Up6xTkk.png,W1XKBo0.png,1Y6xvW0.png,JXOytMz.png,DNiI6pp.png,XDv5s6p.jpeg,eRwiRJ9.jpeg,DRAfJoc.jpeg,ASVRQ1G.jpeg,35svwUT.jpeg,81xLiVI.jpeg,6kod2Em.jpeg,eU0C8zt.jpeg,Bv0PBY8.jpeg,DQNbjIZ.jpeg,2uACPqZ.jpeg,XEKltMF.jpeg,WHgLfBm.jpeg,QFYM0Fw.jpeg,K12HCao.jpeg,oN8rtsE.jpeg,9fGnrns.jpeg,2ONJJeW.jpeg,DO23Va7.jpeg,QaKeoXk.jpeg,QU5oCBR.jpeg,MhlYZmh.jpeg,ylL1ToB.jpeg,AWWsCv8.jpeg,Tk9Tzzj.jpeg".split(",")).map((e) => "https://i.imgur.com/" + e), fi = "qwksearch-background-art-v1", pi = "backgroundArtCache", mi = (e) => typeof e == "string" && di.includes(e);
3844
- function hi() {
3919
+ // src/components/ChatConversation/background-cache.ts
3920
+ var mi = "qwksearch-background-art-v1", hi = "backgroundArtCache", gi = (e) => typeof e == "string" && ai.includes(e);
3921
+ function _i() {
3845
3922
  try {
3846
3923
  let e = JSON.parse(localStorage.getItem("backgroundArtCache") || "[]");
3847
- return Array.isArray(e) ? [...new Set(e.filter(mi))] : [];
3924
+ return Array.isArray(e) ? [...new Set(e.filter(gi))] : [];
3848
3925
  } catch {
3849
3926
  return [];
3850
3927
  }
3851
3928
  }
3852
- function gi(e) {
3929
+ function vi(e) {
3853
3930
  try {
3854
- localStorage.setItem(pi, JSON.stringify(e));
3931
+ localStorage.setItem(hi, JSON.stringify(e));
3855
3932
  } catch {}
3856
3933
  }
3857
- function _i(e) {
3858
- let t = hi().filter((t) => t !== e);
3934
+ function yi(e) {
3935
+ let t = _i().filter((t) => t !== e);
3859
3936
  t.push(e);
3860
3937
  let n = t.splice(0, Math.max(0, t.length - 10));
3861
- return gi(t), n;
3862
- }
3863
- function vi(e) {
3864
- gi(hi().filter((t) => t !== e));
3938
+ return vi(t), n;
3865
3939
  }
3866
- var yi = (e) => e.length ? e[Math.floor(Math.random() * e.length)] : null;
3867
3940
  function bi(e) {
3868
- return yi(hi().filter((t) => t !== e));
3941
+ vi(_i().filter((t) => t !== e));
3869
3942
  }
3870
- function xi() {
3871
- let e = new Set(hi());
3872
- return yi(di.filter((t) => !e.has(t)));
3943
+ var xi = (e) => e.length ? e[Math.floor(Math.random() * e.length)] : null;
3944
+ function Si(e) {
3945
+ return xi(_i().filter((t) => t !== e));
3873
3946
  }
3874
- async function Si() {
3947
+ function Ci() {
3948
+ let e = new Set(_i());
3949
+ return xi(ai.filter((t) => !e.has(t)));
3950
+ }
3951
+ async function wi() {
3875
3952
  if (typeof caches > "u") return null;
3876
3953
  try {
3877
- return await caches.open(fi);
3954
+ return await caches.open(mi);
3878
3955
  } catch {
3879
3956
  return null;
3880
3957
  }
3881
3958
  }
3882
- async function Ci(e) {
3883
- let t = await Si();
3959
+ async function Ti(e) {
3960
+ let t = await wi();
3884
3961
  if (!t) return null;
3885
3962
  try {
3886
3963
  let n = await t.match(e);
3887
- return n ? URL.createObjectURL(await n.blob()) : (vi(e), null);
3964
+ return n ? URL.createObjectURL(await n.blob()) : (bi(e), null);
3888
3965
  } catch {
3889
3966
  return null;
3890
3967
  }
3891
3968
  }
3892
- async function wi(e) {
3893
- let t = await Si();
3969
+ async function Ei(e) {
3970
+ let t = await wi();
3894
3971
  if (!t) return e;
3895
3972
  let n;
3896
3973
  try {
@@ -3905,17 +3982,17 @@ async function wi(e) {
3905
3982
  }
3906
3983
  if (n.size <= 15728640) try {
3907
3984
  await t.put(e, new Response(n, { headers: { "Content-Type": n.type } }));
3908
- let r = _i(e);
3985
+ let r = yi(e);
3909
3986
  await Promise.all(r.map((e) => t.delete(e)));
3910
3987
  } catch {}
3911
3988
  return URL.createObjectURL(n);
3912
3989
  }
3913
3990
  // src/components/ChatConversation/ChatHomepage.tsx
3914
- var Ti = S(() => import("use-weather-forecast").then((e) => ({ default: e.WeatherForecast }))), Ei = S(() => import("trending-news-api").then((e) => ({ default: e.TrendingNews }))), Di = S(() => import("education-playlists").then((e) => ({ default: e.EducationPlaylists }))), Oi = S(() => import("./DownloadsDialog-DvS23Dh-.js")), ki = 15;
3915
- function Ai(e) {
3991
+ var Di = S(() => import("use-weather-forecast").then((e) => ({ default: e.WeatherForecast }))), Oi = S(() => import("trending-news-api").then((e) => ({ default: e.TrendingNews }))), ki = S(() => import("education-playlists").then((e) => ({ default: e.EducationPlaylists }))), Ai = S(() => import("./DownloadsDialog-DvS23Dh-.js")), ji = 15;
3992
+ function Mi(e) {
3916
3993
  return e ? e.split(/[,\n]/).map((e) => e.trim()).filter(Boolean) : [];
3917
3994
  }
3918
- function ji(e) {
3995
+ function Ni(e) {
3919
3996
  return e ? e.split(/\r?\n/).map((e) => e.trim()).filter(Boolean).map((e) => {
3920
3997
  let t = e.split(",").map((e) => e.trim()), n = Number(t[t.length - 2]), r = Number(t[t.length - 1]);
3921
3998
  return t.length >= 2 && t[t.length - 2] !== "" && t[t.length - 1] !== "" && Number.isFinite(n) && Number.isFinite(r) ? {
@@ -3925,20 +4002,20 @@ function ji(e) {
3925
4002
  } : { label: e };
3926
4003
  }) : [];
3927
4004
  }
3928
- var Mi = (e) => e.endsWith(".webm") || e.endsWith(".mp4"), Ni = (e) => e.startsWith("blob:");
3929
- function Pi({ url: e, src: t }) {
3930
- return Mi(e) ? Promise.resolve(!0) : new Promise((e) => {
4005
+ var Pi = (e) => e.endsWith(".webm") || e.endsWith(".mp4"), Fi = (e) => e.startsWith("blob:");
4006
+ function Ii({ url: e, src: t }) {
4007
+ return Pi(e) ? Promise.resolve(!0) : new Promise((e) => {
3931
4008
  let n = new Image();
3932
4009
  n.decoding = "async", n.onload = () => e(!0), n.onerror = () => e(!1), n.src = t;
3933
4010
  });
3934
4011
  }
3935
- function Fi() {
3936
- let { sendMessage: e } = u(), n = o(), r = n ? (e) => n.openPanel(e.url, "", { suggestQuestions: !0 }) : void 0, [i, a] = O(null), [s, c] = O(null), [l, d] = O(!1), [f, p] = O(!1), [m, h] = O(!1), [g, _] = O([]), [v, b] = O(!0), [x, S] = O(5), [C, w] = O(12), [E, D] = O("fahrenheit"), [k, A] = O(null), [j, M] = O(!0), [N, I] = O(null), [L, R] = O(null), [z, B] = O([]), [V, H] = O("trending"), [ee, te] = O(null), [U, ne] = O(!0), [re, ie] = O(!1), [ae, oe] = O(!1), [se, ce] = O(!1), le = t.footerLinks.map((e) => e.url === "/#downloads" ? {
4012
+ function Li() {
4013
+ let { sendMessage: e } = u(), n = o(), r = n ? (e) => n.openPanel(e.url, "", { suggestQuestions: !0 }) : void 0, [i, a] = O(null), [s, c] = O(null), [l, d] = O(!1), [f, p] = O(!1), [m, h] = O(!1), [g, _] = O([]), [v, b] = O(!0), [x, S] = O(5), [C, w] = O(12), [E, D] = O("fahrenheit"), [k, A] = O(null), [j, M] = O(!0), [N, I] = O(null), [L, R] = O(null), [z, B] = O([]), [V, H] = O("trending"), [ee, te] = O(null), [U, ne] = O(!0), [re, ie] = O(!0), [ae, oe] = O(!0), W = t.homepageMascotUrl, [se, ce] = O(!1), [le, ue] = O(!1), [de, fe] = O(!1), pe = t.footerLinks.map((e) => e.url === "/#downloads" ? {
3937
4014
  ...e,
3938
4015
  onClick: () => {
3939
4016
  h(!0), p(!0);
3940
4017
  }
3941
- } : e), ue = k || t.trendingNewsApiUrl, de = ee?.enabled !== !1, fe = ee?.allowUserTopics === !1 ? [] : z, pe = N ?? ee?.maxTopics ?? 6, me = L ?? ee?.showImages ?? !0, he = j && de;
4018
+ } : e), me = k || t.trendingNewsApiUrl, he = ee?.enabled !== !1, ge = ee?.allowUserTopics === !1 ? [] : z, _e = N ?? ee?.maxTopics ?? 6, ve = L ?? ee?.showImages ?? !0, ye = j && he;
3942
4019
  T(() => {
3943
4020
  let e = t.trendingNewsSettingsUrl;
3944
4021
  if (!e) return;
@@ -3950,11 +4027,11 @@ function Fi() {
3950
4027
  };
3951
4028
  }, []), T(() => {
3952
4029
  let e = () => {
3953
- _(ji(localStorage.getItem("weatherLocations"))), b(localStorage.getItem("showWeatherWidget") !== "false"), S(Number(localStorage.getItem("weatherForecastDays")) || 5), w(Number(localStorage.getItem("weatherForecastHours")) || 12), D(localStorage.getItem("weatherTemperatureUnit") === "celsius" ? "celsius" : "fahrenheit"), A(localStorage.getItem("trendingNewsApiUrl")), M(localStorage.getItem("showTrendingNewsWidget") !== "false");
4030
+ _(Ni(localStorage.getItem("weatherLocations"))), b(localStorage.getItem("showWeatherWidget") !== "false"), S(Number(localStorage.getItem("weatherForecastDays")) || 5), w(Number(localStorage.getItem("weatherForecastHours")) || 12), D(localStorage.getItem("weatherTemperatureUnit") === "celsius" ? "celsius" : "fahrenheit"), A(localStorage.getItem("trendingNewsApiUrl")), M(localStorage.getItem("showTrendingNewsWidget") !== "false");
3954
4031
  let e = localStorage.getItem("trendingNewsMaxTopics");
3955
4032
  I(e && Number(e) || null);
3956
4033
  let t = localStorage.getItem("trendingNewsShowImages");
3957
- R(t === null ? null : t !== "false"), B(Ai(localStorage.getItem("trendingNewsCustomTopics"))), H(localStorage.getItem("trendingNewsSource") === "hckrnews" ? "hckrnews" : "trending"), ne(localStorage.getItem("showEducationPlaylistsWidget") !== "false"), oe(localStorage.getItem("orbHoverGlow") === "true"), ce(localStorage.getItem("cursorGlowTrail") === "true");
4034
+ R(t === null ? null : t !== "false"), B(Mi(localStorage.getItem("trendingNewsCustomTopics"))), H(localStorage.getItem("trendingNewsSource") === "hckrnews" ? "hckrnews" : "trending"), ne(localStorage.getItem("showEducationPlaylistsWidget") !== "false"), ie(localStorage.getItem("showMascotWidget") !== "false"), oe(localStorage.getItem("showBackgroundArt") !== "false"), ue(localStorage.getItem("orbHoverGlow") === "true"), fe(localStorage.getItem("cursorGlowTrail") === "true");
3958
4035
  };
3959
4036
  return e(), window.addEventListener("client-config-changed", e), window.addEventListener("storage", e), () => {
3960
4037
  window.removeEventListener("client-config-changed", e), window.removeEventListener("storage", e);
@@ -3962,10 +4039,10 @@ function Fi() {
3962
4039
  }, []), T(() => {
3963
4040
  let e, t = () => {
3964
4041
  if (typeof window.requestIdleCallback == "function") {
3965
- let t = window.requestIdleCallback(() => ie(!0), { timeout: 2500 });
4042
+ let t = window.requestIdleCallback(() => ce(!0), { timeout: 2500 });
3966
4043
  e = () => window.cancelIdleCallback(t);
3967
4044
  } else {
3968
- let t = window.setTimeout(() => ie(!0), 800);
4045
+ let t = window.setTimeout(() => ce(!0), 800);
3969
4046
  e = () => window.clearTimeout(t);
3970
4047
  }
3971
4048
  };
@@ -3974,25 +4051,25 @@ function Fi() {
3974
4051
  };
3975
4052
  }, []), T(() => {
3976
4053
  if (localStorage.getItem("showBackgroundArt") === "false") return;
3977
- let e = !1, t, n, r, i = null, o = null, s = /* @__PURE__ */ new Set(), l = (e) => (e && Ni(e.src) && s.add(e.src), e), u = (e) => {
3978
- e && Ni(e.src) && (URL.revokeObjectURL(e.src), s.delete(e.src));
3979
- }, f = async (t) => t ? e || !await Pi(t) ? (u(t), null) : t : null, p = async (e) => {
4054
+ let e = !1, t, n, r, i = null, o = null, s = /* @__PURE__ */ new Set(), l = (e) => (e && Fi(e.src) && s.add(e.src), e), u = (e) => {
4055
+ e && Fi(e.src) && (URL.revokeObjectURL(e.src), s.delete(e.src));
4056
+ }, f = async (t) => t ? e || !await Ii(t) ? (u(t), null) : t : null, p = async (e) => {
3980
4057
  if (!e) return null;
3981
- let t = await Ci(e);
4058
+ let t = await Ti(e);
3982
4059
  return f(l(t ? {
3983
4060
  url: e,
3984
4061
  src: t
3985
4062
  } : null));
3986
4063
  }, m = async (e) => {
3987
- let t = hi().length < 10 ? xi() : null;
4064
+ let t = _i().length < 10 ? Ci() : null;
3988
4065
  if (t) {
3989
- let e = await wi(t), n = await f(l(e ? {
4066
+ let e = await Ei(t), n = await f(l(e ? {
3990
4067
  url: t,
3991
4068
  src: e
3992
4069
  } : null));
3993
4070
  if (n) return n;
3994
4071
  }
3995
- return p(bi(e?.url));
4072
+ return p(Si(e?.url));
3996
4073
  }, h = (e) => {
3997
4074
  let t = i;
3998
4075
  i = e, t ? (c(e), d(!0), n = setTimeout(() => {
@@ -4003,7 +4080,7 @@ function Fi() {
4003
4080
  g = !0;
4004
4081
  let t = await (o ?? m(i));
4005
4082
  o = null, g = !1, e || (t && h(t), o = m(i));
4006
- }, v = p(bi()).then((t) => {
4083
+ }, v = p(Si()).then((t) => {
4007
4084
  t && !e && h(t);
4008
4085
  }), y = () => {
4009
4086
  v.then(() => {
@@ -4023,7 +4100,7 @@ function Fi() {
4023
4100
  for (let e of s) URL.revokeObjectURL(e);
4024
4101
  };
4025
4102
  }, []);
4026
- let ge = ({ url: e, src: t }, n) => Mi(e) ? /* @__PURE__ */ P("video", {
4103
+ let be = ({ url: e, src: t }, n) => Pi(e) ? /* @__PURE__ */ P("video", {
4027
4104
  src: t,
4028
4105
  autoPlay: !0,
4029
4106
  loop: !0,
@@ -4042,9 +4119,17 @@ function Fi() {
4042
4119
  /* @__PURE__ */ F("div", {
4043
4120
  className: "absolute inset-0 z-0",
4044
4121
  children: [
4045
- i && ge(i, l ? "opacity-0" : "opacity-30"),
4046
- s && ge(s, l ? "opacity-30" : "opacity-0"),
4047
- se && /* @__PURE__ */ P(Ht, {})
4122
+ i && be(i, l ? "opacity-0" : "opacity-30"),
4123
+ s && be(s, l ? "opacity-30" : "opacity-0"),
4124
+ se && ae && W && /* @__PURE__ */ P("img", {
4125
+ src: W,
4126
+ alt: "",
4127
+ "aria-hidden": !0,
4128
+ decoding: "async",
4129
+ "data-testid": "background-mascot",
4130
+ className: "pointer-events-none absolute right-4 bottom-0 hidden h-[60vh] max-h-[560px] w-auto object-contain object-bottom opacity-40 md:block"
4131
+ }),
4132
+ de && /* @__PURE__ */ P(Ht, {})
4048
4133
  ]
4049
4134
  }),
4050
4135
  /* @__PURE__ */ P("div", {
@@ -4059,7 +4144,7 @@ function Fi() {
4059
4144
  alignItems: "center",
4060
4145
  justifyContent: "center"
4061
4146
  },
4062
- className: ae ? void 0 : "pointer-events-none",
4147
+ className: le ? void 0 : "pointer-events-none",
4063
4148
  children: /* @__PURE__ */ P(kt, {
4064
4149
  autoRandomize: !0,
4065
4150
  onSphereClick: () => console.log("Sphere clicked"),
@@ -4070,12 +4155,23 @@ function Fi() {
4070
4155
  children: [
4071
4156
  /* @__PURE__ */ P(ii, {}),
4072
4157
  /* @__PURE__ */ P(Rr, {}),
4073
- re && (U || v || he) && /* @__PURE__ */ P(y, {
4158
+ se && (re && W || U || v || ye) && /* @__PURE__ */ P(y, {
4074
4159
  fallback: null,
4075
4160
  children: /* @__PURE__ */ F("div", {
4076
4161
  className: "flex flex-col gap-2 w-full",
4077
4162
  children: [
4078
- U && /* @__PURE__ */ P(Di, {
4163
+ re && W && /* @__PURE__ */ P(si, {
4164
+ src: W,
4165
+ onDismiss: () => ie(!1),
4166
+ className: "rounded-2xl w-full",
4167
+ style: {
4168
+ background: "rgba(255,255,255,0.08)",
4169
+ border: "1px solid rgba(255,255,255,0.15)",
4170
+ color: "inherit",
4171
+ backdropFilter: "blur(8px)"
4172
+ }
4173
+ }),
4174
+ U && /* @__PURE__ */ P(ki, {
4079
4175
  compact: !0,
4080
4176
  planEndpoint: t.educationPlaylistsApiUrl || void 0,
4081
4177
  openHref: t.educationPlaylistsPageUrl || void 0,
@@ -4089,16 +4185,16 @@ function Fi() {
4089
4185
  maxWidth: "100%"
4090
4186
  }
4091
4187
  }),
4092
- he && /* @__PURE__ */ P(Ei, {
4188
+ ye && /* @__PURE__ */ P(Oi, {
4093
4189
  compact: !0,
4094
4190
  expandable: !0,
4095
- maxTopics: pe,
4096
- expandedMaxTopics: ki,
4097
- showImages: me,
4098
- apiEndpoint: ue,
4099
- topics: fe,
4191
+ maxTopics: _e,
4192
+ expandedMaxTopics: ji,
4193
+ showImages: ve,
4194
+ apiEndpoint: me,
4195
+ topics: ge,
4100
4196
  source: V,
4101
- limit: ki,
4197
+ limit: ji,
4102
4198
  className: "rounded-2xl w-full",
4103
4199
  style: {
4104
4200
  background: "rgba(255,255,255,0.08)",
@@ -4108,7 +4204,7 @@ function Fi() {
4108
4204
  maxWidth: "100%"
4109
4205
  }
4110
4206
  }),
4111
- v && /* @__PURE__ */ P(Ti, {
4207
+ v && /* @__PURE__ */ P(Di, {
4112
4208
  compact: !0,
4113
4209
  forecastDays: x,
4114
4210
  forecastHours: C,
@@ -4125,24 +4221,24 @@ function Fi() {
4125
4221
  ]
4126
4222
  })
4127
4223
  }),
4128
- /* @__PURE__ */ P(ci, { listFooterLinks: le })
4224
+ /* @__PURE__ */ P(di, { listFooterLinks: pe })
4129
4225
  ]
4130
4226
  })]
4131
4227
  })
4132
4228
  }),
4133
4229
  m && /* @__PURE__ */ P(y, {
4134
4230
  fallback: null,
4135
- children: /* @__PURE__ */ P(Oi, {
4231
+ children: /* @__PURE__ */ P(Ai, {
4136
4232
  open: f,
4137
4233
  onOpenChange: p
4138
4234
  })
4139
4235
  }),
4140
- /* @__PURE__ */ P(ui, {})
4236
+ /* @__PURE__ */ P(pi, {})
4141
4237
  ]
4142
4238
  });
4143
4239
  }
4144
4240
  // src/ui/Loader.tsx
4145
- var Ii = () => /* @__PURE__ */ F("svg", {
4241
+ var Ri = () => /* @__PURE__ */ F("svg", {
4146
4242
  "aria-hidden": "true",
4147
4243
  className: "w-8 h-8 text-border fill-secondary animate-spin",
4148
4244
  viewBox: "0 0 100 101",
@@ -4157,7 +4253,7 @@ var Ii = () => /* @__PURE__ */ F("svg", {
4157
4253
  })]
4158
4254
  });
4159
4255
  // src/components/ConfigError.tsx
4160
- function Li() {
4256
+ function zi() {
4161
4257
  return /* @__PURE__ */ P("div", {
4162
4258
  className: "flex min-h-screen flex-col items-center justify-center p-8",
4163
4259
  children: /* @__PURE__ */ F("div", {
@@ -4274,15 +4370,15 @@ function Li() {
4274
4370
  });
4275
4371
  }
4276
4372
  // src/components/ChatConversation/ChatWindow.tsx
4277
- var Ri = () => import("./ChatConversationThread-BokwudCc.js"), zi = S(Ri), Bi = () => {
4373
+ var Bi = () => import("./ChatConversationThread-CNNOv4XP.js"), Vi = S(Bi), Hi = () => {
4278
4374
  let e = j(), { hasError: t, isReady: r, notFound: i, messages: a } = u(), { isAuthenticated: o } = n(), s = r && !i && a.length === 0;
4279
4375
  return T(() => {
4280
4376
  if (!s) return;
4281
4377
  if (typeof window.requestIdleCallback == "function") {
4282
- let e = window.requestIdleCallback(() => void Ri(), { timeout: 5e3 });
4378
+ let e = window.requestIdleCallback(() => void Bi(), { timeout: 5e3 });
4283
4379
  return () => window.cancelIdleCallback(e);
4284
4380
  }
4285
- let e = window.setTimeout(() => void Ri(), 3e3);
4381
+ let e = window.setTimeout(() => void Bi(), 3e3);
4286
4382
  return () => window.clearTimeout(e);
4287
4383
  }, [s]), T(() => {
4288
4384
  r && i && !o && e.replace("/");
@@ -4291,9 +4387,9 @@ var Ri = () => import("./ChatConversationThread-BokwudCc.js"), zi = S(Ri), Bi =
4291
4387
  i,
4292
4388
  o,
4293
4389
  e
4294
- ]), t ? /* @__PURE__ */ P(Li, {}) : r && i && !o ? /* @__PURE__ */ P("div", {
4390
+ ]), t ? /* @__PURE__ */ P(zi, {}) : r && i && !o ? /* @__PURE__ */ P("div", {
4295
4391
  className: "flex flex-row items-center justify-center min-h-screen",
4296
- children: /* @__PURE__ */ P(Ii, {})
4392
+ children: /* @__PURE__ */ P(Ri, {})
4297
4393
  }) : r ? i ? /* @__PURE__ */ F("div", {
4298
4394
  className: "flex min-h-screen flex-col items-center justify-center gap-3 px-4 text-center",
4299
4395
  children: [/* @__PURE__ */ P("p", {
@@ -4308,15 +4404,15 @@ var Ri = () => import("./ChatConversationThread-BokwudCc.js"), zi = S(Ri), Bi =
4308
4404
  }) : /* @__PURE__ */ P("div", { children: a.length > 0 ? /* @__PURE__ */ P(N, { children: /* @__PURE__ */ P(y, {
4309
4405
  fallback: /* @__PURE__ */ P("div", {
4310
4406
  className: "flex flex-row items-center justify-center min-h-screen",
4311
- children: /* @__PURE__ */ P(Ii, {})
4407
+ children: /* @__PURE__ */ P(Ri, {})
4312
4408
  }),
4313
- children: /* @__PURE__ */ P(zi, {})
4314
- }) }) : /* @__PURE__ */ P(Fi, {}) }) : /* @__PURE__ */ P("div", {
4409
+ children: /* @__PURE__ */ P(Vi, {})
4410
+ }) }) : /* @__PURE__ */ P(Li, {}) }) : /* @__PURE__ */ P("div", {
4315
4411
  className: "flex flex-row items-center justify-center min-h-screen",
4316
- children: /* @__PURE__ */ P(Ii, {})
4412
+ children: /* @__PURE__ */ P(Ri, {})
4317
4413
  });
4318
- }, Vi = "https://qwksearch.com", Hi = null, Ui = Vi, Wi = !1;
4319
- function Gi(e, t) {
4414
+ }, Ui = "https://qwksearch.com", Wi = null, Gi = Ui, Ki = !1;
4415
+ function qi(e, t) {
4320
4416
  let n;
4321
4417
  n = typeof e == "string" ? e : e instanceof URL ? e.href : e.url;
4322
4418
  try {
@@ -4326,32 +4422,32 @@ function Gi(e, t) {
4326
4422
  return !1;
4327
4423
  }
4328
4424
  }
4329
- function Ki() {
4330
- if (Wi || typeof window > "u" || typeof window.fetch != "function") return;
4331
- Wi = !0;
4425
+ function Ji() {
4426
+ if (Ki || typeof window > "u" || typeof window.fetch != "function") return;
4427
+ Ki = !0;
4332
4428
  let e = window.fetch.bind(window);
4333
4429
  window.fetch = (t, n) => {
4334
- if (!Hi || !Gi(t, Ui)) return e(t, n);
4430
+ if (!Wi || !qi(t, Gi)) return e(t, n);
4335
4431
  let r = new Headers(n?.headers ?? (t instanceof Request ? t.headers : void 0));
4336
- return !r.has("x-api-key") && !r.has("authorization") && r.set("X-API-Key", Hi), e(t, {
4432
+ return !r.has("x-api-key") && !r.has("authorization") && r.set("X-API-Key", Wi), e(t, {
4337
4433
  ...n,
4338
4434
  headers: r
4339
4435
  });
4340
4436
  };
4341
4437
  }
4342
- function qi(e, t = Vi) {
4343
- Hi = e || null, Ui = t.replace(/\/+$/, ""), Hi && Ki();
4438
+ function Yi(e, t = Ui) {
4439
+ Wi = e || null, Gi = t.replace(/\/+$/, ""), Wi && Ji();
4344
4440
  }
4345
- function Ji() {
4346
- return Hi;
4441
+ function Xi() {
4442
+ return Wi;
4347
4443
  }
4348
- function Yi(e, t) {
4444
+ function Zi(e, t) {
4349
4445
  let n = t ?? (typeof window < "u" ? `${window.location.pathname}${window.location.search}` : "/");
4350
4446
  return `${e}${e.includes("?") ? "&" : "?"}returnTo=${encodeURIComponent(n)}`;
4351
4447
  }
4352
- function Xi(e) {
4448
+ function Qi(e) {
4353
4449
  let t = e.qwksearchOrigin ?? "https://qwksearch.com", n = { connected: !1 }, r = /* @__PURE__ */ new Set(), i = (i) => {
4354
- n = i, qi(i.connected ? i.apiKey ?? null : null, t), e.onSession?.(i), r.forEach((e) => e());
4450
+ n = i, Yi(i.connected ? i.apiKey ?? null : null, t), e.onSession?.(i), r.forEach((e) => e());
4355
4451
  }, a = null, o = () => (a ??= fetch(e.sessionUrl, {
4356
4452
  credentials: "same-origin",
4357
4453
  headers: { Accept: "application/json" }
@@ -4368,7 +4464,7 @@ function Xi(e) {
4368
4464
  },
4369
4465
  oneTap: (e) => {},
4370
4466
  signIn: { social: (t) => {
4371
- typeof window < "u" && window.location.assign(Yi(e.connectUrl));
4467
+ typeof window < "u" && window.location.assign(Zi(e.connectUrl));
4372
4468
  } },
4373
4469
  signOut: async (t) => {
4374
4470
  try {
@@ -4384,14 +4480,14 @@ function Xi(e) {
4384
4480
  };
4385
4481
  }
4386
4482
  // src/components/ArticleReader/ArticlePanelHeader.tsx
4387
- var Zi = ({ onClose: e }) => /* @__PURE__ */ P("div", {
4483
+ var $i = ({ onClose: e }) => /* @__PURE__ */ P("div", {
4388
4484
  className: "flex items-center justify-between bg-secondary px-4 py-3 border-b border-border",
4389
4485
  children: /* @__PURE__ */ P("button", {
4390
4486
  onClick: e,
4391
4487
  className: "rounded-md p-1 hover:bg-accent transition-colors",
4392
- children: /* @__PURE__ */ P(rt, { className: "h-5 w-5" })
4488
+ children: /* @__PURE__ */ P(nt, { className: "h-5 w-5" })
4393
4489
  })
4394
- }), Qi = Ot("inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-2xl text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
4490
+ }), ea = Ot("inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-2xl text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
4395
4491
  variants: {
4396
4492
  variant: {
4397
4493
  default: "bg-primary text-primary-foreground hover:bg-primary/90",
@@ -4416,7 +4512,7 @@ var Zi = ({ onClose: e }) => /* @__PURE__ */ P("div", {
4416
4512
  function Q({ className: e, variant: t, size: n, asChild: r = !1, ...i }) {
4417
4513
  return /* @__PURE__ */ P(r ? Dt : "button", {
4418
4514
  "data-slot": "button",
4419
- className: h(Qi({
4515
+ className: h(ea({
4420
4516
  variant: t,
4421
4517
  size: n,
4422
4518
  className: e
@@ -4425,7 +4521,7 @@ function Q({ className: e, variant: t, size: n, asChild: r = !1, ...i }) {
4425
4521
  });
4426
4522
  }
4427
4523
  // src/components/ArticleReader/ArticleActionButtons.tsx
4428
- var $i = {
4524
+ var ta = {
4429
4525
  ask: {
4430
4526
  alt: !0,
4431
4527
  key: "a"
@@ -4466,12 +4562,12 @@ var $i = {
4466
4562
  alt: !1,
4467
4563
  key: "Escape"
4468
4564
  }
4469
- }, ea = typeof navigator < "u" && /Mac|iPhone|iPad|iPod/.test(navigator.platform || navigator.userAgent || "");
4470
- function ta(e) {
4471
- let { alt: t, key: n } = $i[e], r = n === "Escape" ? "Esc" : n.length === 1 ? n.toUpperCase() : n;
4472
- return t ? ea ? `⌥${r}` : `Alt+${r}` : r;
4565
+ }, na = typeof navigator < "u" && /Mac|iPhone|iPad|iPod/.test(navigator.platform || navigator.userAgent || "");
4566
+ function ra(e) {
4567
+ let { alt: t, key: n } = ta[e], r = n === "Escape" ? "Esc" : n.length === 1 ? n.toUpperCase() : n;
4568
+ return t ? na ? `⌥${r}` : `Alt+${r}` : r;
4473
4569
  }
4474
- var na = h("h-9 w-9 rounded-xl transition-all duration-200", "hover:bg-muted/80 hover:text-foreground text-muted-foreground"), $ = ({ label: e, action: t, children: n }) => /* @__PURE__ */ F(l, { children: [/* @__PURE__ */ P(s, {
4570
+ var ia = h("h-9 w-9 rounded-xl transition-all duration-200", "hover:bg-muted/80 hover:text-foreground text-muted-foreground"), $ = ({ label: e, action: t, children: n }) => /* @__PURE__ */ F(l, { children: [/* @__PURE__ */ P(s, {
4475
4571
  asChild: !0,
4476
4572
  children: n
4477
4573
  }), /* @__PURE__ */ P(a, {
@@ -4480,10 +4576,10 @@ var na = h("h-9 w-9 rounded-xl transition-all duration-200", "hover:bg-muted/80
4480
4576
  className: "flex items-center gap-1.5",
4481
4577
  children: [/* @__PURE__ */ P("span", { children: e }), t && /* @__PURE__ */ P("kbd", {
4482
4578
  className: "rounded bg-primary-foreground/20 px-1 py-0.5 text-[10px] font-semibold leading-none tracking-wide",
4483
- children: ta(t)
4579
+ children: ra(t)
4484
4580
  })]
4485
4581
  })
4486
- })] }), ra = ({ isLoadingAI: e, isLoadingFollowups: t, isLoadingFavorite: n, isFavorited: r, isHighlightMode: i, articleUrl: a, fontScale: o, onAskClick: s, onSuggestClick: c, onCopyClick: l, onShareClick: u, onFavoriteClick: d, onHighlightToggle: f, onZoomIn: p, onZoomOut: m, onZoomReset: g, onClose: _ }) => {
4582
+ })] }), aa = ({ isLoadingAI: e, isLoadingFollowups: t, isLoadingFavorite: n, isFavorited: r, isHighlightMode: i, articleUrl: a, fontScale: o, onAskClick: s, onSuggestClick: c, onCopyClick: l, onShareClick: u, onFavoriteClick: d, onHighlightToggle: f, onZoomIn: p, onZoomOut: m, onZoomReset: g, onClose: _ }) => {
4487
4583
  let v = p || m, y = Math.round((o ?? 1) * 100);
4488
4584
  return /* @__PURE__ */ F("div", {
4489
4585
  className: "flex flex-nowrap items-center gap-1 rounded-2xl border border-muted bg-gradient-to-b from-background to-muted/30 p-1 shadow-sm",
@@ -4512,7 +4608,7 @@ var na = h("h-9 w-9 rounded-xl transition-all duration-200", "hover:bg-muted/80
4512
4608
  variant: "ghost",
4513
4609
  size: "sm",
4514
4610
  className: h("flex items-center gap-2 px-3 h-9 rounded-xl transition-all duration-200", "hover:bg-muted/80 hover:text-foreground text-muted-foreground"),
4515
- children: [/* @__PURE__ */ P(Pe, { className: "size-4" }), /* @__PURE__ */ P("span", {
4611
+ children: [/* @__PURE__ */ P(Ne, { className: "size-4" }), /* @__PURE__ */ P("span", {
4516
4612
  className: "font-medium",
4517
4613
  children: "Suggest"
4518
4614
  })]
@@ -4525,8 +4621,8 @@ var na = h("h-9 w-9 rounded-xl transition-all duration-200", "hover:bg-muted/80
4525
4621
  onClick: l,
4526
4622
  variant: "ghost",
4527
4623
  size: "icon",
4528
- className: na,
4529
- children: /* @__PURE__ */ P(se, { className: "size-4" })
4624
+ className: ia,
4625
+ children: /* @__PURE__ */ P(W, { className: "size-4" })
4530
4626
  })
4531
4627
  }),
4532
4628
  /* @__PURE__ */ P($, {
@@ -4535,8 +4631,8 @@ var na = h("h-9 w-9 rounded-xl transition-all duration-200", "hover:bg-muted/80
4535
4631
  onClick: u,
4536
4632
  variant: "ghost",
4537
4633
  size: "icon",
4538
- className: na,
4539
- children: /* @__PURE__ */ P(Ge, { className: "size-4" })
4634
+ className: ia,
4635
+ children: /* @__PURE__ */ P(We, { className: "size-4" })
4540
4636
  })
4541
4637
  }),
4542
4638
  /* @__PURE__ */ P($, {
@@ -4547,7 +4643,7 @@ var na = h("h-9 w-9 rounded-xl transition-all duration-200", "hover:bg-muted/80
4547
4643
  variant: "ghost",
4548
4644
  size: "icon",
4549
4645
  className: h("h-9 w-9 rounded-xl transition-all duration-200", i ? "text-yellow-500 bg-yellow-50 dark:bg-yellow-950/30 hover:bg-yellow-100 dark:hover:bg-yellow-950/50" : "hover:bg-muted/80 hover:text-foreground text-muted-foreground"),
4550
- children: /* @__PURE__ */ P(we, { className: "size-4" })
4646
+ children: /* @__PURE__ */ P(Ce, { className: "size-4" })
4551
4647
  })
4552
4648
  }),
4553
4649
  /* @__PURE__ */ P($, {
@@ -4559,7 +4655,7 @@ var na = h("h-9 w-9 rounded-xl transition-all duration-200", "hover:bg-muted/80
4559
4655
  variant: "ghost",
4560
4656
  size: "icon",
4561
4657
  className: h("h-9 w-9 rounded-xl transition-all duration-200", r ? "text-yellow-500 hover:text-yellow-600 hover:bg-yellow-50 dark:hover:bg-yellow-950/30" : "hover:bg-muted/80 hover:text-foreground text-muted-foreground"),
4562
- children: /* @__PURE__ */ P(Xe, { className: h("size-4", r && "fill-yellow-400") })
4658
+ children: /* @__PURE__ */ P(Ye, { className: h("size-4", r && "fill-yellow-400") })
4563
4659
  })
4564
4660
  }),
4565
4661
  a && /* @__PURE__ */ P($, {
@@ -4569,12 +4665,12 @@ var na = h("h-9 w-9 rounded-xl transition-all duration-200", "hover:bg-muted/80
4569
4665
  asChild: !0,
4570
4666
  variant: "ghost",
4571
4667
  size: "icon",
4572
- className: na,
4668
+ className: ia,
4573
4669
  children: /* @__PURE__ */ P("a", {
4574
4670
  href: a,
4575
4671
  target: "_blank",
4576
4672
  rel: "noopener noreferrer",
4577
- children: /* @__PURE__ */ P(me, { className: "size-4" })
4673
+ children: /* @__PURE__ */ P(pe, { className: "size-4" })
4578
4674
  })
4579
4675
  })
4580
4676
  }),
@@ -4589,7 +4685,7 @@ var na = h("h-9 w-9 rounded-xl transition-all duration-200", "hover:bg-muted/80
4589
4685
  variant: "ghost",
4590
4686
  size: "icon",
4591
4687
  className: "h-8 w-8 rounded-lg text-muted-foreground transition-all duration-200 hover:bg-muted/80 hover:text-foreground",
4592
- children: /* @__PURE__ */ P(at, { className: "size-4" })
4688
+ children: /* @__PURE__ */ P(it, { className: "size-4" })
4593
4689
  })
4594
4690
  }),
4595
4691
  /* @__PURE__ */ P($, {
@@ -4610,7 +4706,7 @@ var na = h("h-9 w-9 rounded-xl transition-all duration-200", "hover:bg-muted/80
4610
4706
  variant: "ghost",
4611
4707
  size: "icon",
4612
4708
  className: "h-8 w-8 rounded-lg text-muted-foreground transition-all duration-200 hover:bg-muted/80 hover:text-foreground",
4613
- children: /* @__PURE__ */ P(it, { className: "size-4" })
4709
+ children: /* @__PURE__ */ P(rt, { className: "size-4" })
4614
4710
  })
4615
4711
  })
4616
4712
  ]
@@ -4622,13 +4718,13 @@ var na = h("h-9 w-9 rounded-xl transition-all duration-200", "hover:bg-muted/80
4622
4718
  onClick: _,
4623
4719
  variant: "ghost",
4624
4720
  size: "icon",
4625
- className: h(na, !v && "ml-auto"),
4626
- children: /* @__PURE__ */ P(rt, { className: "size-4" })
4721
+ className: h(ia, !v && "ml-auto"),
4722
+ children: /* @__PURE__ */ P(nt, { className: "size-4" })
4627
4723
  })
4628
4724
  })
4629
4725
  ]
4630
4726
  });
4631
- }, ia = ({ value: e, onChange: t, onSubmit: n }) => /* @__PURE__ */ P("div", {
4727
+ }, oa = ({ value: e, onChange: t, onSubmit: n }) => /* @__PURE__ */ P("div", {
4632
4728
  className: "relative",
4633
4729
  children: /* @__PURE__ */ P("input", {
4634
4730
  value: e,
@@ -4638,7 +4734,7 @@ var na = h("h-9 w-9 rounded-xl transition-all duration-200", "hover:bg-muted/80
4638
4734
  placeholder: "Ask AI any question...",
4639
4735
  className: "w-full px-3 py-2 text-sm rounded-md border border-input bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-ring"
4640
4736
  })
4641
- }), aa = ({ questions: e, isLoading: n, error: r, onQuestionClick: i }) => {
4737
+ }), sa = ({ questions: e, isLoading: n, error: r, onQuestionClick: i }) => {
4642
4738
  let a = v.useMemo(() => {
4643
4739
  let t = [];
4644
4740
  return e.forEach((e) => {
@@ -4675,7 +4771,7 @@ var na = h("h-9 w-9 rounded-xl transition-all duration-200", "hover:bg-muted/80
4675
4771
  children: r
4676
4772
  })
4677
4773
  ] });
4678
- }, oa = ({ response: e, isLoading: t, error: n }) => /* @__PURE__ */ F(N, { children: [
4774
+ }, ca = ({ response: e, isLoading: t, error: n }) => /* @__PURE__ */ F(N, { children: [
4679
4775
  t && /* @__PURE__ */ P("div", {
4680
4776
  className: "flex justify-center",
4681
4777
  children: /* @__PURE__ */ P("div", { className: "animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500" })
@@ -4689,7 +4785,7 @@ var na = h("h-9 w-9 rounded-xl transition-all duration-200", "hover:bg-muted/80
4689
4785
  className: "bg-red-500 text-white p-2 rounded-md text-sm",
4690
4786
  children: n
4691
4787
  })
4692
- ] }), sa = ({ html: e, isHighlightMode: t = !1, fontScale: n = 1 }) => {
4788
+ ] }), la = ({ html: e, isHighlightMode: t = !1, fontScale: n = 1 }) => {
4693
4789
  let [r, i] = O("");
4694
4790
  return T(() => {
4695
4791
  i(At.sanitize(e || "", {
@@ -4712,7 +4808,7 @@ var na = h("h-9 w-9 rounded-xl transition-all duration-200", "hover:bg-muted/80
4712
4808
  },
4713
4809
  dangerouslySetInnerHTML: { __html: r }
4714
4810
  });
4715
- }, ca = ({ article: e, isHighlightMode: t, fontScale: n = 1 }) => /* @__PURE__ */ P("div", {
4811
+ }, ua = ({ article: e, isHighlightMode: t, fontScale: n = 1 }) => /* @__PURE__ */ P("div", {
4716
4812
  className: "border-t border-border pt-6",
4717
4813
  children: /* @__PURE__ */ F("div", { children: [
4718
4814
  /* @__PURE__ */ P("div", { className: "flex items-start justify-between mb-2" }),
@@ -4733,24 +4829,24 @@ var na = h("h-9 w-9 rounded-xl transition-all duration-200", "hover:bg-muted/80
4733
4829
  }),
4734
4830
  /* @__PURE__ */ P("div", {
4735
4831
  id: "article-content",
4736
- children: /* @__PURE__ */ P(sa, {
4832
+ children: /* @__PURE__ */ P(la, {
4737
4833
  html: e.html || "",
4738
4834
  isHighlightMode: t,
4739
4835
  fontScale: n
4740
4836
  })
4741
4837
  })
4742
4838
  ] })
4743
- }), la = /(?:https?:\/\/)?(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*)/g, ua = /[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/g;
4744
- function da(e) {
4839
+ }), da = /(?:https?:\/\/)?(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*)/g, fa = /[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/g;
4840
+ function pa(e) {
4745
4841
  return e.includes("](") || e.includes(")[") ? !1 : /\.(com|org|net|io|dev|co|uk|de|fr|it|es|jp|cn|in|br|au|ca|us|gov|edu|mil|int|xyz|info|app|tech|online|site|website|store|shop|blog|news|tv|me|cc|ws|name|mobi|asia|tel|travel|jobs|pro|museum|coop|aero|arpa|biz|cat|jobs|post|tel|xxx|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw)(?:\/|$)/i.test(e);
4746
4842
  }
4747
- function fa(e) {
4843
+ function ma(e) {
4748
4844
  return /^https?:\/\//i.test(e) ? e : `https://${e}`;
4749
4845
  }
4750
- function pa(e) {
4846
+ function ha(e) {
4751
4847
  if (!e || typeof e != "string") return e;
4752
4848
  let t = e, n = [], r;
4753
- for (ua.lastIndex = 0; (r = ua.exec(t)) !== null;) {
4849
+ for (fa.lastIndex = 0; (r = fa.exec(t)) !== null;) {
4754
4850
  let e = r[0], i = r.index, a = t.substring(0, i), o = t.substring(i + e.length);
4755
4851
  !a.endsWith("](") && !o.startsWith(")") && n.push({
4756
4852
  email: e,
@@ -4762,9 +4858,9 @@ function pa(e) {
4762
4858
  t = t.substring(0, i) + `[${r}](mailto:${r})` + t.substring(i + r.length);
4763
4859
  }
4764
4860
  let i = [], a;
4765
- for (la.lastIndex = 0; (a = la.exec(t)) !== null;) {
4861
+ for (da.lastIndex = 0; (a = da.exec(t)) !== null;) {
4766
4862
  let e = a[0], n = a.index;
4767
- if (ua.test(e)) continue;
4863
+ if (fa.test(e)) continue;
4768
4864
  let r = t.substring(0, n), o = t.substring(n + e.length);
4769
4865
  if (r.endsWith("](") || o.startsWith(")") || (r.match(/```/g) || []).length % 2 != 0) continue;
4770
4866
  let s = r.lastIndexOf("`");
@@ -4772,22 +4868,22 @@ function pa(e) {
4772
4868
  let e = t.substring(s + 1).indexOf("`");
4773
4869
  if (e !== -1 && e > n - s - 1) continue;
4774
4870
  }
4775
- da(e) && i.push({
4871
+ pa(e) && i.push({
4776
4872
  url: e,
4777
4873
  index: n
4778
4874
  });
4779
4875
  }
4780
4876
  for (let e = i.length - 1; e >= 0; e--) {
4781
- let { url: n, index: r } = i[e], a = fa(n);
4877
+ let { url: n, index: r } = i[e], a = ma(n);
4782
4878
  t = t.substring(0, r) + `[${n}](${a})` + t.substring(r + n.length);
4783
4879
  }
4784
4880
  return t;
4785
4881
  }
4786
4882
  // src/components/ArticleReader/unified-markdown.tsx
4787
- function ma(e) {
4883
+ function ga(e) {
4788
4884
  return !e || e.startsWith("http://") || e.startsWith("https://") || e.includes("://") ? !1 : e.startsWith("/") || e.startsWith("#");
4789
4885
  }
4790
- function ha(e, t) {
4886
+ function _a(e, t) {
4791
4887
  if (t.startsWith("#")) {
4792
4888
  e.preventDefault();
4793
4889
  let n = t.substring(1), r = document.getElementById(n);
@@ -4797,7 +4893,7 @@ function ha(e, t) {
4797
4893
  });
4798
4894
  }
4799
4895
  }
4800
- function ga({ code: e }) {
4896
+ function va({ code: e }) {
4801
4897
  let [t, n] = O(!1), r = C(async () => {
4802
4898
  try {
4803
4899
  await navigator.clipboard.writeText(e), n(!0), setTimeout(() => n(!1), 2e3);
@@ -4809,10 +4905,10 @@ function ga({ code: e }) {
4809
4905
  onClick: r,
4810
4906
  className: h("absolute top-3 right-3 p-1.5 rounded-md", "opacity-0 group-hover:opacity-100 transition-opacity duration-150", "bg-zinc-200/80 hover:bg-zinc-300 dark:bg-zinc-700/80 dark:hover:bg-zinc-600", "text-zinc-600 hover:text-zinc-800 dark:text-zinc-400 dark:hover:text-zinc-200", "focus:outline-none focus:ring-1 focus:ring-zinc-400 dark:focus:ring-zinc-500"),
4811
4907
  "aria-label": t ? "Copied!" : "Copy code",
4812
- children: t ? /* @__PURE__ */ P(re, { className: "h-4 w-4 text-green-600 dark:text-green-400" }) : /* @__PURE__ */ P(de, { className: "h-4 w-4" })
4908
+ children: t ? /* @__PURE__ */ P(re, { className: "h-4 w-4 text-green-600 dark:text-green-400" }) : /* @__PURE__ */ P(ue, { className: "h-4 w-4" })
4813
4909
  });
4814
4910
  }
4815
- function _a({ children: e }) {
4911
+ function ya({ children: e }) {
4816
4912
  let t = D(null), [n, r] = O("");
4817
4913
  return T(() => {
4818
4914
  if (t.current) {
@@ -4828,15 +4924,15 @@ function _a({ children: e }) {
4828
4924
  ref: t,
4829
4925
  className: h("p-4 rounded-xl overflow-x-auto", "bg-zinc-100 dark:bg-zinc-900", "border border-zinc-200 dark:border-zinc-800", "text-[13px] font-mono leading-relaxed", "text-zinc-800 dark:text-zinc-200", "[&_code]:bg-transparent [&_code]:text-inherit [&_code]:p-0"),
4830
4926
  children: e
4831
- }), n && /* @__PURE__ */ P(ga, { code: n })]
4927
+ }), n && /* @__PURE__ */ P(va, { code: n })]
4832
4928
  });
4833
4929
  }
4834
- var va = v.memo(({ content: e, className: t, isStreaming: n = !1 }) => {
4930
+ var ba = v.memo(({ content: e, className: t, isStreaming: n = !1 }) => {
4835
4931
  if (!e) return /* @__PURE__ */ P("div", {
4836
4932
  className: h("text-muted-foreground text-sm", t),
4837
4933
  children: "No content"
4838
4934
  });
4839
- let r = pa(e);
4935
+ let r = ha(e);
4840
4936
  return /* @__PURE__ */ P("div", {
4841
4937
  className: h("kortix-markdown", t),
4842
4938
  children: /* @__PURE__ */ P(jt, {
@@ -4883,10 +4979,10 @@ var va = v.memo(({ content: e, className: t, isStreaming: n = !1 }) => {
4883
4979
  children: e
4884
4980
  }),
4885
4981
  a: ({ href: e, children: t }) => {
4886
- let n = ma(e), r = e?.startsWith("#"), i = h("font-medium text-foreground", "underline decoration-foreground/30 underline-offset-[3px] decoration-[1px]", "hover:decoration-foreground/60 transition-colors duration-150");
4982
+ let n = ga(e), r = e?.startsWith("#"), i = h("font-medium text-foreground", "underline decoration-foreground/30 underline-offset-[3px] decoration-[1px]", "hover:decoration-foreground/60 transition-colors duration-150");
4887
4983
  return r ? /* @__PURE__ */ P("a", {
4888
4984
  href: e,
4889
- onClick: (t) => ha(t, e),
4985
+ onClick: (t) => _a(t, e),
4890
4986
  className: i,
4891
4987
  children: t
4892
4988
  }) : n ? /* @__PURE__ */ P(Et, {
@@ -4908,7 +5004,7 @@ var va = v.memo(({ content: e, className: t, isStreaming: n = !1 }) => {
4908
5004
  className: "px-2 py-1 rounded-md text-[13px] font-mono bg-card dark:bg-[#161618] border border-neutral-200 dark:border-neutral-700/50 text-foreground",
4909
5005
  children: e
4910
5006
  }),
4911
- pre: ({ children: e }) => /* @__PURE__ */ P(_a, { children: e }),
5007
+ pre: ({ children: e }) => /* @__PURE__ */ P(ya, { children: e }),
4912
5008
  blockquote: ({ children: e }) => /* @__PURE__ */ P("blockquote", {
4913
5009
  className: h("my-5 pl-4 py-1 text-sm", "border-l-2 border-border", "text-muted-foreground", "[&>p]:my-2"),
4914
5010
  children: e
@@ -4989,17 +5085,17 @@ var va = v.memo(({ content: e, className: t, isStreaming: n = !1 }) => {
4989
5085
  })
4990
5086
  });
4991
5087
  });
4992
- va.displayName = "UnifiedMarkdown";
5088
+ ba.displayName = "UnifiedMarkdown";
4993
5089
  // src/app/MainViewProvider.tsx
4994
- var ya = b(null), ba = "qwksearch-main-view";
4995
- function xa({ children: e, docsEnabled: t = !0 }) {
5090
+ var xa = b(null), Sa = "qwksearch-main-view";
5091
+ function Ca({ children: e, docsEnabled: t = !0 }) {
4996
5092
  let [n, r] = O("research"), [i, a] = O(0), o = C((e) => r(t ? e : "research"), [t]);
4997
5093
  T(() => {
4998
5094
  if (typeof window > "u" || !t) return;
4999
- let e = window.localStorage.getItem(ba);
5095
+ let e = window.localStorage.getItem(Sa);
5000
5096
  (e === "research" || e === "docs") && r(e);
5001
5097
  }, [t]), T(() => {
5002
- typeof window < "u" && t && window.localStorage.setItem(ba, n);
5098
+ typeof window < "u" && t && window.localStorage.setItem(Sa, n);
5003
5099
  }, [n, t]);
5004
5100
  let s = E(() => ({
5005
5101
  activeView: n,
@@ -5015,12 +5111,12 @@ function xa({ children: e, docsEnabled: t = !0 }) {
5015
5111
  t,
5016
5112
  i
5017
5113
  ]);
5018
- return /* @__PURE__ */ P(ya.Provider, {
5114
+ return /* @__PURE__ */ P(xa.Provider, {
5019
5115
  value: s,
5020
5116
  children: e
5021
5117
  });
5022
5118
  }
5023
- var Sa = Object.freeze({
5119
+ var wa = Object.freeze({
5024
5120
  activeView: "research",
5025
5121
  setActiveView: () => {},
5026
5122
  docsEnabled: !1,
@@ -5028,12 +5124,12 @@ var Sa = Object.freeze({
5028
5124
  toggleToResearch: () => {},
5029
5125
  filesSidebarRequestId: 0,
5030
5126
  requestFilesSidebar: () => {}
5031
- }), Ca = !1;
5032
- function wa() {
5033
- return w(ya) || (!Ca && process.env.NODE_ENV !== "production" && (Ca = !0, console.error("useMainView was called outside a MainViewProvider. The component is rendering with view switching disabled — mount it inside MainViewProvider (see QwkSearchProviders).")), Sa);
5127
+ }), Ta = !1;
5128
+ function Ea() {
5129
+ return w(xa) || (!Ta && process.env.NODE_ENV !== "production" && (Ta = !0, console.error("useMainView was called outside a MainViewProvider. The component is rendering with view switching disabled — mount it inside MainViewProvider (see QwkSearchProviders).")), wa);
5034
5130
  }
5035
5131
  // src/settings/sections.json
5036
- var Ta = [
5132
+ var Da = [
5037
5133
  {
5038
5134
  key: "account",
5039
5135
  name: "Account",
@@ -5097,24 +5193,24 @@ var Ta = [
5097
5193
  icon: "Volume2",
5098
5194
  dataAdd: "voice"
5099
5195
  }
5100
- ], Ea = [
5196
+ ], Oa = [
5101
5197
  {
5102
5198
  key: "webSearch",
5103
5199
  title: "All",
5104
5200
  description: "Searches across all of the internet",
5105
- icon: /* @__PURE__ */ P(Se, { size: 16 })
5201
+ icon: /* @__PURE__ */ P(xe, { size: 16 })
5106
5202
  },
5107
5203
  {
5108
5204
  key: "academicSearch",
5109
5205
  title: "Academic",
5110
5206
  description: "Search in published academic papers",
5111
- icon: /* @__PURE__ */ P(Qe, { size: 16 })
5207
+ icon: /* @__PURE__ */ P(Ze, { size: 16 })
5112
5208
  },
5113
5209
  {
5114
5210
  key: "writingAssistant",
5115
5211
  title: "Writing",
5116
5212
  description: "Chat without searching the web",
5117
- icon: /* @__PURE__ */ P(ze, { size: 16 })
5213
+ icon: /* @__PURE__ */ P(Re, { size: 16 })
5118
5214
  },
5119
5215
  {
5120
5216
  key: "wolframAlphaSearch",
@@ -5134,7 +5230,7 @@ var Ta = [
5134
5230
  description: "Search for discussions and opinions",
5135
5231
  icon: /* @__PURE__ */ P(Mt, { className: "h-[16px] w-auto mr-0.5" })
5136
5232
  }
5137
- ], Da = [
5233
+ ], ka = [
5138
5234
  {
5139
5235
  href: "/",
5140
5236
  label: "Research",
@@ -5192,9 +5288,9 @@ var Ta = [
5192
5288
  }
5193
5289
  ];
5194
5290
  // src/components/SpotlightPalette/spotlightItems.ts
5195
- function Oa(e) {
5196
- let t = (e) => e === "/" ? He : e === "/workspace" ? ye : e === "/settings" ? Ue : e === "/docs" ? ee : De;
5197
- return Da.filter((t) => !t.docsOnly || e.docsEnabled).map((n) => ({
5291
+ function Aa(e) {
5292
+ let t = (e) => e === "/" ? Ve : e === "/workspace" ? ve : e === "/settings" ? He : e === "/docs" ? ee : Ee;
5293
+ return ka.filter((t) => !t.docsOnly || e.docsEnabled).map((n) => ({
5198
5294
  id: `page:${n.href}`,
5199
5295
  source: "page",
5200
5296
  name: n.label,
@@ -5204,7 +5300,7 @@ function Oa(e) {
5204
5300
  run: () => e.navigate(n.href)
5205
5301
  }));
5206
5302
  }
5207
- function ka(e, t) {
5303
+ function ja(e, t) {
5208
5304
  let n = /* @__PURE__ */ new Date();
5209
5305
  return e.map((e) => ({
5210
5306
  id: `chat:${e.id}`,
@@ -5212,23 +5308,23 @@ function ka(e, t) {
5212
5308
  name: e.title || "Untitled chat",
5213
5309
  meta: `${e.messageCount ?? 0} question${(e.messageCount ?? 0) === 1 ? "" : "s"}`,
5214
5310
  keywords: e.focusMode ?? "",
5215
- icon: Fe,
5311
+ icon: Pe,
5216
5312
  hint: f(n, e.lastMessageAt || e.createdAt),
5217
5313
  run: () => t.openChat(e.id)
5218
5314
  }));
5219
5315
  }
5220
- function Aa(e) {
5221
- return Ta.map((t) => ({
5316
+ function Ma(e) {
5317
+ return Da.map((t) => ({
5222
5318
  id: `setting:${t.key}`,
5223
5319
  source: "setting",
5224
5320
  name: t.name,
5225
5321
  meta: t.description,
5226
5322
  keywords: `settings ${t.key}`,
5227
- icon: Ke,
5323
+ icon: Ge,
5228
5324
  run: () => e.openSettings(t.key)
5229
5325
  }));
5230
5326
  }
5231
- function ja(e) {
5327
+ function Na(e) {
5232
5328
  let t = [
5233
5329
  {
5234
5330
  id: "action:new-chat",
@@ -5236,7 +5332,7 @@ function ja(e) {
5236
5332
  name: "New chat",
5237
5333
  meta: "Start a fresh conversation",
5238
5334
  keywords: "clear reset blank",
5239
- icon: Ve,
5335
+ icon: Be,
5240
5336
  run: e.newChat
5241
5337
  },
5242
5338
  {
@@ -5245,7 +5341,7 @@ function ja(e) {
5245
5341
  name: "Open settings",
5246
5342
  meta: "Models, connectors, search sources and preferences",
5247
5343
  keywords: "preferences configure",
5248
- icon: Ue,
5344
+ icon: He,
5249
5345
  run: () => e.openSettings()
5250
5346
  },
5251
5347
  {
@@ -5254,18 +5350,18 @@ function ja(e) {
5254
5350
  name: e.incognito ? "Turn off incognito" : "Turn on incognito",
5255
5351
  meta: "Stop saving this conversation to history",
5256
5352
  keywords: "private incognito history off",
5257
- icon: he,
5353
+ icon: me,
5258
5354
  hint: e.incognito ? "on" : "off",
5259
5355
  run: () => e.setIncognito(!e.incognito)
5260
5356
  }
5261
5357
  ];
5262
- for (let n of Ea) t.push({
5358
+ for (let n of Oa) t.push({
5263
5359
  id: `action:focus:${n.key}`,
5264
5360
  source: "action",
5265
5361
  name: `Focus: ${n.title}`,
5266
5362
  meta: n.description,
5267
5363
  keywords: `focus mode ${n.key}`,
5268
- icon: Se,
5364
+ icon: xe,
5269
5365
  hint: e.focusMode === n.key ? "current" : void 0,
5270
5366
  run: () => e.setFocusMode(n.key)
5271
5367
  });
@@ -5275,7 +5371,7 @@ function ja(e) {
5275
5371
  name: "Switch to documents",
5276
5372
  meta: "Open the REASON editor view",
5277
5373
  keywords: "reason editor write docs",
5278
- icon: ye,
5374
+ icon: ve,
5279
5375
  run: () => e.setActiveView("docs")
5280
5376
  }, {
5281
5377
  id: "action:view-research",
@@ -5283,7 +5379,7 @@ function ja(e) {
5283
5379
  name: "Switch to research",
5284
5380
  meta: "Back to the search and chat view",
5285
5381
  keywords: "chat search",
5286
- icon: He,
5382
+ icon: Ve,
5287
5383
  run: () => e.setActiveView("research")
5288
5384
  }, {
5289
5385
  id: "action:files-sidebar",
@@ -5291,7 +5387,7 @@ function ja(e) {
5291
5387
  name: "Show files sidebar",
5292
5388
  meta: "Browse REASON documents",
5293
5389
  keywords: "files documents sidebar",
5294
- icon: ye,
5390
+ icon: ve,
5295
5391
  run: () => {
5296
5392
  e.setActiveView("docs"), e.requestFilesSidebar();
5297
5393
  }
@@ -5301,7 +5397,7 @@ function ja(e) {
5301
5397
  name: "Sign out",
5302
5398
  meta: "End this session",
5303
5399
  keywords: "logout log out",
5304
- icon: je,
5400
+ icon: Ae,
5305
5401
  run: e.signOut
5306
5402
  } : {
5307
5403
  id: "action:sign-in",
@@ -5309,24 +5405,24 @@ function ja(e) {
5309
5405
  name: "Sign in",
5310
5406
  meta: "Sync chats and settings across devices",
5311
5407
  keywords: "login log in account",
5312
- icon: Ae,
5408
+ icon: ke,
5313
5409
  run: e.signIn
5314
5410
  }), t;
5315
5411
  }
5316
- function Ma(e, t) {
5412
+ function Pa(e, t) {
5317
5413
  let n = e.trim();
5318
5414
  return n ? {
5319
5415
  id: "search:ask",
5320
5416
  source: "search",
5321
5417
  name: n,
5322
5418
  meta: `Ask ${t.appName} — searches the web and answers with sources`,
5323
- icon: qe,
5419
+ icon: Ke,
5324
5420
  hint: "Enter",
5325
5421
  run: () => t.ask(n)
5326
5422
  } : null;
5327
5423
  }
5328
5424
  // src/components/SpotlightPalette/spotlightMatch.ts
5329
- var Na = [
5425
+ var Fa = [
5330
5426
  {
5331
5427
  prefix: "c",
5332
5428
  source: "chat",
@@ -5353,10 +5449,10 @@ var Na = [
5353
5449
  label: "web"
5354
5450
  }
5355
5451
  ];
5356
- function Pa(e) {
5452
+ function Ia(e) {
5357
5453
  let t = e.match(/^([a-zA-Z])\s+(.*)$/);
5358
5454
  if (t) {
5359
- let e = t[1].toLowerCase(), n = Na.find((t) => t.prefix === e);
5455
+ let e = t[1].toLowerCase(), n = Fa.find((t) => t.prefix === e);
5360
5456
  if (n) return {
5361
5457
  prefix: n.prefix,
5362
5458
  query: t[2]
@@ -5367,11 +5463,11 @@ function Pa(e) {
5367
5463
  query: e
5368
5464
  };
5369
5465
  }
5370
- var Fa = 18;
5371
- function Ia(e) {
5466
+ var La = 18;
5467
+ function Ra(e) {
5372
5468
  return `${e.meta ?? ""} ${e.keywords ?? ""}`.toLowerCase();
5373
5469
  }
5374
- function La(e, t) {
5470
+ function za(e, t) {
5375
5471
  let n = t.toLowerCase().split(/\s+/).filter(Boolean);
5376
5472
  if (n.length === 0) return e.map((e) => ({
5377
5473
  item: e,
@@ -5383,7 +5479,7 @@ function La(e, t) {
5383
5479
  let e = t.name.toLowerCase();
5384
5480
  if (n.every((t) => e.includes(t))) r.push(t);
5385
5481
  else {
5386
- let r = `${e} ${Ia(t)}`;
5482
+ let r = `${e} ${Ra(t)}`;
5387
5483
  n.every((e) => r.includes(e)) && i.push(t);
5388
5484
  }
5389
5485
  }
@@ -5395,32 +5491,32 @@ function La(e, t) {
5395
5491
  })), ...i.map((e) => ({
5396
5492
  item: e,
5397
5493
  matchedName: !1,
5398
- snippet: Ra(Ia(e), a)
5494
+ snippet: Ba(Ra(e), a)
5399
5495
  }))];
5400
5496
  }
5401
- function Ra(e, t) {
5497
+ function Ba(e, t) {
5402
5498
  let n = e.indexOf(t);
5403
5499
  if (n < 0) return "";
5404
- let r = Math.max(0, n - Fa), i = Math.min(e.length, n + t.length + Fa), a = e.slice(r, i).replace(/\s+/g, " ").trim();
5500
+ let r = Math.max(0, n - La), i = Math.min(e.length, n + t.length + La), a = e.slice(r, i).replace(/\s+/g, " ").trim();
5405
5501
  return r > 0 && (a = "…" + a), i < e.length && (a += "…"), a;
5406
5502
  }
5407
5503
  // src/components/SpotlightPalette/SpotlightPalette.tsx
5408
- var za = "qwksearch:open-spotlight", Ba = 100, Va = 6, Ha = 40;
5409
- function Ua() {
5410
- typeof window < "u" && window.dispatchEvent(new Event(za));
5504
+ var Va = "qwksearch:open-spotlight", Ha = 100, Ua = 6, Wa = 40;
5505
+ function Ga() {
5506
+ typeof window < "u" && window.dispatchEvent(new Event(Va));
5411
5507
  }
5412
- function Wa(e) {
5508
+ function Ka(e) {
5413
5509
  return e.ctrlKey && !e.metaKey && !e.altKey && (e.code === "Space" || e.key === " ");
5414
5510
  }
5415
- var Ga = {
5511
+ var qa = {
5416
5512
  search: "ask",
5417
5513
  chat: "chat",
5418
5514
  page: "page",
5419
5515
  setting: "setting",
5420
5516
  action: "action"
5421
5517
  };
5422
- function Ka() {
5423
- let [e, r] = O(!1), [i, a] = O(""), [o, s] = O(0), c = j(), l = u(), { isAuthenticated: d, signIn: f, signOut: p } = n(), { docsEnabled: m, setActiveView: g, requestFilesSidebar: _ } = wa(), { recentChats: v, load: y } = mr(Ba), b = D(null), x = D(null), S = D(null), w = C(() => r(!1), []), k = D(y);
5518
+ function Ja() {
5519
+ let [e, r] = O(!1), [i, a] = O(""), [o, s] = O(0), c = j(), l = u(), { isAuthenticated: d, signIn: f, signOut: p } = n(), { docsEnabled: m, setActiveView: g, requestFilesSidebar: _ } = Ea(), { recentChats: v, load: y } = mr(Ha), b = D(null), x = D(null), S = D(null), w = C(() => r(!1), []), k = D(y);
5424
5520
  T(() => {
5425
5521
  k.current = y;
5426
5522
  }, [y]);
@@ -5460,30 +5556,30 @@ function Ka() {
5460
5556
  m,
5461
5557
  g,
5462
5558
  _
5463
- ]), { prefix: M, query: N } = Pa(i), I = N.trim(), L = E(() => ({
5464
- chat: ka(v, A),
5465
- page: Oa(A),
5466
- setting: Aa(A),
5467
- action: ja(A)
5559
+ ]), { prefix: M, query: N } = Ia(i), I = N.trim(), L = E(() => ({
5560
+ chat: ja(v, A),
5561
+ page: Aa(A),
5562
+ setting: Ma(A),
5563
+ action: Na(A)
5468
5564
  }), [v, A]), R = E(() => {
5469
- let e = Ma(N, A);
5565
+ let e = Pa(N, A);
5470
5566
  if (M === "w") return e ? [e] : [];
5471
5567
  if (M) {
5472
- let e = Na.find((e) => e.prefix === M).source;
5473
- return La(L[e], N).map((e) => e.item).slice(0, Ha);
5568
+ let e = Fa.find((e) => e.prefix === M).source;
5569
+ return za(L[e], N).map((e) => e.item).slice(0, Wa);
5474
5570
  }
5475
5571
  if (!I) return [
5476
- ...L.chat.slice(0, Va),
5572
+ ...L.chat.slice(0, Ua),
5477
5573
  ...L.action,
5478
5574
  ...L.page
5479
- ].slice(0, Ha);
5480
- let t = La([
5575
+ ].slice(0, Wa);
5576
+ let t = za([
5481
5577
  ...L.action,
5482
5578
  ...L.page,
5483
5579
  ...L.setting,
5484
5580
  ...L.chat
5485
5581
  ], N).map((e) => e.item);
5486
- return [...e ? [e] : [], ...t].slice(0, Ha);
5582
+ return [...e ? [e] : [], ...t].slice(0, Wa);
5487
5583
  }, [
5488
5584
  M,
5489
5585
  N,
@@ -5493,10 +5589,10 @@ function Ka() {
5493
5589
  ]);
5494
5590
  T(() => {
5495
5591
  let e = (e) => {
5496
- Wa(e) && (e.preventDefault(), r((e) => !e));
5592
+ Ka(e) && (e.preventDefault(), r((e) => !e));
5497
5593
  }, t = () => r(!0);
5498
- return window.addEventListener("keydown", e), window.addEventListener(za, t), () => {
5499
- window.removeEventListener("keydown", e), window.removeEventListener(za, t);
5594
+ return window.addEventListener("keydown", e), window.addEventListener(Va, t), () => {
5595
+ window.removeEventListener("keydown", e), window.removeEventListener(Va, t);
5500
5596
  };
5501
5597
  }, []), T(() => {
5502
5598
  e ? (s(0), k.current(), x.current?.focus()) : (a(""), s(0));
@@ -5514,7 +5610,7 @@ function Ka() {
5514
5610
  let z = C((e) => {
5515
5611
  e && (w(), e.run());
5516
5612
  }, [w]), B = C(() => {
5517
- let e = Na.map((e) => e.prefix), t = e[((M ? e.indexOf(M) : -1) + 1) % e.length];
5613
+ let e = Fa.map((e) => e.prefix), t = e[((M ? e.indexOf(M) : -1) + 1) % e.length];
5518
5614
  a(`${t} ${N}`), s(0);
5519
5615
  }, [M, N]), V = (e) => {
5520
5616
  switch (e.key) {
@@ -5534,7 +5630,7 @@ function Ka() {
5534
5630
  }
5535
5631
  };
5536
5632
  if (!e) return null;
5537
- let H = M ? Na.find((e) => e.prefix === M) : null;
5633
+ let H = M ? Fa.find((e) => e.prefix === M) : null;
5538
5634
  return /* @__PURE__ */ P("div", {
5539
5635
  className: "fixed inset-0 z-[10000] flex items-start justify-center bg-black/40 backdrop-blur-[2px] px-4 pt-[12vh]",
5540
5636
  role: "presentation",
@@ -5548,7 +5644,7 @@ function Ka() {
5548
5644
  /* @__PURE__ */ F("div", {
5549
5645
  className: "flex items-center gap-3 border-b border-border px-4",
5550
5646
  children: [
5551
- /* @__PURE__ */ P(He, {
5647
+ /* @__PURE__ */ P(Ve, {
5552
5648
  size: 18,
5553
5649
  className: "shrink-0 text-muted-foreground"
5554
5650
  }),
@@ -5616,7 +5712,7 @@ function Ka() {
5616
5712
  }),
5617
5713
  /* @__PURE__ */ P("span", {
5618
5714
  className: "shrink-0 rounded-md bg-secondary px-1.5 py-0 text-[10px] text-muted-foreground",
5619
- children: Ga[e.source]
5715
+ children: qa[e.source]
5620
5716
  })
5621
5717
  ]
5622
5718
  }, e.id);
@@ -5631,7 +5727,7 @@ function Ka() {
5631
5727
  /* @__PURE__ */ P("span", { children: "esc close" }),
5632
5728
  /* @__PURE__ */ P("span", {
5633
5729
  className: "ml-auto",
5634
- children: Na.map((e) => `${e.prefix} ${e.label}`).join(" · ")
5730
+ children: Fa.map((e) => `${e.prefix} ${e.label}`).join(" · ")
5635
5731
  })
5636
5732
  ]
5637
5733
  })
@@ -5640,57 +5736,57 @@ function Ka() {
5640
5736
  });
5641
5737
  }
5642
5738
  // src/lib/kokoro.ts
5643
- var qa = {
5739
+ var Ya = {
5644
5740
  device: "webgpu",
5645
5741
  dtype: "fp32"
5646
- }, Ja = {
5742
+ }, Xa = {
5647
5743
  device: "wasm",
5648
5744
  dtype: "q8"
5649
- }, Ya = "hexgrad/Kokoro-82M", Xa = null, Za = null;
5650
- function Qa() {
5745
+ }, Za = "hexgrad/Kokoro-82M", Qa = null, $a = null;
5746
+ function eo() {
5651
5747
  return typeof navigator < "u" && "gpu" in navigator;
5652
5748
  }
5653
- async function $a() {
5654
- if (!Qa()) return !1;
5749
+ async function to() {
5750
+ if (!eo()) return !1;
5655
5751
  try {
5656
5752
  return await navigator.gpu.requestAdapter() != null;
5657
5753
  } catch {
5658
5754
  return !1;
5659
5755
  }
5660
5756
  }
5661
- async function eo(e) {
5757
+ async function no(e) {
5662
5758
  let t = [];
5663
- await $a() && t.push(qa), t.push(Ja);
5759
+ await to() && t.push(Ya), t.push(Xa);
5664
5760
  let { KokoroTTS: n } = await import("kokoro-js"), r;
5665
5761
  for (let i of t) try {
5666
- let t = await n.from_pretrained(Ya, {
5762
+ let t = await n.from_pretrained(Za, {
5667
5763
  device: i.device,
5668
5764
  dtype: i.dtype,
5669
5765
  progress_callback: e
5670
5766
  });
5671
- return Za = i.device, t;
5767
+ return $a = i.device, t;
5672
5768
  } catch (e) {
5673
5769
  r = e, console.warn(`Kokoro model failed to load on "${i.device}" backend:`, e);
5674
5770
  }
5675
5771
  throw r instanceof Error ? r : /* @__PURE__ */ Error("Failed to load Kokoro model");
5676
5772
  }
5677
- async function to(e) {
5678
- return Xa ||= eo(e).catch((e) => {
5679
- throw Xa = null, e;
5680
- }), Xa;
5773
+ async function ro(e) {
5774
+ return Qa ||= no(e).catch((e) => {
5775
+ throw Qa = null, e;
5776
+ }), Qa;
5681
5777
  }
5682
- async function no(e) {
5683
- return to(e);
5778
+ async function io(e) {
5779
+ return ro(e);
5684
5780
  }
5685
- async function ro() {
5686
- let e = await no();
5781
+ async function ao() {
5782
+ let e = await io();
5687
5783
  return Object.keys(e.voices);
5688
5784
  }
5689
- function io() {
5690
- return Za;
5785
+ function oo() {
5786
+ return $a;
5691
5787
  }
5692
5788
  // src/hooks/voice/useKokoroTTS.ts
5693
- function ao(e, t) {
5789
+ function so(e, t) {
5694
5790
  let [n, r] = O("idle"), [i, a] = O(!1), [o, s] = O([]), [c, l] = O("af_heart"), [u, d] = O(null), [f, p] = O(null), m = D(null), h = D(null);
5695
5791
  T(() => {
5696
5792
  t?.autoPreload && !i && _();
@@ -5704,10 +5800,10 @@ function ao(e, t) {
5704
5800
  m.current &&= (m.current.pause(), m.current.src.startsWith("blob:") && URL.revokeObjectURL(m.current.src), null), h.current?.abort(), h.current = null;
5705
5801
  }, []), _ = C(async () => {
5706
5802
  try {
5707
- r("loading"), d(null), p(null), await to((e) => {
5803
+ r("loading"), d(null), p(null), await ro((e) => {
5708
5804
  p(e);
5709
5805
  });
5710
- let e = await ro();
5806
+ let e = await ao();
5711
5807
  s(e), e.length && !e.includes(c) && l(e[0]), a(!0), r("idle");
5712
5808
  } catch (e) {
5713
5809
  let t = e instanceof Error ? e.message : "Failed to load model";
@@ -5729,7 +5825,7 @@ function ao(e, t) {
5729
5825
  g(), r("generating"), d(null);
5730
5826
  let t = new AbortController();
5731
5827
  h.current = t;
5732
- let n = (await (await no()).generate(e.slice(0, 5e3), { voice: c })).toWav(), i = new Blob([n], { type: "audio/wav" }), a = URL.createObjectURL(i), o = new Audio(a);
5828
+ let n = (await (await io()).generate(e.slice(0, 5e3), { voice: c })).toWav(), i = new Blob([n], { type: "audio/wav" }), a = URL.createObjectURL(i), o = new Audio(a);
5733
5829
  m.current = o, o.onended = () => {
5734
5830
  r("idle"), URL.revokeObjectURL(a), m.current = null;
5735
5831
  }, o.onerror = () => {
@@ -5754,11 +5850,11 @@ function ao(e, t) {
5754
5850
  changeVoice: C((e) => {
5755
5851
  l(e), localStorage.setItem("kokoroVoice", e);
5756
5852
  }, []),
5757
- backend: io()
5853
+ backend: oo()
5758
5854
  };
5759
5855
  }
5760
5856
  // src/hooks/voice/useTextToVoice.ts
5761
- function oo(e, t) {
5857
+ function co(e, t) {
5762
5858
  let [n, r] = O("stopped"), [i, a] = O(!1), o = D(null), s = D(null), c = D(null), l = D(t);
5763
5859
  l.current = t;
5764
5860
  let u = C(() => {
@@ -5790,7 +5886,7 @@ function oo(e, t) {
5790
5886
  try {
5791
5887
  let n = localStorage.getItem("useTTSKokoro");
5792
5888
  if (n === null || n !== "false") try {
5793
- let t = await no((e) => {
5889
+ let t = await io((e) => {
5794
5890
  (e.status === "progress_total" || e.status === "progress" || e.status === "download") && console.log(`[Kokoro] Loading: ${Math.round(e.progress ?? 0)}%`);
5795
5891
  }), n = localStorage.getItem("kokoroVoice") || "af_heart", i = (await t.generate(e.slice(0, 5e3), { voice: n })).toWav(), s = new Blob([i], { type: "audio/wav" }), c = URL.createObjectURL(s), l = new Audio(c);
5796
5892
  o.current = l, l.onended = () => {
@@ -5803,7 +5899,7 @@ function oo(e, t) {
5803
5899
  console.debug("Kokoro TTS unavailable, using server-side TTS:", e instanceof Error ? e.message : String(e)), a(!1);
5804
5900
  }
5805
5901
  a(!1);
5806
- let i = await K("agent/voice", {
5902
+ let i = await ot("agent/voice", {
5807
5903
  method: "POST",
5808
5904
  body: {
5809
5905
  text: e.slice(0, 5e3),
@@ -5833,7 +5929,7 @@ function oo(e, t) {
5833
5929
  };
5834
5930
  }
5835
5931
  // src/components/VoiceSettings/KokoroVoiceSelector.tsx
5836
- var so = {
5932
+ var lo = {
5837
5933
  af_heart: "American Female - Heart",
5838
5934
  af_bella: "American Female - Bella",
5839
5935
  af_nicole: "American Female - Nicole",
@@ -5845,8 +5941,8 @@ var so = {
5845
5941
  bm_george: "British Male - George",
5846
5942
  bm_thomas: "British Male - Thomas"
5847
5943
  };
5848
- function co({ preloadOnMount: e = !1 }) {
5849
- let { status: t, modelReady: n, voices: r, selectedVoice: i, error: o, progress: c, warmupModel: u, changeVoice: d, backend: f } = ao("", { autoPreload: e }), [p, m] = O(!1), g = t === "loading", _ = t === "error";
5944
+ function uo({ preloadOnMount: e = !1 }) {
5945
+ let { status: t, modelReady: n, voices: r, selectedVoice: i, error: o, progress: c, warmupModel: u, changeVoice: d, backend: f } = so("", { autoPreload: e }), [p, m] = O(!1), g = t === "loading", _ = t === "error";
5850
5946
  return /* @__PURE__ */ F("div", {
5851
5947
  className: "flex flex-col gap-3",
5852
5948
  children: [/* @__PURE__ */ F("div", {
@@ -5858,10 +5954,10 @@ function co({ preloadOnMount: e = !1 }) {
5858
5954
  onClick: u,
5859
5955
  disabled: g || n,
5860
5956
  className: h("p-2 rounded-full transition duration-200", n ? "bg-green-500/10 text-green-600 dark:text-green-400" : "bg-white/10 dark:bg-black/10 text-muted-foreground hover:bg-white/20 dark:hover:bg-black/20", g && "opacity-70 cursor-not-allowed"),
5861
- children: g ? /* @__PURE__ */ P(W, {
5957
+ children: g ? /* @__PURE__ */ P(G, {
5862
5958
  size: 18,
5863
5959
  className: "animate-spin"
5864
- }) : /* @__PURE__ */ P(pe, { size: 18 })
5960
+ }) : /* @__PURE__ */ P(fe, { size: 18 })
5865
5961
  })
5866
5962
  }), /* @__PURE__ */ P(a, {
5867
5963
  side: "bottom",
@@ -5908,7 +6004,7 @@ function co({ preloadOnMount: e = !1 }) {
5908
6004
  className: "w-full text-left px-3 py-2 rounded-md bg-white/5 dark:bg-black/5 hover:bg-white/10 dark:hover:bg-black/10 transition text-sm font-medium",
5909
6005
  children: /* @__PURE__ */ F("div", {
5910
6006
  className: "flex items-center gap-2",
5911
- children: [/* @__PURE__ */ P(nt, { size: 16 }), so[i] || i]
6007
+ children: [/* @__PURE__ */ P(tt, { size: 16 }), lo[i] || i]
5912
6008
  })
5913
6009
  }), p && /* @__PURE__ */ P("div", {
5914
6010
  className: "grid grid-cols-2 gap-2 p-2 bg-white/5 dark:bg-black/5 rounded-md max-h-64 overflow-y-auto",
@@ -5917,18 +6013,18 @@ function co({ preloadOnMount: e = !1 }) {
5917
6013
  d(e), m(!1);
5918
6014
  },
5919
6015
  className: h("p-2 text-left text-sm rounded transition duration-200", i === e ? "bg-blue-500/20 text-blue-600 dark:text-blue-400 font-medium" : "bg-white/5 dark:bg-black/5 text-foreground hover:bg-white/10 dark:hover:bg-black/10"),
5920
- children: so[e] || e
6016
+ children: lo[e] || e
5921
6017
  }, e))
5922
6018
  })]
5923
6019
  })]
5924
6020
  });
5925
6021
  }
5926
6022
  // src/components/VoiceSettings/VoiceSettingsPanel.tsx
5927
- function lo() {
6023
+ function fo() {
5928
6024
  let [e, t] = O(!1), [n, r] = O(() => {
5929
6025
  let e = localStorage.getItem("useTTSKokoro");
5930
6026
  return e === null || e !== "false";
5931
- }), [i, o] = O(() => localStorage.getItem("ttsSpeaker") || "angus"), [c, u] = O(() => kn()), { start: d, speechStatus: f } = oo("This is a preview of the selected voice.", { enableInterrupt: !1 }), p = (e) => {
6027
+ }), [i, o] = O(() => localStorage.getItem("ttsSpeaker") || "angus"), [c, u] = O(() => kn()), { start: d, speechStatus: f } = co("This is a preview of the selected voice.", { enableInterrupt: !1 }), p = (e) => {
5932
6028
  r(e), localStorage.setItem("useTTSKokoro", String(e));
5933
6029
  }, m = (e) => {
5934
6030
  o(e), localStorage.setItem("ttsSpeaker", e);
@@ -5941,7 +6037,7 @@ function lo() {
5941
6037
  className: "flex items-center justify-between",
5942
6038
  children: [/* @__PURE__ */ F("div", {
5943
6039
  className: "flex items-center gap-2",
5944
- children: [/* @__PURE__ */ P(We, { size: 18 }), /* @__PURE__ */ P("h3", {
6040
+ children: [/* @__PURE__ */ P(Ue, { size: 18 }), /* @__PURE__ */ P("h3", {
5945
6041
  className: "font-semibold",
5946
6042
  children: "Voice Settings"
5947
6043
  })]
@@ -5980,7 +6076,7 @@ function lo() {
5980
6076
  children: "Runs locally in your browser. No server requests, lower latency, and multiple voice options."
5981
6077
  })] })
5982
6078
  ]
5983
- }), n && /* @__PURE__ */ P(co, { preloadOnMount: !1 })]
6079
+ }), n && /* @__PURE__ */ P(uo, { preloadOnMount: !1 })]
5984
6080
  }),
5985
6081
  /* @__PURE__ */ F("div", {
5986
6082
  className: "space-y-2",
@@ -6037,7 +6133,7 @@ function lo() {
6037
6133
  onClick: () => d(),
6038
6134
  disabled: f === "started",
6039
6135
  className: h("w-full flex items-center justify-center gap-2 px-3 py-2 rounded-md text-sm font-medium transition", f === "started" ? "bg-gray-500/20 text-gray-600 dark:text-gray-400 cursor-not-allowed" : "bg-blue-500/20 text-blue-600 dark:text-blue-400 hover:bg-blue-500/30"),
6040
- children: [/* @__PURE__ */ P(nt, { size: 16 }), f === "started" ? "Playing..." : "Preview"]
6136
+ children: [/* @__PURE__ */ P(tt, { size: 16 }), f === "started" ? "Playing..." : "Preview"]
6041
6137
  })]
6042
6138
  })]
6043
6139
  }),
@@ -6079,10 +6175,10 @@ function lo() {
6079
6175
  });
6080
6176
  }
6081
6177
  // src/icons/icon-read.svg
6082
- var uo = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3csvg%20height='800px'%20width='800px'%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20512%20512'%20xml:space='preserve'%3e%3cpath%20style='fill:%23FE5022;'%20d='M438.802,390.609V278.595h55.174c9.938,0,18.023,8.085,18.023,18.023v75.967%20c0,9.938-8.086,18.024-18.023,18.024L438.802,390.609L438.802,390.609z'/%3e%3cpath%20style='fill:%23ECE5DD;'%20d='M28.107,511.637C12.609,511.637,0,499.027,0,483.529V134.326c0-1.441,0-12.123,0-12.123%20L121.715,0.363c0,0,10.8,0,12.248,0h271.569c15.498,0,28.107,12.609,28.107,28.106v455.059c0,15.499-12.609,28.108-28.107,28.108%20H28.107V511.637z'/%3e%3cpath%20style='fill:%23D9CBBD;'%20d='M405.533,0.363h-31.991c15.498,0,28.107,12.609,28.107,28.107v455.059%20c0,15.499-12.609,28.108-28.107,28.108h31.991c15.498,0,28.107-12.609,28.107-28.108V28.469%20C433.64,12.972,421.031,0.363,405.533,0.363z'/%3e%3cg%3e%3cpath%20style='fill:%23BABABA;'%20d='M167.639,132.2h133.086c4.594,0,8.318-3.723,8.318-8.318c0-4.595-3.724-8.318-8.318-8.318H167.639%20c-4.594,0-8.318,3.723-8.318,8.318C159.321,128.477,163.045,132.2,167.639,132.2z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M356.178,132.2h22.181c4.594,0,8.318-3.723,8.318-8.318c0-4.595-3.724-8.318-8.318-8.318h-22.181%20c-4.594,0-8.318,3.723-8.318,8.318C347.86,128.477,351.584,132.2,356.178,132.2z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M242.5,212.606c0-4.595-3.724-8.318-8.318-8.318H56.734c-4.594,0-8.318,3.723-8.318,8.318%20s3.724,8.318,8.318,8.318h177.449C238.776,220.924,242.5,217.201,242.5,212.606z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M378.359,204.288h-99.815c-4.594,0-8.318,3.723-8.318,8.318s3.724,8.318,8.318,8.318h99.815%20c4.594,0,8.318-3.723,8.318-8.318S382.953,204.288,378.359,204.288z'/%3e%3c/g%3e%3cpath%20style='fill:%23D9CBBD;'%20d='M0.726,123.171L122.442,1.331l1.39,105.939c0,9.465-7.7,17.166-17.166,17.166L0.726,123.171z'/%3e%3cpath%20style='fill:%23FFB656;'%20d='M270.226,401.7V267.504H456.87c5.938,0,10.768,4.83,10.768,10.768v112.659%20c0,5.938-4.83,10.769-10.768,10.769H270.226z'/%3e%3cpath%20style='fill:%23D9CBBD;'%20d='M367.785,335.156c-12.822,0-23.252-10.431-23.252-23.254v-44.399h89.833v44.399%20c0,12.823-10.431,23.254-23.252,23.254H367.785z'/%3e%3cg%3e%3cpath%20style='fill:%23BABABA;'%20d='M167.639,132.2h133.086c4.594,0,8.318-3.723,8.318-8.318c0-4.595-3.724-8.318-8.318-8.318H167.639%20c-4.594,0-8.318,3.723-8.318,8.318C159.321,128.477,163.045,132.2,167.639,132.2z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M356.178,132.2h22.181c4.594,0,8.318-3.723,8.318-8.318c0-4.595-3.724-8.318-8.318-8.318h-22.181%20c-4.594,0-8.318,3.723-8.318,8.318C347.86,128.477,351.584,132.2,356.178,132.2z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M242.5,212.606c0-4.595-3.724-8.318-8.318-8.318H56.734c-4.594,0-8.318,3.723-8.318,8.318%20s3.724,8.318,8.318,8.318h177.449C238.776,220.924,242.5,217.201,242.5,212.606z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M378.359,204.288h-99.815c-4.594,0-8.318,3.723-8.318,8.318s3.724,8.318,8.318,8.318h99.815%20c4.594,0,8.318-3.723,8.318-8.318S382.953,204.288,378.359,204.288z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M345.087,448.28H101.096c-4.594,0-8.318,3.723-8.318,8.318c0,4.595,3.724,8.318,8.318,8.318h243.992%20c4.594,0,8.318-3.723,8.318-8.318C353.405,452.003,349.681,448.28,345.087,448.28z'/%3e%3c/g%3e%3cpath%20style='fill:%23FE5022;'%20d='M163.689,357.337c-3.692,0-6.094-3.886-4.443-7.189l16.225-32.451%20c1.799-3.597,5.416-5.833,9.438-5.833h44.282v45.471h-65.503V357.337z'/%3e%3cpolygon%20style='fill:%23FFB656;'%20points='256.918,278.252%20211.447,300.988%20211.447,368.216%20256.918,390.953%20284.321,390.953%20284.321,278.214%20'/%3e%3cg%3e%3cpath%20style='fill:%23FE5022;'%20d='M268.64,401.7c-7.075,0-12.832-5.756-12.832-12.832V280.336c0-7.075,5.756-12.831,12.832-12.831%20h19.808c7.075,0,12.832,5.756,12.832,12.831v108.532c0,7.076-5.756,12.832-12.832,12.832H268.64z'/%3e%3cpath%20style='fill:%23FE5022;'%20d='M104.156,379.377H26.143V301.33h91.398c8.546,0,14.88,7.936,12.986,16.27l-11.313,49.758%20C117.615,374.388,111.366,379.377,104.156,379.377z'/%3e%3c/g%3e%3c/svg%3e", fo = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3csvg%20height='800px'%20width='800px'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%2064%2064'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%2376C2AF;}%20.st1{fill:%234F5D73;}%20.st2{opacity:0.2;}%20.st3{fill:%23231F20;}%20.st4{fill:%23FFFFFF;}%20%3c/style%3e%3cg%20id='Layer_1'%3e%3cg%3e%3ccircle%20class='st0'%20cx='32'%20cy='32'%20r='32'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st1'%20d='M32,52c-1.1,0-2-0.9-2-2V18c0-1.1,0.9-2,2-2l0,0c1.1,0,2,0.9,2,2v32C34,51.1,33.1,52,32,52L32,52z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st1'%20d='M46,52c-1.1,0-2-0.9-2-2V18c0-1.1,0.9-2,2-2l0,0c1.1,0,2,0.9,2,2v32C48,51.1,47.1,52,46,52L46,52z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st1'%20d='M18,52c-1.1,0-2-0.9-2-2V18c0-1.1,0.9-2,2-2l0,0c1.1,0,2,0.9,2,2v32C20,51.1,19.1,52,18,52L18,52z'/%3e%3c/g%3e%3cg%20class='st2'%3e%3ccircle%20class='st3'%20cx='45.9'%20cy='38'%20r='4'/%3e%3c/g%3e%3cg%20class='st2'%3e%3ccircle%20class='st3'%20cx='32'%20cy='27'%20r='4'/%3e%3c/g%3e%3cg%20class='st2'%3e%3ccircle%20class='st3'%20cx='18'%20cy='44'%20r='4'/%3e%3c/g%3e%3cg%3e%3ccircle%20class='st4'%20cx='45.9'%20cy='36'%20r='4'/%3e%3c/g%3e%3cg%3e%3ccircle%20class='st4'%20cx='32'%20cy='25'%20r='4'/%3e%3c/g%3e%3cg%3e%3ccircle%20class='st4'%20cx='18'%20cy='42'%20r='4'/%3e%3c/g%3e%3c/g%3e%3cg%20id='Layer_2'%3e%3c/g%3e%3c/svg%3e";
6178
+ var po = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3csvg%20height='800px'%20width='800px'%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20512%20512'%20xml:space='preserve'%3e%3cpath%20style='fill:%23FE5022;'%20d='M438.802,390.609V278.595h55.174c9.938,0,18.023,8.085,18.023,18.023v75.967%20c0,9.938-8.086,18.024-18.023,18.024L438.802,390.609L438.802,390.609z'/%3e%3cpath%20style='fill:%23ECE5DD;'%20d='M28.107,511.637C12.609,511.637,0,499.027,0,483.529V134.326c0-1.441,0-12.123,0-12.123%20L121.715,0.363c0,0,10.8,0,12.248,0h271.569c15.498,0,28.107,12.609,28.107,28.106v455.059c0,15.499-12.609,28.108-28.107,28.108%20H28.107V511.637z'/%3e%3cpath%20style='fill:%23D9CBBD;'%20d='M405.533,0.363h-31.991c15.498,0,28.107,12.609,28.107,28.107v455.059%20c0,15.499-12.609,28.108-28.107,28.108h31.991c15.498,0,28.107-12.609,28.107-28.108V28.469%20C433.64,12.972,421.031,0.363,405.533,0.363z'/%3e%3cg%3e%3cpath%20style='fill:%23BABABA;'%20d='M167.639,132.2h133.086c4.594,0,8.318-3.723,8.318-8.318c0-4.595-3.724-8.318-8.318-8.318H167.639%20c-4.594,0-8.318,3.723-8.318,8.318C159.321,128.477,163.045,132.2,167.639,132.2z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M356.178,132.2h22.181c4.594,0,8.318-3.723,8.318-8.318c0-4.595-3.724-8.318-8.318-8.318h-22.181%20c-4.594,0-8.318,3.723-8.318,8.318C347.86,128.477,351.584,132.2,356.178,132.2z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M242.5,212.606c0-4.595-3.724-8.318-8.318-8.318H56.734c-4.594,0-8.318,3.723-8.318,8.318%20s3.724,8.318,8.318,8.318h177.449C238.776,220.924,242.5,217.201,242.5,212.606z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M378.359,204.288h-99.815c-4.594,0-8.318,3.723-8.318,8.318s3.724,8.318,8.318,8.318h99.815%20c4.594,0,8.318-3.723,8.318-8.318S382.953,204.288,378.359,204.288z'/%3e%3c/g%3e%3cpath%20style='fill:%23D9CBBD;'%20d='M0.726,123.171L122.442,1.331l1.39,105.939c0,9.465-7.7,17.166-17.166,17.166L0.726,123.171z'/%3e%3cpath%20style='fill:%23FFB656;'%20d='M270.226,401.7V267.504H456.87c5.938,0,10.768,4.83,10.768,10.768v112.659%20c0,5.938-4.83,10.769-10.768,10.769H270.226z'/%3e%3cpath%20style='fill:%23D9CBBD;'%20d='M367.785,335.156c-12.822,0-23.252-10.431-23.252-23.254v-44.399h89.833v44.399%20c0,12.823-10.431,23.254-23.252,23.254H367.785z'/%3e%3cg%3e%3cpath%20style='fill:%23BABABA;'%20d='M167.639,132.2h133.086c4.594,0,8.318-3.723,8.318-8.318c0-4.595-3.724-8.318-8.318-8.318H167.639%20c-4.594,0-8.318,3.723-8.318,8.318C159.321,128.477,163.045,132.2,167.639,132.2z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M356.178,132.2h22.181c4.594,0,8.318-3.723,8.318-8.318c0-4.595-3.724-8.318-8.318-8.318h-22.181%20c-4.594,0-8.318,3.723-8.318,8.318C347.86,128.477,351.584,132.2,356.178,132.2z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M242.5,212.606c0-4.595-3.724-8.318-8.318-8.318H56.734c-4.594,0-8.318,3.723-8.318,8.318%20s3.724,8.318,8.318,8.318h177.449C238.776,220.924,242.5,217.201,242.5,212.606z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M378.359,204.288h-99.815c-4.594,0-8.318,3.723-8.318,8.318s3.724,8.318,8.318,8.318h99.815%20c4.594,0,8.318-3.723,8.318-8.318S382.953,204.288,378.359,204.288z'/%3e%3cpath%20style='fill:%23BABABA;'%20d='M345.087,448.28H101.096c-4.594,0-8.318,3.723-8.318,8.318c0,4.595,3.724,8.318,8.318,8.318h243.992%20c4.594,0,8.318-3.723,8.318-8.318C353.405,452.003,349.681,448.28,345.087,448.28z'/%3e%3c/g%3e%3cpath%20style='fill:%23FE5022;'%20d='M163.689,357.337c-3.692,0-6.094-3.886-4.443-7.189l16.225-32.451%20c1.799-3.597,5.416-5.833,9.438-5.833h44.282v45.471h-65.503V357.337z'/%3e%3cpolygon%20style='fill:%23FFB656;'%20points='256.918,278.252%20211.447,300.988%20211.447,368.216%20256.918,390.953%20284.321,390.953%20284.321,278.214%20'/%3e%3cg%3e%3cpath%20style='fill:%23FE5022;'%20d='M268.64,401.7c-7.075,0-12.832-5.756-12.832-12.832V280.336c0-7.075,5.756-12.831,12.832-12.831%20h19.808c7.075,0,12.832,5.756,12.832,12.831v108.532c0,7.076-5.756,12.832-12.832,12.832H268.64z'/%3e%3cpath%20style='fill:%23FE5022;'%20d='M104.156,379.377H26.143V301.33h91.398c8.546,0,14.88,7.936,12.986,16.27l-11.313,49.758%20C117.615,374.388,111.366,379.377,104.156,379.377z'/%3e%3c/g%3e%3c/svg%3e", mo = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3csvg%20height='800px'%20width='800px'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%2064%2064'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%2376C2AF;}%20.st1{fill:%234F5D73;}%20.st2{opacity:0.2;}%20.st3{fill:%23231F20;}%20.st4{fill:%23FFFFFF;}%20%3c/style%3e%3cg%20id='Layer_1'%3e%3cg%3e%3ccircle%20class='st0'%20cx='32'%20cy='32'%20r='32'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st1'%20d='M32,52c-1.1,0-2-0.9-2-2V18c0-1.1,0.9-2,2-2l0,0c1.1,0,2,0.9,2,2v32C34,51.1,33.1,52,32,52L32,52z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st1'%20d='M46,52c-1.1,0-2-0.9-2-2V18c0-1.1,0.9-2,2-2l0,0c1.1,0,2,0.9,2,2v32C48,51.1,47.1,52,46,52L46,52z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st1'%20d='M18,52c-1.1,0-2-0.9-2-2V18c0-1.1,0.9-2,2-2l0,0c1.1,0,2,0.9,2,2v32C20,51.1,19.1,52,18,52L18,52z'/%3e%3c/g%3e%3cg%20class='st2'%3e%3ccircle%20class='st3'%20cx='45.9'%20cy='38'%20r='4'/%3e%3c/g%3e%3cg%20class='st2'%3e%3ccircle%20class='st3'%20cx='32'%20cy='27'%20r='4'/%3e%3c/g%3e%3cg%20class='st2'%3e%3ccircle%20class='st3'%20cx='18'%20cy='44'%20r='4'/%3e%3c/g%3e%3cg%3e%3ccircle%20class='st4'%20cx='45.9'%20cy='36'%20r='4'/%3e%3c/g%3e%3cg%3e%3ccircle%20class='st4'%20cx='32'%20cy='25'%20r='4'/%3e%3c/g%3e%3cg%3e%3ccircle%20class='st4'%20cx='18'%20cy='42'%20r='4'/%3e%3c/g%3e%3c/g%3e%3cg%20id='Layer_2'%3e%3c/g%3e%3c/svg%3e";
6083
6179
  // src/app/CategoryDock.tsx
6084
- function po() {
6085
- let e = A(), r = j(), { isAuthenticated: i, signIn: a, signOut: o } = n(), { newChat: s } = u(), { activeView: c, setActiveView: l, docsEnabled: d, requestFilesSidebar: f } = wa(), p = [{
6180
+ function ho() {
6181
+ let e = A(), r = j(), { isAuthenticated: i, signIn: a, signOut: o } = n(), { newChat: s } = u(), { activeView: c, setActiveView: l, docsEnabled: d, requestFilesSidebar: f } = Ea(), p = [{
6086
6182
  href: "/",
6087
6183
  label: "Research",
6088
6184
  icon: t.appIconUrl
@@ -6090,7 +6186,7 @@ function po() {
6090
6186
  href: "/workspace",
6091
6187
  label: "Docs",
6092
6188
  icon: /* @__PURE__ */ P(Bt, {
6093
- src: uo,
6189
+ src: po,
6094
6190
  alt: "Docs",
6095
6191
  width: 24,
6096
6192
  height: 24,
@@ -6110,7 +6206,7 @@ function po() {
6110
6206
  ...d ? [{
6111
6207
  key: "files",
6112
6208
  label: "Files",
6113
- icon: /* @__PURE__ */ P(ye, { className: "w-full h-full p-1" }),
6209
+ icon: /* @__PURE__ */ P(ve, { className: "w-full h-full p-1" }),
6114
6210
  onClick: () => {
6115
6211
  l("docs"), f();
6116
6212
  }
@@ -6119,7 +6215,7 @@ function po() {
6119
6215
  key: "settings",
6120
6216
  label: "Settings",
6121
6217
  icon: /* @__PURE__ */ P(Bt, {
6122
- src: fo,
6218
+ src: mo,
6123
6219
  alt: "Settings",
6124
6220
  width: 24,
6125
6221
  height: 24,
@@ -6128,10 +6224,10 @@ function po() {
6128
6224
  }),
6129
6225
  menu: { renderContent: () => /* @__PURE__ */ F(N, { children: [
6130
6226
  /* @__PURE__ */ F(Lt, {
6131
- onClick: () => Ua(),
6227
+ onClick: () => Ga(),
6132
6228
  className: "cursor-pointer py-1 h-7",
6133
6229
  children: [
6134
- /* @__PURE__ */ P(He, { className: "mr-2 h-3.5 w-3.5" }),
6230
+ /* @__PURE__ */ P(Ve, { className: "mr-2 h-3.5 w-3.5" }),
6135
6231
  /* @__PURE__ */ P("span", {
6136
6232
  className: "text-sm",
6137
6233
  children: "Search"
@@ -6147,7 +6243,7 @@ function po() {
6147
6243
  t.onOpenSettings?.() || r.push("/settings");
6148
6244
  },
6149
6245
  className: "cursor-pointer py-1 h-7",
6150
- children: [/* @__PURE__ */ P(Ue, { className: "mr-2 h-3.5 w-3.5" }), /* @__PURE__ */ P("span", {
6246
+ children: [/* @__PURE__ */ P(He, { className: "mr-2 h-3.5 w-3.5" }), /* @__PURE__ */ P("span", {
6151
6247
  className: "text-sm",
6152
6248
  children: "Settings"
6153
6249
  })]
@@ -6155,14 +6251,14 @@ function po() {
6155
6251
  i ? /* @__PURE__ */ F(Lt, {
6156
6252
  onClick: () => o(),
6157
6253
  className: "cursor-pointer py-1 h-7",
6158
- children: [/* @__PURE__ */ P(je, { className: "mr-2 h-3.5 w-3.5" }), /* @__PURE__ */ P("span", {
6254
+ children: [/* @__PURE__ */ P(Ae, { className: "mr-2 h-3.5 w-3.5" }), /* @__PURE__ */ P("span", {
6159
6255
  className: "text-sm",
6160
6256
  children: "Logout"
6161
6257
  })]
6162
6258
  }) : /* @__PURE__ */ F(Lt, {
6163
6259
  onClick: () => a(),
6164
6260
  className: "cursor-pointer py-1 h-7",
6165
- children: [/* @__PURE__ */ P(Ae, { className: "mr-2 h-3.5 w-3.5" }), /* @__PURE__ */ P("span", {
6261
+ children: [/* @__PURE__ */ P(ke, { className: "mr-2 h-3.5 w-3.5" }), /* @__PURE__ */ P("span", {
6166
6262
  className: "text-sm",
6167
6263
  children: "Login"
6168
6264
  })]
@@ -6198,7 +6294,7 @@ function po() {
6198
6294
  })] });
6199
6295
  }
6200
6296
  // src/app/CookieConsent.tsx
6201
- function mo() {
6297
+ function go() {
6202
6298
  return /* @__PURE__ */ P(Vt, {
6203
6299
  appName: t.appName,
6204
6300
  links: t.footerLinks,
@@ -6206,34 +6302,34 @@ function mo() {
6206
6302
  });
6207
6303
  }
6208
6304
  // src/app/useChunkErrorReload.ts
6209
- var ho = "qwk:chunk-error-reload", go = 6e4, _o = /Loading (CSS )?chunk|ChunkLoadError|Failed to fetch dynamically imported module|error loading dynamically imported module|Importing a module script failed|Unable to preload CSS/i;
6210
- function vo(e) {
6211
- if (typeof e == "string") return _o.test(e);
6305
+ var _o = "qwk:chunk-error-reload", vo = 6e4, yo = /Loading (CSS )?chunk|ChunkLoadError|Failed to fetch dynamically imported module|error loading dynamically imported module|Importing a module script failed|Unable to preload CSS/i;
6306
+ function bo(e) {
6307
+ if (typeof e == "string") return yo.test(e);
6212
6308
  if (e && typeof e == "object") {
6213
6309
  let { name: t, message: n } = e;
6214
- return t === "ChunkLoadError" || typeof n == "string" && _o.test(n);
6310
+ return t === "ChunkLoadError" || typeof n == "string" && yo.test(n);
6215
6311
  }
6216
6312
  return !1;
6217
6313
  }
6218
- function yo(e) {
6219
- if (typeof window > "u" || !vo(e)) return !1;
6314
+ function xo(e) {
6315
+ if (typeof window > "u" || !bo(e)) return !1;
6220
6316
  try {
6221
- let e = Number(window.sessionStorage.getItem(ho));
6222
- if (e && Date.now() - e < go) return !1;
6223
- window.sessionStorage.setItem(ho, String(Date.now()));
6317
+ let e = Number(window.sessionStorage.getItem(_o));
6318
+ if (e && Date.now() - e < vo) return !1;
6319
+ window.sessionStorage.setItem(_o, String(Date.now()));
6224
6320
  } catch {
6225
6321
  return !1;
6226
6322
  }
6227
6323
  return window.location.reload(), !0;
6228
6324
  }
6229
- function bo() {
6325
+ function So() {
6230
6326
  T(() => {
6231
6327
  let e = (e) => {
6232
- yo(e.error ?? e.message);
6328
+ xo(e.error ?? e.message);
6233
6329
  }, t = (e) => {
6234
- yo(e.reason);
6330
+ xo(e.reason);
6235
6331
  }, n = (e) => {
6236
- yo(e.payload ?? "Loading chunk") && e.preventDefault();
6332
+ xo(e.payload ?? "Loading chunk") && e.preventDefault();
6237
6333
  };
6238
6334
  return window.addEventListener("error", e), window.addEventListener("unhandledrejection", t), window.addEventListener("vite:preloadError", n), () => {
6239
6335
  window.removeEventListener("error", e), window.removeEventListener("unhandledrejection", t), window.removeEventListener("vite:preloadError", n);
@@ -6241,8 +6337,8 @@ function bo() {
6241
6337
  }, []);
6242
6338
  }
6243
6339
  // src/app/QwkSearchProviders.tsx
6244
- var xo = ({ children: e }) => /* @__PURE__ */ P(N, { children: e });
6245
- function So(e) {
6340
+ var Co = ({ children: e }) => /* @__PURE__ */ P(N, { children: e });
6341
+ function wo(e) {
6246
6342
  let [t, n] = O(e === !0);
6247
6343
  return T(() => {
6248
6344
  if (e !== "auto") {
@@ -6250,7 +6346,7 @@ function So(e) {
6250
6346
  return;
6251
6347
  }
6252
6348
  let t = !1;
6253
- return K("auth/providers").then((e) => {
6349
+ return ot("auth/providers").then((e) => {
6254
6350
  t || n(!!e.providers?.includes("google"));
6255
6351
  }).catch(() => {
6256
6352
  t || n(!1);
@@ -6259,10 +6355,10 @@ function So(e) {
6259
6355
  };
6260
6356
  }, [e]), t;
6261
6357
  }
6262
- function Co({ children: t, authClient: n, config: i, googleOneTap: a = "auto", docsEnabled: o = !0, ChromeProvider: s = xo, showDock: l = !0, showCookieConsent: u = !0, showToaster: d = !0, showSpotlight: f = !0 }) {
6358
+ function To({ children: t, authClient: n, config: i, googleOneTap: a = "auto", docsEnabled: o = !0, ChromeProvider: s = Co, showDock: l = !0, showCookieConsent: u = !0, showToaster: d = !0, showSpotlight: f = !0 }) {
6263
6359
  i && e(i);
6264
- let p = So(a);
6265
- return bo(), /* @__PURE__ */ P(Pt, {
6360
+ let p = wo(a);
6361
+ return So(), /* @__PURE__ */ P(Pt, {
6266
6362
  attribute: "class",
6267
6363
  defaultTheme: "system",
6268
6364
  enableSystem: !0,
@@ -6270,54 +6366,54 @@ function Co({ children: t, authClient: n, config: i, googleOneTap: a = "auto", d
6270
6366
  children: /* @__PURE__ */ P(c, {
6271
6367
  authClient: n,
6272
6368
  enableGoogleOneTap: p,
6273
- children: /* @__PURE__ */ P(r, { children: /* @__PURE__ */ P(Cn, { children: /* @__PURE__ */ P(xa, {
6369
+ children: /* @__PURE__ */ P(r, { children: /* @__PURE__ */ P(Cn, { children: /* @__PURE__ */ P(Ca, {
6274
6370
  docsEnabled: o,
6275
6371
  children: /* @__PURE__ */ P(It, { children: /* @__PURE__ */ F(s, { children: [
6276
6372
  /* @__PURE__ */ F("div", {
6277
6373
  id: "app-scroll-root",
6278
6374
  className: "w-screen h-screen overflow-y-auto overflow-x-hidden pb-[calc(60px+env(safe-area-inset-bottom,0px))] md:pb-0",
6279
- children: [l && /* @__PURE__ */ P(po, {}), /* @__PURE__ */ P("main", {
6375
+ children: [l && /* @__PURE__ */ P(ho, {}), /* @__PURE__ */ P("main", {
6280
6376
  className: "bg-light-primary dark:bg-dark-primary min-h-screen",
6281
6377
  children: t
6282
6378
  })]
6283
6379
  }),
6284
- d && /* @__PURE__ */ P(ot, { toastOptions: {
6380
+ d && /* @__PURE__ */ P(at, { toastOptions: {
6285
6381
  unstyled: !0,
6286
6382
  classNames: { toast: "bg-light-secondary dark:bg-dark-secondary dark:text-white/70 text-black-70 rounded-lg p-4 flex flex-row items-center space-x-2" }
6287
6383
  } }),
6288
- u && /* @__PURE__ */ P(mo, {}),
6289
- f && /* @__PURE__ */ P(Ka, {})
6384
+ u && /* @__PURE__ */ P(go, {}),
6385
+ f && /* @__PURE__ */ P(Ja, {})
6290
6386
  ] }) })
6291
6387
  }) }) })
6292
6388
  })
6293
6389
  });
6294
6390
  }
6295
6391
  // src/app/QwkSearchApp.tsx
6296
- function wo(e) {
6297
- return /* @__PURE__ */ P(Co, {
6392
+ function Eo(e) {
6393
+ return /* @__PURE__ */ P(To, {
6298
6394
  ...e,
6299
6395
  docsEnabled: !1,
6300
- children: /* @__PURE__ */ P(Bi, {})
6396
+ children: /* @__PURE__ */ P(Hi, {})
6301
6397
  });
6302
6398
  }
6303
6399
  // src/app/useChatTabs.ts
6304
- var To = "qwksearch-open-chat-tabs", Eo = 50;
6305
- function Do() {
6400
+ var Do = "qwksearch-open-chat-tabs", Oo = 50;
6401
+ function ko() {
6306
6402
  if (typeof window > "u") return [];
6307
6403
  try {
6308
- let e = window.localStorage.getItem(To);
6404
+ let e = window.localStorage.getItem(Do);
6309
6405
  return e ? JSON.parse(e) : [];
6310
6406
  } catch {
6311
6407
  return [];
6312
6408
  }
6313
6409
  }
6314
- function Oo() {
6315
- let { chatId: e, chatTurns: t, startNewChat: n, switchToChat: r } = u(), [i, a] = O(Do), o = D(null);
6410
+ function Ao() {
6411
+ let { chatId: e, chatTurns: t, startNewChat: n, switchToChat: r } = u(), [i, a] = O(ko), o = D(null);
6316
6412
  T(() => {
6317
- window.localStorage.setItem(To, JSON.stringify(i));
6413
+ window.localStorage.setItem(Do, JSON.stringify(i));
6318
6414
  }, [i]), T(() => {
6319
6415
  if (!e) return;
6320
- let n = t[0]?.content?.slice(0, Eo), r = t.length > 0;
6416
+ let n = t[0]?.content?.slice(0, Oo), r = t.length > 0;
6321
6417
  a((t) => {
6322
6418
  let i = t.find((t) => t.id === e);
6323
6419
  return !i && e === o.current && !r ? t : i ? n && i.title !== n || i.hasMessages !== r ? t.map((t) => t.id === e ? {
@@ -6380,4 +6476,4 @@ function Oo() {
6380
6476
  closeChats: d
6381
6477
  };
6382
6478
  }
6383
- export { Cn as $, Zi as A, $r as B, sa as C, $i as D, ia as E, Gi as F, wr as G, qr as H, qi as I, lr as J, Er as K, Bi as L, Yi as M, Xi as N, ra as O, Ji as P, Un as Q, ui as R, ca as S, aa as T, Rr as U, Xr as V, Tr as W, Wn as X, Hn as Y, X as Z, Pa as _, yo as a, wa as b, po as c, oo as d, xn as et, ao as f, La as g, Na as h, vo as i, Vi as j, ta as k, lo as l, Ua as m, wo as n, bo as o, Ka as p, Dr as q, Co as r, mo as s, Oo as t, J as tt, co as u, Da as v, oa as w, va as x, xa as y, ni as z };
6479
+ export { Cn as $, $i as A, $r as B, la as C, ta as D, oa as E, qi as F, wr as G, qr as H, Yi as I, lr as J, Er as K, Hi as L, Zi as M, Qi as N, aa as O, Xi as P, Un as Q, pi as R, ua as S, sa as T, Rr as U, Xr as V, Tr as W, Wn as X, Hn as Y, X as Z, Ia as _, xo as a, Ea as b, ho as c, co as d, xn as et, so as f, za as g, Fa as h, bo as i, Ui as j, ra as k, fo as l, Ga as m, Eo as n, So as o, Ja as p, Dr as q, To as r, go as s, Ao as t, J as tt, uo as u, ka as v, ca as w, ba as x, Ca as y, ni as z };