PageSourceSearch

https://elixium.ai/_next/static/chunks/0wa8z1uzugqzc.js

js elixium.ai collected 2026-10-05 15:32:55 UTC 72,984 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,65617,e=>{"use strict";var t=e.i(43476),n=e.i(71645),a=e.i(22016),r=e.i(62474);e.s(["MobileMenu",0,({isOpen:e,onClose:i,searchTerm:o,setSearchTerm:s,onSignOut:l,boardHref:d,roadmapHref:c,standupHref:u,settingsHref:p,isRoadmapActive:m,isStandupActive:h})=>{let x=(0,n.useRef)(null),f=(0,n.useRef)(null),b=(0,n.useRef)(null);return((0,n.useEffect)(()=>{if(!e)return;setTimeout(()=>{f.current?.focus()},100);let t=e=>{if("Escape"===e.key)return void i();if("Tab"!==e.key)return;let t=x.current?.querySelectorAll('a, button, input, [tabindex]:not([tabindex="-1"])');if(!t||0===t.length)return;let n=t[0],a=t[t.length-1];e.shiftKey?document.activeElement===n&&(e.preventDefault(),a.focus()):document.activeElement===a&&(e.preventDefault(),n.focus())};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[e,i]),(0,n.useEffect)(()=>{if(!e)return;let t=e=>{x.current&&!x.current.contains(e.target)&&i()};return setTimeout(()=>{document.addEventListener("click",t)},100),()=>document.removeEventListener("click",t)},[e,i]),(0,n.useEffect)(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),e)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-black/50 z-40 motion-safe:animate-fade-in motion-reduce:opacity-100","aria-hidden":"true",onClick:i,"data-testid":"mobile-menu-backdrop"}),(0,t.jsxs)("div",{ref:x,"data-testid":"mobile-menu",role:"dialog","aria-modal":"true","aria-label":"Navigation menu",className:"fixed top-0 right-0 bottom-0 w-80 max-w-[85vw] bg-surface-raised z-50 shadow-xl motion-safe:animate-slide-in-right motion-reduce:translate-x-0 flex flex-col",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-4 border-b border-border",children:[(0,t.jsx)("span",{className:"font-bold text-content-primary text-lg",children:"Menu"}),(0,t.jsx)("button",{ref:f,"data-testid":"mobile-menu-close",onClick:i,"aria-label":"Close navigation menu",className:"w-11 h-11 flex items-center justify-center rounded-lg hover:bg-surface-sunken focus:outline-none focus:ring-2 focus:ring-pivotal-blue focus:ring-offset-2 transition-colors",children:(0,t.jsx)("svg",{className:"w-6 h-6 text-content-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),s&&(0,t.jsx)("div",{className:"p-4 border-b border-border-muted",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("input",{type:"text",placeholder:"Search stories...",value:o||"",onChange:e=>s(e.target.value),className:"w-full bg-surface-sunken border border-border rounded-lg py-3 px-4 text-sm focus:bg-surface-raised focus:border-pivotal-blue focus:ring-2 focus:ring-pivotal-blue/20 focus:outline-none placeholder:text-content-faint"}),(0,t.jsx)("svg",{className:"w-4 h-4 text-content-faint absolute right-4 top-3.5 pointer-events-none",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})]})}),(0,t.jsx)("nav",{className:"flex-1 overflow-y-auto p-4","aria-label":"Mobile navigation",children:(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)(a.default,{ref:b,href:d,onClick:i,className:`flex items-center gap-3 px-4 py-3 rounded-lg text-sm font-medium min-h-[44px] focus:outline-none focus:ring-2 focus:ring-pivotal-blue focus:ring-offset-2 transition-colors ${!m&&!h?"bg-info-bg text-info":"text-content-primary hover:bg-surface-sunken"}`,children:[(0,t.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 17V7m0 10a2 2 0 01-2 2H5a2 2 0 01-2-2V7a2 2 0 012-2h2a2 2 0 012 2m0 10a2 2 0 002 2h2a2 2 0 002-2M9 7a2 2 0 012-2h2a2 2 0 012 2m0 10V7m0 10a2 2 0 002 2h2a2 2 0 002-2V7a2 2 0 00-2-2h-2a2 2 0 00-2 2"})}),"Board"]}),(0,t.jsxs)(a.default,{href:c,onClick:i,className:`flex items-center gap-3 px-4 py-3 rounded-lg text-sm font-medium min-h-[44px] focus:outline-none focus:ring-2 focus:ring-pivotal-blue focus:ring-offset-2 transition-colors ${m?"bg-info-bg text-info":"text-content-primary hover:bg-surface-sunken"}`,children:[(0,t.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})}),"Roadmap"]}),u&&(0,t.jsxs)(a.default,{href:u,onClick:i,"data-testid":"mobile-standup-link",className:`flex items-center gap-3 px-4 py-3 rounded-lg text-sm font-medium min-h-[44px] focus:outline-none focus:ring-2 focus:ring-pivotal-blue focus:ring-offset-2 transition-colors ${h?"bg-info-bg text-info":"text-content-primary hover:bg-surface-sunken"}`,children:[(0,t.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 
10 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"})}),"Stand-Up"]}),(0,t.jsx)("div",{className:"my-4 border-t border-border-muted"}),(0,t.jsxs)("a",{href:"localhost"===window.location.hostname?"http://localhost:3000/docs":"https://elixium.ai/docs",target:"_blank",rel:"noopener noreferrer",onClick:i,className:"flex items-center gap-3 px-4 py-3 rounded-lg text-sm font-medium text-content-primary hover:bg-surface-sunken min-h-[44px] focus:outline-none focus:ring-2 focus:ring-pivotal-blue focus:ring-offset-2 transition-colors",children:[(0,t.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"})}),"Documentation"]}),p&&(0,t.jsxs)(a.default,{href:p,onClick:i,className:"flex items-center gap-3 px-4 py-3 rounded-lg text-sm font-medium text-content-primary hover:bg-surface-sunken min-h-[44px] focus:outline-none focus:ring-2 focus:ring-pivotal-blue focus:ring-offset-2 transition-colors",children:[(0,t.jsxs)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),"Settings"]})]})}),(0,t.jsxs)("div",{className:"px-4 py-3 border-t border-border-muted flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-content-primary",children:"Theme"}),(0,t.jsx)(r.ThemeToggle,{})]}),(0,t.jsx)("div",{className:"p-4 border-t border-border",children:(0,t.jsxs)("button",{onClick:()=>{l(),i()},className:"flex items-center gap-3 px-4 py-3 rounded-lg text-sm font-medium text-content-muted hover:bg-surface-sunken hover:text-content-primary w-full min-h-[44px] focus:outline-none focus:ring-2 focus:ring-pivotal-blue focus:ring-offset-2 transition-colors",children:[(0,t.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"})}),"Sign Out"]})})]})]}):null}])},42672,97480,e=>{"use strict";var t=e.i(43476),n=e.i(71645),a=e.i(18566),r=e.i(92161),i=e.i(21851);let o=["readableId","title","epic","labels","body"];function s(e){return"string"==typeof e?e.toLowerCase():""}function l(e,t){return t.length>0&&s(e).includes(t)}function d(e){return e.map((e,t)=>({row:e,i:t})).sort((e,t)=>{let n=o.indexOf(e.row.matchField)-o.indexOf(t.row.matchField);return 0!==n?n:e.i-t.i}).map(({row:e})=>e)}function c(e,t){let n=e.lane??"";return"Current"===n?"Current iteration":"Done"===n?"Done":"Icebox"===n?"Icebox":t.get(e.id)??n??""}function u(e){return"Done"===e.lane||!0===e.isArchived}function p({stories:e,epics:t,query:n,iterationLabels:a}){let r=n.trim(),i=r.length>0,o=new Map(t.map(e=>[e.id,e.title])),m=e=>e?o.get(e)??null:null,h=[],x=[];for(let t of e){let e=function(e,t,n){let a=t.trim().toLowerCase();if(!a)return{matched:!0,field:null,snippet:null};if(l(e.readableId,a))return{matched:!0,field:"readableId",snippet:null};if(l(e.title,a))return{matched:!0,field:"title",snippet:null};if(l(n(e.epicId),a))return{matched:!0,field:"epic",snippet:null};if((Array.isArray(e.labels)?e.labels:[]).some(e=>l(e,a)))return{matched:!0,field:"labels",snippet:null};for(let t of[e.description,e.acceptanceCriteria,e.hypothesis])if(l(t,a))return{matched:!0,field:"body",snippet:function(e,t){if(!e||!t)return null;let n=e.replace(/\s+/g," ").trim(),a=n.toLowerCase().indexOf(t.toLowerCase());if(-1===a)return null;let r=Math.max(0,a-48),i=Math.min(n.length,a+t.length+48);return`${r>0?"…":""}${n.slice(r,i)}${i<n.length?"…":""}`}(t??null,a)};return{matched:!1,field:null,snippet:null}}(t,r,m);if(!e.matched)continue;
1let n={kind:u(t)?"done":"story",id:t.id,title:t.title,readableId:t.readableId??null,location:c(t,a),epicId:t.epicId??null,storyType:t.storyType??null,matchField:e.field??"title",snippet:e.snippet,needsHuman:t.awaitingInput?.status==="open"||"tests_proposed"===t.workflow_stage,source:"client"};(u(t)?x:h).push(n)}let f=new Map;for(let t of e)!u(t)&&t.epicId&&f.set(t.epicId,(f.get(t.epicId)??0)+1);let b=t.filter(e=>!i||s(e.title).includes(r.toLowerCase())).map(e=>({kind:"epic",id:e.id,title:e.title,openCount:f.get(e.id)??0}));return{stories:d(h).slice(0,i?40:8),epics:b,done:d(x).slice(0,i?20:3)}}function m(e,t){let n=new Set(e.map(e=>e.id));return[...e,...t.filter(e=>!n.has(e.id))]}e.s(["SERVER_MIN_QUERY",0,2,"STORY_CAP_QUERY",0,40,"buildFinderGroups",0,p,"mergeServerRows",0,m,"storyLocation",0,c],97480);let h=e=>"header"!==e.kind;e.s(["StoryFinder",0,({open:e,onClose:o,stories:s=[],epics:l=[],iterationLabels:d,boardId:u,tenantId:x,boardHref:f,onOpenStory:b})=>{let g=(0,a.useRouter)(),[k,v]=(0,n.useState)(""),[w,y]=(0,n.useState)(0),[j,N]=(0,n.useState)([]),[C,S]=(0,n.useState)(!1),L=(0,n.useRef)(null);(0,n.useEffect)(()=>{e||(v(""),y(0),N([]),S(!1))},[e]),(0,n.useEffect)(()=>{if("u"<typeof document)return;let t=document.documentElement;return e?t.setAttribute("data-finder-open","true"):t.removeAttribute("data-finder-open"),()=>t.removeAttribute("data-finder-open")},[e]),(0,n.useEffect)(()=>{if(!e||!u)return;let t=k.trim();if(t.length<2){N([]),S(!1);return}let n=new AbortController,a=setTimeout(async()=>{try{let e=await (0,r.getToken)(),a=await fetch(`/api/stories/search?q=${encodeURIComponent(t)}&boardId=${encodeURIComponent(u)}`,{headers:{...e?{Authorization:`Bearer ${e}`}:{},...x?{"X-Tenant-ID":x}:{}},signal:n.signal});if(!a.ok)throw Error(String(a.status));let i=await a.json(),o=(Array.isArray(i.results)?i.results:[]).map(e=>({kind:"story",id:e.id,title:e.title,readableId:e.readableId??null,location:c({id:e.id,title:e.title,lane:e.lane??null},d??new Map),epicId:e.epicId??null,storyType:e.storyType??null,matchField:"body",snippet:null,needsHuman:!1,source:"server"}));N(o),S(!1)}catch(e){if(e?.name==="AbortError")return;N([]),S(!0)}},250);return()=>{clearTimeout(a),n.abort()}},[e,k,u,x,d]);let $=(0,n.useMemo)(()=>p({stories:s,epics:l,query:k,iterationLabels:d??new Map}),[s,l,k,d]),T=(0,n.useMemo)(()=>m($.stories,j).slice(0,40),[$.stories,j]),I=(0,n.useMemo)(()=>{let e=[];return T.length>0&&(e.push({kind:"header",key:"h-stories",label:"Stories"}),T.forEach(t=>e.push({...t,kind:"story",key:`s-${t.id}`}))),$.epics.length>0&&(e.push({kind:"header",key:"h-epics",label:"Epics"}),$.epics.forEach(t=>e.push({...t,kind:"epic",key:`e-${t.id}`}))),$.done.length>0&&(e.push({kind:"header",key:"h-done",label:"Done"}),$.done.forEach(t=>e.push({...t,kind:"done",key:`d-${t.id}`}))),e},[T,$.epics,$.done]),A=(0,n.useMemo)(()=>I.filter(h),[I]);(0,n.useEffect)(()=>{y(e=>0===A.length?0:Math.min(e,A.length-1))},[A.length]),(0,n.useEffect)(()=>{let e=L.current?.querySelector('[data-selected="true"]');e?.scrollIntoView({block:"nearest"})},[w]);let E=(0,n.useMemo)(()=>T.map(e=>e.id).concat($.done.map(e=>e.id)),[T,$.done]),M=(0,n.useCallback)(e=>{if("epic"===e.kind){v(e.title),y(0);return}o(),b?b(e.id,E):f&&g.push(`${f}?storyId=${encodeURIComponent(e.id)}`)},[o,b,E,f,g]),D=(0,n.useCallback)(e=>{e&&requestAnimationFrame(()=>e.focus())},[]);if(!e)return null;let R=k.trim();return(0,t.jsx)("div",{"data-testid":"story-finder",className:"fixed inset-0 z-[60] flex justify-center",style:{background:"rgba(6,8,12,.45)"},onMouseDown:e=>{e.target===e.currentTarget&&o()},children:(0,t.jsxs)("div",{role:"dialog","aria-label":"Find a story","aria-modal":"true",onKeyDown:e=>{if("Escape"===e.key){e.preventDefault(),o();return}if("ArrowDown"===e.key){e.preventDefault(),y(e=>0===A.length?0:(e+1)%A.length);return}if("ArrowUp"===e.key){e.preventDefault(),y(e=>0===A.length?0:(e-1+A.length)%A.length);return}if("Enter"===e.key){e.preventDefault();let t=A[w];t&&M(t)}},className:"absolute w-[640px] max-w-[calc(100vw-2rem)] top-[14%] rounded-xl border border-line bg-card overflow-hidden finder-window",style:{boxShadow:"0 30px 80px rgba(0,0,0,.6)"},children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-4 py-3 border-b border-line",children:[(0,t.jsx)("span",{"aria-hidden":"true",className:"text-magic font-mono text-base leading-none",children:"/"}),(0,t.jsx)("input",{ref:D,"data-testid":"story-finder-input",value:k,onChange:e=>{v(e.target.value),y(0)},placeholder:"Find a story","aria-label":"Find a story",className:"flex-1 bg-transparent text-base text-ink placeholder:text-ink-faint outline-none min-w-0"}),(0,t.jsx)("kbd",{className:"shrink-0 font-mono text-[11px] text-ink-faint border border-line rounded px-1.5 py-0.5",children:"esc"})]}),(0,t.jsxs)("div",{ref:L,className:"max-h-[52vh] overflow-y-auto py-1",children:[0===I.length&&(0,t.jsx)("p",{"data-testid":"story-finder-empty",className:"px-4 py-6 text-sm text-ink-mute",children:R?`No matches for “${R}”`:"Type to search stories."}),I.map(e=>{if("header"===e.kind)return(0,t.jsx)("div",{"data-testid":"story-finder-group",className:"px-4 pt-3 pb-1 text-[10px] font-semibold uppercase tracking-[0.08em] text-ink-faint",children:e.label},e.key);let n=A.indexOf(e),a=n===w;return(0,t.jsxs)("button",{type:"button","data-testid":"story-finder-row","data-row-kind":e.kind,"data-selected":a?"true":"false",onMouseEnter:()=>y(n),onClick:()=>M(e),className:`w-full text-left px-4 py-1.5 flex items-center gap-2 transition-colors ${a?"bg-paper-deep text-ink":"text-ink-2 hover:bg-paper-deep/60"}`,children:[(0,t.jsx)("span",{"aria-hidden":"true",className:"w-3 shrink-0 text-center text-[12px] leading-none",style:{color:"epic"===e.kind?(0,i.epicColorVar)(e.id):"done"===e.kind?"var(--good)":e.epicId?(0,i.epicColorVar)(e.epicId):"var(--ink-faint)"},children:"epic"===e.kind?"◆":"done"===e.kind?"✓":"★"}),(0,t.jsx)("span",{className:"w-[84px] shrink-0 font-mono text-[11px] text-ink-faint truncate",children:"epic"===e.kind?"":e.readableId??""}),(0,t.jsxs)("span",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5 min-w-0",children:[(0,t.jsx)("span",{className:"truncate text-[13px]",children:e.title}),"epic"!==e.kind&&e.needsHuman&&(0,t.jsx)("span",{"data-testid":"story-finder-needs-human",title:"Waiting on a person",className:"shrink-0 text-[9px] font-bold uppercase tracking-wider px-1 py-0.5 rounded bg-warn-bg text-warn border border-warn/30",children:"Needs you"})]}),"epic"!==e.kind&&e.snippet&&(0,t.jsx)("span",{"data-testid":"story-finder-snippet",className:"block truncate text-[11px] text-ink-faint",children:e.snippet})]}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-ink-faint",children:"epic"===e.kind?`${e.openCount} open`:e.location})]},e.key)}),C&&(0,t.jsx)("p",{"data-testid":"story-finder-server-error",className:"px-4 py-2 text-[11px] text-ink-faint",children:"Showing local matches only — board-wide search is unavailable."})]}),(0,t.jsx)("div",{className:"px-4 py-2 border-t border-line font-mono text-[11px] text-ink-faint",children:"↑↓ move    ⏎ focus    esc close"})]})})}],42672)},63555,48992,97450,41874,28202,e=>{"use strict";var t=e.i(43476),n=e.i(71645),a=e.i(38628),r=e.i(18566),i=e.i(92161),o=e.i(59647),s=e.i(63526),l=e.i(55190),d=e.i(74080),c=e.i(16438);function u({testId:e,title:n,rows:a,onSelect:r}){return(0,t.jsxs)("div",{"data-testid":e,role:"group","aria-label":n,children:[(0,t.jsxs)("div",{className:(0,
1c.buildSwitcherGroupHeaderClassName)(),children:[(0,t.jsx)("span",{children:n}),(0,t.jsx)("span",{className:"font-mono font-normal",children:a.length})]}),a.map(e=>(0,t.jsxs)("button",{type:"button",role:"menuitem","data-testid":"switcher-row","data-current":e.current?"true":void 0,"aria-current":e.current?"true":void 0,onClick:()=>r(e),className:(0,c.buildSwitcherItemClassName)(e.current),children:[(0,t.jsx)("span",{"aria-hidden":"true",className:(0,c.buildSwitcherDotClassName)(e.current)}),(0,t.jsx)("span",{className:"flex-1 min-w-0 truncate",children:e.label}),e.awaiting>0&&(0,t.jsx)("span",{"data-testid":"switcher-awaiting-count",title:"Awaiting you",className:"font-mono text-[10px] px-1.5 py-px rounded bg-signal-amber-fill text-signal-amber-text",children:e.awaiting}),e.assigned>0&&(0,t.jsx)("span",{"data-testid":"switcher-assigned-count",title:"Assigned to you",className:"font-mono text-[10px] px-1.5 py-px rounded bg-kbd text-ink-soft",children:e.assigned}),(0,t.jsx)("span",{className:"font-mono text-[10px] text-ink-dim w-16 text-right shrink-0",children:e.meta})]},e.id))]})}function p({anchor:e,workspaceRows:a,boardRows:r,workspaceName:i,manageHref:o,onSelectWorkspace:s,onSelectBoard:l,onClose:c}){let m=(0,n.useRef)(null);if((0,n.useEffect)(()=>{let t=t=>{let n=t.target;m.current?.contains(n)||e?.contains(n)||c()},n=t=>{if("Escape"===t.key){t.preventDefault(),c(),e?.focus();return}if("ArrowDown"!==t.key&&"ArrowUp"!==t.key)return;let n=Array.from(m.current?.querySelectorAll('[role="menuitem"]')??[]);if(0===n.length)return;t.preventDefault();let a=n.indexOf(document.activeElement);n[(a+("ArrowDown"===t.key?1:-1)+n.length)%n.length]?.focus()};return document.addEventListener("mousedown",t),document.addEventListener("keydown",n),window.addEventListener("resize",c),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("keydown",n),window.removeEventListener("resize",c)}},[e,c]),!e||"u"<typeof document)return null;let h=e.getBoundingClientRect(),x={top:h.bottom+4,left:Math.max(8,Math.min(h.left,window.innerWidth-260-8))};return(0,d.createPortal)((0,t.jsxs)("div",{ref:m,role:"menu","aria-label":"Switch workspace or board","data-testid":"workspace-breadcrumb-menu",style:{top:x.top,left:x.left,width:260},className:"fixed z-[70] bg-panel border border-kbd-line rounded-lg shadow-menu p-1 animate-slideDown leading-[normal]",children:[(0,t.jsx)(u,{testId:"breadcrumb-menu-workspaces",title:"Workspaces",rows:a,onSelect:s}),(0,t.jsx)("div",{role:"separator",className:"border-t border-hairline-2 my-1"}),(0,t.jsx)(u,{testId:"breadcrumb-menu-boards",title:`Boards in ${i}`,rows:r,onSelect:l}),(0,t.jsx)("div",{role:"separator",className:"border-t border-hairline-2 my-1"}),(0,t.jsx)("div",{className:"flex justify-end px-2.5 pt-1.5 pb-1 text-[11px]",children:(0,t.jsx)("a",{href:o,"data-testid":"switcher-manage-boards",onClick:c,className:"text-ink-dim hover:text-ink whitespace-nowrap no-underline",children:"Manage boards →"})})]}),document.body)}let m=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function h(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function x(e,t,n){return`${e} ${1===e?t:n}`}e.s(["formatLastActive",0,function(e,t=new Date){if(null==e||""===e)return"—";let n=new Date(e);if(Number.isNaN(n.getTime()))return"—";let a=Math.floor((t.getTime()-n.getTime())/6e4);if(h(n,t)&&a>=0)return a<1?"just now":a<60?`${a}m ago`:`${Math.floor(a/60)}h ago`;let r=new Date(t);if(r.setDate(t.getDate()-1),h(n,r))return"yesterday";let i=`${m[n.getMonth()]} ${n.getDate()}`;return n.getFullYear()===t.getFullYear()?i:`${i}, ${n.getFullYear()}`},"formatSaveState",0,function(e,t,n=Date.now()){if(e)return"saving…";if(!t)return null;let a=Math.floor((n-t)/6e4);return a<1?"saved just now":a<60?`saved ${a}m ago`:`saved ${Math.floor(a/60)}h ago`},"plural",0,x],48992);let f={awaiting:0,assigned:0};function b(e){return"number"==typeof e?x(e,"board","boards"):""}function g(e){return"number"!=typeof e?"":0===e?"empty":x(e,"story","stories")}e.s(["WorkspaceBreadcrumb",0,({currentTenantId:e,currentTenantName:d,currentTenantSlug:c,currentBoardSlug:u,initialBoards:m})=>
1{let h=(0,r.useRouter)(),x=(0,o.useTenantPath)(),[k,v]=(0,n.useState)(!1),[w,y]=(0,n.useState)(null),[j,N]=(0,n.useState)([]),[C,S]=(0,n.useState)(m??[]),[L,$]=(0,n.useState)({}),[T,I]=(0,n.useState)(!1),A=(0,n.useCallback)(()=>v(!1),[]);(0,a.useCloseOnTourOpen)(A),(0,n.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await (0,i.getToken)();if(!t)return;let n=await fetch("/api/workspaces",{headers:{Authorization:`Bearer ${t}`}});if(!n.ok)return;let a=await n.json();!e&&Array.isArray(a)&&N(a)}catch{}})(),()=>{e=!0}},[]),(0,n.useEffect)(()=>{let t=async()=>{try{let t=await (0,i.getToken)();if(!t)return;let n=await fetch("/api/boards",{headers:{Authorization:`Bearer ${t}`,...e?{"X-Tenant-ID":e}:{}}});n.ok&&S((0,s.unwrapList)(await n.json(),"boards").items)}catch{}},n=(0,i.getAuthService)();n.currentUser&&t();let a=n.onAuthStateChanged(e=>{e&&t()});return()=>a()},[e]);let E=e??j.find(e=>e.slug===c)?.id;(0,n.useEffect)(()=>{if(!k)return;let e=!1;return(async()=>{let t=await (0,i.getToken)();if(!t||e)return;let n=j.length>0?j.map(e=>e.id):E?[E]:[];await Promise.all(n.map(async n=>{try{let a=await fetch("/api/boards/my-counts",{headers:{Authorization:`Bearer ${t}`,"X-Tenant-ID":n}});if(!a.ok)return;let r=await a.json();e||$(e=>({...e,[n]:r.counts??[]}))}catch{}}))})(),()=>{e=!0}},[k,j,E]);let M=async t=>{if(!T){if(t.id===e||t.slug===c)return void v(!1);I(!0);try{let e=function(e){let{hostname:t,port:n,protocol:a,origin:r}=window.location;if("localhost"===t||t.endsWith(".localhost")){let t=n?`:${n}`:"",a=`http://${e}.localhost${t}`;return{url:`${a}/board`,sameOrigin:a===r}}let i=(0,l.knownApexes)().find(e=>t===e||t.endsWith(`.${e}`));if(i){let t=`${a}//${e}.${i}`;return{url:`${t}/board`,sameOrigin:t===r}}return{url:`${r}/tenant/${e}/board`,sameOrigin:!0}}(t.slug);if(e.sameOrigin){window.location.href=e.url;return}let n=await (0,i.getToken)(),a=await fetch("/api/auth/exchange-token",{method:"POST",headers:{Authorization:`Bearer ${n}`,"X-Tenant-ID":t.id}});if(a.ok){let{customToken:t}=await a.json(),n=new URL(e.url);n.pathname="/auth/sso",n.searchParams.set("token",t),n.searchParams.set("redirect","/board"),window.location.href=n.toString();return}window.location.href=e.url}catch(e){console.error("Workspace switch failed:",e),I(!1)}}},D=d||j.find(t=>t.id===e)?.name||j.find(e=>e.slug===c)?.name||c||"Workspace",R=C.filter(e=>!e.isArchived),B=R.find(e=>e.slug===u)?.name||u||"Board",O=j.length>0?j:E?[{id:E,name:D,slug:c??""}]:[],_=O.map(e=>{let t=e.id===E||!!c&&e.slug===c,n=(L[e.id]??[]).reduce((e,t)=>({awaiting:e.awaiting+(Number(t.awaitingMe)||0),assigned:e.assigned+(Number(t.assignedToMe)||0)}),{...f});return{id:e.id,label:e.name,meta:b(t&&C.length>0?R.length:e.boardCount),awaiting:n.awaiting,assigned:n.assigned,current:t}}),H=function(e){let t=new Map;for(let n of e??[])t.set(String(n.boardId),{awaiting:Number(n.awaitingMe)||0,assigned:Number(n.assignedToMe)||0});return t}(E?L[E]:void 0),P=R.map(e=>{var t;return{id:e.slug,label:e.name,meta:g(e.storyCount),...(t=e.id,H.get(String(t))??f),current:e.slug===u}});return(0,t.jsxs)("div",{className:"relative shrink-0",children:[(0,t.jsxs)("button",{ref:y,type:"button","data-testid":"workspace-breadcrumb","data-tour-target":"switcher",onClick:()=>v(e=>!e),disabled:T,className:`flex items-center px-2.5 py-1 rounded-md border bg-panel transition-colors text-[12px] leading-[normal] whitespace-nowrap disabled:opacity-50 ${k?"border-control-hover":"border-hairline-2 hover:border-control-hover"}`,"aria-haspopup":"menu","aria-expanded":k,"aria-label":"Switch workspace or board",children:[(0,t.jsx)("span",{className:"text-ink-quiet",children:D}),(0,t.jsx)("span",{className:"text-ink-quiet whitespace-pre",children:" / "}),(0,t.jsx)("span",{className:"font-medium text-ink",children:B})]}),k&&(0,t.jsx)(p,{anchor:w,workspaceRows:_,boardRows:P,workspaceName:D,manageHref:x("/command-center?tab=profile#workspaces"),onSelectWorkspace:e=>{let t=O.find(t=>t.id===e.id);t?M(t):v(!1)},onSelectBoard:e=>{v(!1),h.push(x(`/board/${e.id}`))},onClose:A})]})}],63555),e.s(["DemoWorkspacePill",0,function({tenantName:e,boardSlug:i}
1){let o=(0,r.useRouter)(),[s,l]=(0,n.useState)(!1),[d,c]=(0,n.useState)(null);(0,a.useCloseOnTourOpen)(()=>l(!1));let u=(0,n.useCallback)(()=>l(!1),[]),m=[{id:"demo",label:e,meta:b(3),awaiting:2,assigned:5,current:!0},{id:"sandbox",label:"Sandbox",meta:b(1),awaiting:0,assigned:1,current:!1}],h=[{id:i,label:i,meta:g(24),awaiting:2,assigned:5,current:!0},{id:"platform",label:"platform",meta:g(7),awaiting:1,assigned:1,current:!1},{id:"test-board",label:"Test Board",meta:g(0),awaiting:0,assigned:0,current:!1}],x=()=>{l(!1),o.push("/demo")};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{ref:c,type:"button","data-testid":"workspace-pill","data-tour-target":"switcher","aria-haspopup":"menu","aria-expanded":s,"aria-label":"Switch workspace or board",onClick:()=>l(e=>!e),className:`hidden sm:inline-block shrink-0 whitespace-nowrap text-[12px] leading-[normal] text-ink-quiet bg-panel border rounded-md px-2.5 py-1 transition-colors ${s?"border-control-hover":"border-hairline-2 hover:border-control-hover"}`,children:[(0,t.jsx)("span",{"data-testid":"workspace-pill-tenant",children:e})," / ",(0,t.jsx)("span",{"data-testid":"workspace-pill-board",className:"text-ink font-medium",children:i})]}),s&&(0,t.jsx)(p,{anchor:d,workspaceRows:m,boardRows:h,workspaceName:e,manageHref:"/demo/command-center?tab=profile#workspaces",onSelectWorkspace:x,onSelectBoard:x,onClose:u})]})}],97450);var k=e.i(22016);let v="elixium.tab.client-id";function w(e,t){if(t)return"Your agent";let n=e?.trim().split(/\s+/)[0];return n?`${n}'s agent`:"An agent"}e.s(["agentPossessive",0,w,"formatAgentAttribution",0,function(e,t,n){let a=e?n?.find(t=>t.id===e):void 0;return w(a?.name??null,!!(e&&t&&e===t))},"getTabClientId",0,function(e){let t=()=>{if("u">typeof crypto){if("function"==typeof crypto.randomUUID)return crypto.randomUUID();if("function"==typeof crypto.getRandomValues){let e=new Uint32Array(2);return crypto.getRandomValues(e),`tab-${e[0].toString(36)}${e[1].toString(36)}`}}return""};if(!e)return t();try{let n=e.getItem(v);if(n)return n;let a=t();return a&&e.setItem(v,a),a}catch{return t()}},"shouldApplyBoardEvent",0,function(e,t){return!!e&&(!e.originClientId||!t||e.originClientId!==t)}],41874);let y=({boardHref:e,tenantId:o,variant:s="icon"})=>{let l=(0,r.useRouter)(),c=(0,n.useRef)(null),u=(0,n.useRef)(null),[p,m]=(0,n.use
1State)(null),[h,x]=(0,n.useState)(!1);(0,a.useCloseOnTourOpen)(()=>x(!1));let[f,b]=(0,n.useState)([]),[g,k]=(0,n.useState)(0),[v,y]=(0,n.useState)(!1),[j,N]=(0,n.useState)(null),[C,S]=(0,n.useState)(!1),[L,$]=(0,n.useState)("all"),[T,I]=(0,n.useState)(!1),[A,E]=(0,n.useState)(null);(0,n.useEffect)(()=>{let e=!1;return(0,i.getAuthService)().authStateReady().then(()=>{e||E((0,i.getAuthService)().getCurrentUser()?.uid??null)}).catch(()=>{}),()=>{e=!0}},[]);let M=(0,n.useCallback)(async e=>{e?.showLoading&&y(!0);try{let e=await (0,i.getToken)();if(!e){b([]),k(0),N(null);return}let t=await fetch("/api/notifications",{headers:{Authorization:`Bearer ${e}`,...o?{"X-Tenant-ID":o}:{}}});if(!t.ok)throw Error(`status ${t.status}`);let n=await t.json();b(Array.isArray(n.notifications)?n.notifications:[]),k("number"==typeof n.unreadCount?n.unreadCount:0),N(null)}catch{N("Couldn’t load notifications.")}finally{e?.showLoading&&y(!1),S(!0)}},[o]);(0,n.useEffect)(()=>{M();let e=setInterval(()=>M(),45e3);return()=>clearInterval(e)},[M]),(0,n.useEffect)(()=>{h&&M({showLoading:!0})},[h,M]),(0,n.useEffect)(()=>{if(!h)return;let e=e=>{let t=e.target;c.current?.contains(t)||u.current?.contains(t)||x(!1)},t=e=>{"Escape"===e.key&&x(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[h]);let D=()=>
1{if("menu-item"===s&&!h&&c.current&&1){let e=c.current.getBoundingClientRect();m({top:Math.max(8,e.top),left:Math.max(8,e.left-320-8)})}x(e=>!e)},R=async t=>{if(x(!1),!t.readAt){b(e=>e.map(e=>e.id===t.id?{...e,readAt:new Date(0).toISOString()}:e)),k(e=>Math.max(0,e-1));try{let e=await (0,i.getToken)();e&&await fetch(`/api/notifications/${encodeURIComponent(t.id)}/read`,{method:"PATCH",headers:{Authorization:`Bearer ${e}`,...o?{"X-Tenant-ID":o}:{}}})}catch{}}t.storyId&&l.push(`${e}?storyId=${encodeURIComponent(t.storyId)}`)},B=async()=>{if(!T&&0!==g){I(!0),b(e=>e.map(e=>e.readAt?e:{...e,readAt:new Date(0).toISOString()})),k(0);try{let e=await (0,i.getToken)();e&&await fetch("/api/notifications/read-all",{method:"PATCH",headers:{Authorization:`Bearer ${e}`,...o?{"X-Tenant-ID":o}:{}}})}catch{}finally{I(!1),M()}}},O="unread"===L?f.filter(e=>!e.readAt):f,_=(0,t.jsxs)("div",{"data-testid":"notifications-popover",role:"dialog","aria-label":"Notifications",ref:u,className:`${"menu-item"===s?"fixed z-50":"absolute top-full right-0 mt-2 z-40"} w-80 bg-card rounded-lg shadow-xl border border-line overflow-hidden animate-fadeIn`,style:"menu-item"===s&&p?{top:p.top,left:p.left}:void 0,children:[(0,t.jsxs)("div",{className:"px-3 py-2 border-b border-line bg-paper-deep",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("div",{className:"text-sm font-bold text-ink",children:"Notifications"}),(0,t.jsx)("button",{type:"button","data-testid":"notifications-mark-all-read",onClick:B,disabled:T||0===g,className:"text-[11px] font-medium text-pivotal-blue hover:underline disabled:text-ink-faint disabled:no-underline disabled:cursor-default",children:"Mark all read"})]}),(0,t.jsx)("div",{role:"tablist","aria-label":"Filter notifications",className:"mt-1.5 inline-flex items-center gap-1",children:["all","unread"].map(e=>(0,t.jsx)("button",{type:"button",role:"tab","aria-selected":L===e,"data-testid":`notifications-filter-${e}`,onClick:()=>$(e),className:`px-2 py-0.5 rounded-full text-[11px] font-medium transition-colors ${L===e?"bg-ink text-paper":"bg-card text-ink-mute border border-line hover:bg-paper-deep"}`,children:"all"===e?"All":`Unread${g>0?` (${g})`:""}`},e))})]}),(0,t.jsxs)("div",{className:"max-h-80 overflow-y-auto",children:[v&&!C&&(0,t.jsx)("p",{"data-testid":"notifications-loading",className:"px-3 py-3 text-xs text-ink-mute",children:"Loading…"}),j&&(0,t.jsx)("p",{"data-testid":"notifications-error",className:"px-3 py-3 text-xs text-pivotal-red",children:j}),!j&&0===f.length&&(C||!v)&&(0,t.jsx)("p",{"data-testid":"notifications-empty",className:"px-3 py-3 text-xs text-ink-mute leading-relaxed",children:"You’re all caught up. Mentions, blockers, and updates to your stories will land here."}),!j&&f.length>0&&0===O.length&&(0,t.jsx)("p",{"data-testid":"notifications-no-unread",className:"px-3 py-3 text-xs text-ink-mute",children:"No unread notifications."}),!j&&O.length>0&&(0,t.jsx)("ul",{"data-testid":"notifications-list",className:"py-1",children:O.map(e=>(0,t.jsx)("li",{children:(0,t.jsx)("button",{type:"button","data-testid":"notification-item",onClick:()=>R(e),className:`w-full text-left px-3 py-2 transition-colors hover:bg-paper-deep focus:outline-none focus:bg-paper-deep ${e.readAt?"opacity-60":""}`,children:(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[!e.readAt&&(0,t.jsx)("span",{className:"mt-1.5 w-1.5 h-1.5 rounded-full bg-pivotal-blue shrink-0","aria-hidden":"true"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"text-xs font-semibold text-ink",children:function(e,t){let n=e.actorAgent?w(e.actorName,!!(e.actorUid&&t&&e.actorUid===t)):e.actorName||"A teammate";switch(e.eventType){case"blocker_added":return`${n} added a blocker`;case"blocker_removed":return`${n} removed a blocker`;case"story_updated":return`${n} updated a story`;case"story_finished":return`${n} finished a story`;case"story_delivered":return`${n} delivered a story`;case"story_accepted":return`${n} accepted a story`;case"review_requested":return`${n} requested your review`;case"test_plan_proposed":return`${n} proposed a test plan`;case"mention":return`${n} mentioned you`;case"awaiting_input":return`${n} needs your input`;case"input_answered":return`${n} answered your question`;case"design_proposed":return`${n} proposed a design — review & endorse`;case"design_ready":return`${n} marked design ready to implement`;default:return`${n} sent an update`}}(e,A)}),e.storyTitle&&(0,t.jsx)("div",{className:"text-xs text-ink-mute truncate",children:e.storyTitle}),e.detail&&(0,t.jsx)("div",{className:"text-[11px] text-ink-faint truncate",children:e.detail}),(0,t.jsx)("div",{"data-testid":"notification-stamp",className:"mt-0.5 text-[10px] text-ink-faint",children:function(e){if(!e)return"";let t=new Date(e);
1return Number.isNaN(t.getTime())?"":t.toLocaleString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}(e.createdAt)})]})]})})},e.id))})]})]});return"menu-item"===s?(0,t.jsxs)("div",{ref:c,children:[(0,t.jsxs)("button",{type:"button","data-testid":"notifications-icon-btn","aria-label":"Notifications","aria-haspopup":"dialog","aria-expanded":h,title:"Notifications",onClick:D,className:"w-full text-left flex items-center gap-2 px-3 py-2 text-sm text-ink-2 hover:bg-paper-deep hover:text-ink transition-colors",children:[(0,t.jsx)("svg",{className:"w-4 h-4 text-ink-faint",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.75,d:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"})}),"Notifications",g>0&&(0,t.jsx)("span",{"data-testid":"notifications-badge",className:"ml-auto min-w-[16px] h-4 px-1 inline-grid place-items-center rounded-full bg-pivotal-red text-white text-[9px] font-bold leading-none","aria-label":`${g} unread notifications`,children:g>9?"9+":g})]}),h&&p&&"u">typeof document&&(0,d.createPortal)(_,document.body)]}):(0,t.jsxs)("div",{ref:c,className:"relative",children:[(0,t.jsxs)("button",{type:"button","data-testid":"notifications-icon-btn","data-tour-target":"tour-notifications","aria-label":"Notifications","aria-haspopup":"dialog","aria-expanded":h,title:"Notifications",onClick:D,className:"relative w-8 h-8 inline-grid place-items-center rounded-md border border-line bg-card text-ink-mute hover:border-border-strong hover:text-ink transition-colors",children:[(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.75,d:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"})}),g>0&&(0,t.jsx)("span",{"data-testid":"notifications-badge",className:"absolute -top-1 -right-1 min-w-[16px] h-4 px-1 inline-grid place-items-center rounded-full bg-pivotal-red text-white text-[9px] font-bold leading-none","aria-label":`${g} unread notifications`,children:g>9?"9+":g})]}),h&&_]})};var j=e.i(62474);let N="flex items-center gap-2 px-3 py-2 text-sm text-ink-2 hover:bg-paper-deep hover:text-ink transition-colors",C={profile:{testId:"profile-popover",label:"Profile (demo)",body:"Sign in to access your profile. The demo doesn't host the auth-gated profile surface."},signOut:{testId:"sign-out-popover",label:"Sign Out (demo)",body:"Sign in to access account actions. The demo is browse-only — no account state to sign out of."},invite:{testId:"invite-popover",label:"Invite teammate",body:"Inviting teammates is available after you start a trial — the real product wires this through Firebase auth and the team membership API."}};e.s(["AvatarMenu",0,({user:e,settingsHref:r,onSignOut:i,onShowInvite:o,demoMode:s=!1,tourHref:l,boardHref:d="/board",tenantId:c})=>{let[u,p]=(0,n.useState)(!1);(0,a.useCloseOnTourOpen)(()=>p(!1));let[m,h]=(0,n.useState)(null),x=(0,n.useRef)(null);(0,n.useEffect)(()=>{if(!u)return;let e=e=>{let t=e.target;t.closest?.('[data-testid="notifications-popover"]')||x.current&&!x.current.contains(t)&&p(!1)},t=e=>{"Escape"===e.key&&p(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[u]);let f=function(e,t){let n=(e||t||"?").trim();if(!n)return"?";let a=n.split(/\s+/).filter(Boolean);return 0===a.length?"?":1===a.length?a[0].slice(0,2).toUpperCase():(a[0][0]+a[a.length-1][0]).toUpperCase()}(e?.displayName,e?.email),b=e?.displayName||e?.email||"Signed-in user",g=m?C[m]:null;return(0,t.jsxs)("div",{ref:x,className:"relative shrink-0",children:[(0,t.jsx)("button",{type:"button","data-testid":"avatar-menu-trigger",onClick:()=>p(!u),className:"w-[26px] h-[26px] rounded-full bg-human text-white flex items-center justify-center font-semibold text-[10px] leading-none hover:ring-1 hover:ring-control-hover transition-shadow focus:outline-none focus:ring-2 focus:ring-human focus:ring-offset-1","aria-haspopup":"menu","aria-expanded":u,"aria-label":"Account menu",title:b,children:f}),(0,t.jsxs)("div",{"data-testid":"avatar-menu",role:"menu",hidden:!u,className:"absolute top-full right-0 mt-2 w-64 bg-card rounded-lg shadow-xl border border-line z-40 overflow-hidden animate-fadeIn",children:[(0,t.jsxs)("div",{className:"px-3 py-2 border-b border-line bg-paper-deep",children:[(0,t.jsx)("div",{className:"text-sm font-bold text-ink truncate",children:b}),e?.email&&e.displayName&&(0,t.jsx)("div",{className:"text-[10px] text-ink-faint truncate",children:e.email})]}),(0,t.jsxs)("div",{className:"py-1 border-b border-line",children:[(0,t.jsx)(y,{variant:"menu-item",boardHref:d,tenantId:c}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2 px-3 py-1.5 text-sm text-ink-2",children:[(0,t.jsx)("span",{children:"Theme"}),(0,t.jsx)(j.ThemeToggle,{})]})]}),(0,t.jsxs)("div",{"data-testid":"header-utility-icons",className:"py-1",children:[(0,t.jsxs)("div",{"data-testid":"help-popover",role:"group","aria-label":"Help",children:[l&&(0,t.jsxs)("a",{href:l,"data-testid":"help-tour-link",role:"menuitem",title:"Take the board tour",className:N,onClick:()=>p(!1),children:[(0,t.jsx)("svg",{className:"w-4 h-4 text-ink-faint",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.75,d:"M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7"})}),"Take the board tour"]}
1),(0,t.jsxs)("a",{href:"/docs","data-testid":"help-docs-link",role:"menuitem",target:"_blank",rel:"noopener noreferrer",title:"Docs","aria-label":"Documentation (opens in new tab)",className:N,onClick:()=>p(!1),children:[(0,t.jsx)("svg",{className:"w-4 h-4 text-ink-faint",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.75,d:"M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"})}),"Docs"]})]}),r&&(0,t.jsxs)(k.default,{href:r,title:"Settings","aria-label":"Workspace settings",className:N,onClick:()=>p(!1),children:[(0,t.jsxs)("svg",{className:"w-4 h-4 text-ink-faint",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.75,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.75,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),"Settings"]}),(s||o)&&(0,t.jsxs)("button",{type:"button","data-testid":"avatar-menu-invite",title:"Invite teammate","aria-label":"Invite team member",onClick:()=>{s?h("invite"):(p(!1),o?.())},className:`w-full text-left ${N}`,children:[(0,t.jsx)("svg",{className:"w-4 h-4 text-ink-faint",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.75,d:"M18 9v6m3-3h-6M13 7a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z"})}),"Invite teammate"]})]}),(0,t.jsxs)("div",{"data-testid":"header-user-actions",className:"py-1 border-t border-line",children:[s?(0,t.jsxs)("button",{type:"button",title:"Profile","aria-label":"Profile",onClick:()=>h("profile"),className:`w-full text-left ${N}`,children:[(0,t.jsx)("svg",{className:"w-4 h-4 text-ink-faint",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.75,d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})}),"Profile"]}):(0,t.jsxs)(k.default,{href:"/profile",title:"Profile","aria-label":"Profile",className:N,onClick:()=>p(!1),children:[(0,t.jsx)("svg",{className:"w-4 h-4 text-ink-faint",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.75,d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})}),"Profile"]}),(0,t.jsxs)("button",{type:"button",title:"Sign Out","aria-label":"Sign Out",onClick:()=>{s?h("signOut"):(p(!1),i())},className:`w-full text-left ${N}`,children:[(0,t.jsx)("svg",{className:"w-4 h-4 text-ink-faint",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.75,d:"M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"})}),"Sign Out"]}),s&&g&&(0,t.jsx)("div",{"data-testid":g.testId,role:"dialog","aria-label":g.label,className:"mx-3 my-2 px-3 py-2 rounded border border-line bg-paper-deep text-xs text-ink-mute leading-relaxed",children:g.body})]})]})]})}],28202)},81024,85783,60348,28894,64480,70326,14554,88641,68565,63388,4894,e=>{"use strict";var t=e.i(43476),n=e.i(71645),a=e.i(18566),r=e.i(65617),i=e.i(1583),o=e.i(22016),s=e.i(87956),l=e.i(15603),d=e.i(63555),c=e.i(97450),u=e.i(28202),p=e.i(42672),m=e.i(38628);let h={accent:"text-human",muted:"text-ink-quiet",agent:"text-agent-2",risk:"text-signal-amber",account:"text-ink-ghost"};function x({label:e,tone:n="muted",sub:a,count:r,id:i,testId:o,className:s="",children:l}){return(0,t.jsxs)("section",{id:i,"data-testid":o??(i?`cc-band-${i}`:void 0),"data-band-label":e,className:`grid gap-2 sm:grid-cols-[120px_minmax(0,1fr)] sm:gap-6 items-start scroll-mt-6 ${s}`,children:[(0,t.jsxs)("div",{"data-testid":"cc-band-label",className:"min-w-0",children:[(0,t.jsx)("h2",{className:`m-0 text-[11px] leading-[normal] font-semibold tracking-[0.12em] uppercase ${h[n]}`,children:e}),null!=a&&(0,t.jsx)("div",{className:"text-[12px] leading-[normal] text-ink-dim mt-1",children:a}),null!=r&&(0,t.jsx)("div",{className:"text-[12px] leading-[normal] text-ink-dim mt-1 font-mono",children:r})]}),(0,t.jsx)("div",{"data-testid":"cc-band-body",className:"min-w-0",children:l})]})}e.s(["Band",0,x],85783);let f="bg-paper border border-hairline rounded-[10px] overflow-hidden",b="font-mono text-[11px] leading-[normal] text-ink-dim whitespace-nowrap";e.s(["AMBER_CHIP_CLASS",0,"inline-block text-[10px] leading-[normal] text-signal-amber border border-signal-amber-line rounded px-[5px] whitespace-nowrap font-normal","BAND_CARD_CLASS",0,f,"BUTTON_CLASS",0,"px-3 py-1.5 text-[12px] leading-[normal] rounded-[7px] bg-panel border border-control text-ink-soft hover:border-control-hover hover:text-ink transition-colors disabled:opacity-50 disabled:cursor-not-allowed whitespace-nowrap","BUTTON_PRIMARY_CLASS",0,"px-3 py-1.5 text-[12px] leading-[normal] rounded-[7px] bg-ink border border-ink text-paper font-medium hover:opacity-90 transition-opacity disabled:opacity-50 disabled:cursor-not-allowed whitespace-nowrap","CHIP_CLASS",0,"inline-block text-[10px] leading-[normal] tracking-[0.06em] uppercase border rounded px-[5px] whitespace-nowrap","FIELD_CLASS",0,"flex flex-col gap-1.5 min-w-0","FIELD_GRID_CLASS",0,"grid grid-cols-[repeat(auto-fit,minmax(200px,1fr))] gap-x-[18px] gap-y-3.5","FIELD_HINT_CLASS",0,"text-[11px] leading-[normal] text-ink-ghost","FIELD_INPUT_CLASS",0,"w-full bg-panel border border-control rounded-md px-2.5 py-[7px] text-[13px] text-ink outline-none focus:border-control-hover disabled:opacity-50","FIELD_LABEL_CLASS",0,"text-[10px] font-semibold tracking-[0.08em] uppercase text-ink-dim","FORM_CARD_CLASS",0,"bg-paper border border-hairline rounded-[10px] px-5 py-[18px]","ROW_BUTTON_CLASS",0,"px-2.5 py-1 text-[12px] leading-[normal] rounded-md bg-panel border border-control text-ink-soft hover:border-control-hover hover:text-ink transition-colors disabled:opacity-50 disabled:cursor-not-allowed whitespace-nowrap","ROW_VALUE_CLASS",0,b,"TEXT_BUTTON_CLASS",0,"p-0 bg-transparent border-0 text-[12px] leading-[normal] text-ink-quiet hover:text-ink transition-colors","pillToggleClass",0,function(e){return`px-2.5 py-1 rounded-full border text-[12px] leading-[normal] transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${e?"bg-ink border-ink text-paper":"bg-transparent border-control text-ink-quiet hover:text-ink"}`},"toggleKnobClass",0,function(e){return`block w-3.5 h-3.5 rounded-full bg-white transition-transform duration-150 ${e?"translate-x-3.5":"translate-x-0"}`},"toggleTrackClass",0,function(e,t="accent"){return`inline-flex w-8 h-[18px] shrink-0 rounded-[9px] p-0.5 border-0 transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${e?"agent"===t?"bg-agent-2":"bg-human":"bg-kbd-line"}`}],60348);let g={good:"bg-signal-good",warn:"bg-signal-amber",bad:"bg-signal-blocked",accent:"bg-human",agent:"bg-
1agent-2",muted:"bg-ink-ghost",off:"bg-transparent"};function k({dot:e,title:n,line:a,value:r,action:i,onClick:o,dense:s,muted:l,testId:d,children:c}){let u="function"==typeof o;return(0,t.jsxs)("div",{"data-testid":d,"data-cc-row":"",role:u?"button":void 0,tabIndex:u?0:void 0,onClick:o,onKeyDown:u?e=>{e.target===e.currentTarget&&("Enter"===e.key||" "===e.key)&&(e.preventDefault(),o())}:void 0,className:`border-t border-hairline first:border-t-0 transition-colors hover:bg-panel ${u?"cursor-pointer focus:outline-none focus-visible:bg-panel":""} ${l?"opacity-55":""}`,children:[(0,t.jsxs)("div",{className:`flex items-center gap-3.5 px-[18px] ${s?"py-[11px]":"py-3"}`,children:[e&&(0,t.jsx)("span",{"aria-hidden":"true",className:`w-1.5 h-1.5 rounded-full shrink-0 ${g[e]}`}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"text-[13px] leading-[normal] font-medium text-ink",children:n}),null!=a&&(0,t.jsx)("div",{className:"text-[12px] leading-[normal] text-ink-quiet",children:a})]}),null!=r&&(0,t.jsx)("span",{className:`shrink-0 ${b}`,children:r}),null!=i&&(0,t.jsx)("div",{className:"shrink-0 flex items-center gap-2",children:i})]}),c]})}e.s(["Row",0,k],28894),e.s(["SectionHeader",0,function({title:e,subline:n,actions:a}){return(0,t.jsxs)("div",{"data-testid":"cc-section-header",className:"flex items-end gap-4 flex-wrap",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h1",{className:"m-0 text-[26px] leading-[normal] font-semibold tracking-[-0.01em] text-ink",children:e}),null!=n&&(0,t.jsx)("div",{className:"text-[13px] leading-[normal] text-ink-quiet mt-1",children:n})]}),(0,t.jsx)("div",{className:"flex-1"}),null!=a&&(0,t.jsx)("div",{className:"flex items-center gap-2.5 flex-wrap",children:a})]})}],64480);let v=[{label:"Workspace",sections:[{key:"profile",label:"Profile",kind:"tab"},{key:"how-we-work",label:"How we work",kind:"tab"},{key:"integrations",label:"Integrations",kind:"tab"}]},{label:"Operations",sections:[{key:"deployment",label:"Deployment",kind:"tab"},{key:"documents",label:"Documents",kind:"tab"},{key:"audit",label:"Audit Log",kind:"tab"}]},{label:"Account",sections:[{key:"billing",label:"Billing",kind:"tab"},{key:"usage",label:"Usage",kind:"tab"},{key:"services",label:"Services",kind:"tab"},{key:"support",label:"Support",kind:"tab"}]}],w=v.flatMap(e=>e.sections),y=new Set(w.map(e=>e.key));function j(e,t){let n=w.map(e=>e.key),a=w.filter(e=>"tab"===e.kind).map(e=>e.key),r=n.indexOf(e);return -1===r?a[0]:(1===t?n.slice(r+1):n.slice(0,r).reverse()).find(e=>a.includes(e))??e}function N(e){if(!e)return!1;if(e.isContentEditable)return!0;let t=(e.tagName??"").toUpperCase();return"INPUT"===t||"SELECT"===t||"TEXTAREA"===t}e.s(["COMMAND_CENTER_GROUPS",0,v,"COMMAND_CENTER_HEADERS",0,{profile:{title:"Profile",subline:"Who you are on this workspace, and where you land when you sign in."},"how-we-work":{title:"How we work",subline:"Team practice. Edits flow to agent context and the board’s identity pills."},integrations:{title:"Integrations",subline:"What Elixium is connected to, and whether each connection is healthy."},deployment:{title:"Deployment",subline:"Run Elixium in your own infrastructure. License, profile, bundle, version."},documents:{title:"Documents",subline:"Generated by the agent and the build. Nothing here is hand-written."},audit:{title:"Audit Log",subline:"Every sign-in, setting change and agent action in this workspace."},billing:{title:"Billing",subline:"Plan, seats and invoices."},usage:{title:"Usage",subline:"Token consumption across the workspace."},services:{title:"Services",subline:"Hands-on deployment help from the Elixium team, working on your board."},support:{title:"Support",subline:"Tickets are answered within 24 hours. Priority support is on the Business plan."}},"COMMAND_CENTER_SECTIONS",0,w,"COMMAND_CENTER_TAB_STORAGE_KEY",0,"elixium.cc.tab","isTypingTarget",0,N,"resolveActiveTab",0,function(e,t){if(e)return"knowledge"===e?"integrations":"team"===e?"how-we-work":e;return t&&y.has(t)?t:"profile"},"stepSection",0,j],70326),e.s(["CommandCenterShell",0,function({activeTab:e,onSelect:a,meta:r={},usageHref:i=null,children:o}){return(0,n.useEffect)(()=>{let t=t=>{if(t.defaultPrevented||t.metaKey||t.ctrlKey||t.altKey||"j"!==t.key&&"k"!==t.key||N(t.target))return;let n=j(e,"j"===t.key?1:-1);n!==e&&(t.preventDefault(),a(n))};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[e,a]),(0,n.useEffect)(()=>{let e=window.location.hash.slice(1);if(!e)return;let t=0,n=window.setInterval(()=>{let a=document.getElementById(e);(a||++t>40)&&(window.clearInterval(n),a?.scrollIntoView({block:"start"}))},50);return()=>window.clearInterval(n)},[e]),(0,t.jsxs)("div",{className:"flex-1 min-h-0 flex flex-col sm:grid sm:grid-cols-[208px_minmax(0,1fr)]",children:[(0,t.jsx)("div",{className:"sm:hidden px-4 pt-4",children:(0,t.jsx)("select",{value:e,onCh
1ange:e=>a(e.target.value),"aria-label":"Select section",className:"w-full bg-panel border border-control rounded-md px-2.5 py-2 text-[13px] text-ink outline-none focus:border-control-hover",children:w.map(e=>(0,t.jsx)("option",{value:e.key,children:e.label},e.key))})}),(0,t.jsxs)("nav",{"aria-label":"Command Center",className:"hidden sm:flex flex-col gap-[22px] border-r border-hairline px-3.5 py-7 min-h-0 overflow-y-auto leading-[normal]",children:[v.map(n=>(0,t.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("div",{"data-testid":"cc-nav-group-label",className:"text-[10px] font-semibold tracking-[0.12em] uppercase text-ink-ghost px-2.5 pb-1.5",children:n.label}),n.sections.map(n=>{let o=n.key===e,s="link"===n.kind&&!!i,l=r[n.key];return(0,t.jsxs)("a",{"data-testid":"cc-nav-item","data-section":n.key,href:s?i:`?tab=${n.key}`,"aria-current":o?"page":void 0,onClick:e=>{s||e.metaKey||e.ctrlKey||e.shiftKey||0!==e.button||(e.preventDefault(),a(n.key))},className:`flex items-center gap-2.5 px-2.5 py-[7px] rounded-[7px] text-[13px] transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-human ${o?"bg-group-hover text-ink font-medium":"text-ink-quiet hover:bg-panel hover:text-ink"}`,children:[(0,t.jsx)("span",{"aria-hidden":"true",className:`w-1.5 h-1.5 rounded-full shrink-0 ${o?"bg-human":"bg-transparent"}`}),(0,t.jsx)("span",{"data-cc-nav-label":"",className:"flex-1 min-w-0 truncate",children:n.label}),l&&(0,t.jsx)("span",{"data-testid":`cc-nav-meta-${n.key}`,className:"font-mono text-[10px] font-normal text-ink-ghost",children:l})]},n.key)})]},n.label)),(0,t.jsx)("div",{className:"flex-1"}),(0,t.jsxs)("div",{className:"text-[11px] text-ink-ghost px-2.5 leading-normal",children:[(0,t.jsx)("kbd",{className:"font-mono text-[10px] bg-kbd border border-kbd-line rounded px-[5px] text-ink-quiet",children:"J"})," ",(0,t.jsx)("kbd",{className:"font-mono text-[10px] bg-kbd border border-kbd-line rounded px-[5px] text-ink-quiet",children:"K"})," move between sections"]})]}),(0,t.jsx)("main",{id:"main-content",tabIndex:-1,className:"flex-1 min-h-0 min-w-0 overflow-y-auto focus:outline-none",children:(0,t.jsx)("div",{className:"w-full max-w-[1000px] mx-auto px-4 sm:px-10 pt-6 sm:pt-10 pb-24 flex flex-col gap-8 leading-[normal]",children:o})})]})}],14554),e.s([],88641);var C=e.i(92161);let S={practice:"Practice",mechanics:"Mechanics"};function L(e,t){let[a,r]=(0,n.useState)(null);return(0,n.useEffect)(()=>{if(void 0!==e)return;let n=!1;return(0,C.getAuthService)().authStateReady().then(async()=>{if(!n)try{let e=await (0,C.getToken)();if(!e)return;let a=await fetch("/api/config/features",{headers:{Authorization:`Bearer ${e}`,...t?{"X-Tenant-ID":t}:{}}});if(!a.ok||n)return;let i=await a.json();i&&Array.isArray(i.workspaceIdentityPills)&&r(i.workspaceIdentityPills)}catch{}}),()=>{n=!0}},[e,t]),e??a}function $({tenantId:e,pills:n}){let a=L(n,e);if(null===a)return null;let r=a.slice(0,3).map(e=>e.label);return(0,t.jsx)("div",{"data-testid":"workspace-identity-pills",className:"relative min-w-0 shrink overflow-hidden max-w-[38%] sm:max-w-none","aria-label":"Workspace practices",children:(0,t.jsx)("span",{"data-testid":"practices-chip",title:a.map(e=>e.label).join(" · ")||void 0,className:"block truncate text-[11px] leading-[normal] text-ink-quiet",children:r.length>0?r.join(" · "):"No practices defined"})})}function T({pills:e}){return(0,t.jsx)("dl",{className:"practice-grid grid grid-cols-[110px_1fr] gap-x-4",children:e.map(e=>(0,t.jsx)(I,{pill:e},e.testId))})}function I({pill:e}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("dt",{className:"text-[10px] font-mono uppercase tracking-wider text-ink-faint py-2 self-start",children:S[e.segment]}),(0,t.jsxs)("dd",{"data-testid":e.testId,className:"py-2 border-b border-dashed border-line-soft last:border-b-0 text-ink-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-base leading-none","aria-hidden":"true",children:e.emoji}),(0,t.jsx)("span",{className:"text-sm font-medium text-ink",children:e.label})]}),e.description&&(0,t.jsx)("p",{className:"mt-1 text-xs text-ink-mute leading-relaxed",children:e.description})]})]})}e.s(["HowWeWorkPractices",0,function({pills:e,tenantId:n,heading:a="How we work",variant:r="panel"}){let i=L(e,n);return null===i?null:"band"===r?(0,t.jsx)(x,{label:a,sub:"What the board and agents read from this page",testId:"practices-popover",id:"on-the-board",children:(0,t.jsx)("div",{className:f,children:0===i.length?(0,t.jsx)("div",{className:"px-[18px] py-3 text-[12px] text-ink-quiet",children:"No practices defined yet."}):i.map(e=>(0,t.jsx)(k,{testId:e.testId,title:e.label,line:e.description,value:S[e.segment],dense:!0},e.testId))})}):(0,t.jsxs)("section",{"data-testid":"practices-popover",className:"max-w-3xl",children:[(0,t.jsx)("h2",{className:"font-display text-xl font-semibold text-ink leading-tight tracking-[-0.05em] mb-2",children:a}),(0,t.jsx)("p",{className:"text-sm text-ink-mute mb-4",children:"The team profile your agents inherit, as the board summarises it."}),0===i.length?(0,t.jsx)("div",{className:"rounded-md border border-dashed border-border-strong px-4 py-6 text-sm text-ink-mute text-center",children:"No practices defined yet."}):(0,t.jsx)(T,{pills:i})]})},"PracticesList",0,T,"WorkspaceIdentityPills",0,$],68565);var A=e.i(69706);let E={team:"Team",business:"Business",enterprise:"Enterprise","self-hosted":"Self
1-hosted"};var M=e.i(69890);let D=({user:e,teamMembers:a,currentUser:r,licenseTier:m,tenantId:h,tenantName:x,tenantSlug:f,tenantPlan:b,boardSlug:g,boards:k,boardId:v,onOpenFinder:w,boardHref:y,roadmapHref:j,standupHref:N,usageHref:C,isBoardActive:S,isRoadmapActive:L,isStandupActive:$,isUsageActive:I,trialBadge:D,settingsHref:H,commandCenterHref:P,isCommandCenterActive:W=!1,onReplayTour:U,onShowInvite:z,onSignOut:F,onOpenMobileMenu:V,isMobileMenuOpen:q,demoMode:K=!1,workspaceIdentityPills:Y})=>{let X=e?.uid||"me",G=a.some(e=>e.id===X),J=r||G?a:[...a,{id:X,name:e?.displayName||"Me",email:e?.email||"",role:"Eng",initials:(e?.displayName||"ME").substring(0,2).toUpperCase(),color:"bg-indigo-600",joinedAt:0,accessLevel:"member"}],Q=K?"Demo":b?E[b]??null:null,[Z,ee]=(0,n.useState)(!1);return(0,t.jsxs)(t.Fragment,{children:[!w&&(0,t.jsx)(p.StoryFinder,{open:Z,onClose:()=>ee(!1),boardId:v,tenantId:h,boardHref:y}),(0,t.jsxs)("div",{"data-testid":"top-chrome",className:`bg-paper border-b border-hairline flex items-center gap-2 sm:gap-3 md:gap-[18px] px-3 sm:px-4 ${M.TOP_BAR_HEIGHT_CLASS} shrink-0`,children:[(0,t.jsxs)(o.default,{href:"/",className:"flex items-center gap-2 group shrink-0",children:[(0,t.jsx)(s.BoardMark,{className:"w-4 h-4 group-hover:scale-105 transition-transform"}),(0,t.jsxs)("div",{className:"hidden md:flex items-center gap-2",children:[(0,t.jsx)("div",{className:"font-semibold text-ink text-[14px] leading-[normal]",children:(0,i.brandName)()}),Q&&(0,t.jsx)("span",{"data-testid":"tier-badge",className:"text-[9px] uppercase font-semibold tracking-[.06em] leading-[normal] px-1 py-px rounded border border-accent-2-line text-accent-2",title:`Plan: ${Q}`,children:Q}),D]})]}),K?(0,t.jsx)(c.DemoWorkspacePill,{tenantName:x??"",boardSlug:g??""}):(0,t.jsx)("div",{className:"hidden sm:block",children:(0,t.jsx)(d.WorkspaceBreadcrumb,{currentTenantId:h,currentTenantName:x,currentTenantSlug:f,currentBoardSlug:g,initialBoards:k})}),(0,t.jsxs)("nav",{className:"hidden sm:flex items-center gap-1",role:"navigation","aria-label":"Main navigation","data-tour-target":"tabs",children:[(0,t.jsx)(l.TabLink,{href:y,active:S,children:"Board"}),(0,t.jsx)(l.TabLink,{href:j,active:L,children:"Roadmap"}),(0,t.jsx)(l.TabLink,{href:N,active:$,children:"Stand-Up"}),C&&(0,t.jsx)(l.TabLink,{href:C,active:!!I,testId:"usage-tab",children:"Usage"})]}),(0,t.jsx)("div",{className:"flex-1"}),(0,t.jsx)("div",{className:"hidden sm:flex shrink-0",children:(0,t.jsxs)("button",{type:"button","data-testid":"search-icon-btn","data-tour-target":"search","aria-label":"Find a story",title:"Find a story  /",onClick:()=>w?w():ee(!0),className:(0,M.buildFinderTriggerClassName)(),children:[(0,t.jsx)("svg",{className:(0,M.buildFinderIconClassName)(),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.75,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),(0,t.jsx)("span",{"data-testid":"search-btn-label",className:(0,M.buildFinderLabelClassName)(),children:"Find a story"}),(0,t.jsx)("kbd",{"data-testid":"search-btn-kbd",className:(0,M.buildFinderKbdClassName)(),children:"/"})]})}),U&&(0,t.jsx)("button",{type:"button","data-testid":"topchrome-replay-tour","data-chrome-slot":"help","aria-label":"Replay the tour",title:"Replay the tour",onClick:U,className:`hidden sm:inline-grid font-mono text-[12px] font-semibold ${R}`,children:"?"}),P&&(0,t.jsx)(o.default,{href:P,"data-testid":"topchrome-command-center","data-chrome-slot":"command-center","data-tour-target":"command-center","aria-label":"Command Center","aria-current":W?"page":void 0,title:"Command Center",className:`hidden sm:inline-grid ${W?B:R}`,children:(0,t.jsx)(O,{})}),K&&(0,t.jsx)("div",{className:"hidden sm:block shrink-0","data-chrome-slot":"command-center",children:(0,t.jsx)(_,{testId:"topchrome-command-center",tourTarget:"command-center",popoverTestId:"command-center-popover",ariaLabel:"Command Center",title:"Command Center",icon:(0,t.jsx)(O,{}),popoverTitle:"Command Center",popoverBody:"The Command Center lets your team configure how you work — methodology, roles, integrations, deployment posture. Available when you start a trial.",children:Y&&Y.length>0&&(0,t.jsxs)("div",{"data-testid":"practices-popover",className:"px-3 pb-3 max-h-[60vh] overflow-y-auto",children:[(0,t.jsx)("h2",{className:"font-display text-base font-semibold text-ink leading-tight tracking-[-0.05em] mb-2",children:"How we work"}),(0,t.jsx)(T,{pills:Y})]})})}),(0,t.jsxs)("div",{className:"hidden md:flex items-center gap-1.5 shrink-0","data-testid":"team-avatars",children:[J.slice(0,4).map(e=>(0,t.jsx)("div",{"data-testid":"team-avatar",className:`w-[26px] h-[26px] rounded-full ${e.color||"bg-ink-mute"} text-white flex items-center justify-center font-semibold text-[10px] leading-none cursor-help`,title:(0,A.avatarTitle)(e),role:"img","aria-label":`${e.name}, ${e.role}`,children:e.initials},e.id)),a.length>4&&(0,t.jsxs)("div",{"data-testid":"team-avatar-overflow",className:"w-[26px] h-[26px] rounded-full bg-panel text-ink-quiet flex items-center justify-center font-semibold text-[10px] leading-none",title:`${a.length-4} more team members`,children:["+",a.length-4]})]}),(0,t.jsx)("div",{className:"hidden md:block shrink-0","data-chrome-slot":"account",children:(0,t.jsx)(u.AvatarMenu,{user:e,settingsHref:H,onSignOut:F,onShowInvite:z,demoMode:K,tourHref:`${y}?tour=${K?"demo":"1"}`,boardHref:y,tenantId:h})}),(0,t.jsx)("button",{"data-testid":"mobile-menu-button",onClick:V,className:"md:hidden flex items-center justify-center w-11 h-11 rounded-lg hover:bg-paper-deep focus:outline-none focus:ring-2 focus:ring-human focus:ring-offset-2 transition-colors","aria-label":"Open navigation menu","aria-expanded":q,"aria-controls":"mobile-menu",children:(0,t.jsx)("svg",{className:"w-5 h-5 text-ink-mute",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})]})},R="w-[30px] h-[30px] place-items-center rounded-[7px] border border-control bg-panel text-ink-quiet hover:border-control-hover hover:text-ink transition-colors shrink-0",B="w-[30px] h-[30px] place-items-center rounded-[7px] border border-control-hover bg-group-hover text-ink transition-colors shrink-0",O=()=>(0,t.jsxs)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.75,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.75,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),_=({testId:e,popoverTestId:a,ariaLabel:r,title:i,icon:o,popoverTitle:s,popoverBody:l,tourTarget:d,children:c})=>
1{let[u,p]=(0,n.useState)(!1),h=(0,n.useRef)(null);return(0,m.useCloseOnTourOpen)(()=>p(!1)),(0,n.useEffect)(()=>{if(!u)return;let e=e=>{h.current&&!h.current.contains(e.target)&&p(!1)},t=e=>{"Escape"===e.key&&p(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[u]),(0,t.jsxs)("div",{ref:h,className:"relative",children:[(0,t.jsx)("button",{type:"button","data-testid":e,"data-tour-target":d,"aria-label":r,"aria-haspopup":"dialog","aria-expanded":u,title:i,onClick:()=>p(!u),className:`inline-grid ${R}`,children:o}),u&&(0,t.jsxs)("div",{"data-testid":a,role:"dialog","aria-label":s,className:"absolute top-full right-0 mt-2 w-72 bg-card rounded-lg shadow-xl border border-line z-40 overflow-hidden animate-fadeIn",children:[(0,t.jsx)("div",{className:"px-3 py-2 border-b border-line bg-paper-deep",children:(0,t.jsx)("div",{className:"text-sm font-bold text-ink",children:s})}),(0,t.jsx)("p",{className:"px-3 py-3 text-xs text-ink-mute leading-relaxed",children:l}),c]})]})},H=({workspaceIdentityPills:e,tenantSlug:n,tenantId:a,velocity:r,children:i})=>(0,t.jsxs)("div",{"data-testid":"context-strip",className:"bg-paper flex items-center gap-2 px-3 sm:px-4 h-[40px] flex-nowrap overflow-x-auto sm:overflow-x-visible overflow-y-hidden",children:[(0,t.jsx)($,{tenantSlug:n,tenantId:a,pills:e}),(0,t.jsx)("div",{className:"flex-1 flex items-center gap-2 min-w-0 overflow-y-hidden",children:i}),void 0!==r&&(0,t.jsxs)("span",{"data-testid":"velocity-display",className:"ml-auto shrink-0 whitespace-nowrap font-mono text-[11px] leading-[normal] text-signal-amber border border-signal-amber-line rounded-md px-2 py-[3px]",title:"Rolling velocity — an earned signal",children:["VEL ",r]})]});function P(e){return e<=0?"Trial expired":1===e?"1 day left":`${e} days left`}function W(e){return e<=0?"expired":e<=2?"critical":e<=5?"warning":"normal"}e.s(["ContextStrip",0,H],63388),e.s(["calculateDaysRemaining",0,function(e){let t=e-Date.now();return t<=0?0:Math.ceil(t/864e5)},"formatTrialStatus",0,P,"getTrialUrgency",0,W],4894);let U=({daysRemaining:e})=>{let n=W(e),a=P(e);return(0,t.jsxs)("div",{"data-testid":"trial-badge",className:"flex items-center gap-1.5",children:[(0,t.jsx)("span",{className:`text-[9px] uppercase font-bold px-1.5 py-0.5 rounded border ${{normal:"bg-pivotal-blue/10 text-pivotal-blue border-pivotal-blue/30",warning:"bg-pivotal-yellow/10 text-pivotal-yellow border-pivotal-yellow/30",critical:"bg-pivotal-red/10 text-pivotal-red border-pivotal-red/30 animate-pulse",expired:"bg-surface-sunken text-content-muted border-border"}[n]}`,title:"expired"===n?"Your trial has expired":`Trial: ${a}`,children:"expired"===n?"Trial Expired":`Trial: ${a}`}),"normal"!==n&&(0,t.jsx)("a",{href:"/pricing",className:"text-[9px] font-bold text-white bg-pivotal-blue px-2 py-0.5 rounded hover:bg-pivotal-blue/90 transition-opacity",children:"Upgrade"})]})};e.s(["WorkspaceHeader",0,({licenseTier:e,velocity:i,user:o,currentUser:s,teamMembers:l,onShowInvite:d,onSignOut:c,tenantId:u,tenantName:p,boardSlug:m,boards:h,boardId:x,onOpenFinder:f,currentPage:b,tenantPlan:g,trialDaysRemaining:k,workspaceIdentityPills:v,contextStripContent:w,demoMode:y=!1,hideContextStrip:j=!1,onReplayTour:N})=>{let C=(0,a.usePathname)(),[S,L]=(0,n.useState)(!1),$=m||function(e){if(!e)return;let t=e.match(/\/board\/([^\/]+)/);return t?t[1]:void 0}(C),T=C?.match(/\/tenant\/([^\/]+)/)?.[1],I=T?`/tenant/${T}`:"",A=y?"/demo":$?`${I}/board/${$}`:`${I}/board`,E=y?"/demo/roadmap":$?`${I}/board/${$}/roadmap`:`${I}/board/main/roadmap`,M=y?"/demo/standup":$?`${I}/board/${$}/standup`:`${I}/board/main/standup`,R=y?null:$?`${I}/board/${$}/usage`:`${I}/board/main/usage`,B=y?null:T||u?`${I}/settings`:null,O=y?null:T||u?`${I}/command-center`:null,_="roadmap"===b||!b&&!!C?.includes("/roadmap"),P="standup"===b||!b&&!!C?.includes("/standup"),W="review"===b||!b&&!!C?.includes("/review"),z="usage"===b||!b&&!!C?.includes("/usage"),F="command-center"===b||!b&&!!C?.includes("/command-center"),V=!_&&!P&&!W&&!z&&!F,q="trial"===g&&void 0!==k?(0,t.jsx)(U,{daysRemaining:k}):null;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("header",{"data-testid":"workspace-header",role:"banner",className:"bg-paper z-20 shrink-0",children:[(0,t.jsx)(D,{user:o,teamMembers:l,currentUser:s,licenseTier:e,tenantId:u,tenantName:p,tenantSlug:T,tenantPlan:g,boardSlug:$,boards:h,boardId:x,onOpenFinder:f,boardHref:A,roadmapHref:E,standupHref:M,usageHref:R,isBoardActive:V,isRoadmapActive:_,isStandupActive:P,isUsageActive:z,isCommandCenterActive:F,onReplayTour:N,trialBadge:q,settingsHref:B,commandCenterHref:O,onShowInvite:d,onSignOut:c,onOpenMobileMenu:()=>L(!0),isMobileMenuOpen:S,demoMode:y,workspaceIdentityPills:v}),!j&&(0,t.jsx)(H,{workspaceIdentityPills:v,tenantSlug:T,tenantId:u,velocity:i,children:w})]}),(0,t.jsx)(r.MobileMenu,{isOpen:S,onClose:()=>L(!1),onSignOut:c,boardHref:A,roadmapHref:E,settingsHref:B||void 0,isRoadmapActive:_})]})}],81024)},38628,42010,e=>{"use strict";var t=e.i(71645);let n="elixium:tour-open";function a(e){return`elixium.tour.seen.${e}`}function r(e){return!!e&&"string"==typeof e.target&&e.target.length>0}function i(e){return e.filter(r).length}function o(e,t){return r(e[t])?e.slice(0,t+1).filter(r).length:0}e.s(["TOUR_OPEN_EVENT",0,n,"computeCoachmarkPosition",0,function(e,t,n,a=14){let r,i,o=e.right-e.left;return e.bottom-e.top>240?((r=e.right+a)+n.width>t.width-12&&(r=e.left-a-n.width),i=e.top+8):((i=e.bottom+a)+n.height>t.height-12&&(i=e.top-a-n.height),r=e.left+o/2>t.width/2?e.right-n.width:e.left),{left:Math.max(12,Math.min(r,t.width-n.width-12)),top:Math.max(12,Math.min(i,t.height-n.height-12))}},"isSpotlightStep",0,r,"markTourSeen",0,function(e,t){if(t)try{t.setItem(a(e),String(Date.now()))}catch{}},"nextStepIndex",0,function(e,t){return e+1<t?e+1:null},"prevStepIndex",0,function(e){return e>0?e-1:null},"progressSegments",0,function(e,t){let n=o(e,t);return Array.from({length:i(e)},(e,t)=>({active:t+1===n,done:t+1<=n}))},"shouldShowTour",0,function(e,t,n){return e&&!function(e,t){if(!t)return!0;try{return null!==t.getItem(a(e))}catch{return!0}}(t,n)},"spotlightCount",0,i,"spotlightOrdinal",0,o],42010),e.s(["announceTourOpen",0,function(){window.dispatchEvent(new Event(n))},"useCloseOnTourOpen",0,function(e){let a=(0,t.useRef)(e);(0,t.useEffect)(()=>{a.current=e}),(0,t.useEffect)(()=>{let e=()=>a.current();return window.addEventListener(n,e),()=>window.removeEventListener(n,e)},[])}],38628)}]);

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.