1import{o as e}from"./chunk-C-L9q8_q.js";import{n as t,t as n}from"./jsx-runtime-Ddhrl-jj.js";import{A as r,I as i,M as a,c as o,k as s,r as c}from"./chunk-QFMPRPBF-BQNaR4b6.js";import{t as l}from"./createLucideIcon-BqUX5gTW.js";import{a as u,c as d,i as f,n as ee,o as p,r as m,t as h}from"./topic-history-item-DcQpsgM-.js";import{t as g}from"./check-UOvaoQxu.js";import{s as _}from"./sheet-gQRdn02y.js";import{b as v,c as y,d as te,f as b,g as ne,l as x,s as S,v as C}from"./legacy-chat-api-CsTZLAxK.js";import{n as re}from"./sidebar-open-state-cBV9vvOV.js";import{t as w}from"./user-DT8kyFmk.js";import{t as T}from"./scroll-area-D0W7uTxj.js";import{l as E,t as D}from"./skeleton-DWsMtjJl.js";import{t as O}from"./auth-Bur-t9X4.js";import{t as k}from"./useTranslation-6udlnGWM.js";import{r as ie}from"./locales--DO7F5tw.js";import{d as ae,l as A,t as j,u as M}from"./chat-DvQmzBt8.js";import{a as N}from"./www-routing-C4Y6jevX.js";import{a as P,o as F}from"./auth-redirect-B0FOzrLa.js";import{n as I,r as L,t as R}from"./popover-D_8zIXxS.js";import{n as z,t as B}from"./proxy-Bh8WXv3_.js";var V=l(`Menu`,[[`line`,{x1:`4`,x2:`20`,y1:`12`,y2:`12`,key:`1e0a9i`}],[`line`,{x1:`4`,x2:`20`,y1:`6`,y2:`6`,key:`1owob3`}],[`line`,{x1:`4`,x2:`20`,y1:`18`,y2:`18`,key:`yk5zj1`}]]),H=e(t(),1),U=n();function W(){let{t:e,i18n:t}=k(),n=O(e=>e.authToken),r=s(),i=(0,H.useMemo)(()=>ie(t.resolvedLanguage??t.language,`/`),[t.resolvedLanguage,t.language]),[a,o]=(0,H.useState)(()=>A(n)??[]),[c,l]=(0,H.useState)(()=>A(n)?`ready`:`idle`),[u,d]=(0,H.useState)(0),f=j(e=>e.renameTopic),p=j(e=>e.deleteTopic);(0,H.useEffect)(()=>{if(!n){ae(),o([]),l(`idle`);return}let e=A(n);if(e&&u===0){o(e),l(`ready`);return}let t=!1;async function r(){l(`loading`);try{let e=await M(n,u>0);if(t)return;o(e),l(`ready`)}catch{if(t)return;l(`error`)}}return r(),()=>{t=!0}},[n,u]);let m=async e=>{await p(e),o(t=>t.filter(t=>t.id!==e))},g=async(e,t)=>{await f(e,t),o(n=>n.map(n=>n.id===e?{...n,name:t}:n))};return(0,U.jsxs)(S,{className:`flex-1 min-h-0 group-data-[collapsible=icon]:hidden`,children:[(0,U.jsx)(x,{className:`px-3 text-[11px] font-semibold uppercase tracking-wide text-slate-400`,children:e(`history`)}),(0,U.jsx)(y,{className:`overflow-hidden`,children:c===`loading`?(0,U.jsxs)(`div`,{className:`px-3 py-2 space-y-3`,children:[(0,U.jsx)(D,{className:`h-4 w-full rounded-md`}),(0,U.jsx)(D,{className:`h-4 w-[90%] rounded-md`}),(0,U.jsx)(D,{className:`h-4 w-[95%] rounded-md`}),(0,U.jsx)(D,{className:`h-4 w-[85%] rounded-md`})]}):(0,U.jsxs)(T,{className:`h-full`,children:[(0,U.jsx)(b,{children:(0,U.jsx)(z,{initial:!1,children:a.map(e=>(0,U.jsx)(B.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0,x:-20},transition:{duration:.25,ease:`easeOut`},style:{overflow:`hidden`},children:(0,U.jsx)(h,{id:e.id,isActive:ee(r.pathname,e.id),title:e.name,onRename:g,onDelete:m,fallbackPath:i})},e.id))})}),c===`error`?(0,U.jsx)(`div`,{className:`px-3 py-2`,children:(0,U.jsxs)(`button`,{type:`button`,className:`flex w-full items-center justify-between rounded-xl border border-slate-200 px-3 py-2 text-left text-xs text-slate-500 transition hover:bg-slate-50`,onClick:()=>{d(e=>e+1)},children:[(0,U.jsx)(`span`,{children:e(`loadHistoryFailed`)}),(0,U.jsx)(v,{className:`size-3.5`})]})}):null,c===`ready`&&a.length===0?(0,U.jsx)(`div`,{className:`px-3 py-2 text-xs leading-5 text-slate-400`,children:e(`noChatHistory`)}):null]})})]})}function G(e){let t=e.split(`-`);return`navItem_`+t[0]+t.slice(1).map(e=>e[0].toUpperCase()+e.slice(1)).join(``)}var K=[{slug:`ai-summarizer`},{slug:`youtube-video-summarizer`,hot:!0},{slug:`ai-powerpoint-summarizer`},{slug:`ai-image-summarizer`,hot:!0},{slug:`book-summarizer`},{slug:`research-paper-summarizer`},{slug:`podcast-summarizer`},{slug:`ai-document-summarizer`},{slug:`ai-website-summarizer`}],q=[{slug:`video-to-mind-map`},{slug:`pdf-to-mind-map`},{slug:`image-to-mind-map`,hot:!0},{slug:`text-to-mind-map`},{slug:`relationship-chart-maker`,hot:!0}],J=[{titleKey:`navAiWriting`,items:[{slug:`ai-story-generator`,hot:!0},{slug:`true-or-false-generator`},{slug:`ai-argument-generator`},{slug:`press-release-generator`},{slug:`instagram-name-generator`,hot:!0},{slug:`job-description-generator`},{slug:`ai-sop-generator`,hot:!0},{slug:`ai-paragraph-expander`}]},{titleKey:`navAiAnalysis`,items:[{slug:`ai-handwriting-recognition`,hot:!0},{slug:`ai-study-guide-maker`},{slug:`ai-math-solver`},{slug:`chat-with-pdf`},{slug:`youtube-transcript-generator`},{slug:`ai-chart-maker`,hot:!0},{slug:`tiktok-transcript-generator`},{slug:`audio-to-text-converter`}]}
1,{titleKey:`navAiConverter`,items:[{slug:`mp4-to-text`},{slug:`audio-to-text-converter`},{slug:`ai-pdf-to-markdown-converter`}]}],Y=[{titleKey:`navAiWorkflow`,items:[{slug:`ai-workflow`},{slug:`ai-for-knowledge-workers`},{slug:`ai-document-workflow`},{slug:`ai-meeting-workflow`},{slug:`ai-research-workflow`},{slug:`ai-report-workflow`},{slug:`ai-office-assistant`},{slug:`ai-learning`}],grid:!0},{titleKey:`navForUsers`,items:[{slug:`for-students`},{slug:`for-creators`},{slug:`for-marketers`},{slug:`for-startups`}]}];function X(){let{activeLocale:e}=u();return e}function Z({items:e}){let{t}=k(`common`),n=X();return(0,U.jsx)(`div`,{className:`absolute top-full left-1/2 -translate-x-1/2 pt-2 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50`,children:(0,U.jsxs)(`div`,{className:`bg-white rounded-[10px] shadow-[0_4px_40px_rgba(164,177,204,0.5)] p-5 w-[280px] flex flex-col items-center`,children:[(0,U.jsx)(`div`,{className:`w-full max-h-[480px] overflow-y-auto space-y-1`,children:e.map(e=>(0,U.jsx)(c,{to:N(n,`/agents/${e.slug}`),className:`block px-2 py-1 text-sm rounded-[7px] leading-[40px] text-gray-700 hover:bg-[#edeff2] hover:pl-3 transition-all`,children:t(G(e.slug))},e.slug))}),(0,U.jsxs)(c,{to:N(n,`/agents`),className:`mt-3 text-sm text-[#246bfa] font-medium hover:font-bold hover:underline transition-all`,children:[t(`navAllAgents`),` >`]})]})})}function oe(){let{t:e}=k(`common`),t=X();return(0,U.jsx)(`div`,{className:`absolute top-full left-1/2 -translate-x-1/2 pt-2 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50`,children:(0,U.jsxs)(`div`,{className:`bg-white rounded-[10px] shadow-[0_4px_40px_rgba(164,177,204,0.5)] p-5 w-[780px] flex flex-col items-center`,children:[(0,U.jsx)(`div`,{className:`flex w-full gap-0`,children:J.map((n,r)=>(0,U.jsxs)(`div`,{className:`flex-1 px-2 relative ${r<J.length-1?`after:content-[''] after:absolute after:right-1 after:top-10 after:bottom-2 after:w-px after:border-r-2 after:border-[#f6f6f6]`:``}`,children:[(0,U.jsx)(`div`,{className:`px-2 font-bold text-base leading-[34px]`,children:e(n.titleKey)}),(0,U.jsx)(`div`,{className:`max-h-[480px] overflow-y-auto space-y-1`,children:n.items.map(n=>(0,U.jsx)(c,{to:N(t,`/agents/${n.slug}`),className:`block px-2 py-0 text-sm rounded-[7px] leading-[40px] text-gray-700 hover:bg-[#edeff2] hover:pl-3 transition-all`,children:e(G(n.slug))},n.slug))})]},n.titleKey))}),(0,U.jsxs)(c,{to:N(t,`/agents`),className:`mt-3 text-sm text-[#246bfa] font-medium hover:font-bold hover:underline transition-all`,children:[e(`navAllAgents`),` >`]})]})})}function se(){let{t:e}=k(`common`),t=X();return(0,U.jsx)(`div`,{className:`absolute top-full left-1/2 -translate-x-1/2 pt-2 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50`,children:(0,U.jsx)(`div`,{className:`bg-white rounded-[10px] shadow-[0_4px_40px_rgba(164,177,204,0.5)] p-5 w-[760px] flex flex-col items-center`,children:(0,U.jsx)(`div`,{className:`flex w-full`,children:Y.map((n,r)=>(0,U.jsxs)(`div`,{className:`px-4 relative ${r===0?`flex-[0_0_500px] max-w-[500px]`:`flex-1`} ${r<Y.length-1?`after:content-[''] after:absolute after:right-0 after:top-10 after:bottom-2 after:w-px after:border-r-2 after:border-[#f6f6f6]`:``}`,children:[(0,U.jsx)(`div`,{className:`px-1 font-bold text-base leading-[34px]`,children:e(n.titleKey)}),(0,U.jsx)(`div`,{className:`max-h-[480px] overflow-y-auto ${n.grid?`grid grid-cols-2 gap-x-6`:`space-y-0`}`,children:n.items.map(n=>(0,U.jsx)(c,{to:N(t,`/solutions/${n.slug}`),className:`block px-1 text-sm rounded-[7px] leading-[40px] text-gray-700 hover:bg-[#edeff2] hover:pl-3 transition-all whitespace-nowrap`,children:e(G(n.slug))},n.slug))})]},n.titleKey))})})})}function Q(){let[e,t]=(0,H.useState)(!1),{activeLocale:n,switchLanguage:r,locales:i}=u(),a=i.find(e=>e.code===n)??i[0];return(0,U.jsxs)(R,{open:e,onOpenChange:t,children:[(0,U.jsx)(L,{asChild:!0,children:(0,U.jsxs)(`button`,{className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-[15px] font-semibold text-gray-700 hover:text-[#246bfa] cursor-pointer transition-colors`,children:[(0,U.jsx)(d,{className:`w-4 h-4`}),(0,U.jsx)(`span`,{className:`hidden xl:inline`,children:a.label}),(0,U.jsx)(_,{className:`w-3.5 h-3.5`})]})}),(0,U.jsx)(I,{align:`end`,className:`w-44 p-1 rounded-xl`,children:i.map(e=>(0,U.jsxs)(`button`,{onClick:()=>{r(e.code),t(!1)},className:`flex w-full items-center justify-between rounded-lg px-3 py-2 text-sm text-slate-700 hover:bg-slate-50 cursor-pointer`,children:[(0,U.jsx)(`span`,{children:e.label}),e.code===n&&(0,U.jsx)(g,{className:`w-4 h-4 text-[#05f]`})]},e.code))})]})}function ce(){let[e,t]=(0,H.useState)(!1),{toggleSidebar:n,isMobile:r}=C(),i=O(e=>e.userProfile),{t:a}=k(`common`),o=X(),l=F(s()),u=P(o);return(0,U.jsxs)(`header`,{className:`sticky top-0 z-50 bg-white border-b border-gray-100`,children:[(0,U.jsxs)(`div`,{className:`max-w-[1400px] mx-auto flex items-center justify-between h-[70px] px-6`,children:[r&&(0,U.jsx)(`button`,{type:`button`,className:`mr-2 flex items-center justify-center size-9 rounded-lg text-gray-600 hover:bg-gray-100 lg:hidden`,onClick:n,children:(0,U.jsx)(p,{className:`w-5 h-5`})}),(0,U.jsx)(`div`,{className:`hidden h-[34px] w-[70px] shrink-0 lg:block`,"aria-hidden":`true`}),(0,U.jsxs)(`nav`,{className:`hidden lg:flex items-center gap-1`,children:[(0,U.jsxs)(`div`,{className:`relative group`,children:[(0,U.jsxs)(`button`,{className:`flex items-center gap-1 px-4 py-2 text-[15px] font-semibold text-gray-700 hover:text-[#246bfa] transition-colors`,children:[a(`navAiSummary`),(0,U.jsx)(_,{className:`w-3.5 h-3.5`})]}),(0,U.jsx)(Z,{items:K})]}),(0,U.jsxs)(`div`,{className:`relative group`,children:[(0,U.jsxs)(`button`,{className:`flex items-center gap-1 px-4 py-2 text-[15px] font-semibold text-gray-700 hover:text-[#246bfa] transition-colors`,children:[a(`navAiMindMap`),(0,U.jsx)(_,{className:`w-3.5 h-3.5`})]}),(0,U.jsx)(Z,{items:q})]}),(0,U.jsxs)(`div`,{className:`relative group`,children:[(0,U.jsxs)(`button`,{className:`flex items-center gap-1 px-4 py-2 text-[15px] font-semibold text-gray-700 hover:text-[#246bfa] transition-colors`,children:[a(`navAiAgents`),(0,U.jsx)(_,{className:`w-3.5 h-3.5`})]}),(0,U.jsx)(oe,{})]}),(0,U.jsxs)(`div`,{className:`relative group`,children:[(0,U.jsxs)(`button`,{className:`flex items-center gap-1 px-4 py-2 text-[15px] font-semibold text-gray-700 hover:text-[#246bfa] transition-colors`,children:[a(`navSolutions`),(0,U.jsx)(_,{className:`w-3.5 h-3.5`})]}),(0,U.jsx)(se,{})]}),(0,U.jsx)(c,{to:N(o,`/articles`),className:`px-4 py-2 text-[15px] font-semibold text-gray-700 hover:text-[#246bfa] transition-colors`,children:a(`navResources`)}),(0,U.jsx)(c,{to:N(o,`/pricing`),className:`px-4 py-2 text-[15px] font-semibold text-gray-700 hover:text-[#246bfa] transition-colors`,children:a(`navPricing`)})]}),(0,U.jsxs)(`div`,{className:`hidden lg:flex items-center gap-3 shrink-0`,children:[(0,U.jsx)(Q,{}),i?(0,U.jsx)(c,{to:u,className:`flex items-center justify-center size-9 rounded-full overflow-hidden bg-[#F0F5FF] hover:ring-2 hover:ring-[#0052f7]/30 transition-all`,children:i.avatarUrl?(0,U.jsx)(`img`,{src:i.avatarUrl,alt:i.nickname,className:`size-9 rounded-full object-cover`}):(0,U.jsx)(w,{className:`size-5 text-[#0052f7]`})}):(0,U.jsx)(c,{to:l,className:`h-10 px-6 inline-flex items-center justify-center rounded-xl bg-[#0052f7] text-white text-sm font-bold hover:bg-[#0047d6] shadow-[0_4px_14px_0_rgba(0,85,255,0.39)] transition-all`,children:a(`navLogin`)})]}),(0,U.jsx)(`button`,{className:`lg:hidden flex items-center justify-center size-9 rounded-lg text-gray-600 hover:bg-gray-100`,onClick:()=>t(!e),children:e?(0,U.jsx)(E,{className:`w-5 h-5`}):(0,U.jsx)(V,{className:`w-5 h-5`})})]}),e&&(0,U.jsxs)(`div`,{className:`lg:hidden border-t border-gray-100 bg-white px-4 py-4 space-y-2 max-h-[80vh] overflow-y-auto`,children:[(0,U.jsx)($,{title:a(`navAiSummary`),items:K,basePath:`/agents`}),(0,U.jsx)($,{title:a(`navAiMindMap`),items:q,basePath:`/agents`}),(0,U.jsx)(`div`,{className:`border-t border-gray-100 pt-2`,children:(0,U.jsx)(c,{to:N(o,`/agents`),className:`block px-3 py-2 text-gray-700 font-semibold`,children:a(`navAiAgents`)})}),(0,U.jsx)(`div`,{className:`border-t border-gray-100 pt-2`,children:(0,U.jsx)(c,{to:N(o,`/solutions`),className:`block px-3 py-2 text-gray-700 font-semibold`,children:a(`navSolutions`)})}),(0,U.jsx)(`div`,{className:`border-t border-gray-100 pt-2`,children:(0,U.jsx)(c,{to:N(o,`/articles`),className:`block px-3 py-2 text-gray-700 font-semibold`,children:a(`navResources`)})}),(0,U.jsx)(`div`,{className:`border-t border-gray-100 pt-2`,children:(0,U.jsx)(c,{to:N(o,`/pricing`),className:`block px-3 py-2 text-gray-700 font-semibold`,children:a(`navPricing`)})}),(0,U.jsx)(`div`,{className:`border-t border-gray-100 pt-2`,children:(0,U.jsx)(Q,{})}),(0,U.jsx)(`div`,{className:`border-t border-gray-100 pt-3`,children:i?(0,U.jsxs)(c,{to:u,className:`flex items-center gap-3 px-3 py-2 text-gray-700 font-semibold`,children:[(0,U.jsx)(`span`,{className:`flex items-center justify-center size-8 rounded-full overflow-hidden bg-[#F0F5FF]`,children:i.avatarUrl?(0,U.jsx)(`img`,{src:i.avatarUrl,alt:i.nickname,className:`size-8 rounded-full object-cover`}):(0,U.jsx)(w,{className:`size-4 text-[#0052f7]`})}
1),i.nickname||`Workspace`]}):(0,U.jsx)(c,{to:l,className:`block w-full h-10 leading-10 text-center rounded-xl bg-[#0052f7] text-white text-sm font-bold`,children:a(`navLogin`)})})]})]})}function $({title:e,items:t,basePath:n}){let[r,i]=(0,H.useState)(!1),{t:a}=k(`common`),o=X();return(0,U.jsxs)(`div`,{className:`border-t border-gray-100 pt-2`,children:[(0,U.jsxs)(`button`,{className:`flex items-center justify-between w-full px-3 py-2 text-gray-700 font-semibold`,onClick:()=>i(!r),children:[e,(0,U.jsx)(_,{className:`w-4 h-4 transition-transform ${r?`rotate-180`:``}`})]}),r&&(0,U.jsx)(`div`,{className:`pl-4 space-y-1`,children:t.map(e=>(0,U.jsx)(c,{to:N(o,`${n}/${e.slug}`),className:`block px-3 py-1.5 text-sm text-gray-600 hover:text-[#246bfa]`,children:a(G(e.slug))},e.slug))})]})}var le={"--sidebar-width":`280px`},ue=i(function(){let e=s(),t=r(),n=a(),i=t.some(e=>e.id===`www-layout`),{open:c,setOpen:l}=re(),u=n.state===`loading`&&/\/?(\w{2}\/)?agents-plaza/.test(n.location?.pathname??``);return(0,H.useLayoutEffect)(()=>{i&&l(!1)},[i,e.pathname,l]),(0,H.useLayoutEffect)(()=>
1{document.querySelector(`[data-public-content-scroll] [data-radix-scroll-area-viewport]`)?.scrollTo({top:0,left:0})},[e.pathname]),(0,U.jsx)(`div`,{className:`bg-[#F7F8FA] flex min-h-screen w-full`,children:(0,U.jsxs)(ne,{className:f,style:le,open:c,onOpenChange:l,children:[(0,U.jsx)(m,{historySlot:(0,U.jsx)(W,{})}),(0,U.jsx)(te,{className:`bg-white md:rounded-[12px] shadow-sm m-0 md:m-[10px] md:ml-0 md:border border-slate-100 overflow-hidden`,children:(0,U.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col bg-white`,children:[(0,U.jsx)(ce,{}),(0,U.jsx)(`div`,{className:`relative flex flex-1 flex-col overflow-hidden`,children:(0,U.jsx)(`div`,{className:`absolute inset-0 overflow-hidden bg-white`,children:(0,U.jsx)(T,{className:`h-full w-full`,"data-public-content-scroll":!0,children:u?(0,U.jsxs)(`div`,{className:`flex flex-col py-[6px] px-[12px] md:p-[60px] md:pt-[50px] pb-10`,children:[(0,U.jsxs)(`div`,{className:`mb-4`,children:[(0,U.jsx)(`div`,{className:`h-8 w-60 mb-2 rounded bg-gray-100 animate-pulse`}),(0,U.jsx)(`div`,{className:`h-4 w-80 rounded bg-gray-100 animate-pulse`})]}),(0,U.jsx)(`div`,{className:`h-[42px] w-full rounded-[12px] mb-4 bg-gray-100 animate-pulse`}),(0,U.jsx)(`div`,{className:`h-10 w-96 rounded-full mb-6 bg-gray-100 animate-pulse`}),(0,U.jsxs)(`div`,{className:`space-y-8`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:`h-6 w-40 mb-3 rounded bg-gray-100 animate-pulse`}),(0,U.jsxs)(`div`,{className:`grid gap-6 xl:grid-cols-3`,children:[(0,U.jsx)(`div`,{className:`xl:col-span-2`,children:(0,U.jsx)(`div`,{className:`h-[270px] rounded-[12px] bg-gray-100 animate-pulse`})}),(0,U.jsxs)(`div`,{className:`flex flex-col gap-[26px]`,children:[(0,U.jsx)(`div`,{className:`h-[122px] rounded-[12px] bg-gray-100 animate-pulse`}),(0,U.jsx)(`div`,{className:`h-[122px] rounded-[12px] bg-gray-100 animate-pulse`})]})]})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:`h-6 w-40 mb-3 rounded bg-gray-100 animate-pulse`}),(0,U.jsx)(`div`,{className:`grid gap-6 md:grid-cols-2 xl:grid-cols-3`,children:Array.from({length:6}).map((e,t)=>(0,U.jsx)(`div`,{className:`h-[160px] rounded-[12px] bg-gray-100 animate-pulse`},t))})]})]})]}):(0,U.jsx)(o,{})})})})]})})]})})});export{ue as default};
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.