PageSourceSearch

https://speedmobi.ai/assets/AgencyLayout-D5Ti6Nz0.js

js speedmobi.ai collected 2026-10-05 16:23:06 UTC 26,924 bytes, 1 lines download raw bytes

1import{$ as oe,r as d,q as S,s as N,F as V,j as e,B as j,t as w,D as H,c as x,a3 as ce,S as ae,a4 as le,X as ne,U as de,A as me,Q as xe,V as ue,_ as he,W as pe,a2 as fe,a5 as ge,N as be,a6 as Q,a7 as K,a1 as q,o as T,a8 as je,L as Ne}from"./index-D1idcEUO.js";import{u as ye}from"./use-impersonation-LZz0Gh_8.js";import{B}from"./brand-logo-B46tNv-V.js";import{D as G,a as J,b as Z,c as D,d as $}from"./dropdown-menu-Bl6l4YdF.js";import{p as ve,B as we,A as X,N as ke,a as W}from"./NavModeChooser-CTXTX-WR.js";import{m as k}from"./react-BXw3iqzx.js";import{E as Ce,a as Se,b as Ae,c as Ee,d as Me}from"./empty-BfLwj4Mn.js";import{B as ie}from"./badge-9daUM6G7.js";import{S as Ie,a as Le,b as Ue,c as De,d as Re}from"./sheet-C4NA3gZM.js";import{B as ee}from"./bell-C-MmnbYc.js";import{A as R}from"./index-ChG4_wGD.js";import{C as Oe}from"./check-check-C26W_xws.js";import{f as Te}from"./formatDistanceToNow-D3T8Ek7d.js";import{T as Be}from"./trending-up-B37N2XaQ.js";import{C as _e}from"./calendar-days-z5UezJv_.js";import{C as ze}from"./circle-check-DslY_iNa.js";import{C as Fe}from"./circle-alert-LkGFGGnV.js";import{I as Pe}from"./info-DKHFMaoI.js";import{l as Ye}from"./index.module-Cka00F9u.js";import{S as _}from"./search-DA9FxQRi.js";import{C as He}from"./calendar-check-BNXHKSRr.js";import{R as Ve}from"./receipt-H-D763_F.js";import{U as Qe}from"./user-check-DJ7SEUIV.js";import{u as Ke}from"./use-agency-permissions-Cs_I-_X9.js";import{u as qe,A as Ge,a as C,b as Je,i as Ze}from"./use-board-tiles-DPo0ewSk.js";import{N as $e}from"./NavModeToggle-DSBEXRZv.js";import{u as Xe}from"./use-nav-mode-e_k4Aq7-.js";import{E as We}from"./eye-DGNB9bIa.js";import{L as se}from"./lock-CddPA3IM.js";import{C as te}from"./chevron-down-yiSxZdi6.js";import{S as re}from"./settings-B5UIENTF.js";import{L as es}from"./layout-grid-DxA2WNc-.js";import"./index-DXODiXiN.js";import"./chevron-right-B-DZo7pV.js";import"./index-De2dz-JC.js";import"./index-C0O6S-sm.js";import"./index-BIzaxVxn.js";import"./MacThreadPanel--eT57qhi.js";import"./appMap-C9PORT0v.js";import"./textarea-DrWKLUQ3.js";import"./MacAvatar-iSC9AiCn.js";import"./message-square-Ctl0ORGM.js";import"./sparkles-Dw17HAGC.js";import"./send-C7oLXo9-.js";import"./format-wlRNMwND.js";import"./en-US-C6iJ1xwW.js";import"./arrow-up-right-CXGQax4Y.js";import"./mail-DLDE3l6I.js";import"./shield-alert-D9-9uajB.js";import"./clock-BfuapMNW.js";import"./dialog-DjdV-IlH.js";import"./index-DPzoCUzk.js";import"./getRoundingMethod-BcWLtw-l.js";import"./permissions-DZqUzzKF.js";import"./use-client-permissions-C1OI8hw3.js";import"./trophy-DZe-Twgr.js";import"./layout-dashboard-nsUfZAfb.js";import"./hand-Dd8q5y3y.js";import"./radio-C7FGjVoM.js";import"./radar-CuQhMDsL.js";import"./messages-square-zqrv9UsA.js";import"./layout-template-rIuI3fMd.js";import"./list-todo-BnIe0CcQ.js";import"./shield-check-CjXIGRSE.js";import"./book-open-gSY_RLrZ.js";import"./library-be56k5gc.js";import"./dollar-sign-B_47oRfd.js";import"./code-xml-Dl1KutBr.js";import"./activity-CchYHQF0.js";import"./user-cog-BUCuN_QM.js";import"./sun-BTkyhucW.js";import"./handshake-CAMSc5vZ.js";import"./briefcase-DecVmyYR.js";import"./wallet-CwjlAXPd.js";import"./segmented-control-DOV46yn-.js";const ss=[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]],ts=oe("command",ss);function rs(s){return s.title.toLowerCase().includes("lead won")?Be:s.title.toLowerCase().includes("lead")?ce:s.title.toLowerCase().includes("review")?ae:s.title.toLowerCase().includes("booking")?_e:s.title.toLowerCase().includes("report")?le:s.type==="success"?ze:s.type==="alert"?Fe:Pe}function as(s){return s.type==="success"?"text-emerald-500 bg-emerald-500/10":s.type==="alert"||s.type==="error"?"text-destructive bg-destructive/10":"text-primary bg-primary/10"}function ns({n:s,onRead:n,onNavigate:l}){const i=rs(s),t=H(),c=()=>{s.read||n(s._id),s.link&&(t(s.link),l())};return e.jsxs(k.div,{initial:{opacity:0,x:8},animate:{opacity:1,x:0},layout:!0,onClick:c,className:x("flex items-start gap-3 px-4 py-3 border-b border-border last:border-0 transition-colors",s.link&&"cursor-pointer hover:bg-muted/40",!s.read&&"bg-primary/[0.03]"),children:[e.jsx("div",{className:x("p-1.5 rounded-lg mt-0.5 shrink-0",as(s)),children:e.jsx(i,{className:"w-3.5 h-3.5"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:x("text-sm font-medium leading-tight",!s.read&&"text-foreground"),children:s.title}),!s.read&&e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-primary shrink-0"})]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-snug",children:s.message}
1),e.jsx("p",{className:"text-xs text-muted-foreground/60 mt-1",children:Te(new Date(s.createdAt),{addSuffix:!0})})]})]})}function z(){const[s,n]=d.useState(!1),l=S(N.notifications.listForUser,{limit:30}),i=S(N.notifications.countUnread,{}),t=V(N.notifications.markRead),c=V(N.notifications.markAllRead),m=async u=>{await t({notificationId:u})},A=async()=>{await c({})};return e.jsxs(Ie,{open:s,onOpenChange:n,children:[e.jsx(Le,{asChild:!0,children:e.jsxs(j,{variant:"ghost",size:"icon",className:"h-8 w-8 relative",children:[e.jsx(ee,{className:"w-4 h-4"}),e.jsx(R,{children:(i??0)>0&&e.jsx(k.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},className:"absolute -top-1 -right-1",children:e.jsx(ie,{className:"h-4 min-w-4 px-1 py-0 flex items-center justify-center text-xs font-bold",children:i>99?"99+":i})},"badge")})]})}),e.jsxs(Ue,{side:"right",className:"w-full sm:w-96 p-0 flex flex-col",children:[e.jsx(De,{className:"px-4 py-4 border-b border-border shrink-0",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(Re,{className:"text-base",children:"Notifications"}),(i??0)>0&&e.jsxs(j,{variant:"ghost",size:"sm",className:"text-xs h-7 gap-1.5 text-muted-foreground hover:text-foreground",onClick:A,children:[e.jsx(Oe,{className:"w-3.5 h-3.5"})," Mark all read"]})]})}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:l===void 0?e.jsx("div",{className:"space-y-0",children:Array.from({length:5}).map((u,h)=>e.jsxs("div",{className:"flex items-start gap-3 px-4 py-3 border-b border-border",children:[e.jsx(w,{className:"w-7 h-7 rounded-lg shrink-0"}),e.jsxs("div",{className:"flex-1 space-y-1.5",children:[e.jsx(w,{className:"h-3.5 w-32"}),e.jsx(w,{className:"h-3 w-full"})]})]},h))}):l.length===0?e.jsx(Ce,{className:"h-48 border-0 py-0",children:e.jsxs(Se,{children:[e.jsx(Ae,{variant:"icon",children:e.jsx(ee,{})}),e.jsx(Ee,{children:"No notifications yet"}),e.jsx(Me,{children:"New leads, reviews, and bookings will appear here."})]})}):e.jsx("div",{children:l.map(u=>e.jsx(ns,{n:u,onRead:m,onNavigate:()=>n(!1)},u._id))})}),e.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:e.jsxs("p",{className:"text-xs text-muted-foreground text-center",children:["Manage preferences in"," ",e.jsx("button",{className:"underline cursor-pointer hover:text-foreground transition-colors",onClick:()=>{n(!1)},children:"Settings → Notifications"})]})})]})]})}const is={client:{label:"Client",Icon:de,color:"text-blue-500"},lead:{label:"Lead",Icon:Qe,color:"text-green-500"},invoice:{label:"Invoice",Icon:Ve,color:"text-amber-500"},review:{label:"Review",Icon:ae,color:"text-purple-500"},booking:{label:"Booking",Icon:He,color:"text-cyan-500"}},os={active:"bg-green-500/10 text-green-600 dark:text-green-400",onboarding:"bg-blue-500/10 text-blue-600 dark:text-blue-400",paused:"bg-amber-500/10 text-amber-600 dark:text-amber-400",churned:"bg-red-500/10 text-red-600 dark:text-red-400",new:"bg-blue-500/10 text-blue-600 dark:text-blue-400",contacted:"bg-purple-500/10 text-purple-600 dark:text-purple-400",qualified:"bg-cyan-500/10 text-cyan-600 dark:text-cyan-400",booked:"bg-green-500/10 text-green-600 dark:text-green-400",won:"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400",lost:"bg-red-500/10 text-red-600 dark:text-red-400",draft:"bg-muted text-muted-foreground",sent:"bg-blue-500/10 text-blue-600 dark:text-blue-400",paid:"bg-green-500/10 text-green-600 dark:text-green-400",overdue:"bg-red-500/10 text-red-600 dark:text-red-400",void:"bg-muted text-muted-foreground",pending:"bg-amber-500/10 text-amber-600 dark:text-amber-400",confirmed:"bg-green-500/10 text-green-600 dark:text-green-400",completed:"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400",cancelled:"bg-red-500/10 text-red-600 dark:text-red-400",google:"bg-blue-500/10 text-blue-600 dark:text-blue-400",facebook:"bg-indigo-500/10 text-indigo-600 dark:text-indigo-400"},F=["client","lead","invoice","review","booking"];function P(){const[s,n]=d.useState(!1),[l,i]=d.useState(""),[t,c]=d.useState(0),m=H(),A=d.useRef(null),u=d.useRef(null),[h]=Ye(l,200),p=S(N.search.globalSearch,h.trim().length>=2?{q:h.trim()}:"skip"),y=p?F.flatMap(a=>(p[a]??[]).map(o=>({...o,type:a}))):[],f=y.length;d.useEffect(()=>{const a=o=>{o.key==="/"&&!["INPUT","TEXTAREA"].includes(document.activeElement?.tagName??"")&&!document.activeElement?.isContentEditable&&(o.preventDefault(),n(!0)),o.key==="Escape"&&n(!1)};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[]),d.useEffect(()=>{s&&(i(""),c(0),setTimeout(()=>A.current?.focus(),50))},[s]),d.useEffect(()=>{if(!s)return;const a=o=>{o.key==="ArrowDown"?(o.preventDefault(),c(b=>Math.min(b+1,f-1))):o.key==="ArrowUp"?(o.preventDefault(),c(b=>Math.max(b-1,0))):o.key==="Enter"&&y[t]&&(o.preventDefault(),v(y[t].url))};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[s,t,y,f]),d.useEffect(()=>
1{u.current?.querySelector(`[data-idx="${t}"]`)?.scrollIntoView({block:"nearest"})},[t]);const v=d.useCallback(a=>{n(!1),m(a)},[m]),I=p&&F.some(a=>(p[a]?.length??0)>0),L=h.length>=2&&p===void 0;let E=0;return e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>n(!0),className:"hidden md:flex items-center gap-2 px-3 py-1.5 rounded-lg bg-muted/60 border border-border hover:bg-muted transition-colors text-sm text-muted-foreground cursor-pointer group","aria-label":"Open global search",children:[e.jsx(_,{className:"w-3.5 h-3.5"}),e.jsx("span",{className:"text-xs",children:"Search everything…"}),e.jsx("kbd",{className:"ml-2 text-xs font-mono bg-background border border-border rounded px-1.5 py-0.5 opacity-70 group-hover:opacity-100 transition-opacity",children:"/"})]}),e.jsx("button",{onClick:()=>n(!0),className:"md:hidden p-1.5 rounded-md hover:bg-sidebar-accent transition-colors cursor-pointer","aria-label":"Search",children:e.jsx(_,{className:"w-5 h-5"})}),e.jsx(R,{children:s&&e.jsxs(k.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},className:"fixed inset-0 z-50 flex items-start justify-center pt-[10vh] px-4",onClick:()=>n(!1),children:[e.jsx("div",{className:"absolute inset-0 bg-background/70 backdrop-blur-sm"}),e.jsxs(k.div,{initial:{opacity:0,scale:.97,y:-8},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.97,y:-8},transition:{duration:.18,ease:[.25,.1,.25,1]},className:"relative w-full max-w-xl bg-popover border border-border rounded-xl shadow-2xl overflow-hidden",onClick:a=>a.stopPropagation(),children:[e.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-border",children:[e.jsx(_,{className:"w-4 h-4 text-muted-foreground shrink-0"}),e.jsx("input",{ref:A,value:l,onChange:a=>{i(a.target.value),c(0)},placeholder:"Search clients, leads, invoices, reviews…",className:"flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"}),l&&e.jsx("button",{onClick:()=>i(""),className:"text-muted-foreground hover:text-foreground transition-colors cursor-pointer",children:e.jsx(ne,{className:"w-4 h-4"})}),e.jsx("kbd",{className:"text-xs font-mono bg-muted border border-border rounded px-1.5 py-0.5 text-muted-foreground",children:"ESC"})]}),e.jsx("div",{ref:u,className:"max-h-[60vh] overflow-y-auto overscroll-contain",children:l.trim().length<2?e.jsxs("div",{className:"py-10 px-6 text-center space-y-3",children:[e.jsx("div",{className:"inline-flex items-center justify-center w-10 h-10 rounded-full bg-primary/10 mx-auto",children:e.jsx(ts,{className:"w-5 h-5 text-primary"})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Type at least 2 characters to search across all clients, leads, invoices, reviews, and bookings."}),e.jsxs("div",{className:"flex items-center justify-center gap-4 text-xs text-muted-foreground/60 pt-1",children:[e.jsxs("span",{children:[e.jsx("kbd",{className:"font-mono",children:"↑↓"})," navigate"]}),e.jsxs("span",{children:[e.jsx("kbd",{className:"font-mono",children:"↵"})," select"]}),e.jsxs("span",{children:[e.jsx("kbd",{className:"font-mono",children:"ESC"})," close"]})]})]}):L?e.jsxs("div",{className:"py-8 flex items-center justify-center gap-2 text-sm text-muted-foreground",children:[e.jsx("div",{className:"w-4 h-4 rounded-full border-2 border-primary border-t-transparent animate-spin"}),"Searching…"]}):I?e.jsx("div",{className:"py-2",children:F.map(a=>{const o=p?.[a]??[];if(o.length===0)return null;const{label:b,Icon:M,color:U}=is[a];return e.jsxs("div",{className:"mb-1",children:[e.jsxs("div",{className:"flex items-center gap-1.5 px-4 py-1.5",children:[e.jsx(M,{className:x("w-3 h-3",U)}),e.jsxs("span",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:[b,"s"]})]}),o.map(g=>{const r=E++,O=t===r;return e.jsxs("button",{"data-idx":r,onClick:()=>v(g.url),onMouseEnter:()=>c(r),className:x("w-full flex items-center gap-3 px-4 py-2.5 text-left transition-colors cursor-pointer",O?"bg-primary/10":"hover:bg-muted/50"),children:[e.jsx("div",{className:x("w-7 h-7 rounded-md flex items-center justify-center shrink-0",O?"bg-primary/20":"bg-muted"),children:e.jsx(M,{className:x("w-3.5 h-3.5",U)})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:g.title}),e.jsx("p",{className:"text-xs text-muted-foreground truncate",children:g.subtitle})]}),g.meta&&e.jsx(ie,{variant:"secondary",className:x("text-xs py-0 shrink-0 capitalize",os[g.meta]??"bg-muted text-muted-foreground"),children:g.meta}),e.jsx(me,{className:x("w-3.5 h-3.5 text-muted-foreground shrink-0 transition-opacity",O?"opacity-100":"opacity-0")})]},g.id)})]},a)})}):e.jsxs("div",{className:"py-10 text-center text-sm text-muted-foreground",children:["No results for"," ",e.jsxs("span",{className:"text-foreground font-medium",children:['"',h,'"']}
1)]})}),I&&e.jsxs("div",{className:"border-t border-border px-4 py-2 flex items-center justify-between",children:[e.jsxs("span",{className:"text-xs text-muted-foreground",children:[f," result",f!==1?"s":""]}),e.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground/60",children:[e.jsxs("span",{children:[e.jsx("kbd",{className:"font-mono",children:"↑↓"})," navigate"]}),e.jsxs("span",{children:[e.jsx("kbd",{className:"font-mono",children:"↵"})," open"]})]})]})]})]})})]})}const cs=Ge,ls=Je;function Y({href:s,label:n,Icon:l,active:i,badge:t,onClick:c}){return e.jsxs(Ne,{to:s,onClick:c,onMouseEnter:()=>W(s),onFocus:()=>W(s),className:x("flex items-center gap-3 px-3 py-2 rounded-md text-sm font-medium transition-all duration-150",i?"bg-primary text-primary-foreground shadow-sm":"text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"),children:[e.jsx(l,{className:"w-4 h-4 shrink-0"}),n,t!==void 0&&t>0&&e.jsx("span",{className:x("ml-auto min-w-5 h-5 px-1.5 rounded-full text-xs font-semibold leading-5 text-center",i?"bg-primary-foreground/20 text-primary-foreground":"bg-destructive text-white"),children:t>99?"99+":t})]})}function ds(){const s=H(),n=fe(),{signout:l}=ge(),i=S(N.users.getCurrentUser,{}),t=S(N.agencies.getMyAgency,{}),c=Ke(),m=ye(),u=S(N.needsYou.summary,t&&c.canView("clients")?{agencyId:t._id}:"skip")?.now,[h,p]=d.useState(!1),[y,f]=d.useState(!1),v=Xe(),I=qe();d.useEffect(()=>{ve()},[]);const L=async()=>{await l(),s("/")};if(i===void 0||t===void 0||c.isLoading||m.active===void 0||v.isLoading)return e.jsx("div",{className:"flex h-screen items-center justify-center",children:e.jsxs("div",{className:"space-y-3 w-48",children:[e.jsx(w,{className:"h-8 w-full"}),e.jsx(w,{className:"h-4 w-3/4"})]})});if(m.active){const r=m.active.target.name??m.active.target.email??"a client user";return e.jsx("div",{className:"flex h-screen items-center justify-center bg-background px-6",children:e.jsxs("div",{className:"text-center max-w-sm space-y-4",children:[e.jsx("div",{className:"w-14 h-14 rounded-full bg-amber-500/15 flex items-center justify-center mx-auto",children:e.jsx(We,{className:"w-6 h-6 text-amber-600 dark:text-amber-400"})}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("h2",{className:"text-lg font-semibold",children:["You are viewing as ",r]}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["The agency view is hidden while you are inside"," ",m.active.clientName," as them."]})]}),e.jsxs("div",{className:"flex items-center justify-center gap-2",children:[e.jsx(j,{size:"sm",variant:"secondary",className:"cursor-pointer",onClick:()=>s(`/client/${m.active?.clientId}/mac`),children:"Back to their account"}),e.jsx(j,{size:"sm",className:"cursor-pointer",onClick:()=>{m.end()},children:"Exit and return to agency"})]})]})})}if(!t)return e.jsx(be,{to:"/setup",replace:!0});const E=r=>Ze(r,n.pathname),a=cs.filter(r=>!r.archive&&(!r.feature||c.canView(r.feature))&&(!r.ownerOnly||c.isOwner)),o=r=>r.badge==="needsYou"?u:void 0,b=ls(n.pathname),M=b?!c.canView(b):!1,U=e.jsx("div",{className:"flex flex-1 items-center justify-center min-h-[60vh] px-6",children:e.jsxs("div",{className:"text-center max-w-sm space-y-4",children:[e.jsx("div",{className:"w-14 h-14 rounded-full bg-muted flex items-center justify-center mx-auto",children:e.jsx(se,{className:"w-6 h-6 text-muted-foreground"})}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("h2",{className:"text-lg font-semibold",children:"You don't have access to this area"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Ask an owner of ",t.name," to grant you access if you need it."]})]}),e.jsx(j,{size:"sm",onClick:()=>s(v.isSiteMap?C:"/agency/dashboard"),children:v.isSiteMap?"Back to the board":"Back to Dashboard"})]})}),g=e.jsxs(G,{children:[e.jsx(J,{asChild:!0,children:e.jsxs("button",{"aria-label":"Your account",className:"flex items-center gap-2 rounded-md px-1.5 py-1 hover:bg-muted transition-colors cursor-pointer",children:[e.jsx("div",{className:"w-7 h-7 rounded-full bg-primary/20 flex items-center justify-center shrink-0",children:e.jsx("span",{className:"text-xs font-semibold text-primary",children:i?.name?.charAt(0)?.toUpperCase()??"U"})}),e.jsx(te,{className:"w-3.5 h-3.5 text-muted-foreground shrink-0 hidden sm:block"})]})}),e.jsxs(Z,{align:"end",className:"w-48",children:[e.jsxs(D,{onClick:()=>s("/agency/settings"),children:[e.jsx(re,{className:"w-4 h-4 mr-2"})," Settings"]}),e.jsx($,{}),e.jsxs(D,{onClick:L,className:"text-destructive",children:[e.jsx(Q,{className:"w-4 h-4 mr-2"})," Sign out"]})]})]});return v.isSiteMap?e.jsxs(e.Fragment,{children:[e.jsx(we,{tiles:I,base:C,macHref:"/agency/dashboard",brand:e.jsx(B,{logoUrl:t.logoUrl,logoDarkUrl:t.logoDarkUrl,alt:t.name,className:"h-6 max-w-[140px]",fallback:e.jsx("img",{src:"https://hercules-cdn.com/cdn-cgi/image/w=96,format=auto/file_QJiCwg16H7K9SLPOZVTj6mjy",width:48,height:48,alt:"SpeedMobi",className:"w-7 h-7 rounded-lg"})}),actions:e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden md:block",children:e.jsx(P,{})}),e.jsxs(j,{size:"sm",variant:"secondary",onClick:()=>f(!0),className:"gap-1.5 cursor-pointer",title:"Ask Mac (⌘K)",children:[e.jsx(T,{className:"size-4"})," ",e.jsx("span",{className:"hidden sm:inline",children:"Ask Mac"})]}),e.jsx(z,{}),g]}),children:e.jsx(K,{children:M?U:e.jsx(q,{})},n.pathname)}),e.jsx(X,{open:y,onOpenChange:f})]}):e.jsxs("div",{className:"flex h-screen bg-background",children:[e.jsx(ke,{macHref:"/agency/dashboard",boardHref:C}),e.jsxs("aside",{className:"hidden md:flex w-60 flex-col border-r border-border bg-sidebar shrink-0",children:[e.jsx("div",{className:"flex items-center gap-2.5 px-5 py-5 border-b border-sidebar-border",children:e.jsx(B,{logoUrl:t.logoUrl,logoDarkUrl:t.logoDarkUrl,alt:t.name,className:"h-7 max-w-full",fallback:e.jsxs(e.Fragment,{children:[e.jsx("img",{src:"https://hercules-cdn.com/cdn-cgi/image/w=96,format=auto/file_QJiCwg16H7K9SLPOZVTj6mjy",width:48,height:48,alt:"SpeedMobi",className:"w-7 h-7 rounded-lg"}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"text-sm font-bold text-sidebar-foreground leading-none",children:t.name}),e.jsx("span",{className:"text-xs text-muted-foreground mt-0.5",children:"Agency Portal"})]})]})})}),e.jsxs("div",{className:"px-3 pt-3 space-y-2",children:[e.jsx($e,{macHref:"/agency/dashboard",boardHref:C,className:"flex w-full [&>button]:flex-1"}),e.jsxs("button",{onClick:()=>f(!0),className:"flex items-center gap-2 w-full px-3 py-2 rounded-lg text-sm font-medium cursor-pointer bg-primary text-primary-foreground hover:bg-primary/90 transition-colors",title:"Ask Mac (⌘K)",children:[e.jsx(T,{className:"w-4 h-4"}),e.jsx("span",{children:"Ask Mac"}),e.jsx("kbd",{className:"ml-auto text-xs opacity-70 font-mono bg-primary-foreground
1/15 px-1.5 py-0.5 rounded",children:"⌘K"})]})]}),e.jsxs("nav",{className:"flex-1 px-3 py-4 space-y-0.5 overflow-y-auto",children:[e.jsx(Y,{href:C,label:"Board",Icon:es,active:E(C)}),a.map(r=>e.jsx(Y,{href:r.href,label:r.label,Icon:r.icon,active:E(r.href),badge:o(r)},r.href))]}),e.jsx("div",{className:"px-3 pb-4 border-t border-sidebar-border pt-3",children:e.jsxs(G,{children:[e.jsx(J,{asChild:!0,children:e.jsxs("button",{className:"flex items-center gap-2.5 w-full px-3 py-2 rounded-md hover:bg-sidebar-accent transition-colors cursor-pointer",children:[e.jsx("div",{className:"w-7 h-7 rounded-full bg-primary/20 flex items-center justify-center shrink-0",children:e.jsx("span",{className:"text-xs font-semibold text-primary",children:i?.name?.charAt(0)?.toUpperCase()??"U"})}),e.jsxs("div",{className:"flex-1 text-left min-w-0",children:[e.jsx("p",{className:"text-xs font-medium text-sidebar-foreground truncate",children:i?.name??"User"}),e.jsx("p",{className:"text-xs text-muted-foreground truncate",children:i?.email??""})]}),e.jsx(te,{className:"w-3.5 h-3.5 text-muted-foreground shrink-0"})]})}),e.jsxs(Z,{align:"end",className:"w-48",children:[e.jsxs(D,{onClick:()=>s("/agency/settings"),children:[e.jsx(re,{className:"w-4 h-4 mr-2"})," Settings"]}),e.jsx($,{}),e.jsxs(D,{onClick:L,className:"text-destructive",children:[e.jsx(Q,{className:"w-4 h-4 mr-2"})," Sign out"]})]})]})})]}),e.jsxs("div",{className:"md:hidden fixed top-0 left-0 right-0 z-40 flex items-center justify-between px-4 py-3 bg-sidebar border-b border-sidebar-border",children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(B,{logoUrl:t.logoUrl,logoDarkUrl:t.logoDarkUrl,alt:t.name,className:"h-6 max-w-[140px]",fallback:e.jsxs(e.Fragment,{children:[e.jsx("img",{src:"https://hercules-cdn.com/cdn-cgi/image/w=96,format=auto/file_QJiCwg16H7K9SLPOZVTj6mjy",width:48,height:48,alt:"SpeedMobi",className:"w-6 h-6 rounded-md"}),e.jsx("span",{className:"text-sm font-bold",children:t.name})]})})}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(P,{}),e.jsx(z,{}),e.jsx("button",{onClick:()=>p(!h),className:"p-1.5 rounded-md hover:bg-sidebar-accent cursor-pointer",children:h?e.jsx(ne,{className:"w-5 h-5"}):e.jsx(je,{className:"w-5 h-5"})})]})]}),e.jsx(R,{children:h&&e.jsx(k.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},className:"md:hidden fixed inset-0 z-30 bg-background/80 backdrop-blur-sm pt-14",onClick:()=>p(!1),children:e.jsx(k.div,{initial:{x:-16,opacity:0},animate:{x:0,opacity:1},exit:{x:-16,opacity:0},transition:{duration:.18},className:"w-64 h-full bg-sidebar border-r border-sidebar-border p-3 space-y-0.5 overflow-y-auto",onClick:r=>r.stopPropagation(),children:a.map(r=>e.jsx(Y,{href:r.href,label:r.label,Icon:r.icon,active:E(r.href),badge:o(r),onClick:()=>p(!1)},r.href))})})}),e.jsxs("main",{className:"flex-1 min-w-0 overflow-y-auto overflow-x-hidden md:pt-0 pt-14 flex flex-col",children:[e.jsxs("div",{className:"sticky top-0 z-10 hidden md:flex items-center justify-between gap-3 px-6 py-3 bg-background/80 backdrop-blur-md border-b border-border",children:[e.jsx(P,{}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>s("/agency/clients/new"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors px-2 py-1 rounded hover:bg-muted cursor-pointer",children:"+ New Client"}),e.jsx(z,{})]})]}),e.jsx(R,{mode:"wait",children:e.jsx(k.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.18,ease:"easeOut"},className:"flex-1 min-w-0",children:e.jsx(K,{children:M?e.jsx("div",{className:"flex flex-1 items-center justify-center min-h-[60vh] px-6",children:e.jsxs("div",{className:"text-center max-w-sm space-y-4",children:[e.jsx("div",{className:"w-14 h-14 rounded-full bg-muted flex items-center justify-center mx-auto",children:e.jsx(se,{className:"w-6 h-6 text-muted-foreground"})}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("h2",{className:"text-lg font-semibold",children:"You don't have access to this area"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Ask an owner of ",t.name," to grant you access if you need it."]})]}),e.jsx(j,{size:"sm",onClick:()=>s("/agency/dashboard"),children:"Back to Dashboard"})]})}):e.jsx(q,{})},n.pathname)},n.pathname)})]}),e.jsx(j,{size:"icon","aria-label":"Ask Mac",onClick:()=>f(!0),className:"md:hidden fixed bottom-4 right-4 z-30 size-12 rounded-full shadow-lg cursor-pointer",children:e.jsx(T,{className:"size-5"})}),e.jsx(X,{open:y,onOpenChange:f})]})}function Ut(){return e.jsxs(e.Fragment,{children:[e.jsx(xe,{children:e.jsx("div",{className:"flex h-screen items-center justify-center bg-background",children:e.jsxs("div",{className:"text-center space-y-4",children:[e.jsx("img",{src:"https://hercules-cdn.com/cdn-cgi/image/w=96,format=auto/file_QJiCwg16H7K9SLPOZVTj6mjy",width:48,height:48,alt:"SpeedMobi",className:"w-12 h-12 mx-auto"}),e.jsx("h1",{className:"text-xl font-bold",children:"Sign in to SpeedMobi"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Access your agency portal"}),e.jsx(ue,{})]})})}),e.jsx(he,{children:e.jsx("div",{className:"flex h-screen items-center justify-center",children:e.jsxs("div",{className:"space-y-3 w-48",children:[e.jsx(w,{className:"h-8 w-full"}),e.jsx(w,{className:"h-4 w-3/4"})]})})}),e.jsx(pe,{children:e.jsx(ds,{})})]})}export{Ut 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.