PageSourceSearch

https://www.saintsal.ai/_next/static/chunks/5533-f98b7ed0672d3154.js

js saintsal.ai collected 2026-10-05 14:10:38 UTC 25,831 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5533],{16983:()=>{},30168:(e,t,n)=>{"use strict";n.d(t,{NB:()=>_,L6:()=>z,Ay:()=>I,q2:()=>L});var a=n(95155),i=n(71792),r=n(12115),s=n(15239),l=n(89715),o=n(65229),c=n(6191),d=n(18085),x=n(39068),p=n(78192),h=n(34604),u=n(5917),m=n(6132),b=n(24033),g=n(39142),f=n(81315),w=n(14285),y=n(50905),v=n(95074),A=n(37069),j=n(53978),k=n(47886),N=n(47650),S=n(61654);function F(e){let{open:t,onClose:n,onSelect:i}=e,s=(0,r.useRef)(null),[l,c]=(0,r.useState)(!1);if(!t||"undefined"==typeof document)return null;let d=e=>{e&&e.length&&(null==i||i(e)),n()};return(0,N.createPortal)((0,a.jsx)("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/60 p-4 backdrop-blur-md",style:{fontFamily:y.zk},onClick:n,role:"dialog","aria-modal":"true","aria-label":"Upload file",children:(0,a.jsxs)("div",{className:"w-[380px] max-w-[92vw] rounded-2xl border border-white/10 bg-[#0d0d10] p-4 shadow-2xl",onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"mb-3.5 flex items-center justify-between",children:[(0,a.jsx)("h3",{className:"text-[15px] font-medium text-white",children:"Upload File"}),(0,a.jsx)("button",{type:"button",onClick:n,"aria-label":"Close",className:"text-zinc-500 transition-colors hover:text-zinc-200",children:(0,a.jsx)(o.A,{className:"h-4 w-4"})})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{var e;return null==(e=s.current)?void 0:e.click()},onDragOver:e=>{e.preventDefault(),c(!0)},onDragLeave:()=>c(!1),onDrop:e=>{e.preventDefault(),c(!1),d(e.dataTransfer.files)},className:"flex w-full flex-col items-center gap-2.5 rounded-xl px-6 py-8 text-center transition-colors",style:{border:"1.5px dashed rgba(250,170,23,0.55)",background:l?"rgba(250,170,23,0.06)":"transparent"},children:[(0,a.jsx)(S.A,{className:"h-7 w-7 text-[#FAAA17]",strokeWidth:1.7}),(0,a.jsx)("p",{className:"text-[15px] font-medium text-white",children:"Drop files here or click to upload"}),(0,a.jsx)("p",{className:"max-w-[300px] text-[12.5px] leading-[18px] text-white/40",children:"Supports: PDF, Word, Text, CSV, JSON, Markdown, Images (max 8MB)"}),(0,a.jsx)("span",{className:"mt-2 rounded-lg px-5 py-2 text-[14px] font-semibold text-[#1a1300]",style:{background:"linear-gradient(180deg,#FFD25E 0%,#FBB024 50%,#F59E0B 100%)"},children:"Choose File"})]}),(0,a.jsx)("input",{ref:s,type:"file",multiple:!0,accept:".pdf,.doc,.docx,.txt,.csv,.json,.md,image/*",className:"hidden",onChange:e=>d(e.target.files)})]})}),document.body)}let C=()=>{Promise.all([n.e(2613),n.e(1153)]).then(n.bind(n,83534)).catch(()=>{})},z=[{id:"claude",label:"SaintSal™",provider:"anthropic",description:"For everything (fast and responsive)"},{id:"dual",label:"SaintSal™ HACP™ Mode",provider:"anthropic",description:"For complex tasks (uses more tokens)"},{id:"perplexity",label:"SaintSal™ Search",provider:"perplexity",description:"Live web search & real-time research"},{id:"grok",label:"SaintSal™ Creator",provider:"grok",description:"Trending topics, creative & social media"}],E=[{id:null,label:"Auto",description:"Sal picks the right depth for each question"},{id:"mini",label:"Mini",description:"Fastest and cheapest, for simple questions"},{id:"balanced",label:"Balanced",description:"Everyday depth for most work"},{id:"pro",label:"Pro",description:"Deepest thinking, for hard problems"}],_=E[0],P=e=>z.find(t=>t.id===e),$=e=>E.find(t=>t.id===e),O=[{label:"SaintSal™ Auto",description:"Picks the right depth for each question",model:P("claude"),tier:$(null)},{label:"SaintSal™ Mini",description:"Fastest and cheapest, for simple questions",model:P("claude"),tier:$("mini")},{label:"SaintSal™",description:"Everyday depth for most work",model:P("claude"),tier:$("balanced")},{label:"SaintSal™ Pro",description:"Deepest thinking, for hard problems",model:P("claude"),tier:$("pro")},{label:"SaintSal™ HACP™ Mode",description:"For complex tasks (uses more tokens)",model:P("dual"),tier:$(null)},{label:"SaintSal™ Search",description:"Live web search & real-time research",model:P("perplexity"),tier:$(null)},{label:"SaintSal™ Creator",description:"Trending topics, creative & social media",model:P("grok"),tier:$(null)}],D=new Set(["dual","perplexity","grok","gemini","gpt"]),L=e=>!D.has(e);z.filter(e=>L(e.id));let T=O.filter(e=>L(e.model.id));function I(e){let{value:t,onChange:n,onSend:N,disabled:S,model:z,onModelChange:E,onStartVoice:P,webSearch:$,onToggleWebSearch:O,ultraPlan:D,onToggleUltraPlan:L,loading:I,loadingStatus:B,onAttach:W,attachedCount:M=0,agents:q=[],selectedAgent:J=null,onSelectAgent:R,onNewAgent:U,onDeleteAgent:Z,attachedFiles:G=[],onRemoveAttached:H,tier:K=_,onTierChange:Y}=e,[V,Q]=(0,r.useState)(!1),[X,ee]=(0,r.useState)(!1),[et,en]=(0,r.useState)(!1);(0,r.useEffect)(()=>{try{localStorage.getItem("sv_voice_hint_seen")||en(!0)}catch(e){}},[]);let ea=(0,r.useCallback)(()=>{en(!1);try{localStorage.setItem("sv_voice_hint_seen","1")}catch(e){}},[]),[ei,er]=(0,r.useState)(!1),[es,el]=(0,r.useState)([]),[eo,ec]=(0,r.useState)(!1),[ed,ex]=(0,r.useState)(null),ep=e=>e.alwaysOn?!!e.enabled:!!e.connected,eh=(0,r.useCallback)(async()=>{ec(!0);try{el(await (0,v.bG)())}catch(e){}finally{ec(!1)}},[]);(0,r.useEffect)(()=>{ei&&eh()},[ei,eh]),(0,r.useEffect)(()=>(eh(),(0,k.B1)(()=>{el([]),eh()})),[eh]);let eu=es.filter(ep).length,em=(0,r.useCallback)(async(e,t)=>{if(e.alwaysOn){ex(e.id),el(n=>n.map(n=>n.id===e.id?{...n,enabled:t}:n));try{await (0,v.qZ)(e.id,t)}catch(e){await eh()}finally{ex(null)}}},[eh]);return(0,a.jsxs)("div",{className:"w-full",style:{fontFamily:y.zk},children:[(0,a.jsx)(F,{open:X,onClose:()=>ee(!1),onSelect:W}),(0,a.jsx)("style",{children:"\n        @property --sv-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }\n        @keyframes svAngleSpin { to { --sv-angle: 360deg; } }\n        /* full continuous gold gradient that rotates around the whole perimeter — border only */\n        .sv-ai-ring {\n          padding: 1.8px;\n          background: conic-gradient(from var(--sv-angle),\n            #F3841F, #FAAA17, #FFE9A8, #FAAA17, #C77E12, #F3841F);\n          -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);\n          -webkit-mask-composite: xor;\n                  mask-composite: exclude;\n          animation: svAngleSpin 3s linear infinite;\n          filter: drop-shadow(0 0 4px rgba(250,170,23,0.55)) drop-shadow(0 0 9px rgba(250,170,23,0.35));\n        }\n        @media (prefers-reduced-motion: reduce){ .sv-ai-ring { animation: none } }\n      "}),G.length>0&&(()=>{let e=G.slice(0,3),t=G.length-e.length;return(0,a.jsxs)("div",{className:"mb-2 flex min-w-0 flex-nowrap items-center gap-2 overflow-hidden",children:[e.map(e=>(0,a.jsxs)("span",{className:"flex shrink-0 items-center gap-1.5 rounded-lg border border-[rgba(250,170,23,0.3)] bg-[#FAAA17]/[0.06] py-1 pl-2 pr-1 text-[12px] text-[#FAAA17]",children:[(0,a.jsx)(l.A,{className:"h-3.5 w-3.5 shrink-0"}),(0,a.jsx)("span",{className:"max-w-[140px] truncate",children:e.name}),H&&(0,a.jsx)("button",{type:"button",onClick:()=>H(e.id),"aria-label":"Remove ".concat(e.name),className:"flex h-4 w-4 shrink-0 items-center justify-center rounded text-[#FAAA17]/70 hover:bg-[#FAAA17]/15 hover:text-[#FAAA17]",children:(0,a.jsx)(o.A,{className:"h-3 w-3"})})]},e.id)),t>0&&(0,a.jsxs)("span",{className:"flex shrink-0 items-center rounded-lg border border-[rgba(250,170,23,0.3)] bg-[#FAAA17]/[0.06] px-2 py-1 text-[12px] text-[#FAAA17]",title:G.slice(3).map(e=>e.name).join(", "),children:["+",t," …"]}),(0,a.jsx)("button",{type:"button",onClick:()=>ee(!0),"aria-label":"Add more files",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border border-[rgba(250,170,23,0.3)] text-[#FAAA17] hover:bg-[#FAAA17]/[0.10]",children:(0,a.jsx)(c.A,{className:"h-3.5 w-3.5",
1strokeWidth:2.2})})]})})(),(0,a.jsxs)("div",{"data-tour":"composer",className:"relative rounded-2xl bg-[#0a0a0c]/60 p-4 backdrop-blur-md transition-all duration-200 ".concat(I?"border border-white/[0.07]":"border border-white/[0.07] focus-within:border-[rgba(250,170,23,0.6)] focus-within:shadow-[0_0_0_1px_rgba(250,170,23,0.35),0_0_28px_-6px_rgba(250,170,23,0.45)]"),children:[(0,a.jsx)("textarea",{value:t,onChange:e=>n(e.target.value),onKeyDown:e=>{"Enter"===e.key&&!e.shiftKey&&(e.preventDefault(),!S&&t.trim()&&N())},rows:2,placeholder:"Type your message...",className:"min-h-[60px] w-full resize-none bg-transparent pr-12 text-[15px] text-zinc-100 caret-[#FAAA17] placeholder:text-zinc-500 focus:outline-none"}),(0,a.jsx)("button",{type:"button",onClick:()=>t.trim()&&!S&&N(),disabled:S||!t.trim(),"aria-label":"Send",className:"absolute right-4 top-4 flex h-10 w-10 items-center justify-center rounded-full text-[#1a1300] transition-transform hover:scale-105 disabled:opacity-40",style:{background:"radial-gradient(circle at 50% 30%, #FFD877, #F59E0B)",boxShadow:"0 0 20px -2px rgba(250,170,23,0.7)"},children:I?(0,a.jsx)(i.A,{size:32,status:B,theme:"light",decorative:!0}):(0,a.jsx)(d.A,{className:"h-[18px] w-[18px]",strokeWidth:2})}),(0,a.jsxs)("div",{className:"mt-2 flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("button",{type:"button",onClick:O,"aria-label":"Web search","aria-pressed":$,className:"relative flex h-8 w-8 items-center justify-center rounded-lg border transition-colors ".concat($?"border-[rgba(250,170,23,0.55)] bg-[#FAAA17]/15 text-[#FAAA17]":"border-white/[0.07] text-zinc-400 hover:text-zinc-200"),children:[(0,a.jsx)(x.A,{className:"h-[17px] w-[17px]",strokeWidth:1.8}),$&&(0,a.jsx)("span",{className:"absolute -right-0.5 -top-0.5 h-2 w-2 rounded-full bg-emerald-400 ring-2 ring-[#141417]"})]}),(0,a.jsxs)("button",{type:"button",onClick:L,"aria-label":"Ultra plan","aria-pressed":D,className:"relative flex h-8 w-8 items-center justify-center rounded-lg border transition-colors ".concat(D?"border-[rgba(250,170,23,0.55)] bg-[#FAAA17]/15 text-[#FAAA17]":"border-white/[0.07] text-zinc-400 hover:text-zinc-200"),children:[(0,a.jsx)(p.A,{className:"h-[17px] w-[17px]",strokeWidth:1.8}),D&&(0,a.jsx)("span",{className:"absolute -right-0.5 -top-0.5 h-2 w-2 rounded-full bg-emerald-400 ring-2 ring-[#141417]"})]}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>er(e=>!e),"aria-label":"Connectors","aria-pressed":ei,className:"relative flex h-8 items-center gap-1.5 rounded-lg border px-2 transition-colors ".concat(eu>0?"border-[rgba(250,170,23,0.55)] bg-[#FAAA17]/15 text-[#FAAA17]":"border-white/[0.07] text-zinc-400 hover:text-zinc-200"),children:[(0,a.jsx)(h.A,{className:"h-[17px] w-[17px]",strokeWidth:1.8}),eu>0&&(0,a.jsx)("span",{className:"text-[11px] font-semibold",children:eu})]}),ei&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"fixed inset-0 z-40",onClick:()=>er(!1),"aria-hidden":!0}),(0,a.jsxs)("div",{className:"absolute bottom-full left-0 z-50 mb-2 w-80 rounded-xl border border-white/10 bg-[#141417] p-2 shadow-2xl",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-2 py-1.5",children:[(0,a.jsx)("span",{className:"text-[13px] font-semibold text-zinc-200",children:"Connectors"}),(0,a.jsxs)("span",{className:"text-[11px] text-zinc-500",children:[eu," on"]})]}),(0,a.jsx)("div",{className:"my-1 h-px bg-white/[0.06]"}),(0,a.jsx)("div",{className:"max-h-72 space-y-0.5 overflow-y-auto",children:eo&&0===es.length?(0,a.jsxs)("div",{className:"flex items-center gap-2 px-2 py-3 text-[12px] text-zinc-500",children:[(0,a.jsx)(i.A,{activity:"working",decorative:!0})," Loading connectors…"]}):0===es.length?(0,a.jsx)("p",{className:"px-2 py-3 text-[12px] text-zinc-500",children:"No connectors available."}):es.map(e=>{let t=ep(e),n=!!e.alwaysOn&&!1===e.configured;return(0,a.jsxs)("div",{className:"flex items-start gap-2.5 rounded-lg px-2 py-2 hover:bg-white/[0.03]",children:[(0,a.jsx)("div",{className:"mt-0.5",children:t?(0,a.jsx)(u.A,{className:"h-4 w-4 text-emerald-400"}):n?(0,a.jsx)(m.A,{className:"h-4 w-4 text-zinc-600"}):(0,a.jsx)(h.A,{className:"h-4 w-4 text-zinc-500"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-[13px] font-medium text-zinc-100",children:e.name}),e.readOnly&&(0,a.jsx)("span",{className:"rounded bg-white/10 px-1 text-[10px] text-zinc-400",children:"read-only"}),e.costsCredits&&(0,a.jsx)("span",{className:"rounded bg-amber-500/15 px-1 text-[10px] text-amber-400",children:"costs credits"}),e.alwaysOn&&(0,a.jsx)("span",{className:"rounded bg-[#FAAA17]/15 px-1 text-[10px] text-[#FAAA17]",children:"default"}),!e.connected&&!e.alwaysOn&&e.usableInChat&&(0,a.jsx)("span",{className:"rounded bg-emerald-500/15 px-1 text-[10px] text-emerald-400",children:"ready"})]}),(0,a.jsx)("p",{className:"mt-0.5 text-[11px] leading-snug text-zinc-500",children:n?e.note||"Not configured on the server yet.":e.description}),!n&&e.actions&&e.actions.length>0&&(0,a.jsx)("div",{className:"mt-1.5 flex flex-wrap gap-1",children:e.actions.map(e=>(0,a.jsx)("span",{className:"rounded border border-white/[0.06] bg-white/[0.03] px-1.5 py-0.5 text-[10px] leading-none text-zinc-400",children:e},e))})]}),ed===e.id?(0,a.jsx)(i.A,{activity:"working",decorative:!0}):e.alwaysOn?!n&&(0,a.jsx)("button",{type:"button",onClick:()=>em(e,!t),className:"mt-0.5 shrink-0 rounded-md border px-2 py-1 text-[11px] font-medium transition-colors ".concat(t?"border-white/10 text-zinc-400 hover:text-zinc-200":"border-[rgba(250,170,23,0.4)] text-[#FAAA17] hover:bg-[#FAAA17]/10"),children:t?"On":"Off"}):t?e.connectPath?(0,a.jsx)("a",{href:e.connectPath,className:"mt-0.5 shrink-0 rounded-md border border-white/10 px-2 py-1 text-[11px] font-medium text-zinc-400 hover:text-zinc-200",children:"On"}):(0,a.jsx)("span",{className:"mt-0.5 shrink-0 rounded-md border border-white/10 px-2 py-1 text-[11px] font-medium text-zinc-400",children:"On"}):e.connectPath?e.usableInChat?(0,a.jsx)("a",{href:e.connectPath,title:"Working through the shared SaintSal account. Connect your own to use your own data.",className:"mt-0.5 shrink-0 rounded-md border border-white/10 px-2 py-1 text-[11px] font-medium text-zinc-400 hover:text-zinc-200",children:"Use my own"}):(0,a.jsx)("a",{href:e.connectPath,className:"mt-0.5 shrink-0 rounded-md border border-[rgba(250,170,23,0.4)] px-2 py-1 text-[11px] font-medium text-[#FAAA17] hover:bg-[#FAAA17]/10",children:"Connect"}):e.usableInChat?(0,a.jsx)("span",{title:"Working through the shared SaintSal account.",className:"mt-0.5 shrink-0 rounded-md border border-white/10 px-2 py-1 text-[11px] font-medium text-zinc-400",children:"Shared"}):(0,a.jsx)("span",{title:"Connect this in the SaintSal desktop app. The web app has no connect flow for it.",className:"mt-0.5 shrink-0 rounded-md border border-white/10 px-2 py-1 text-[11px] font-medium text-zinc-500",children:"Desktop only"})]},e.id)})}),(0,a.jsx)("div",{className:"my-1 h-px bg-white/[0.06]"}),(0,a.jsx)(A.u,{client:j.H,onSelect:e=>{n("Use the ".concat(e.label," connector (custom_mcp:").concat(e.id,") for this request.\n\n").concat(t)),er(!1)}}),(0,a.jsx)("p",{className:"px-2 py-1 text-[11px] text-zinc-600",children:"Default connectors are on for everyone. Manage the rest anytime in Connectors."})]})]})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>Q(e=>!e),"aria-haspopup":"menu","aria-expanded":V,className:"flex items-center gap-1.5 rounded-lg px-2 py-1 text-[13px] text-zinc-300 hover:bg-white/[0.04]",children:[(0,a.jsx)(s.default,{src:"/figma/chat/model-logo.png",alt:"",width:40,height:40,className:"h-4 w-4 object-contain"}),(0,a.jsx)("span",{className:"text-zinc-500",children:"AI Model:"}),(0,a.jsx)("span",{className:"font-semibold text-[#FAAA17]",children:(T.find(e=>e.model.id===z.id&&e.tier.id===K.id)||T.find(e=>e.model.id===z.id)||T[0]).label}),(0,a.jsx)(b.A,{className:"h-3.5 w-3.5 text-zinc-500"})]}),V&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"fixed inset-0 z-10",onClick:()=>Q(!1),"aria-hidden":!0}),(0,a.jsxs)("div",{className:"absolute bottom-full right-0 z-20 mb-2 w-[248px] overflow-hidden rounded-2xl border border-white/10 bg-[#0f0f13] p-1.5 shadow-2xl",role:"menu",children:[T.map(e=>{let t=e.model.id===z.id&&e.tier.id===K.id;return(0,a.jsxs)("button",{type:"button",role:"menuitem",onClick:()=>{E(e.model),null==Y||Y(e.tier),Q(!1)},className:"flex w-full flex-col gap-0.5 rounded-lg px-3 py-2.5 text-left transition-colors ".concat(t?"bg-[#FAAA17]/[0.10]":"hover:bg-white/[0.05]"),children:[(0,a.jsx)("span",{className:"text-[13px] font-semibold ".concat(t?"text-[#FAAA17]":"text-zinc-100"),children:e.label}),(0,a.jsx)("span",{className:"truncate text-[11.5px] text-zinc-500",children:e.description})]},e.label)}),(0,a.jsx)("p",{className:"px-3 pb-1.5 pt-2 text-[10.5px] leading-snug text-zinc-600",children:"Sensitive topics always use a higher tier, whichever you pick."})]})]})]}),(0,a.jsxs)("div",{className:"relative flex items-center gap-1",children:[(0,a.jsx)("button",{type:"button",onPointerEnter:C,onFocus:C,onClick:()=>{ea(),null==P||P(!1)},className:"flex h-8 w-8 items-center justify-center rounded-lg text-zinc-400 hover:text-zinc-200","aria-label":"Live voice chat",title:"Live voice chat",children:(0,a.jsx)(g.A,{className:"h-[17px] w-[17px]",strokeWidth:1.8})}),(0,a.jsx)("button",{type:"button",onPointerEnter:C,onFocus:C,onClick:()=>{ea(),null==P||P(!0)},className:"flex h-8 w-8 items-center justify-center rounded-lg text-zinc-400 hover:text-zinc-200","aria-label":"Share screen and talk",title:"Share your screen and talk to SAL",children:(0,a.jsx)(f.A,{className:"h-[17px] w-[17px]",strokeWidth:1.8})}),et&&(0,a.jsxs)("div",{className:"absolute bottom-full right-0 z-30 mb-2 w-max max-w-[240px] rounded-xl border border-[#FAAA17]/30 bg-black/80 px-3 py-2 text-left shadow-[0_8px_24px_-8px_rgba(0,0,0,0.7)] backdrop-blur-md",children:[(0,a.jsx)("span",{"aria-hidden":!0,
1className:"absolute -bottom-1 right-12 h-2 w-2 rotate-45 border-b border-r border-[#FAAA17]/30 bg-black/80"}),(0,a.jsx)("p",{className:"text-[12px] font-medium text-white",children:"Talk to SAL"}),(0,a.jsx)("p",{className:"mt-0.5 text-[11px] leading-snug text-white/60",children:"Tap the mic to start a live voice chat."}),(0,a.jsxs)("div",{className:"mt-1.5 flex items-center gap-3",children:[(0,a.jsx)("button",{type:"button",onPointerEnter:C,onFocus:C,onClick:()=>{ea(),null==P||P(!1)},className:"text-[11px] font-semibold text-[#FAAA17] hover:brightness-110",children:"Try it"}),(0,a.jsx)("button",{type:"button",onClick:ea,className:"text-[11px] text-white/45 hover:text-white/70",children:"Dismiss"})]})]})]})]})]})]}),(0,a.jsxs)("div",{className:"mt-2 flex items-center justify-between px-1 text-[12px] text-zinc-500",children:[(0,a.jsx)("span",{children:"Collaborate with Clarity using documents, images and more"}),(0,a.jsxs)("button",{type:"button",onClick:()=>ee(!0),className:"flex items-center gap-1.5 hover:text-zinc-300 ".concat(M>0?"text-[#FAAA17]":""),children:[(0,a.jsx)(w.A,{className:"h-3.5 w-3.5"}),M>0?"".concat(M," attached"):"Attach content"]})]})]})}},37908:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var a=n(95155),i=n(12115),r=n(12347),s=n(6408),l=n(58808),o=n(92397),c=n(37039);n(76105),n(16983);let d=[s.A,l.A],x={trust:!1,strict:"ignore",maxSize:20,maxExpand:1e3},p=(0,i.memo)(function(e){let{children:t,components:n,streaming:s=!1}=e,l=(0,i.useMemo)(()=>(function(e){let t=[],n="",a=()=>{var e;t.push((e=n)&&"string"==typeof e?/#{2,6}[ \t]|\d\.[ \t]+\*\*|[*-][ \t]+(?:\*\*|[A-Z])/.test(e)?(function(e){let t,n=[],a=/(```[\s\S]*?(?:```|$)|~~~[\s\S]*?(?:~~~|$)|`[^`\n]*`)/g,i=0;for(;null!==(t=a.exec(e));)t.index>i&&n.push({code:!1,text:e.slice(i,t.index)}),n.push({code:!0,text:t[0]}),i=t.index+t[0].length;return i<e.length&&n.push({code:!1,text:e.slice(i)}),n})(e).map(e=>e.code?e.text:e.text.replace(/([^\n\s])[ \t]+(#{2,6}[ \t]+\S)/g,"$1\n\n$2").replace(/([.:;!?])[ \t]+(\d{1,2}\.[ \t]+\*\*)/g,"$1\n\n$2").replace(/([.:;!?])[ \t]+([*-][ \t]+(?:\*\*|[A-Z]))/g,"$1\n\n$2")).join(""):e:e||""),n=""};for(let i=0;i<e.length;){if(0===i||"\n"===e[i-1]){let n=/^( {0,3})(`{3,}|~{3,})[^\n]*(?:\n|$)/.exec(e.slice(i));if(n){let r=RegExp("^ {0,3}".concat(n[2][0],"{").concat(n[2].length,",}[ \\t]*\\r?$"),"gm");r.lastIndex=i+n[0].length;let s=r.exec(e),l=s?s.index+s[0].length:e.length;a(),t.push(e.slice(i,l)),i=l;continue}let r=/^(?: {4}|\t)[^\n]*(?:\n|$)/.exec(e.slice(i));if(r){a(),t.push(r[0]),i+=r[0].length;continue}}if("`"===e[i]){let n=/^`+/.exec(e.slice(i))[0],r=RegExp("(?<!`)`{"+n.length+"}(?!`)","g");r.lastIndex=i+n.length;let s=r.exec(e),l=s?s.index+n.length:e.length;a(),t.push(e.slice(i,l)),i=l;continue}let r=e.slice(i,i+2),s="\\("===r||"\\["===r;if(s||"$"===e[i]){let l="\\["===r||"$$"===r,o=s?l?"\\]":"\\)":l?"$$":"$",c=s||l?2:1,d=function(e,t,n){let a=e.indexOf(t,n);for(;-1!==a;){let n=0;for(let t=a-1;t>=0&&"\\"===e[t];t--)n++;if(n%2==0)return a;a=e.indexOf(t,a+t.length)}return -1}(e,o,i+c),x=d<0?"":e.slice(i+c,d);if(d>=0&&x.trim()&&(s||l||!/^\s|\s$|\n/.test(x)&&!/\d/.test(e[d+1]||""))){a(),t.push(l?"\n\n$$\n".concat(x.trim(),"\n$$\n\n"):"$".concat(x.trim(),"$")),i=d+o.length;continue}if(!s){n+=l?"\\$\\$":"\\$",i+=c;continue}}"\\"===e[i]&&i+1<e.length?(n+=e.slice(i,i+2),i+=2):n+=e[i++]}return a(),t.join("")})(t),[t]),p=(0,i.useMemo)(()=>({...n,pre:c.Zt}),[n]);return(0,a.jsx)("div",{className:"ss-chat-markdown",children:(0,a.jsx)(c.q5,{content:l,streaming:s,pre:null==n?void 0:n.pre,children:(0,a.jsx)(r.oz,{remarkPlugins:d,rehypePlugins:[[o.A,x]],components:p,children:l})})})})},41406:(e,t,n)=>{"use strict";
1n.d(t,{CreditsProvider:()=>d,I:()=>x});var a=n(95155),i=n(12115),r=n(47886),s=n(70476);let l={balance:0,spendable:null,unlimited:!1,lifetimeEarned:0,lifetimeSpent:0,loginStreak:0,lastLoginDate:null,policy:null,transactions:[],isLoading:!0,isLow:!1,isEmpty:!1},o=(0,i.createContext)(null);function c(e,t){return{balance:e,spendable:t,isLow:null!==t&&t<20,isEmpty:null!==t&&0===t}}function d(e){let{children:t}=e,[n,d]=(0,i.useState)(l),[x,p]=(0,i.useState)(!1);(0,i.useEffect)(()=>{let e=!1;(0,r.getSession)().then(t=>{e||p(!!(null==t?void 0:t.user))});let t=(0,r.B1)((e,t)=>{p(!!(null==t?void 0:t.user))});return()=>{e=!0,t()}},[]);let h=(0,i.useCallback)(async()=>{if(!x)return void d({...l,isLoading:!1});try{var e,t,n,a,i,r,o;let l=await (0,s.vh)();d({lifetimeEarned:null!=(e=l.lifetime_earned)?e:0,lifetimeSpent:null!=(t=l.lifetime_spent)?t:0,loginStreak:null!=(n=l.login_streak)?n:0,lastLoginDate:null!=(a=l.last_login_date)?a:null,policy:null!=(i=l.policy)?i:null,transactions:null!=(r=l.transactions)?r:[],isLoading:!1,unlimited:(0,s.g4)(l),...c(null!=(o=l.balance)?o:0,(0,s.p5)(l))})}catch(e){d(e=>({...e,isLoading:!1}))}},[x]),u=(0,i.useCallback)(e=>{d(t=>({...t,lifetimeSpent:e<t.balance?t.lifetimeSpent+(t.balance-e):t.lifetimeSpent,...c(e,t.spendable)}))},[]),m=(0,i.useCallback)(async()=>{let e=await (0,s.Y1)();return e.awarded&&d(t=>({...t,loginStreak:e.streak,lifetimeEarned:t.lifetimeEarned+e.creditsGiven,...c(e.newBalance,t.spendable)})),e},[]);return(0,i.useEffect)(()=>{h()},[h]),(0,i.useEffect)(()=>{if(!x||"undefined"==typeof document)return;let e=()=>{"visible"===document.visibilityState&&h()};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[x,h]),(0,a.jsx)(o.Provider,{value:{...n,refresh:h,setBalance:u,awardDailyLogin:m},children:t})}function x(){let e=(0,i.useContext)(o);
1if(!e)throw Error("useCredits must be used within CreditsProvider");return e}},72246:(e,t,n)=>{"use strict";n.d(t,{YP:()=>o,pz:()=>l,sk:()=>s});var a=n(47886);let i="sal_avatar_mode",r="work";function s(){try{return!!(0,a.R6)()}catch(e){return!1}}function l(){if(!s())return"chat";try{return"chat"===window.localStorage.getItem(i)?"chat":r}catch(e){return r}}function o(e){try{window.localStorage.setItem(i,e)}catch(e){}}},95074:(e,t,n)=>{"use strict";n.d(t,{Bi:()=>x,Gv:()=>p,IP:()=>d,bG:()=>l,cb:()=>o,cm:()=>c,qZ:()=>s});var a=n(47886);let i=(0,n(59589).lJ)();async function r(){let e=await (0,a.gf)();return{"Content-Type":"application/json",...e?{Authorization:"Bearer ".concat(e)}:{}}}async function s(e,t){let n=await r(),a=await fetch("".concat(i,"/api/skills/toggle"),{method:"POST",headers:n,body:JSON.stringify({skillId:e,enabled:t})}),s=await a.json();if(!s.success)throw Error(s.error||"Failed to toggle connector")}async function l(){let e=await r(),t=await fetch("".concat(i,"/api/skills"),{headers:e}),n=await t.json();if(!n.success)throw Error(n.error||"Failed to list skills");return n.data}async function o(e,t,n){let a=await r(),s=await fetch("".concat(i,"/api/skills/connect/token"),{method:"POST",headers:a,body:JSON.stringify({skillId:e,credential:t,config:n})}),l=await s.json();if(!l.success)throw Error(l.error||"Failed to connect skill")}async function c(e){let t=await r(),n=await fetch("".concat(i,"/api/skills/oauth/start"),{method:"POST",headers:t,body:JSON.stringify({skillId:e})}),a=await n.json();if(!a.success)throw Error(a.error||"Failed to start OAuth");return a.url}async function d(e){let t=await r(),n=await fetch("".concat(i,"/api/skills/").concat(e),{method:"DELETE",headers:t}),a=await n.json();if(!a.success)throw Error(a.error||"Failed to disconnect skill")}let x={communication:"Communication",productivity:"Productivity",developer:"Developer",automation:"Automation"},p={communication:"text-blue-400 bg-blue-500/10 border-blue-500/30",productivity:"text-purple-400 bg-purple-500/10 border-purple-500/30",developer:"text-green-400 bg-green-500/10 border-green-500/30",automation:"text-yellow-400 bg-yellow-500/10 border-yellow-500/30"}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.