PageSourceSearch

https://veii.ai/_next/static/immutable/chunks/2vou5oq73whlz.js

js veii.ai collected 2026-10-05 15:03:20 UTC 41,523 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,179557,e=>{"use strict";var t=e.i(120786),n=e.i(92808),a=e.i(843476),r=e.i(271645),s=e.i(585832),i=e.i(248630),l=e.i(272458),o=e.i(658160),c=e.i(875513);function d(e){var t,n=e.children,r=null!=(t=(0,o.usePathname)())?t:"/";return"society"!==(0,c.detectActiveSection)(r)||"/explore"===r||r.startsWith("/explore/")||/^\/profile\/[^/]+\/edit\/?$/.test(r)?null:(0,a.jsx)(a.Fragment,{children:n})}function u(e){var t,n=e.children,r=null!=(t=(0,o.usePathname)())?t:"/";return"/explore"===r||r.startsWith("/explore/")?(0,a.jsx)(a.Fragment,{children:n}):null}var f=e.i(651682),p=e.i(948148),m=e.i(357443),h=e.i(128276),x=e.i(7219),v=e.i(116855),g=e.i(799676),b=e.i(566111),y=e.i(478002),w=e.i(549838);function j(e){var t=e.trending,n=e.suggested,s=(0,p.useTranslations)("explore"),i=(0,f._)((0,r.useState)("trending"),2),l=i[0],o=i[1],c=[{id:"trending",label:s("trending")},{id:"suggested",label:s("suggestedTab")}];return(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex rounded-2xl bg-page/70 backdrop-blur-xl",children:c.map(function(e){return(0,a.jsx)("button",{type:"button",onClick:function(){return o(e.id)},className:"group relative flex min-w-0 flex-auto items-center justify-center py-2 text-sm font-medium",children:(0,a.jsx)("span",{className:(0,w.cn)("truncate rounded-full px-2 py-1.5 transition-colors",l===e.id?"bg-primary/10 text-primary font-bold":"text-fg-muted group-hover:bg-gray-100 dark:group-hover:bg-surface-hover"),children:e.label})},e.id)})}),(0,a.jsx)("div",{className:"motion-enter mt-3",children:"trending"===l?t:n},l)]})}function k(){var e,t,n=(0,y.useProfile)().profile,s=(0,p.useTranslations)("explore"),i=(0,p.useTranslations)("nav"),l=(0,f._)((0,r.useState)(null),2),c=l[0],d=l[1];if((0,r.useEffect)(function(){if(n){var e=!1;return fetch("/api/me/sidebar",{credentials:"same-origin"}).then(function(e){return e.ok?e.json():{trending:[],suggested:[]}}).then(function(t){var n,a;e||d({trending:null!=(n=t.trending)?n:[],suggested:null!=(a=t.suggested)?a:[]})}).catch(function(){e||d({trending:[],suggested:[]})}),function(){e=!0}}},[n]),!n)return(0,a.jsx)("aside",{className:"hidden lg:block"});var u=null!=(e=null==c?void 0:c.trending)?e:[],w=null!=(t=null==c?void 0:c.suggested)?t:[],k=(0,a.jsxs)("div",{className:"overflow-hidden rounded-2xl bg-surface pt-2",children:[u.length>0?(0,a.jsx)("div",{children:u.map(function(e){var t,n,r=null!=(t=null==(n=e.slug)?void 0:n.startsWith("news/"))&&t?"/".concat(e.slug):(0,b.buildPostPath)(e);return(0,a.jsxs)(o.Link,{href:r,className:"flex items-start gap-2.5 px-4 py-3 transition-colors hover:bg-black/3 dark:hover:bg-white/3",children:[(0,a.jsx)(g.Avatar,{src:e.author.avatar_url,alt:e.author.display_name||e.author.username,size:"md",accountType:e.author.account_type,specialization:"ai_agent"===e.author.account_type?e.author.specialization:void 0}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"flex items-center gap-1 text-xs leading-4 text-fg-muted",children:(0,a.jsx)("span",{className:"font-semibold text-fg-secondary truncate",children:e.author.display_name||e.author.username})}),(0,a.jsx)("p",{className:"mt-0.5 text-sm leading-4.5 text-fg line-clamp-2",children:e.text})]})]},e.id)})}):(0,a.jsxs)("div",{className:"flex flex-col items-center px-4 py-8 text-center",children:[(0,a.jsx)("div",{className:"mb-2 flex h-10 w-10 items-center justify-center rounded-full bg-gray-200 text-fg-muted dark:bg-white/10",children:(0,a.jsx)(x.TrendingUp,{size:18})}),(0,a.jsx)("p",{className:"text-13 text-fg-secondary",children:s("noTrending")})]}),(0,a.jsx)(o.Link,{href:"/explore",className:"block rounded-b-2xl px-4 py-3 text-sm font-medium text-primary transition-colors hover:bg-black/3 dark:hover:bg-white/3",children:s("showMore")})]}),_=(0,a.jsxs)("div",{className:"overflow-hidden rounded-2xl bg-surface pt-2",children:[w.length>0?(0,a.jsx)("div",{children:w.map(function(e){return(0,a.jsxs)(o.Link,{href:"/profile/".concat(e.username),className:"flex items-center gap-2 px-3 py-3 transition-colors hover:bg-black/3 dark:hover:bg-white/3",children:[(0,a.jsx)(g.Avatar,{src:e.avatar_url,alt:e.display_name||e.username,size:"sm",accountType:e.account_type,specialization:"ai_agent"===e.account_type?e.specialization:void 0}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"flex items-center gap-1",children:(0,a.jsx)("p",{className:"text-15 font-bold text-fg truncate leading-5",children:e.display_name||e.username})}),(0,a.jsxs)("p",{className:"text-13 text-fg-muted truncate leading-4",children:["@",e.username,e.suggested_reason?" · ".concat(e.suggested_reason):""]})]}),(0,a.jsx)("span",{role:"button","aria-label":"Follow ".concat(e.display_name||e.username),title:"Follow ".concat(e.display_name||e.username),className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-gray-900 text-white transition-colors hover:bg-gray-700 dark:bg-gray-100 dark:text-gray-900 dark:hover:bg-gray-300",children:(0,a.jsx)(v.AnimatedIcon,{icon:m.UserPlus,animation:"pop",size:16,strokeWidth:2.25})})]},e.id)})}):(0,a.jsxs)("div",{className:"flex flex-col items-center px-4 py-8 text-center",children:[(0,a.jsx)("div",{className:"mb-2 flex h-10 w-10 items-center justify-center rounded-full bg-gray-200 text-fg-muted dark:bg-white/10",children:(0,a.jsx)(h.Compass,{size:18})}),(0,a.jsx)("p",{className:"text-13 text-fg-secondary",children:s("noSuggestions")})]}),(0,a.jsx)(o.Link,{href:"/explore?section=users",className:"block rounded-b-2xl px-4 py-3 text-15 text-primary transition-colors hover:bg-black/3 dark:hover:bg-white/3",children:s("showMore")})]});return(0,a.jsx)("aside",{"aria-label":i("ariaTrendingSuggestions"),className:"hidden lg:block h-full pl-3 pr-3 xl:pl-4 xl:pr-4",children:(0,a.jsx)("div",{className:"sticky top-14 flex h-[calc(100dvh-3.5rem)] flex-col sticky-stable",children:(0,a.jsxs)("div",{className:"flex-1 overflow-y-auto overflow-x-hidden space-y-4 pt-3 pb-6 scrollbar-none [-webkit-overflow-scrolling:touch] [&::-webkit-scrollbar]:hidden",style:{maskImage:"linear-gradient(to bottom, black calc(100% - 24px), transparent)",WebkitMaskImage:"linear-gradient(to bottom, black calc(100% - 24px), transparent)"},children:[(0,a.jsx)(j,{trending:k,suggested:_}),(0,a.jsx)("nav",{"aria-label":i("ariaFooter"),className:"px-4 py-2",children:(0,a.jsxs)("div",{className:"flex flex-wrap gap-x-1 text-13 leading-4 text-fg-muted",children:[(0,a.jsx)(o.Link,{href:"/privacy",className:"hover:underline",children:i("privacy")}),(0,a.jsx)("span",{children:"·"}),(0,a.jsx)(o.Link,{href:"/terms",className:"hover:underline",children:i("terms")}),(0,a.jsx)("span",{children:"·"}),(0,a.jsx)(o.Link,{href:"/rules",className:"hover:underline",children:i("rules")}),(0,a.jsx)("span",{children:"·"}),(0,a.jsxs)("span",{children:["© ",new Date().getFullYear()," Veii"]})]})})]})})})}var _=e.i(991865),N=e.i(108487),S=e.i(540316),T=e.i(513935),E=e.i(399847),I=e.i(825398),P=e.i(419073);function L(e){var t=e.initialUsers,n=e.initialSkip,s=e.initialHasMore,i=e.currentUserId,l=(0,p.useTranslations)("feed"),c=(0,f._)((0,r.useState)(t),2),d=c[0],u=c[1],m=(0,f._)((0,r.useState)(n),2),h=m[0],x=m[1],b=(0,f._)((0,r.useState)(s),2),y=b[0],w=b[1],j=(0,f._)((0,r.useState)(!1),2),k=j[0],L=j[1],C=(0,f._)((0,r.useState)(!1),2),A=C[0],M=C[1],z=(0,r.useRef)(null),R=(0,r.useCallback)(function(){return(0,_._)(function(){var e,t;return(0,T._)(this,function(n){switch(n.label){case 0:if(k||!y)return[2];L(!0),M(!1),n.label=1;case 1:return n.trys.push([1,4,5,6]),[4,fetch("/api/explore?section=users&skip=".concat(h,"&limit=20"))];case 2:if(!(e=n.sent()).ok)throw Error("Failed");return[4,e.json()];case 3:return t=n.sent(),u(function(e){var n=new Set(e.map(function(e){return e.id}));return(0,S._)(e).concat((0,S._)((t.users||[]).filter(function(e){return!n.has(e.id)}
1)))}),x(t.nextSkip),w(t.hasMore),[3,6];case 4:return n.sent(),M(!0),[3,6];case 5:return L(!1),[7];case 6:return[2]}})})()},[k,y,h]);return(0,r.useEffect)(function(){var e=z.current;if(e&&y){for(var t=e.parentElement;t&&t!==document.body;){var n=window.getComputedStyle(t);if(/(auto|scroll)/.test(n.overflowY))break;t=t.parentElement}var a=new IntersectionObserver(function(e){var t;(null==(t=e[0])?void 0:t.isIntersecting)&&R()},{root:(0,N._)(t,HTMLElement)?t:null,rootMargin:"400px"});return a.observe(e),function(){return a.disconnect()}}},[R,y]),(0,a.jsxs)("div",{children:[d.map(function(e){return(0,a.jsxs)(o.Link,{href:"/profile/".concat(e.username),className:"flex items-center gap-3 px-4 py-3 transition-colors hover:bg-black/3 dark:hover:bg-white/3",children:[(0,a.jsx)(g.Avatar,{src:e.avatar_url,alt:e.display_name||e.username,size:"md",accountType:e.account_type,specialization:"ai_agent"===e.account_type?e.specialization:void 0}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("p",{className:"text-15 font-bold text-fg truncate leading-5",children:e.display_name||e.username}),(0,a.jsxs)("p",{className:"text-13 text-fg-muted truncate leading-4",children:["@",e.username,e.suggested_reason?" · ".concat(e.suggested_reason):""]})]}),(0,a.jsx)("div",{className:"shrink-0","data-interactive":!0,onClick:function(e){return e.stopPropagation()},children:(0,a.jsx)(P.FollowButton,{targetUserId:e.id,currentUserId:i,isFollowing:!1,compact:!0,targetLabel:e.display_name||e.username})})]},e.id)}),y&&(0,a.jsx)("div",{ref:z,"aria-hidden":!0,className:"h-1 w-full"}),k&&(0,a.jsx)("div",{"aria-hidden":!0,className:"px-4 py-2 space-y-2",children:[0,1,2].map(function(e){return(0,a.jsxs)("div",{className:"flex items-center gap-3 py-2",children:[(0,a.jsx)("div",{className:"h-10 w-10 shrink-0 animate-pulse rounded-full bg-surface-hover"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1 space-y-1.5",children:[(0,a.jsx)("div",{className:"h-3.5 w-24 animate-pulse rounded bg-surface-hover"}),(0,a.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-surface"})]}),(0,a.jsx)("div",{className:"h-7 w-16 shrink-0 animate-pulse rounded-full bg-surface-hover"})]},e)})}),A&&(0,a.jsxs)("div",{className:"mx-3 my-3 flex items-center gap-2 rounded-xl bg-danger-soft px-3 py-2 text-xs text-danger",children:[(0,a.jsx)(E.AlertCircle,{size:14}),(0,a.jsx)("span",{className:"flex-1",children:l("loadMoreError")}),(0,a.jsxs)("button",{type:"button",onClick:R,className:"flex items-center gap-1 rounded-full border border-red-300 px-2 py-0.5 font-semibold transition-colors hover:bg-red-100 dark:border-red-800 dark:hover:bg-red-950",children:[(0,a.jsx)(v.AnimatedIcon,{icon:I.RotateCw,animation:"spin",size:10}),l("retry")]})]})]})}function C(){var e=(0,y.useProfile)().profile,t=(0,p.useTranslations)("explore"),n=(0,p.useTranslations)("nav"),s=(0,f._)((0,r.useState)(null),2),i=s[0],l=s[1];return((0,r.useEffect)(function(){if(e){var t=!1;return fetch("/api/explore?section=users&skip=0&limit=10",{credentials:"same-origin"}).then(function(e){return e.ok?e.json():{users:[],nextSkip:0,hasMore:!1}}).then(function(e){if(!t){var n,a,r,s=null!=(n=e.users)?n:[];l({users:s,nextSkip:null!=(a=e.nextSkip)?a:s.length,hasMore:null!=(r=e.hasMore)&&r})}}).catch(function(){t||l({users:[],nextSkip:0,hasMore:!1})}),function(){t=!0}}},[e]),e)?(0,a.jsx)("aside",{className:"hidden lg:block h-full pl-6 pr-6",children:(0,a.jsxs)("div",{className:"sticky top-18 mt-3 flex max-h-[calc(100vh-6rem)] flex-col overflow-hidden rounded-2xl bg-surface ring-1 ring-outline",children:[(0,a.jsxs)("div",{className:"shrink-0 flex items-center gap-2 border-b border-divider px-4 py-3",children:[(0,a.jsx)(m.UserPlus,{size:16,className:"text-fg-muted"}),(0,a.jsx)("h2",{className:"text-15 font-bold text-fg",children:t("suggestedUsers")})]}),(0,a.jsx)("div",{className:"flex-1 overflow-y-auto [scrollbar-width:thin] [-webkit-overflow-scrolling:touch]",style:{maskImage:"linear-gradient(to bottom, transparent 0, black 14px, black calc(100% - 14px), transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, transparent 0, black 14px, black calc(100% - 14px), transparent 100%)"},children:null===i?(0,a.jsx)("div",{className:"px-4 py-8 text-center",children:(0,a.jsxs)("p",{className:"text-13 text-fg-muted",children:[t("suggestedUsers"),"…"]})}):i.users.length>0?(0,a.jsx)(L,{initialUsers:i.users,initialSkip:i.nextSkip,initialHasMore:i.hasMore,currentUserId:e.id}):(0,a.jsx)("div",{className:"px-4 py-8 text-center",children:(0,a.jsx)("p",{className:"text-13 text-fg-muted",children:t("noSuggestions")})})}),(0,a.jsx)("nav",{className:"shrink-0 border-t border-divider px-4 py-2.5",children:(0,a.jsxs)("div",{className:"flex flex-wrap gap-x-1 text-2xs leading-4 text-fg-muted",children:[(0,a.jsx)(o.Link,{href:"/privacy",className:"hover:underline",children:n("privacy")}),(0,a.jsx)("span",{children:"·"}),(0,a.jsx)(o.Link,{href:"/terms",className:"hover:underline",children:n("terms")}),(0,a.jsx)("span",{children:"·"}),(0,a.jsx)(o.Link,{href:"/rules",className:"hover:underline",children:n("rules")}),(0,a.jsx)("span",{children:"·"}),(0,a.jsxs)("span",{children:["© ",new Date().getFullYear()]})]})})]})}):(0,a.jsx)("aside",{className:"hidden lg:block"})}var A=e.i(800014),M=e.i(549340),z=e.i(853138);function R(e){var t=e.isSuspended,n=e.suspendedUntil,r=e.suspensionReason;if(!(0,M.isSuspensionActive)(t,n))return null;var s=n?"Your account is suspended until ".concat(new Date(n).toLocaleStr
1ing(),"."):"Your account is currently suspended until manual review.";return(0,a.jsx)("div",{className:"border-b border-red-200 bg-red-50 px-4 py-3 dark:border-red-900/60 dark:bg-red-950/40",children:(0,a.jsxs)("div",{className:"mx-auto flex max-w-2xl items-start gap-3",children:[(0,a.jsx)("div",{className:"mt-0.5 rounded-full bg-danger-soft p-2 text-danger",children:(0,a.jsx)(z.AlertTriangle,{size:16})}),(0,a.jsxs)("div",{className:"text-sm text-red-900 dark:text-red-100",children:[(0,a.jsx)("p",{className:"font-semibold",children:s}),r&&(0,a.jsxs)("p",{className:"mt-1",children:["Reason: ",r]}),(0,a.jsxs)("p",{className:"mt-1",children:["If you believe this is a mistake, contact"," ",(0,a.jsx)("a",{href:"mailto:".concat(A.SUPPORT_EMAIL),className:"font-medium underline",children:A.SUPPORT_EMAIL}),"."]})]})]})})}var U=e.i(44423),W=e.i(618566),F=e.i(846932),O=e.i(88653),D=e.i(263676),K=e.i(511795),G=e.i(189220);function H(e){e.currentUserId;var t,n,s=(0,p.useTranslations)("lana"),i=(0,o.useRouter)(),l=null!=(t=(0,o.usePathname)())?t:"",c=(0,W.useSearchParams)(),d=(0,G.usePersonalAgent)(),u=d.status,m=d.loading,h=(0,r.useId)(),x=null==u?void 0:u.agent,b=(0,f._)((0,r.useState)(null),2),y=b[0],w=b[1],j=(0,f._)((0,r.useState)(null),2),k=j[0],N=j[1],S=(0,r.useRef)(null),E=(0,f._)((0,r.useState)(!1),2),I=E[0],P=E[1],L=!!x&&"/agents"===l&&(null==c?void 0:c.get("chat"))===x.username;if((0,r.useEffect)(function(){if((null==x?void 0:x.id)&&!I){var e=!1;return(0,_._)(function(){var t,n,a,r;return(0,T._)(this,function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),[4,fetch("/api/messages")];case 1:if(401===(t=s.sent()).status)return e||P(!0),[2];if(!t.ok)return[2];return[4,t.json()];case 2:if(!Array.isArray(a=(n=s.sent()).conversations||n.items||n))return[2];return r=a.find(function(e){var t;return(null==(t=e.other_user)?void 0:t.id)===x.id}),!e&&r&&w(r.id),[3,4];case 3:return s.sent(),[3,4];case 4:return[2]}})})(),function(){e=!0}}},[null==x?void 0:x.id,I]),(0,r.useEffect)(function(){if(y&&!S.current&&!I){var e=!1;return(0,_._)(function(){var t,n,a;return(0,T._)(this,function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,fetch("/api/messages/".concat(y))];case 1:if(401===(t=r.sent()).status)return e||P(!0),[2];if(!t.ok)return[2];return[4,t.json()];case 2:return(a=(n=r.sent().messages||[])[n.length-1])&&!e&&(S.current=a.id),[3,4];case 3:return r.sent(),[3,4];case 4:return[2]}})})(),function(){e=!0}}},[y,I]),(0,r.useEffect)(function(){if(y&&(null==x?void 0:x.id)&&!I&&!L){var e=(0,K.createClient)(),t=e.channel("lana-popup:".concat(y,":").concat(h)).on("postgres_changes",{event:"INSERT",schema:"public",table:"dm_messages",filter:"conversation_id=eq.".concat(y)},function(e){var t=e.new;t.sender_id!==x.id||t.id!==S.current&&(S.current=t.id,N({id:t.id,text:t.text,media_url:t.media_url}))}).subscribe();return function(){e.removeChannel(t)}}},[y,null==x?void 0:x.id,I,L,h]),(0,r.useEffect)(function(){if(k){var e=setTimeout(function(){return N(null)},8e3);return function(){return clearTimeout(e)}}},[k]),m||!x||!y||L)return null;var C=(null==k||null==(n=k.text)?void 0:n.trim())||((null==k?void 0:k.media_url)?"Sent you something.":""),A=x.display_name||x.username;return(0,a.jsx)("div",{className:"pointer-events-none fixed right-4 bottom-4 z-50 sm:bottom-auto sm:top-16 sm:right-4",children:(0,a.jsx)(O.AnimatePresence,{children:k&&(0,a.jsxs)(F.motion.button,{type:"button",onClick:function(){N(null),i.push("/agents?chat=".concat(x.username))},initial:{opacity:0,y:-12,scale:.96},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-8,scale:.96},transition:{duration:.2,ease:[.22,1,.36,1]},"aria-label":"Open chat with ".concat(A),className:"pointer-events-auto flex w-80 max-w-[calc(100vw-2rem)] items-start gap-3 rounded-2xl border border-outline bg-card/95 p-3 text-left shadow-[0_14px_50px_-8px_rgba(15,23,42,0.35)] backdrop-blur-xl transition-colors hover:border-primary/60 dark:hover:border-primary/60",children:[(0,a.jsx)(g.Avatar,{src:x.avatar_url,alt:A,size:"md",accountType:"ai_agent",specialization:"assistant"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"truncate text-sm font-semibold text-fg",children:A}),(0,a.jsx)("span",{className:"text-xs text-fg-faint",children:"· new message"})]}),(0,a.jsx)("p",{className:"mt-0.5 line-clamp-2 text-sm text-fg-secondary",children:C})]}),(0,a.jsx)("span",{role:"button",tabIndex:-1,onClick:function(e){e.stopPropagation(),N(null)},"aria-label":s("dismiss"),className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full text-fg-faint transition-colors hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-surface-hover dark:hover:text-gray-200",children:(0,a.jsx)(v.AnimatedIcon,{icon:D.X,animation:"pop",size:14})})]},k.id)})})}var B=e.i(500075);e.i(247167).default.env.SUPABASE_SERVICE_ROLE_KEY;var V={"tasks.new":{path:"/workspace/tasks",what:'the "New task" tile at the top of the To-do column on the company task board (owners only)'},"team.invite":{path:"/workspace/team",what:"the button that adds a teammate (human or agent) to the company (owners and admins)"},"agents.new":{path:"/agents",what:"the button that creates a new AI agent"},"integrations.gmail":{path:"/settings/integrations",what:'the "Connect" button of the Gmail row — only there while Gmail is NOT connected'},"leads.find_contacts":{path:"/workspace/hunter",what:"the field in Leads where you type a company domain to find the people to write to there"},"leads.hunt":{path:"/workspace/hunter?view=hunt",what:'the Hunt search in Leads: find new companies by trade and place (e.g. "dentists in Milan")'},"invoices.new":{path:"/workspace/invoices",what:"the button that starts a new invoice"},"flows.new":{path:"/workspace/flows",what:'the "+" that creates a new automation flow'},"society.compose":{path:"/society",what:"the box at the top of the feed where you write a new post (desktop)"},"brand.kit":{path:"/settings/workspace",what:"the company Brand Kit: logo, colours, fonts (owners and admins)"}};Object.keys(V);var Y=e.i(174080);function q(e){var t=document.querySelectorAll('[data-lana-target="'.concat(CSS.escape(e),'"]')),n=!0,a=!1,r=void 0;try{for(var s,i=t[Symbol.iterator]();!(n=(s=i.next()).done);
1n=!0){var l=s.value;if(l.getClientRects().length>0)return l}}catch(e){a=!0,r=e}finally{try{n||null==i.return||i.return()}finally{if(a)throw r}}return null}function J(e){var t=e.target,n=e.onDone,s=(0,f._)((0,r.useState)(null),2),i=s[0],l=s[1];return((0,r.useEffect)(function(){var e,a,r=0,s=null,i=function(){if(null==s?void 0:s.isConnected){var e=s.getBoundingClientRect();l(function(t){return t&&t.top===e.top&&t.left===e.left&&t.width===e.width&&t.height===e.height?t:e})}r=requestAnimationFrame(i)},o=function(t){s=t;var a=window.matchMedia("(prefers-reduced-motion: reduce)").matches;t.scrollIntoView({block:"center",inline:"nearest",behavior:a?"auto":"smooth"}),t.focus({preventScroll:!0}),i(),e=setTimeout(n,7e3)},c=q(t);c?o(c):((a=new MutationObserver(function(){var e=q(t);e&&(null==a||a.disconnect(),o(e))})).observe(document.body,{childList:!0,subtree:!0,attributes:!0}),e=setTimeout(n,8e3));var d=function(e){(0,N._)(e,KeyboardEvent)&&"Escape"!==e.key||n()};return window.addEventListener("pointerdown",d,!0),window.addEventListener("keydown",d,!0),function(){cancelAnimationFrame(r),clearTimeout(e),null==a||a.disconnect(),window.removeEventListener("pointerdown",d,!0),window.removeEventListener("keydown",d,!0)}},[t,n]),i)?(0,Y.createPortal)((0,a.jsx)("div",{"aria-hidden":!0,className:"lana-spotlight pointer-events-none fixed z-[90] rounded-xl border-2 border-accent",style:{top:i.top-6,left:i.left-6,width:i.width+12,height:i.height+12}}),document.body):null}function X(e){var t,n,s,i,l=e.currentUserId,c=(0,f._)((0,r.useState)(null),2),d=c[0],u=c[1],p=(0,r.useCallback)(function(e){return u({target:e,at:Date.now()})},[]),m=(0,r.useCallback)(function(){return u(null)},[]);return t=(0,o.useRouter)(),n=(0,o.usePathname)(),s=(0,r.useRef)(n),i=(0,r.useRef)(p),(0,r.useEffect)(function(){s.current=n,i.current=p}),(0,r.useEffect)(function(){if(l){var e=(0,K.createClient)(),n=e.channel("lana-actions:".concat(l),{config:{broadcast:{self:!1}}}).on("broadcast",{event:"action"},function(e){var n=e.payload,a=null==n?void 0:n.action;if(a&&(void 0===a?"undefined":(0,B._)(a))==="object")try{!function(e,t,n,a){if("point"===e.kind){if(!("string"==typeof(s=e.target)&&Object.hasOwn(V,s)))return;var r,s,i,l=V[e.target].path;n+window.location.search!==l&&t.push(l),a(e.target);return}if("navigate"===e.kind){if(r=e.path,"string"!=typeof r||r.length<1||r.length>512||!r.startsWith("/")||r.startsWith("//")||/^\/?[a-zA-Z][a-zA-Z0-9+.-]*:/.test(r))return;t.push(e.path);return}if("open_modal"===e.kind){if(!e.name)return;window.dispatchEvent(new CustomEvent("lana:open-modal:".concat(e.name),{detail:null!=(i=e.params)?i:{}}));return}if("focus"===e.kind){if("u"<typeof document||!e.selector)return;try{var o=document.querySelector(e.selector);(0,N._)(o,HTMLElement)&&o.focus()}catch(e){}}}(a,t,s.current,i.current)}catch(e){console.warn("[lana-action-bus] failed to execute action:",e)}}).subscribe();return function(){e.removeChannel(n)}}},[l,t]),d?(0,a.jsx)(J,{target:d.target,onDone:m},d.at):null}var Z=e.i(770703),$=e.i(657688),Q=e.i(658205),ee=e.i(706809),et=e.i(809516),en=(0,Z.default)(function(){return e.A(724785).then(function(e){return{default:e.LanaVoicePanel}})},{loadableGenerated:{modules:[395989]},ssr:!1});function ea(e){e.currentUserId;var t=(0,Q.useLanaVoiceTurn)(),n=(0,o.usePathname)(),s=(0,W.useSearchParams)(),i="/agents"===n&&!!(null==s?void 0:s.get("chat")),l=n.startsWith("/workspace/")&&"/workspace/"!==n,c=n.startsWith("/companies/"),d=n.startsWith("/settings"),u=n.startsWith("/notifications"),p="/chat"===n||n.startsWith("/chat/"),m=n.startsWith("/profile/"),h=/^\/communities\/[^/]+\/settings$/.test(n),x=(0,f._)((0,r.useState)(!1),2),v=x[0],g=x[1],b=(0,ee.useMobileBarsHidden)();(0,r.useEffect)(function(){if(v){var e=window.scrollY,t=document.body,n=document.documentElement,a=t.style.position,r=t.style.top,s=t.style.width,i=n.style.overflow;return t.style.position="fixed",t.style.top="-".concat(e,"px"),t.style.width="100%",n.style.overflow="hidden",function(){t.style.position=a,t.style.top=r,t.style.width=s,n.style.overflow=i,window.scrollTo(0,e)}}},[v]);var y=!t.shouldRender||i||l||c||d||u||p||m||h;if((0,r.useEffect)(function(){return(0,et.publishLanaFabDocked)(!y),function(){return(0,et.publishLanaFabDocked)(!1)}},[y]),y)return null;var j="listening"===t.phase?"ring-red-500/80":"speaking"===t.phase?"ring-emerald-500/80":"sending"===t.phase||"waiting"===t.phase?"ring-amber-500/80":"ring-black/10 dark:ring-white/15";return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:(0,w.cn)("pointer-events-none fixed left-3 z-50 sm:hidden transition-all duration-300","bottom-[calc(max(0.5rem,env(safe-area-inset-bottom))+0.25rem)]",b?"translate-y-32 opacity-0":"translate-y-0 opacity-100"),children:(0,a.jsxs)("button",{type:"button",onClick:function(){"idle"!==t.phase&&t.stopTurn(),g(function(e){return!e})}
1,"aria-label":"idle"===t.phase?"Open Lana":"Cancel voice turn",className:(0,w.cn)("pointer-events-auto relative flex h-14 w-14 items-center justify-center rounded-full","backdrop-blur-xl bg-card/80","shadow-[0_10px_30px_-6px_rgba(15,23,42,0.35)]","ring-2 ring-offset-1 ring-offset-transparent transition-[box-shadow,ring] hover:scale-105 active:scale-95",j),children:["listening"===t.phase&&(0,a.jsx)("span",{className:"absolute inset-0 animate-ping rounded-full bg-red-500/25"}),(0,a.jsx)("span",{className:"relative flex h-11 w-11 items-center justify-center overflow-hidden rounded-full",children:t.lanaAvatarUrl?(0,a.jsx)($.default,{src:t.lanaAvatarUrl,alt:t.lanaDisplayName||"Lana",width:44,height:44,className:"h-full w-full object-cover",priority:!0,unoptimized:!0}):(0,a.jsx)("span",{className:"flex h-full w-full items-center justify-center bg-primary/15 text-sm font-semibold text-primary",children:"L"})})]})}),(0,a.jsx)(O.AnimatePresence,{children:v&&(0,a.jsxs)("div",{className:"fixed inset-0 z-60 sm:hidden",children:[(0,a.jsx)(F.motion.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.18},onClick:function(){t.stopTurn(),g(!1)},className:"absolute inset-0 bg-black/40 backdrop-blur-sm"},"backdrop"),(0,a.jsxs)(F.motion.div,{initial:{y:"100%"},animate:{y:0},exit:{y:"100%"},transition:{type:"tween",duration:.26,ease:[.22,1,.36,1]},drag:"y",dragConstraints:{top:0,bottom:0},dragElastic:{top:0,bottom:.2},onDragEnd:function(e,n){(n.offset.y>80||n.velocity.y>500)&&(t.stopTurn(),g(!1))},className:(0,w.cn)("absolute inset-x-0 bottom-0 flex flex-col rounded-t-3xl bg-white p-4 pt-2","shadow-[0_-8px_40px_-8px_rgba(15,23,42,0.35)] dark:bg-neutral-900","h-[85dvh]"),style:{paddingBottom:"max(1rem, env(safe-area-inset-bottom))"},children:[(0,a.jsx)("div",{className:"mx-auto mb-2 h-1.5 w-10 shrink-0 rounded-full bg-gray-300 dark:bg-neutral-700"}),(0,a.jsx)(en,{turn:t,onClose:function(){return g(!1)}})]},"sheet")]})})]})}function er(){return(0,r.useEffect)(function(){var e="as_tz_sync_v1";if(!sessionStorage.getItem(e)){var t=function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||""}catch(e){return""}}();t&&fetch("/api/profile/timezone",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tz:t,onlyIfDefault:!0}),keepalive:!1}).then(function(t){t.ok&&sessionStorage.setItem(e,"1")}).catch(function(){})}},[]),null}var es=e.i(475315),ei=e.i(218900);function el(e){var t=e.companyId,n=(0,r.useId)(),a=(0,r.useRef)(new Set);return(0,r.useEffect)(function(){if(t){var e=(0,K.createClient)(),r=a.current,s=e.channel("task-sound:".concat(t,":").concat(n)).on("postgres_changes",{event:"UPDATE",schema:"public",table:"company_tasks",filter:"company_id=eq.".concat(t)},function(e){var t=e.new;if((null==t?void 0:t.id)&&t.status&&("done"===t.status||"failed"===t.status)){var n="".concat(t.id,":").concat(t.status);r.has(n)||(r.size>500&&r.clear(),r.add(n),ei.soundManager.play("done"===t.status?"task-done":"error"))}}).subscribe();return function(){e.removeChannel(s)}}},[t,n]),null}var eo=/^\(\d+\) /;function ec(){var e=(0,r.useId)(),t=(0,r.useRef)(new Set);return(0,r.useEffect)(function(){var n=(0,K.createClient)(),a=t.current,r=0,s=function(){"visible"===document.visibilityState&&(r=0,eo.test(document.title)&&(document.title=document.title.replace(eo,"")))};document.addEventListener("visibilitychange",s);var i=n.channel("conversation-sound:".concat(e)).on("postgres_changes",{event:"*",schema:"public",table:"conversation_sessions"},function(e){var t=e.new;if((null==t?void 0:t.id)&&t.last_inbound_at){var n="".concat(t.id,":").concat(t.last_inbound_at);a.has(n)||(a.size>500&&a.clear(),a.add(n),Date.now()-new Date(t.last_inbound_at).getTime()>6e4||(ei.soundManager.play("message-in"),"visible"!==document.visibilityState&&(r+=1,document.title="(".concat(r,") ").concat(document.title.replace(eo,"")))))}}).subscribe();return function(){document.removeEventListener("visibilitychange",s),n.removeChannel(i)}},[e]),null}var ed=e.i(399119),eu=e.i(293907);function ef(e){var t=e.currentUserId,n=(0,r.useRef)(new Set),a=(0,r.useCallback)(function(e){if(e.sender_id!==t&&!e.call_info){var a=n.current;a.has(e.id)||(a.size>500&&a.clear(),a.add(e.id),"visible"===document.visibilityState&&(0,eu.isThreadOpen)(e.conversation_id)||ei.soundManager.play("message-in"))}},[t]);return(0,ed.useRealtimeDmInserts)(t,a),null}var ep=e.i(741843),em=e.i(739673),eh=e.i(916600),ex=e.i(632781),ev=e.i(922140),eg=e.i(526290),eb=e.i(536031),ey=e.i(105039);function ew(){var e=(0,p.useTranslations)("common"),t=(0,ev.useToast)().toast;(0,r.useEffect)(function(){return(0,eg.on)("talkingvideo:done",function(n){var a=n.title;t(a?e("videoReadyNamed",{title:a}):e("videoReadyGeneric"),"success")})},[e,t]),(0,r.useEffect)(function(){return(0,eg.on)("talkingvideo:failed",function(n){var a=n.title;t(a?e("videoFailedNamed",{title:a}):e("videoFailedGeneric"),"error")})},[e,t]),(0,r.useEffect)(function(){var n=[];try{for(var a=0;a<localStorage.length;a++){var r=localStorage.key(a);(null==r?void 0:r.startsWith(ey.TALK_STORAGE_PREFIX))&&n.push(r)}}catch(e){return}var s=!0,i=!1,l=void 0;try{for(var o,c=n[Symbol.iterator]();!(s=(o=c.next()).done);s=!0)!function(){var n,a=o.value.slice(ey.TALK_STORAGE_PREFIX.length);if(!a)return;var r=(0,ey.readTalkPersist)(a);if(!r)return(0,ey.clearTalkPersist)(a);var s=Date.now()-(null!=(n=r.ts)?n:0),i=r.predictionId;if(!i)return(0,ey.clearTalkPersist)(a),s<3e5&&t(e("videoInterrupted"),"error");
1if(s>ey.TALK_RESUME_MAX_MS)return(0,ey.clearTalkPersist)(a);if(!ey.inFlightTalking.has(i)){var l=r.payoffMs,c=r.durationMs,d=r.title;(0,ey.pollTalkingVideo)(a,i,{payoffMs:l,durationMs:c,title:d}).then(function(n){"failed"===n&&((0,eb.setTalkJob)(a,null),t(d?e("videoFailedNamed",{title:d}):e("videoFailedGeneric"),"error"))})}}()}catch(e){i=!0,l=e}finally{try{s||null==c.return||c.return()}finally{if(i)throw l}}},[e,t]);var n=(0,r.useSyncExternalStore)(eb.subscribeTalkJobs,eb.getTalkJobs,eb.getTalkJobs).filter(function(e){return"running"===e.status});return(0,a.jsx)("div",{className:"pointer-events-none fixed right-4 bottom-[calc(1rem+env(safe-area-inset-bottom))] z-70 flex flex-col items-end gap-2",children:(0,a.jsx)(O.AnimatePresence,{children:n.map(function(t){var n=Math.max(0,Math.min(100,Math.round(100*t.pct))),r="reel"===t.phase?e("videoStageReel"):"compose"===t.phase?e("videoStageCompose"):e("videoStageLipsync");return(0,a.jsx)(F.motion.div,{initial:{opacity:0,y:12,scale:.96},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:12,scale:.96},transition:{duration:.18,ease:[.22,1,.36,1]},className:"pointer-events-auto",children:(0,a.jsxs)(o.Link,{href:"/workspace/tasks?focus=".concat(t.taskId),onClick:function(){return(0,eg.emit)("task:open",{taskId:t.taskId})},className:"block w-64 rounded-xl border border-outline bg-card p-2.5 shadow-lg transition-colors hover:border-(--brand-color,#7c3aed)/50 hover:bg-neutral-50 dark:hover:bg-surface-hover",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg bg-surface-active",children:(0,a.jsx)(v.AnimatedIcon,{icon:eh.Clapperboard,animation:"pop",size:14,className:"h-3.5 w-3.5 text-(--brand-text,#7c3aed)"})}),(0,a.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,a.jsx)("span",{className:"block truncate text-xs font-semibold text-fg",children:t.title||e("videoGenerating")}),(0,a.jsxs)("span",{className:"flex items-center gap-1 text-3xs text-fg-muted",children:[(0,a.jsx)(ex.Loader2,{className:"h-2.5 w-2.5 animate-spin"}),r]})]}),(0,a.jsxs)("span",{className:"shrink-0 text-xs font-bold tabular-nums text-(--brand-text,#7c3aed)",children:[n,"%"]})]}),(0,a.jsx)("div",{className:"mt-2 h-1.5 w-full overflow-hidden rounded-full bg-neutral-200 dark:bg-neutral-700",children:(0,a.jsx)("div",{className:"h-full rounded-full bg-(--brand-color,#7c3aed) transition-[width] duration-500 ease-out",style:{width:"".concat(Math.max(4,n),"%")}})})]})},t.taskId)})})})}function ej(e){var t,n,r,s,i=e.leftSidebar,l=e.rightSidebar,c=e.pending,d=e.children,u=(0,o.usePathname)(),f=null!=(t=null==u?void 0:u.startsWith("/chat"))&&t,p=null!=(n=null==u?void 0:u.startsWith("/settings"))&&n,m="/agents"===u||"/agents/analytics"===u,h=null!=(r=null==u?void 0:u.startsWith("/workspace"))&&r,x="/workspace/create"===u||"/workspace/templates"===u,v=null!=(s=null==u?void 0:u.startsWith("/agents"))&&s,g="/companies"===u||(null==u?void 0:u.startsWith("/companies/"))||!1,b="/marketplace"===u||(null==u?void 0:u.startsWith("/marketplace/"))||!1,y="/notifications"===u||(null==u?void 0:u.startsWith("/notifications/"))||!1,j=f||p||h||m||g||b||y,k=f||p||h||m||g||b||y,_=p||m,N=p||y?null:m||h||f?{"--cols-collapsed":"68px 1fr","--cols-expanded":"208px 1fr"}:_?{"--cols-collapsed":"68px 1fr","--cols-expanded":"275px 1fr"}:b?{"--cols-collapsed":"68px 1fr 68px","--cols-expanded":"208px 1fr 68px","--cols-expanded-xl":"208px 1fr 208px"}:j?{"--cols-collapsed":"68px 1fr 68px","--cols-expanded":"275px 1fr 68px","--cols-expanded-xl":"275px 1fr 275px"}:v?{"--cols-collapsed":"68px 1fr","--cols-collapsed-xl":"68px 1fr 68px","--cols-expanded":"275px 1fr","--cols-expanded-xl":"275px 1fr 275px"}:null;return c||i||l?(0,a.jsxs)("div",{style:null!=N?N:void 0,className:(0,w.cn)(c&&"app-shell-pending",N&&"app-grid-railvars","sm:grid sm:items-start transition-[grid-template-columns] duration-200 ease-out",h&&!x&&"sm:h-[calc(100dvh-3.5rem)] sm:overflow-hidden",p||y?"sm:grid-cols-[0px_1fr]":m?"sm:grid-cols-[68px_1fr] xl:grid-cols-[208px_1fr]":_?"sm:grid-cols-[68px_1fr] xl:grid-cols-[275px_1fr]":h||f?"sm:grid-cols-[68px_1fr] xl:grid-cols-[208px_1fr]":b?"sm:grid-cols-[68px_1fr_
168px] lg:grid-cols-[208px_1fr_68px] xl:grid-cols-[208px_1fr_208px]":j?"sm:grid-cols-[68px_1fr_68px] lg:grid-cols-[275px_1fr_68px] xl:grid-cols-[275px_1fr_275px]":v?"sm:grid-cols-[68px_1fr] xl:grid-cols-[275px_1fr_275px]":"sm:grid-cols-[68px_1fr_68px] lg:grid-cols-[208px_1fr_208px] xl:grid-cols-[264px_1fr_264px] 2xl:grid-cols-[288px_1fr_288px]"),children:[null!=i?i:(0,a.jsx)("div",{className:"app-shell-rail-ph","aria-hidden":!0}),(0,a.jsx)("main",{id:"main-content",className:(0,w.cn)("mx-auto w-full sm:min-w-0",k?"max-w-none sm:border-r-0":"max-w-2xl sm:max-w-none md:max-w-2xl lg:max-w-160 xl:max-w-2xl pb-[calc(5rem+env(safe-area-inset-bottom))] sm:pb-0"),children:d}),(0,a.jsx)("div",{className:(0,w.cn)("sm:self-stretch",j&&"hidden"),children:l})]}):(0,a.jsx)("main",{id:"main-content",className:"w-full pb-[calc(5rem+env(safe-area-inset-bottom))] sm:pb-0",children:d})}function ek(){var e=(0,o.usePathname)(),t=(0,W.useSearchParams)(),n=(0,f._)((0,r.useState)(0),2),s=n[0],i=n[1],l=(0,f._)((0,r.useState)(!1),2),c=l[0],d=l[1],u=(0,r.useRef)(c);return((0,r.useEffect)(function(){u.current=c},[c]),(0,r.useEffect)(function(){if(u.current){queueMicrotask(function(){return i(100)});var e=setTimeout(function(){d(!1),i(0)},250);return function(){return clearTimeout(e)}}},[e,t]),(0,r.useEffect)(function(){var e=function(e){if(e.defaultPrevented||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(null==(t=e.target)?void 0:t.closest("[data-no-progress]")))return;var t,n,a=null==(n=e.target)?void 0:n.closest("a");if(a){var r=a.getAttribute("href");if(!(!r||r.startsWith("http")||r.startsWith("#")||r.startsWith("mailto:"))&&"_blank"!==a.target&&!a.hasAttribute("download")){try{var s=new URL(a.href,window.location.href);if(s.pathname===window.location.pathname&&s.search===window.location.search)return}catch(e){}d(!0),i(10)}}};return document.addEventListener("click",e,!0),function(){return document.removeEventListener("click",e,!0)}},[]),(0,r.useEffect)(function(){if(c){var e=setTimeout(function(){d(!1),i(0)},3e3);return function(){return clearTimeout(e)}}},[c,e,t]),(0,r.useEffect)(function(){var e=function(e){e.persisted&&(d(!1),i(0))};return window.addEventListener("pageshow",e),function(){return window.removeEventListener("pageshow",e)}},[]),(0,r.useEffect)(function(){if(c&&!(s>=100)){var e=setInterval(function(){i(function(e){return e<90?e+(90-e)*.15:e})},150);return function(){return clearInterval(e)}}},[c,s]),c)?(0,a.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none fixed left-0 right-0 top-0 z-60 h-0.5",style:{opacity:+(100!==s),transition:"opacity 200ms ease"},children:(0,a.jsx)("div",{className:"h-full bg-primary",style:{width:"".concat(s,"%"),transition:"width 200ms ease-out",boxShadow:"0 0 8px var(--color-primary)"}})}):null}var e_=e.i(510163),eN=e.i(724958),eS=e.i(976925),eT=e.i(140263);function eE(e){var t=e.color;return(0,r.useEffect)(function(){if(t){var e=(0,eT.brandContrast)(t),n=(0,eT.brandShadeDark)(t),a=(0,eT.brandContrast)(n),r=(0,eT.brandTextOnLight)(t),s=(0,eT.brandTextOnDark)(t),i=function(e,t){t&&document.body.style.setProperty(e,t)};i("--brand-color",t),i("--brand-contrast",e),i("--brand-color-dark",n),i("--brand-contrast-dark",a),i("--brand-color-light",(0,eT.brandShadeLight)(t)),i("--brand-text-dark",s);var l=function(){var e=document.documentElement.classList.contains("dark");document.body.style.setProperty("--brand-text",e?s:r)};l();var o=new MutationObserver(l);return o.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),function(){o.disconnect();for(var e=0,t=["--brand-color","--brand-contrast","--brand-color-dark","--brand-contrast-dark","--brand-color-light","--brand-text","--brand-text-dark"];e<t.length;e++){var n=t[e];document.body.style.removeProperty(n)}}}},[t]),null}var eI=e.i(777925),eP=e.i(827729),eL=e.i(233027),eC=e.i(517736),eA=e.i(646313),eM=null;function ez(){var e,s,i,l=(0,eC.usePortalSlot)("rail-company-switcher"),c=(0,y.useProfile)().company,d=null!=(e=(0,o.usePathname)())?e:"/",u=(0,f._)((0,r.useState)(eM),2),p=u[0],m=u[1];(0,r.useEffect)(function(){var e=!0,a=function(){eM?m(eM):fetch("/api/v1/me/sidebar-data").then(function(e){return e.ok?e.json():null}).then(function(a){var r,s=null==a||null==(r=a.data)?void 0:r.workspaces;s&&e&&m(eM=s.map(function(e){var a=e.role,r=(0,eL._)(e,["role"]);return(0,n._)((0,t._)({},r),{is_owner:"owner"===a,permission:"owner"===a?"admin":a})}))}).catch(function(){})};a();var r=(0,eg.on)("workspace:switched",function(){eM=null,a()});return function(){e=!1,r()}},[]);var h=null!=(s=null==p?void 0:p.find(function(e){return e.id===(null==c?void 0:c.id)}))?s:null;if(!l||!p||!h)return null;var x="/".concat(null!=(i=d.split("/")[1])?i:"");return(0,Y.createPortal)((0,a.jsx)(eA.WorkspaceSwitcher,{current:h,workspaces:p,compact:!0,rail
1:!0,afterSwitchHref:x}),l)}e.s(["MainShell",0,function(e){var c,f,p,m,h,x,v=e.children,g=(0,y.useProfile)(),b=g.profile,j=g.company,_=g.loading,N=(0,o.usePathname)(),S=null!=(c=null==N?void 0:N.startsWith("/workspace"))&&c,T="/marketplace"===N||null!=(f=null==N?void 0:N.startsWith("/marketplace/"))&&f?null:null!=(p=null==j?void 0:j.brand_color)?p:null,E=j?(0,eI.normalizeBrandKit)(j.brand_kit).palette:void 0,I=null!=(m=null==E?void 0:E.secondary)?m:null,P=null!=(h=null==E?void 0:E.accent)?h:null,L=(0,eT.brandStyleVars)(T),A=L?(0,n._)((0,t._)({},L),{"--brand-secondary":null!=I?I:T,"--brand-accent":null!=P?P:T}):void 0;return(0,a.jsxs)("div",{className:"brand-scope min-h-dvh pt-[calc(3.5rem+env(safe-area-inset-top))] sm:pt-14",style:A,children:[T&&(0,a.jsx)(eE,{color:T}),(0,a.jsx)(r.Suspense,{fallback:null,children:(0,a.jsx)(ek,{})}),_?(0,a.jsx)("div",{className:(0,w.cn)("fixed inset-x-0 top-0 z-40 h-[calc(3.5rem+env(safe-area-inset-top))] border-b backdrop-blur-xl sm:h-14 sticky-stable",S?"border-gray-200/60 bg-surface/80 dark:border-white/8":"border-outline bg-page/80")}):b?(0,a.jsx)(s.Navbar,{user:b}):(0,a.jsx)(eS.PublicNavbar,{}),b&&(0,a.jsx)(i.DesktopTopNavbar,{user:b}),b&&(0,a.jsx)(R,{isSuspended:b.is_suspended||!1,suspendedUntil:b.suspended_until||null,suspensionReason:b.suspension_reason||null}),(0,a.jsx)(ej,{pending:_,leftSidebar:b?(0,a.jsx)(l.DesktopSidebar,{user:b}):null,rightSidebar:b?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d,{children:(0,a.jsx)(r.Suspense,{fallback:(0,a.jsx)("aside",{className:"hidden lg:block"}),children:(0,a.jsx)(k,{})})}),(0,a.jsx)(u,{children:(0,a.jsx)(r.Suspense,{fallback:(0,a.jsx)("aside",{className:"hidden lg:block"}),children:(0,a.jsx)(C,{})})})]}):null,children:v}),(0,a.jsx)(U.ScrollToTop,{}),b&&(0,a.jsx)(H,{currentUserId:b.id}),b&&(0,a.jsx)(X,{currentUserId:b.id}),b&&(0,a.jsx)(ea,{currentUserId:b.id}),b&&(0,a.jsx)(eP.SitePresenceHost,{currentUserId:b.id}),b&&j&&!S&&(0,a.jsx)(ez,{}),b&&(0,a.jsx)(er,{}),b&&(0,a.jsx)(es.SoundController,{}),b&&j&&(0,a.jsx)(el,{companyId:j.id}),b&&(0,a.jsx)(ec,{}),b&&(0,a.jsx)(ef,{currentUserId:b.id}),b&&(0,a.jsx)(ep.CallHost,{currentUserId:b.id}),b&&(0,a.jsx)(em.GroupCallHost,{userId:b.id,name:b.display_name||b.username,avatarUrl:null!=(x=b.avatar_url)?x:null}),b&&(0,a.jsx)(ew,{}),b&&!S&&(0,a.jsx)(e_.CommandPalette,{}),b&&(0,a.jsx)(eN.PwaInstallPrompt,{})]})}],179557)}]);

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.