@hanzo/team 0.1.19 → 0.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/404.html +1 -1
- package/dist/admin/index.html +1 -1
- package/dist/agents/algo/index.html +1 -1
- package/dist/agents/art/index.html +1 -1
- package/dist/agents/biz/index.html +1 -1
- package/dist/agents/cal/index.html +1 -1
- package/dist/agents/core/index.html +1 -1
- package/dist/agents/cyber/index.html +1 -1
- package/dist/agents/data/index.html +1 -1
- package/dist/agents/db/index.html +1 -1
- package/dist/agents/des/index.html +1 -1
- package/dist/agents/dev/index.html +1 -1
- package/dist/agents/doc/index.html +1 -1
- package/dist/agents/ed/index.html +1 -1
- package/dist/agents/fin/index.html +1 -1
- package/dist/agents/gov/index.html +1 -1
- package/dist/agents/huma/index.html +1 -1
- package/dist/agents/index.html +1 -1
- package/dist/agents/lang/index.html +1 -1
- package/dist/agents/law/index.html +1 -1
- package/dist/agents/mana/index.html +1 -1
- package/dist/agents/mark/index.html +1 -1
- package/dist/agents/mo/index.html +1 -1
- package/dist/agents/mu/index.html +1 -1
- package/dist/agents/opera/index.html +1 -1
- package/dist/agents/rev/index.html +1 -1
- package/dist/agents/sal/index.html +1 -1
- package/dist/agents/sci/index.html +1 -1
- package/dist/agents/sec/index.html +1 -1
- package/dist/agents/su/index.html +1 -1
- package/dist/agents/vi/index.html +1 -1
- package/dist/apps/ads/index.html +1 -1
- package/dist/apps/ai-chat/index.html +1 -1
- package/dist/apps/analytics/index.html +1 -1
- package/dist/apps/billing/index.html +1 -1
- package/dist/apps/bots/index.html +1 -1
- package/dist/apps/cal/index.html +1 -1
- package/dist/apps/chat/index.html +1 -1
- package/dist/apps/cms/index.html +1 -1
- package/dist/apps/commerce/index.html +1 -1
- package/dist/apps/console/index.html +1 -1
- package/dist/apps/crm/index.html +1 -1
- package/dist/apps/dataroom/index.html +1 -1
- package/dist/apps/dev/index.html +1 -1
- package/dist/apps/email/index.html +1 -1
- package/dist/apps/index.html +1 -1
- package/dist/apps/meet/index.html +1 -1
- package/dist/apps/platform/index.html +1 -1
- package/dist/apps/sign/index.html +1 -1
- package/dist/apps/social/index.html +1 -1
- package/dist/apps/tracker/index.html +1 -1
- package/dist/assets/{Bots-ut9jYpti.js → Bots-CkMBi-Ni.js} +2 -2
- package/dist/assets/{Bots-ut9jYpti.js.map → Bots-CkMBi-Ni.js.map} +1 -1
- package/dist/assets/{ModelPickerMenu-DVDLitAq.js → ModelPickerMenu-YflOqlVY.js} +2 -2
- package/dist/assets/{ModelPickerMenu-DVDLitAq.js.map → ModelPickerMenu-YflOqlVY.js.map} +1 -1
- package/dist/assets/{ThemeToggleNext-GGp7XI4T.js → ThemeToggleNext-BnndB04G.js} +2 -2
- package/dist/assets/{ThemeToggleNext-GGp7XI4T.js.map → ThemeToggleNext-BnndB04G.js.map} +1 -1
- package/dist/assets/{index-DZzmIhRO.js → index-un983StG.js} +6 -6
- package/dist/assets/{index-DZzmIhRO.js.map → index-un983StG.js.map} +1 -1
- package/dist/auth/callback/index.html +1 -1
- package/dist/auth/index.html +1 -1
- package/dist/bots/index.html +1 -1
- package/dist/cal/index.html +1 -1
- package/dist/calendar/index.html +1 -1
- package/dist/chat/c-design/index.html +1 -1
- package/dist/chat/c-general/index.html +1 -1
- package/dist/chat/c-lux-bank/index.html +1 -1
- package/dist/chat/c-lux-bridge/index.html +1 -1
- package/dist/chat/c-revenue/index.html +1 -1
- package/dist/chat/c-support/index.html +1 -1
- package/dist/chat/c-tracker/index.html +1 -1
- package/dist/chat/c-ui/index.html +1 -1
- package/dist/chat/c-video/index.html +1 -1
- package/dist/chat/dm-algo/index.html +1 -1
- package/dist/chat/dm-art/index.html +1 -1
- package/dist/chat/dm-biz/index.html +1 -1
- package/dist/chat/dm-cal/index.html +1 -1
- package/dist/chat/dm-core/index.html +1 -1
- package/dist/chat/dm-cyber/index.html +1 -1
- package/dist/chat/dm-data/index.html +1 -1
- package/dist/chat/dm-db/index.html +1 -1
- package/dist/chat/dm-des/index.html +1 -1
- package/dist/chat/dm-dev/index.html +1 -1
- package/dist/chat/dm-doc/index.html +1 -1
- package/dist/chat/dm-ed/index.html +1 -1
- package/dist/chat/dm-fin/index.html +1 -1
- package/dist/chat/dm-gov/index.html +1 -1
- package/dist/chat/dm-huma/index.html +1 -1
- package/dist/chat/dm-lang/index.html +1 -1
- package/dist/chat/dm-law/index.html +1 -1
- package/dist/chat/dm-mana/index.html +1 -1
- package/dist/chat/dm-mark/index.html +1 -1
- package/dist/chat/dm-mo/index.html +1 -1
- package/dist/chat/dm-mu/index.html +1 -1
- package/dist/chat/dm-opera/index.html +1 -1
- package/dist/chat/dm-rev/index.html +1 -1
- package/dist/chat/dm-sal/index.html +1 -1
- package/dist/chat/dm-sci/index.html +1 -1
- package/dist/chat/dm-sec/index.html +1 -1
- package/dist/chat/dm-su/index.html +1 -1
- package/dist/chat/dm-vi/index.html +1 -1
- package/dist/chat/index.html +1 -1
- package/dist/crm/analytics/index.html +1 -1
- package/dist/crm/automations/index.html +1 -1
- package/dist/crm/campaigns/index.html +1 -1
- package/dist/crm/companies/index.html +1 -1
- package/dist/crm/contacts/index.html +1 -1
- package/dist/crm/customers/index.html +1 -1
- package/dist/crm/deliverability/index.html +1 -1
- package/dist/crm/forms/index.html +1 -1
- package/dist/crm/funds/index.html +1 -1
- package/dist/crm/index.html +1 -1
- package/dist/crm/investors/index.html +1 -1
- package/dist/crm/journeys/index.html +1 -1
- package/dist/crm/leads/index.html +1 -1
- package/dist/crm/lists/index.html +1 -1
- package/dist/crm/opportunities/index.html +1 -1
- package/dist/crm/segments/index.html +1 -1
- package/dist/crm/settings/index.html +1 -1
- package/dist/crm/templates/index.html +1 -1
- package/dist/crm/webhooks/index.html +1 -1
- package/dist/docs/index.html +1 -1
- package/dist/files/index.html +1 -1
- package/dist/inbox/index.html +1 -1
- package/dist/index.html +1 -1
- package/dist/issues/index.html +1 -1
- package/dist/issues/kanban/index.html +1 -1
- package/dist/issues/list/index.html +1 -1
- package/dist/login/index.html +1 -1
- package/dist/mail/index.html +1 -1
- package/dist/meet/index.html +1 -1
- package/dist/mine/index.html +1 -1
- package/dist/people/index.html +1 -1
- package/dist/projects/index.html +1 -1
- package/dist/projects/proj-crm/components/index.html +1 -1
- package/dist/projects/proj-crm/index.html +1 -1
- package/dist/projects/proj-crm/issues/index.html +1 -1
- package/dist/projects/proj-crm/issues/kanban/index.html +1 -1
- package/dist/projects/proj-crm/issues/list/index.html +1 -1
- package/dist/projects/proj-crm/milestones/index.html +1 -1
- package/dist/projects/proj-crm/templates/index.html +1 -1
- package/dist/projects/proj-dev/components/index.html +1 -1
- package/dist/projects/proj-dev/index.html +1 -1
- package/dist/projects/proj-dev/issues/index.html +1 -1
- package/dist/projects/proj-dev/issues/kanban/index.html +1 -1
- package/dist/projects/proj-dev/issues/list/index.html +1 -1
- package/dist/projects/proj-dev/milestones/index.html +1 -1
- package/dist/projects/proj-dev/templates/index.html +1 -1
- package/dist/projects/proj-mkt/components/index.html +1 -1
- package/dist/projects/proj-mkt/index.html +1 -1
- package/dist/projects/proj-mkt/issues/index.html +1 -1
- package/dist/projects/proj-mkt/issues/kanban/index.html +1 -1
- package/dist/projects/proj-mkt/issues/list/index.html +1 -1
- package/dist/projects/proj-mkt/milestones/index.html +1 -1
- package/dist/projects/proj-mkt/templates/index.html +1 -1
- package/dist/projects/proj-next/components/index.html +1 -1
- package/dist/projects/proj-next/index.html +1 -1
- package/dist/projects/proj-next/issues/index.html +1 -1
- package/dist/projects/proj-next/issues/kanban/index.html +1 -1
- package/dist/projects/proj-next/issues/list/index.html +1 -1
- package/dist/projects/proj-next/milestones/index.html +1 -1
- package/dist/projects/proj-next/templates/index.html +1 -1
- package/dist/settings/index.html +1 -1
- package/dist/time/index.html +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ModelPickerMenu-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ModelPickerMenu-YflOqlVY.js","assets/rolldown-runtime-B0Z9INg1.js","assets/react-DIaL9_ob.js","assets/catalog-BM2B7gTj.js","assets/Anchor-Avsca6-o.js","assets/ThemeToggleNext-BnndB04G.js","assets/Bots-CkMBi-Ni.js","assets/instrument-CmZcxFxx.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import{a as e,t}from"./rolldown-runtime-B0Z9INg1.js";import{$ as n,A as r,C as i,D as a,Dt as o,Et as s,F as c,G as l,H as u,I as d,J as f,L as p,M as m,N as h,O as g,Ot as _,Q as v,R as y,St as b,T as x,Tt as S,U as C,W as w,X as T,Y as E,a as D,at as O,c as k,ct as A,d as j,dt as ee,et as M,f as N,g as P,gt as te,h as F,ht as I,i as ne,it as re,j as ie,l as L,m as ae,mt as oe,n as R,nt as se,o as ce,ot as le,p as ue,pt as de,r as fe,rt as pe,s as me,st as he,t as ge,tt as _e,u as ve,wt as ye,xt as be,y as xe,yt as Se,z}from"./react-DIaL9_ob.js";import{A as Ce,C as we,D as Te,E as Ee,O as De,S as Oe,T as ke,_ as Ae,a as je,b as Me,c as Ne,d as Pe,f as Fe,g as Ie,h as Le,i as Re,k as ze,l as Be,m as Ve,n as He,o as Ue,p as We,r as Ge,s as Ke,t as qe,u as Je,v as Ye,w as Xe,x as Ze,y as Qe}from"./instrument-CmZcxFxx.js";import{$ as $e,$t as et,A as tt,At as nt,B as rt,Bt as it,C as at,Ct as ot,D as st,Dt as ct,E as lt,Et as ut,F as dt,Ft as ft,G as pt,Gt as mt,H as ht,Ht as gt,I as _t,It as vt,J as yt,Jt as bt,K as xt,Kt as St,L as B,Lt as Ct,M as wt,Mt as Tt,N as Et,Nt as Dt,O as Ot,Ot as kt,P as At,Pt as jt,Q as Mt,Qt as Nt,Rt as Pt,S as Ft,St as It,T as Lt,Tt as Rt,U as zt,Ut as Bt,V as Vt,Vt as Ht,W as Ut,Wt,X as Gt,Xt as Kt,Y as qt,Yt as Jt,Z as Yt,Zt as Xt,_ as Zt,_t as Qt,an as $t,at as en,bt as tn,ct as nn,dt as rn,en as an,et as on,f as sn,ft as cn,gt as ln,ht as un,in as dn,it as fn,j as pn,k as mn,kt as hn,lt as gn,mt as _n,nn as vn,nt as yn,on as bn,ot as xn,pt as Sn,q as Cn,qt as wn,r as Tn,rn as En,rt as Dn,st as On,tn as kn,tt as An,ut as jn,v as Mn,vt as Nn,w as Pn,wt as Fn,xt as In,yt as Ln,z as Rn,zt as zn}from"./catalog-BM2B7gTj.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Bn=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Vn=t(((e,t)=>{t.exports=Bn()})),Hn=t((e=>{var t=Vn(),n=_(),r=o();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function c(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function u(e){if(s(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=s(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var o=a.alternate;if(o===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return u(a),e;if(o===r)return u(a),t;o=o.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=o;else{for(var c=!1,l=a.child;l;){if(l===n){c=!0,n=a,r=o;break}if(l===r){c=!0,r=a,n=o;break}l=l.sibling}if(!c){for(l=o.child;l;){if(l===n){c=!0,n=o,r=a;break}if(l===r){c=!0,r=o,n=a;break}l=l.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,m=Symbol.for(`react.element`),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),v=Symbol.for(`react.fragment`),y=Symbol.for(`react.strict_mode`),b=Symbol.for(`react.profiler`),x=Symbol.for(`react.consumer`),S=Symbol.for(`react.context`),C=Symbol.for(`react.forward_ref`),w=Symbol.for(`react.suspense`),T=Symbol.for(`react.suspense_list`),E=Symbol.for(`react.memo`),D=Symbol.for(`react.lazy`),O=Symbol.for(`react.activity`),k=Symbol.for(`react.memo_cache_sentinel`),A=Symbol.iterator;function j(e){return typeof e!=`object`||!e?null:(e=A&&e[A]||e[`@@iterator`],typeof e==`function`?e:null)}var ee=Symbol.for(`react.client.reference`);function M(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ee?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case v:return`Fragment`;case b:return`Profiler`;case y:return`StrictMode`;case w:return`Suspense`;case T:return`SuspenseList`;case O:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case g:return`Portal`;case S:return e.displayName||`Context`;case x:return(e._context.displayName||`Context`)+`.Consumer`;case C:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case E:return t=e.displayName||null,t===null?M(e.type)||`Memo`:t;case D:t=e._payload,e=e._init;try{return M(e(t))}catch{}}return null}var N=Array.isArray,P=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={pending:!1,data:null,method:null,action:null},I=[],ne=-1;function re(e){return{current:e}}function ie(e){0>ne||(e.current=I[ne],I[ne]=null,ne--)}function L(e,t){ne++,I[ne]=e.current,e.current=t}var ae=re(null),oe=re(null),R=re(null),se=re(null);function ce(e,t){switch(L(R,t),L(oe,e),L(ae,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Qd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Qd(t),e=$d(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ie(ae),L(ae,e)}function le(){ie(ae),ie(oe),ie(R)}function ue(e){e.memoizedState!==null&&L(se,e);var t=ae.current,n=$d(t,e.type);t!==n&&(L(oe,e),L(ae,n))}function de(e){oe.current===e&&(ie(ae),ie(oe)),se.current===e&&(ie(se),cp._currentValue=F)}var fe,pe;function me(e){if(fe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||``,pe=-1<e.stack.indexOf(`
|
|
3
3
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
4
|
`+fe+e+pe}var he=!1;function ge(e,t){if(!e||he)return``;he=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
@@ -93,7 +93,7 @@ svg:active .hanzo-prs{transform:scale(.92)}
|
|
|
93
93
|
</g>
|
|
94
94
|
</svg>`}function KH(e={}){let{variant:t=`color`}=e,n=``;switch(t){case`mono`:n=UH();break;case`white`:n=WH();break;case`favicon`:n=GH();break;default:n=HH()}return`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(n)))}`}KH(),KH({variant:`mono`}),KH({variant:`white`}),KH({variant:`favicon`});function qH(){return`data:image/svg+xml;base64,`+btoa(unescape(encodeURIComponent(VH)))}qH();var JH=32;function YH(e){let t=new Uint8Array(e);return crypto.getRandomValues(t),ZH(t.buffer)}async function XH(e){let t=new TextEncoder;return crypto.subtle.digest(`SHA-256`,t.encode(e))}function ZH(e){let t=new Uint8Array(e),n=``;for(let e of t)n+=String.fromCharCode(e);return btoa(n).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}async function QH(){let e=YH(JH);return{codeVerifier:e,codeChallenge:ZH(await XH(e))}}function $H(){return YH(JH)}var eU={discovery:`/.well-known/openid-configuration`,authorize:`/v1/iam/oauth/authorize`,token:`/v1/iam/oauth/token`,userinfo:`/v1/iam/oauth/userinfo`,jwks:`/v1/iam/.well-known/jwks`,logout:`/v1/iam/oauth/logout`,revoke:`/v1/iam/oauth/revoke`},tU={authMethods:`/v1/iam/auth/methods`,authIdentifier:`/v1/iam/auth/identifier`,authApplication:`/v1/iam/auth/application`,onboarding:`/v1/iam/onboarding`,login:`/v1/iam/login`,sendCode:`/v1/iam/verification-codes`,federationMfa:`/v1/iam/oauth/federation/mfa`,signup:`/v1/iam/signup`,terms:`/v1/iam/terms`,password:`/v1/iam/password`,address:`/v1/iam/address`,accept:`/v1/iam/invitations/accept`,web3Nonce:`/v1/iam/web3/nonce`,web3Verify:`/v1/iam/web3/verify`};function nU(e){return e.replace(/\/+$/,``)}function rU(e,t){return`${nU(e)}${eU[t]}`}function iU(e){let t=new URL(e.endpoint??rU(e.serverUrl,`authorize`));t.searchParams.set(`client_id`,e.clientId),t.searchParams.set(`response_type`,`code`),t.searchParams.set(`redirect_uri`,e.redirectUri),t.searchParams.set(`scope`,e.scope??`openid profile email`),t.searchParams.set(`state`,e.state),e.codeChallenge&&(t.searchParams.set(`code_challenge`,e.codeChallenge),t.searchParams.set(`code_challenge_method`,`S256`)),e.prompt&&t.searchParams.set(`prompt`,e.prompt);for(let[n,r]of Object.entries(e.params??{}))t.searchParams.set(n,r);return t}function aU(e){if(!e)return{};try{let t=e.split(`.`)[1];return t?JSON.parse(atob(t.replace(/-/g,`+`).replace(/_/g,`/`))):{}}catch{return{}}}function oU(e){let t=aU(e),n=Array.isArray(t.orgs)?t.orgs:[],r=[],i={};for(let e of n)e&&typeof e.org==`string`&&e.org!==``&&(r.includes(e.org)||r.push(e.org),typeof e.role==`string`&&e.role!==``&&(i[e.org]=e.role));return{organizations:r,roles:i}}function sU(e){let t=e.trim(),n=t.includes(`/`)?t.slice(t.lastIndexOf(`/`)+1):t;return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(n)||/^[0-9a-f]{24,}$/i.test(n)||/^[0-9]{10,}$/.test(n)?!0:/^[a-z0-9]{20,}$/i.test(n)&&!/[aeiou]{1}/i.test(n.slice(0,6))}function cU(e,t){let n=e??{},r=(...e)=>{for(let r of e){let e=n[r]??t[r];if(typeof e==`string`&&e.trim()!==``)return e.trim()}return null},i=(...e)=>{for(let r of e){let e=n[r]??t[r];if(typeof e==`string`&&e.trim()!==``&&!sU(e))return e.trim()}return null},a=r(`email`),o=i(`displayName`,`name`,`preferred_username`,`given_name`,`firstName`)??(a?a.split(`@`)[0]:null);if(o==null)return null;let s=o.split(/[\s._-]+/).filter(Boolean).slice(0,2).map(e=>e[0]?.toUpperCase()??``).join(``)||o.slice(0,2).toUpperCase();return{name:o,email:a,avatarUrl:r(`avatar`,`picture`,`avatarUrl`),initials:s}}var lU={chain:`evm`,scheme:`secp256k1-eip191`};async function uU(e){let t=e.trim().toLowerCase().replace(/^0x/,``);if(!/^[0-9a-f]{40}$/.test(t))throw Error(`not an Ethereum address: ${e}`);let{keccak_256:n}=await Le(async()=>{let{keccak_256:e}=await import(`./sha3-DDKddPFc.js`);return{keccak_256:e}},[]),r=n(new TextEncoder().encode(t)),i=`0x`;for(let e=0;e<t.length;e++){let n=e%2==0?r[e>>1]>>4:r[e>>1]&15;i+=n>=8?t[e].toUpperCase():t[e]}return i}function dU(e,t,n){let{domain:r,uri:i,statement:a,nonce:o,issuedAt:s,expirationTime:c,version:l}=e;if(a?.includes(`
|
|
95
95
|
`))throw Error(`the sign-in statement must be one line`);let u=[`${r} wants you to sign in with your Ethereum account:`,t,``];return a&&u.push(a,``),u.push(`URI: ${i}`,`Version: ${l||`1`}`,`Chain ID: ${n}`,`Nonce: ${o}`,`Issued At: ${s}`),c&&u.push(`Expiration Time: ${c}`),u.join(`
|
|
96
|
-
`)}function fU(e){let t=`0x`;for(let n of new TextEncoder().encode(e))t+=n.toString(16).padStart(2,`0`);return t}function pU(e){let t=typeof e==`string`?Number.parseInt(e,16):typeof e==`number`?e:NaN;return Number.isSafeInteger(t)&&t>0?t:1}var mU=1500,hU=`hanzo_iam_`,gU=`${hU}state`,_U=`${hU}code_verifier`,vU=`${hU}access_token`,yU=`${hU}refresh_token`,bU=`${hU}id_token`,xU=`${hU}expires_at`,SU=`${hU}hold`,CU=`${hU}spent`,wU=`${hU}refresh`,TU=`${hU}refresh_lease`,EU=3e4,DU=50,OU=50,kU=`${_U}:`;function AU(e){return`${kU}${e}`}var jU=12;function MU(e,t){return`${t}.${e}`}function NU(e){let t=e.indexOf(`.`);if(t>0){let n=e.slice(0,t);if(/^\d+$/.test(n))return{issuedAt:Number(n),codeVerifier:e.slice(t+1)}}return{issuedAt:0,codeVerifier:e}}var PU=`hanzo_iam_login`,FU=`hanzo-iam`;function IU(e,t){let n=new URLSearchParams({code:t});e.state&&n.set(`state`,e.state);let r=e.redirectUri.includes(`?`)?`&`:`?`;return`${e.redirectUri}${r}${n.toString()}`}var LU=9e5,RU=class extends Error{constructor(e,t){super(e),this.code=t,this.name=`Refused`}code},zU=class extends Error{constructor(e,t=[],n){super(`this account signs in with a second factor`),this.directive=e,this.factors=t,this.request=n,this.name=`SecondFactor`}directive;factors;request},BU=class extends Error{constructor(e,t){super(`confirm the account's email address to finish signing in`),this.email=e,this.request=t,this.name=`EmailRequired`}email;request};function VU(e){return`recovery`in e?{recoveryCode:e.recovery}:{mfaType:e.type,passcode:e.passcode}}function HU(e){if(!Array.isArray(e))return[];let t=e.flatMap(e=>{let t=e??{};return typeof t.mfaType!=`string`||!t.mfaType?[]:[{type:t.mfaType,preferred:t.isPreferred===!0,remember:typeof t.mfaRememberInHours==`number`?t.mfaRememberInHours:0}]}),n=``;for(let e of t)(e.type===`email`||e.type===`sms`)&&(n===``||e.preferred)&&(n=e.type);return t.map(({type:e,remember:t})=>({type:e,sent:e===n,remember:t}))}var UU=class extends Error{constructor(){super(`no account holds this address; accept the terms to create one`),this.name=`SignupRequired`}},WU=class extends Error{constructor(e){super(`the session has ended: ${e}`),this.reason=e,this.name=`SessionEnded`}reason},GU=class extends Error{constructor(e,t){super(e),this.reason=t,this.name=`Unmatched`}reason};function KU(e){try{let t=e(),n=`${hU}probe`;return t.setItem(n,`1`),t.removeItem(n),t}catch{return null}}function qU(){return KU(()=>localStorage)??KU(()=>sessionStorage)}function JU(){let e=new Map;return{get length(){return e.size},clear:()=>e.clear(),getItem:t=>e.has(t)?e.get(t):null,key:t=>Array.from(e.keys())[t]??null,removeItem:t=>{e.delete(t)},setItem:(t,n)=>{e.set(t,String(n))}}}var YU=e=>new Promise(t=>setTimeout(t,e));function XU(){try{return typeof navigator<`u`&&navigator.locks?navigator.locks:null}catch{return null}}async function ZU(e,t){let n=XU();if(n)return n.request(wU,t);let r=$H(),i=()=>e.getItem(TU)?.startsWith(`${r}.`)===!0;for(;;){let t=e.getItem(TU);if((t?Number(t.slice(t.indexOf(`.`)+1)):0)>Date.now()){await YU(OU);continue}if(e.setItem(TU,`${r}.${Date.now()+EU}`),await YU(DU),i())break}try{return await t()}finally{i()&&e.removeItem(TU)}}function QU(e){try{let t=JSON.parse(e);return{error:typeof t.error==`string`?t.error:``,description:typeof t.error_description==`string`?t.error_description:``}}catch{return{error:``,description:``}}}async function $U(e,t){let n=await e.json().catch(()=>({}));if(!e.ok||n.status===`error`)throw new RU(typeof n.msg==`string`&&n.msg?n.msg:`${t} (${e.status})`,typeof n.code==`string`?n.code:``);return n}async function eW(e,t){return(await $U(e,t)).data}var tW=class{config;storage;txStorage;redeemable;discoveryCache=null;callbackInFlight=null;held;refreshing=null;constructor(e){this.config=e;let t=qU();this.storage=e.storage??t??JU(),this.txStorage=t??this.storage,this.redeemable=t!==null||e.storage!==void 0,this.held=this.stored()}async getDiscovery(){if(this.discoveryCache)return this.discoveryCache;let e=nU(this.config.serverUrl);try{let t=await fetch(`${e}${eU.discovery}`,{headers:{Accept:`application/json`}});if(t.ok)return this.discoveryCache=await t.json(),this.discoveryCache}catch{}return this.discoveryCache={issuer:e,authorization_endpoint:rU(e,`authorize`),token_endpoint:rU(e,`token`),userinfo_endpoint:rU(e,`userinfo`),jwks_uri:rU(e,`jwks`),revocation_endpoint:rU(e,`revoke`),end_session_endpoint:rU(e,`logout`),response_types_supported:[`code`],grant_types_supported:[`authorization_code`,`refresh_token`],scopes_supported:[`openid`,`email`,`profile`]},this.discoveryCache}async tokenEndpoint(){return this.config.proxyBaseUrl?rU(this.config.proxyBaseUrl,`token`):(await this.getDiscovery()).token_endpoint}async userinfoEndpoint(){return this.config.proxyBaseUrl?rU(this.config.proxyBaseUrl,`userinfo`):(await this.getDiscovery()).userinfo_endpoint}async revocationEndpoint(){return this.config.proxyBaseUrl?rU(this.config.proxyBaseUrl,`revoke`):(await this.getDiscovery()).revocation_endpoint??rU(this.config.serverUrl,`revoke`)}async endSessionEndpoint(){return this.config.proxyBaseUrl?rU(this.config.proxyBaseUrl,`logout`):(await this.getDiscovery()).end_session_endpoint??rU(this.config.serverUrl,`logout`)}stashPkce(e,t){this.sweepStaleVerifiers(),this.txStorage.setItem(AU(e),MU(t,Date.now())),this.txStorage.setItem(gU,e),this.txStorage.setItem(_U,t)}sweepStaleVerifiers(){let e=[];for(let t=this.txStorage.length-1;t>=0;t--){let n=this.txStorage.key(t);if(!n||!n.startsWith(kU))continue;let r=this.txStorage.getItem(n);e.push({key:n,issuedAt:r?NU(r).issuedAt:0})}e.sort((e,t)=>t.issuedAt-e.issuedAt);for(let t of e.slice(jU-1))this.txStorage.removeItem(t.key)}async buildAuthorizeUrl(e){if(!this.redeemable)throw Error(`@hanzo/iam: this browser keeps neither localStorage nor sessionStorage, so the PKCE verifier cannot outlive the redirect to IAM and the callback would fail. Call usableStorage() before starting a login to catch this on the page.`);let t=await this.getDiscovery(),{codeVerifier:n,codeChallenge:r}=await QH(),i=$H();return this.stashPkce(i,n),{url:iU({endpoint:t.authorization_endpoint,serverUrl:this.config.serverUrl,clientId:this.config.clientId,redirectUri:this.config.redirectUri,state:i,scope:this.config.scope,codeChallenge:r,prompt:e?.prompt,params:e?.additionalParams}),codeVerifier:n,state:i}}async signinRedirect(e){let{url:t}=await this.buildAuthorizeUrl(e);window.location.replace(t.toString())}async getSigninUrl(e){let{url:t}=await this.buildAuthorizeUrl(e);return t.toString()}asking=null;parties=new Map;ask(e){this.asking=e&&e.state?{...e,state:e.state}:null}get client(){return this.asking?.clientId??this.config.clientId}async party(e){if(e===this.config.clientId)return{application:this.config.application??this.config.clientId,organization:this.config.organization};let t=this.parties.get(e);if(t)return t;let n=new URL(`${nU(this.config.serverUrl)}${tU.authApplication}`);n.searchParams.set(`clientId`,e);let r=await eW(await fetch(n.toString(),{headers:{Accept:`application/json`}}),`could not read the application`)??{};if(typeof r.organization!=`string`||!r.organization)throw Error(`IAM did not name the application's organization`);let i={application:typeof r.name==`string`&&r.name?r.name:e,organization:r.organization};return this.parties.set(e,i),i}async own(){return this.asking??await this.mine()}async mine(){let{codeVerifier:e,codeChallenge:t}=await QH(),n=$H();return this.stashPkce(n,e),{clientId:this.config.clientId,redirectUri:this.config.redirectUri,scope:this.config.scope,state:n,codeChallenge:t,codeChallengeMethod:`S256`}}async credentialLogin(e){return this.post(e,await this.own())}async post(e,t,n){let r=this.config.proxyBaseUrl??this.config.serverUrl,i=new URL(n??`${nU(r)}${tU.login}`);i.searchParams.set(`clientId`,t.clientId),i.searchParams.set(`responseType`,`code`),i.searchParams.set(`redirectUri`,t.redirectUri),i.searchParams.set(`scope`,t.scope??`openid profile email`),t.state&&i.searchParams.set(`state`,t.state),t.nonce&&i.searchParams.set(`nonce`,t.nonce),t.prompt&&i.searchParams.set(`prompt`,t.prompt),t.loginHint&&i.searchParams.set(`login_hint`,t.loginHint),i.searchParams.set(`type`,`code`),t.codeChallenge&&(i.searchParams.set(`code_challenge`,t.codeChallenge),i.searchParams.set(`code_challenge_method`,t.codeChallengeMethod??`S256`));let a=await fetch(i.toString(),{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},credentials:`include`,body:JSON.stringify({type:`code`,...await this.party(t.clientId),autoSignin:!0,...e})}),o;try{o=await $U(a,`sign-in failed`)}catch(e){throw e instanceof RU&&e.code===`login_required`&&this.release(),e}let s=o.data;if(s===`NextMfa`||s===`RequiredMfa`)throw s===`NextMfa`&&this.hold(),new zU(s,HU(o.data2),t);if(s===`RequiredEmail`){this.hold();let e=o.data2??{};throw new BU(typeof e.email==`string`?e.email:``,t)}if(s===`SignupRequired`)throw new UU;if(typeof s!=`string`||s.length===0)throw Error(`IAM did not return an authorization code`);return this.release(),IU(t,s)}hold(){this.txStorage.setItem(SU,String(Date.now()+LU))}release(){this.txStorage.removeItem(SU)}holding(){return Number(this.txStorage.getItem(SU)??0)>Date.now()}async resume(e){if(this.holding())return null;try{return await this.credentialLogin(e?{loginHint:e}:{})}catch{return null}}loginWithPassword(e,t){return this.credentialLogin({username:e,password:t,signinMethod:`Password`})}loginWithCode(e,t){let n=e.includes(`@`);return this.credentialLogin({username:e,code:t,signinMethod:`Verification code`,...n?{email:e}:{phone:e}})}createAccountWithCode(e,t,n){return this.credentialLogin({username:e,code:t,signinMethod:`Verification code`,email:e,create:!0,terms:n.terms,aup:n.aup})}async verifyFactor(e,t,n=!1){if(!e.request)throw Error(`this second factor names no sign-in to finish`);try{return await this.post({...VU(t),enableMfaRemember:n},e.request)}catch(e){throw e instanceof RU&&this.release(),e}}async finishFederation(e){let t=this.config.proxyBaseUrl??this.config.serverUrl,n=(await $U(await fetch(`${nU(t)}${tU.federationMfa}`,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},credentials:`include`,body:JSON.stringify(VU(e))}),`the sign-in could not be finished`)).data;if(typeof n!=`string`||!n)throw Error(`IAM did not say where the sign-in goes`);return n}confirmEmail(e,t){return this.post({passcode:t},e.request)}async changeEmail(e,t){try{await this.post({email:t},e.request)}catch(e){if(e instanceof BU)return e;throw e}throw Error(`IAM granted the sign-in without confirming the address`)}async resetPassword(e,t,n){await eW(await fetch(`${nU(this.config.serverUrl)}${tU.password}`,{method:`PUT`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify({organization:this.config.organization,username:e,code:t,password:n})}),`could not set the password`)}async acceptInvite(e,t,n){let r=await this.getValidAccessToken();if(!r)throw new RU(`please sign in first`,`login_required`);let i=await eW(await fetch(`${nU(this.config.serverUrl)}${tU.accept}`,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`,Authorization:`Bearer ${r}`},body:JSON.stringify({owner:e,code:t,...n?{emailCode:n}:{}})}),`could not join the organization`)??{};if(i.joined!==!0)throw Error(`IAM did not join the organization`);return typeof i.org==`string`&&i.org?i.org:e}async acceptTerms(e){let t=await this.getValidAccessToken();if(!t)throw Error(`No valid access token — user must log in`);let n=this.config.proxyBaseUrl??this.config.serverUrl;await eW(await fetch(`${nU(n)}${tU.terms}`,{method:`PUT`,headers:{"Content-Type":`application/json`,Accept:`application/json`,Authorization:`Bearer ${t}`},body:JSON.stringify({terms:e.terms,aup:e.aup})}),`could not record the acceptance`)}async addAddress(e,t){let n=await this.getValidAccessToken();if(!n)throw new RU(`please sign in first`,`login_required`);let r=this.config.proxyBaseUrl??this.config.serverUrl,i=await eW(await fetch(`${nU(r)}${tU.address}`,{method:`PUT`,headers:{"Content-Type":`application/json`,Accept:`application/json`,Authorization:`Bearer ${n}`},body:JSON.stringify({clientId:this.client,address:e,code:t})}),`could not add the address`)??{};return{email:typeof i.email==`string`?i.email:``,phone:typeof i.phone==`string`?i.phone:``}}async sendLoginCode(e){let t=e.includes(`@`),n=this.config.proxyBaseUrl??this.config.serverUrl;await eW(await fetch(`${nU(n)}${tU.sendCode}`,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`,Accept:`application/json`},body:new URLSearchParams({applicationId:`admin/${(await this.party(this.client)).application}`,dest:e,type:t?`email`:`phone`}).toString()}),`could not send code`)}async signup(e){let t=this.config.proxyBaseUrl??this.config.serverUrl,n=new URL(`${nU(t)}${tU.signup}`);return n.searchParams.set(`clientId`,this.config.clientId),await eW(await fetch(n.toString(),{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify({application:this.config.application??this.config.clientId,clientId:this.config.clientId,organization:this.config.organization,email:e.email,password:e.password,code:e.code,...e.name?{name:e.name}:{},...e.terms?{terms:e.terms.terms,aup:e.terms.aup}:{}})}),`sign-up failed`),this.loginWithPassword(e.email,e.password)}async methods(){let e=new URL(`${nU(this.config.serverUrl)}${tU.authMethods}`);e.searchParams.set(`clientId`,this.client);let t=await eW(await fetch(e.toString(),{headers:{Accept:`application/json`}}),`could not read the sign-in methods`)??{},n=Array.isArray(t.oauth)?t.oauth:[];return{password:t.password===!0,code:t.code===!0,signup:t.signup===!0,wallet:t.web3===!0&&(!Array.isArray(t.web3Chains)||t.web3Chains.includes(lU.chain)),address:t.address===!0,providers:n.filter(e=>typeof e.name==`string`&&typeof e.type==`string`).map(e=>({name:e.name,type:e.type}))}}async identify(e){let t=this.config.proxyBaseUrl??this.config.serverUrl,n=await eW(await fetch(`${nU(t)}${tU.authIdentifier}`,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify({clientId:this.client,identifier:e})}),`could not look up the address`)??{};return{account:n.account===!0,password:n.password===!0}}async handleCallback(e){let t=new URL(e??window.location.href),n=t.searchParams.get(`error`);if(n)throw this.isOwnAttempt(t.searchParams.get(`state`))?new RU(`OAuth error: ${t.searchParams.get(`error_description`)??n}`,n):new GU(`OAuth error on a sign-in this browser did not start. Restart sign-in.`,`foreign`);let r=t.searchParams.get(`code`);if(!r)throw new GU(`Missing authorization code in callback URL`,`empty`);let i=this.callbackInFlight;if(i&&i.code===r)return i.promise;let a=this.exchangeCode(t,r);return this.callbackInFlight={code:r,promise:a},a.catch(()=>{this.callbackInFlight?.promise===a&&(this.callbackInFlight=null)}),a}isOwnAttempt(e){if(!e)return!1;let t=AU(e);return this.txStorage.getItem(t)??this.storage.getItem(t)?!0:(this.txStorage.getItem(gU)??this.storage.getItem(gU))===e}async exchangeCode(e,t){let n=e.searchParams.get(`state`),r=n?AU(n):null,i=r?this.txStorage.getItem(r)??this.storage.getItem(r):null,a=i?NU(i).codeVerifier:null;if(a&&r)this.txStorage.removeItem(r),this.storage.removeItem(r),(this.txStorage.getItem(gU)===n||this.storage.getItem(gU)===n)&&(this.txStorage.removeItem(gU),this.txStorage.removeItem(_U),this.storage.removeItem(gU),this.storage.removeItem(_U));else{if(n&&this.spent().includes(n))throw new GU(`This sign-in already finished in this browser.`,`spent`);let e=this.txStorage.getItem(gU)??this.storage.getItem(gU);if(!e||n!==e)throw new GU(`OAuth state mismatch — stale, concurrent, or forged login. Restart sign-in.`,`foreign`);if(a=this.txStorage.getItem(_U)??this.storage.getItem(_U),!a)throw Error(`Missing PKCE code verifier — start sign-in via signinRedirect() or the embedded credential login.`);this.txStorage.removeItem(gU),this.txStorage.removeItem(_U),this.storage.removeItem(gU),this.storage.removeItem(_U)}let o=new URLSearchParams({grant_type:`authorization_code`,client_id:this.config.clientId,code:t,redirect_uri:this.config.redirectUri,code_verifier:a}),s=await this.tokenEndpoint(),c=await fetch(s,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:o.toString()});if(!c.ok){let e=await c.text().catch(()=>``);throw Error(`Token exchange failed (${c.status}): ${e}`)}let l=await c.json();return this.storeTokens(l),n&&this.spend(n),nW(l)}spent(){try{let e=JSON.parse(this.txStorage.getItem(CU)??`[]`);return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}catch{return[]}}spend(e){let t=this.spent().filter(t=>t!==e);t.push(e),this.txStorage.setItem(CU,JSON.stringify(t.slice(-12)))}refreshAccessToken(){return this.refreshing??=ZU(this.storage,()=>this.refreshHeld()).finally(()=>{this.refreshing=null}),this.refreshing}async refreshHeld(){let e=this.stored(),t=e.access!==this.held.access||e.refresh!==this.held.refresh;if(e.access&&t&&!this.isTokenExpired()){this.held=e;let t=this.getExpiresAt();return{accessToken:e.access,refreshToken:e.refresh??void 0,idToken:this.getIdToken()??void 0,expiresIn:t===null?void 0:Math.max(0,Math.floor((t-Date.now())/1e3)),tokenType:`Bearer`}}if(!e.refresh)throw this.clearTokens(),new WU(`no refresh token is stored`);let n=await fetch(await this.tokenEndpoint(),{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:new URLSearchParams({grant_type:`refresh_token`,client_id:this.config.clientId,refresh_token:e.refresh}).toString()});if(!n.ok){let t=await n.text().catch(()=>``),{error:r,description:i}=QU(t);throw r===`invalid_grant`?(this.storage.getItem(yU)===e.refresh&&this.clearTokens(),new WU(i||r)):Error(`Token refresh failed (${n.status}): ${t}`)}let r=await n.json();return this.storeTokens(r),nW(r)}stored(){return{access:this.storage.getItem(vU),refresh:this.storage.getItem(yU)}}async signinPopup(e){let{url:t,state:n}=await this.buildAuthorizeUrl({additionalParams:e?.additionalParams}),r=e?.width??600,i=e?.height??700,a=window.screenX+(window.outerWidth-r)/2,o=window.screenY+(window.outerHeight-i)/2,s=new URL(this.config.redirectUri,window.location.href).origin;return new Promise((c,l)=>{let u=window.open(t.toString(),PU,`width=${r},height=${i},left=${a},top=${o},menubar=no,toolbar=no`);if(!u){l(Error(`Failed to open login popup — blocked by browser?`));return}let d=!1,f=null,p=()=>{if(!d){d=!0,window.removeEventListener(`message`,m),clearInterval(h),clearTimeout(g),f&&clearTimeout(f);try{u.closed||u.close()}catch{}}},m=e=>{if(d||e.origin!==s)return;let t=e.data;if(!t||typeof t!=`object`||t.source!==FU)return;if(typeof t.state!=`string`||t.state!==n){p(),l(Error(`OAuth state mismatch — possible CSRF (popup)`));return}if(t.error){p(),l(Error(`OAuth error: ${t.error}`));return}if(typeof t.code!=`string`||t.code.length===0){p(),l(Error(`Login popup returned no authorization code`));return}let r=t.code,i=t.state;p();let a=this.config.redirectUri.includes(`?`)?`&`:`?`,o=`${this.config.redirectUri}${a}code=${encodeURIComponent(r)}&state=${encodeURIComponent(i)}`;this.handleCallback(o).then(c,l)};window.addEventListener(`message`,m);let h=setInterval(()=>{d||!u.closed||f||(f=setTimeout(()=>{d||(p(),l(Error(`Login popup was closed before completing`)))},1e3))},300),g=setTimeout(()=>{d||(p(),l(Error(`Login popup timed out`)))},e?.timeoutMs??3e5)})}async loginWithWallet(e){let t=e?.provider??globalThis.ethereum;if(!t||typeof t.request!=`function`)throw Error(`No EIP-1193 wallet provider found (window.ethereum).`);let n=await t.request({method:`eth_requestAccounts`}),r=Array.isArray(n)?n[0]:void 0;if(typeof r!=`string`||!r)throw Error(`Wallet did not return an address`);let i=await uU(r),a=pU(await t.request({method:`eth_chainId`}).catch(()=>void 0)),o=await this.own(),s=nU(this.config.serverUrl),c=new URL(`${s}${tU.web3Nonce}`);c.searchParams.set(`chain`,lU.chain),c.searchParams.set(`address`,i),c.searchParams.set(`clientId`,o.clientId);let l=await eW(await fetch(c.toString(),{headers:{Accept:`application/json`},credentials:`include`}),`could not start the wallet sign-in`);if(!l||typeof l.nonce!=`string`||typeof l.domain!=`string`)throw Error(`IAM did not return a sign-in challenge`);let u=dU(l,i,a),d=await t.request({method:`personal_sign`,params:[fU(u),i]});if(typeof d!=`string`||!d)throw Error(`Wallet did not return a signature`);return this.post({...lU,address:i,message:u,signature:d,clientId:o.clientId,redirectUri:o.redirectUri,scope:o.scope??`openid profile email`,state:o.state,nonce:o.nonce,codeChallenge:o.codeChallenge,codeChallengeMethod:o.codeChallengeMethod},o,`${s}${tU.web3Verify}`)}storeTokens(e){if(this.storage.setItem(vU,e.access_token),e.refresh_token&&this.storage.setItem(yU,e.refresh_token),e.id_token&&this.storage.setItem(bU,e.id_token),e.expires_in){let t=Date.now()+e.expires_in*1e3;this.storage.setItem(xU,String(t))}else{let t=aU(e.access_token).exp;typeof t==`number`&&Number.isFinite(t)&&this.storage.setItem(xU,String(t*1e3))}this.held=this.stored()}getAccessToken(){return this.storage.getItem(vU)}getRefreshToken(){return this.storage.getItem(yU)}getIdToken(){return this.storage.getItem(bU)}getExpiresAt(){let e=this.storage.getItem(xU);if(!e)return null;let t=Number(e);return Number.isFinite(t)?t:null}isTokenExpired(){let e=this.storage.getItem(xU);return e?Date.now()>=Number(e):!1}async getValidAccessToken(){let e=this.getAccessToken();if(e&&!this.isTokenExpired())return e;if(this.getRefreshToken())try{return(await this.refreshAccessToken()).accessToken}catch{return null}return null}clearTokens(){this.storage.removeItem(vU),this.storage.removeItem(yU),this.storage.removeItem(bU),this.storage.removeItem(xU),this.held={access:null,refresh:null}}async logout(){let e=this.storage.getItem(vU),t=this.storage.getItem(yU),n=this.storage.getItem(bU);this.clearTokens();let r=await Promise.race([(async()=>(await this.revoke(t,`refresh_token`,e),await this.revoke(e,`access_token`,e),this.endSessionEndpoint()))(),new Promise(e=>setTimeout(()=>e(rU(this.config.serverUrl,`logout`)),mU))]),i=new URL(r);n&&i.searchParams.set(`id_token_hint`,n),i.searchParams.set(`client_id`,this.config.clientId),this.config.postLogoutRedirectUri&&i.searchParams.set(`post_logout_redirect_uri`,this.config.postLogoutRedirectUri),window.location.href=i.toString()}async end(){let e=this.storage.getItem(vU),t=this.storage.getItem(yU),n=this.storage.getItem(bU);this.clearTokens();let r=this.config.proxyBaseUrl??this.config.serverUrl,i=new URLSearchParams({client_id:this.config.clientId});n&&i.set(`id_token_hint`,n),await Promise.race([(async()=>{await this.revoke(t,`refresh_token`,e,rU(r,`revoke`)),await this.revoke(e,`access_token`,e,rU(r,`revoke`)),await fetch(rU(r,`logout`),{method:`POST`,credentials:`include`,redirect:`manual`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:i.toString()}).catch(()=>void 0)})(),new Promise(e=>setTimeout(e,mU))])}async revoke(e,t,n,r){if(e)try{await fetch(r??await this.revocationEndpoint(),{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/x-www-form-urlencoded`,...n?{Authorization:`Bearer ${n}`}:{}},body:new URLSearchParams({token:e,token_type_hint:t,client_id:this.config.clientId}).toString()})}catch{}}async getUserInfo(){let e=await this.getValidAccessToken();if(!e)throw Error(`No valid access token — user must log in`);let t=await this.userinfoEndpoint(),n=await fetch(t,{headers:{Authorization:`Bearer ${e}`}});if(!n.ok)throw Error(`Userinfo fetch failed (${n.status})`);return await n.json()}async getUser(){if(!await this.getValidAccessToken())return null;let e=await this.getUserInfo();return{sub:e.sub??``,email:e.email,name:e.name,givenName:e.given_name,familyName:e.family_name,phoneNumber:e.phone_number,emailVerified:e.email_verified,picture:e.picture,owner:e.owner}}};function nW(e){return{accessToken:e.access_token,refreshToken:e.refresh_token,idToken:e.id_token,expiresIn:e.expires_in,tokenType:e.token_type,scope:e.scope}}var rW=2147483647,iW=3e4,aW=(0,V.createContext)(null);aW.displayName=`IamContext`;var oW=`hanzo_iam_current_org`,sW=`hanzo_iam_current_project`;function cW(e){let{config:t,autoInit:n=!0,onAuthChange:r,children:i}=e,a=(0,V.useMemo)(()=>new tW(t),[t.serverUrl,t.clientId,t.redirectUri]),[o,s]=(0,V.useState)(null),[c,l]=(0,V.useState)(!1),[u,d]=(0,V.useState)(n),[f,p]=(0,V.useState)(a.getAccessToken()),[m,h]=(0,V.useState)(null),g=(0,V.useRef)(null),_=(0,V.useCallback)(()=>{if(g.current&&clearTimeout(g.current),a.isTokenExpired())return;let e=a.getExpiresAt();if(e===null)return;let t=async()=>{try{let e=await a.refreshAccessToken();p(e.accessToken),_()}catch(e){if(e instanceof WU){l(!1),s(null),p(null);return}g.current=setTimeout(t,iW)}},n=e-Date.now()-6e4;if(n>rW){g.current=setTimeout(_,rW);return}if(n<=0){t();return}g.current=setTimeout(t,n)},[a]);(0,V.useEffect)(()=>{if(!n){d(!1);return}let e=!1;return(async()=>{try{let t=await a.getValidAccessToken();if(e)return;if(t){p(t),l(!0);try{let t=await a.getUserInfo();e||s(t)}catch{}_(),r?.(!0)}else r?.(!1)}catch(t){e||(h(t instanceof Error?t:Error(String(t))),r?.(!1))}finally{e||d(!1)}})(),()=>{e=!0}},[a,n]),(0,V.useEffect)(()=>()=>{g.current&&clearTimeout(g.current)},[]);let v=(0,V.useCallback)(async e=>{p(e.accessToken),l(!0);try{let e=await a.getUserInfo();s(e)}catch{}_(),r?.(!0)},[a,_,r]),y=(0,V.useCallback)(async e=>{h(null),await a.signinRedirect(e)},[a]),b=(0,V.useCallback)(async e=>{h(null);try{let t=await a.signinPopup(e);await v(t)}catch(e){let t=e instanceof Error?e:Error(String(e));throw h(t),t}},[a,v]),x=(0,V.useCallback)(async e=>{h(null);try{let t=await a.handleCallback(e);return await v(t),t}catch(e){let t=e instanceof Error?e:Error(String(e));throw h(t),t}},[a,v]),S=(0,V.useCallback)(async()=>{g.current&&clearTimeout(g.current);try{localStorage.removeItem(oW),localStorage.removeItem(sW)}catch{}try{await a.logout()}catch{a.clearTokens(),s(null),l(!1),p(null),h(null),r?.(!1)}},[a,r]),C=(0,V.useMemo)(()=>({sdk:a,config:t,user:o,isAuthenticated:c,isLoading:u,accessToken:f,login:y,loginPopup:b,handleCallback:x,logout:S,error:m}),[a,t,o,c,u,f,y,b,x,S,m]);return(0,V.createElement)(aW.Provider,{value:C},i)}function lW(){let e=(0,V.useContext)(aW);if(!e)throw Error(`useIam() must be used within an <IamProvider>`);return e}function uW(){let{isAuthenticated:e,accessToken:t}=lW(),[n,r]=(0,V.useState)([]),[i,a]=(0,V.useState)({}),[o,s]=(0,V.useState)(()=>{try{return localStorage.getItem(oW)}catch{return null}}),[c,l]=(0,V.useState)(()=>{try{return localStorage.getItem(sW)}catch{return null}});(0,V.useEffect)(()=>{if(!e||!t){r([]),a({});return}let{organizations:n,roles:i}=oU(t);r(n.map(e=>({name:e,displayName:e}))),a(i);let c=n[0];if(c&&(!o||!n.includes(o))){s(c);try{localStorage.setItem(oW,c)}catch{}}},[e,t]);let u=[],d=(0,V.useMemo)(()=>n.find(e=>e.name===o)??null,[n,o]),f=(0,V.useCallback)(e=>{s(e),l(null);try{localStorage.setItem(oW,e),localStorage.removeItem(sW)}catch{}},[]),p=(0,V.useCallback)(e=>{l(e);try{e?localStorage.setItem(sW,e):localStorage.removeItem(sW)}catch{}},[]);return{organizations:n,roles:i,currentRole:o?i[o]??null:null,currentOrg:d,currentOrgId:o,switchOrg:f,projects:u,currentProject:null,currentProjectId:c,switchProject:p,isLoading:!1}}function dW(){let{sdk:e,accessToken:t,isAuthenticated:n}=lW(),r=(0,V.useCallback)(async()=>{try{return await e.getValidAccessToken()}catch{return null}},[e]);return{token:t,isValid:n&&!!t&&!e.isTokenExpired(),refresh:r}}function fW(){return pW((0,V.useContext)(aW))}function pW(e){let t=e?.user??null,n=e?.accessToken??null,r=e?.isAuthenticated??!1;return(0,V.useMemo)(()=>r?cU(t,aU(n)):null,[t,n,r])}var mW={site:``,home:`/home`,signUp:`/signup`};function hW(e){mW={...mW,...e}}var gW=()=>mW,_W=()=>mW.brand??`Hanzo`,vW=e=>`${mW.site}${e}`,yW=`admin`;function bW(e){if(!e||e.type===`application`)return!1;let t=e.orgs;return!Array.isArray(t)||t.length===0?!1:t[0]?.org===yW}var xW=[`/board`,`/bots`,`/cal`,`/chat`,`/chat/shared`,`/contacts`,`/dev`,`/drive`,`/home`,`/inbox`,`/meet`,`/settings`,`/settings/organization`,`/settings/organization/billing`,`/settings/organization/members`,`/settings/organization/usage`,`/work`],SW=[`general`,`account`,`privacy`,`billing`,`usage`,`capabilities`,`memory`,`code`,`environments`,`machines`,`keys`,`members`,`integrations`,`notifications`],CW=[`agents`,`bots`,`skills`,`connectors`,`plugins`],wW=[`image`,`video`,`audio`,`document`,`slides`,`type`,`model`,`code`,`file`,`sites`,`new`],TW=/^sess_[0-9a-f]{32}$/,EW=/^[a-z0-9]([a-z0-9-]{0,38}[a-z0-9])?$/,DW=/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/,OW=/^(flow_[0-9a-f]{32}|new)$/,kW=[`artifacts`,`templates`,`projects`,`issues`,`automations`,`sync`,`mcp`,`plans`];function AW(e){let t=e.replace(/^\/+|\/+$/g,``);if(TW.test(t))return{kind:`run`,id:t};if(t===`-/settings`||t.startsWith(`-/settings/`)){let e=t.slice(11)||`general`;return SW.includes(e)?{kind:`settings`,section:e}:{kind:`new`}}if(t.startsWith(`-/customize/agents/`)){let e=t.slice(19);return DW.test(e)?{kind:`agent`,name:e}:{kind:`new`}}if(t===`-/customize`||t.startsWith(`-/customize/`)){let e=t.slice(12)||`agents`;return CW.includes(e)?{kind:`customize`,tab:e}:{kind:`new`}}if(t.startsWith(`-/automations/`)){let e=t.slice(14);return OW.test(e)?{kind:`automation`,id:e}:{kind:`new`}}if(t.startsWith(`-/artifacts/`)){let e=t.slice(12);return wW.includes(e)?{kind:`screen`,screen:`artifacts`,of:e}:{kind:`new`}}if(t.startsWith(`-/`)){let e=t.slice(2);return kW.includes(e)?{kind:`screen`,screen:e}:{kind:`new`}}if(EW.test(t))return{kind:`project`,slug:t};let[n,r,...i]=t.split(`/`);return!i.length&&n&&r&&DW.test(n)&&DW.test(r)?{kind:`repo`,org:n,name:r}:{kind:`new`}}[...kW.map(e=>({kind:`screen`,screen:e})),...SW.map(e=>({kind:`settings`,section:e})),...CW.map(e=>({kind:`customize`,tab:e}))];var jW=new Map([[`-/settings/machines`,`machines`],[`-/settings/environments`,`environments`]]);new Map([...jW].map(([e,t])=>[t,e]));function MW(e){if(e.kind===`run`)return`/run/${e.id}`;if(e.kind===`repo`)return`/projects/${e.org}/${e.name}`;if(e.kind===`project`)return`/projects/${e.slug}`;let t=NW(e);return t&&`/${jW.get(t)??t.slice(2)}`}function NW(e){switch(e.kind){case`new`:return``;case`run`:return e.id;case`screen`:return e.of?`-/${e.screen}/${e.of}`:`-/${e.screen}`;case`settings`:return e.section===`general`?`-/settings`:`-/settings/${e.section}`;case`customize`:return e.tab===`agents`?`-/customize`:`-/customize/${e.tab}`;case`agent`:return`-/customize/agents/${e.name}`;case`project`:return e.slug;case`repo`:return`${e.org}/${e.name}`;case`automation`:return`-/automations/${e.id}`}}var PW=`hanzo.optin`,FW=D(`Sign in to choose experimental features.`);async function IW(e,t,n){let r;try{r=await fetch(`${uG()}${e}`,{...t,headers:{...t?.body?{"Content-Type":`application/json`}:{},...TG()}})}catch{throw Error(n.offline)}if(r.status===401)throw Error(FW);if(r.status===403&&n.refused)throw Error(n.refused);if(!r.ok)throw Error(n.failed);return r.json()}var LW=()=>{typeof window<`u`&&window.dispatchEvent(new Event(PW))};function RW(e){let t=e??{};return{on:t.on===!0,blocked:t.blocked===!0,public:Array.isArray(t.public)?t.public.filter(e=>typeof e==`string`):[]}}async function zW(){return RW(await IW(`/v1/flag/optin`,void 0,{offline:D(`Your experimental features setting could not be read. Check your connection and try again.`),failed:D(`Your experimental features setting could not be read. Try again in a moment.`)}))}async function BW(e){let t=RW(await IW(`/v1/flag/optin`,{method:`PUT`,body:JSON.stringify({on:e})},{offline:D(`Your choice was not saved. Check your connection and try again.`),failed:D(`Your choice was not saved. Try again in a moment.`),refused:D(`Your team or organization has turned experimental features off.`)}));return LW(),t}var VW=`https://hanzo.team`;`${VW}`,`${VW}`;var HW=`/dev`,UW=`/library`,WW=`/settings`,GW=`${WW}/organization`,KW={general:WW,organization:GW,members:`${GW}/members`,billing:`${GW}/billing`,usage:`${GW}/usage`,keys:`${GW}/keys`},qW=e=>Object.hasOwn(KW,e),JW=e=>e&&qW(e)?KW[e]:WW;function YW(e){let t=AW(e),n=MW(t);return n===`/artifacts`||n.startsWith(`/artifacts/`)?`${UW}${n.slice(10)}`:t.kind===`settings`&&(n===`/settings`||n.startsWith(`/settings/`))?JW(t.section):HW+n}var XW=/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}\/[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/,ZW=e=>vW(YW(e&&(TW.test(e)||XW.test(e)||EW.test(e))?e:``)),QW=new Set([`/chat`,`/chat/shared`,`/dev`]);xW.filter(e=>!QW.has(e)&&e!==`/settings`&&!e.startsWith(`/settings/`));var $W=[`hanzo.app`],eG=e=>$W.includes(e),tG=e=>e===`hanzo.team`||e===`www.hanzo.team`,nG=`https://hanzo.ai`,rG=e=>e===`hanzo.ai`||e===`www.hanzo.ai`,iG=`https://hanzo.app`;`${iG}`,`${iG}`;var aG=e=>e.endsWith(`.hanzo.app`)||e===`hanzo.chat`,oG=`-dev.hanzo.ai`;function sG(e){let t=e.endsWith(`.`)?e.slice(0,-1):e;if(!t.endsWith(oG))return!1;let n=t.slice(0,-9);return n.length>4&&!n.includes(`.`)}[...$W],[...$W];var cG=`https://api-dev.hanzo.ai`,lG=()=>typeof window<`u`&&sG(window.location.hostname);function uG(){if(lG())return cG;let e=gW().api;if(e)return e.replace(/\/+$/,``);if(typeof window<`u`){let e=window.location.hostname;return eG(e)||e===`hanzo.ai`||e.endsWith(`.hanzo.ai`)||tG(e)||e===`hanzo.bot`||aG(e)?`https://api.hanzo.ai`:window.location.origin}return`https://api.hanzo.ai`}var dG=`hanzo_iam_`,fG=`${dG}access_token`;`${dG}`;var pG=`${dG}expires_at`;`${dG}`;function mG(){return gW().session??window.localStorage}function hG(){if(typeof window>`u`)return null;try{return mG().getItem(fG)}catch{return null}}`${fG}${pG}`;function gG(){if(typeof window>`u`)return!1;try{return!!(hG()||vG()||window.localStorage.getItem(`hanzo_access_token`)||window.localStorage.getItem(_G)||window.sessionStorage?.getItem(fG))}catch{return!1}}var _G=`hanzo:who`;`${dG}`,`${dG}`;function vG(){let e=hG();if(e)try{let t=e.split(`.`)[1],n=JSON.parse(atob(t.replace(/-/g,`+`).replace(/_/g,`/`)));return typeof n.sub==`string`&&n.sub?n.sub:void 0}catch{return}}function yG(e){if(!e)return null;try{let t=e.split(`.`)[1];return JSON.parse(atob(t.replace(/-/g,`+`).replace(/_/g,`/`)))}catch{return null}}var bG=[`hanzo-id`,`lux-id`,`zoo-id`,`pars-id`],xG=[`hanzo`,`lux`,`zoo`,`pars`,`platform`,`hanzoai`,`luxfi`,`zooai`,`hanzo-inc`,`hanzo-apps`,`hanzo-community`];function SG(e){let t=yG(e),n=bW(t),r=t?.orgs,i=[];for(let e of Array.isArray(r)?r:[]){let t=e,r=t?.org;if(typeof r!=`string`||!r||i.includes(r)||bG.includes(r))continue;let a=typeof t?.role==`string`&&[`owner`,`admin`].includes(t.role.trim().toLowerCase());(r===`admin`?n:!xG.includes(r)||n||a)&&i.push(r)}return i}function CG(){return SG(hG())}function wG(){try{let e=CG(),t=window.localStorage.getItem(`${dG}current_org`);return t&&e.includes(t)?t:e.length===1?e[0]:null}catch{return null}}function TG(){let e={},t=hG();t&&(e.Authorization=`Bearer ${t}`);let n=wG();return n&&(e[`X-Org-Id`]=n),e}var EG=`hanzo:org`;function DG(e){OG(e),window.dispatchEvent(new Event(EG))}function OG(e){try{window.localStorage.setItem(`${dG}current_org`,e)}catch{}}var kG=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function AG(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:kG(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var jG=e=>{let t=``,n=!1;for(let r of e){if(r===`-`||r===`_`||r<=` `){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t},MG=e=>{let t=jG(e);return t.charAt(0).toUpperCase()+t.slice(1)},NG=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),PG={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function FG(e){return e!=null}function IG(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??PG.width,a=e.size??e.height??PG.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?NG(...c):NG(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??PG[`stroke-width`])*Number(e.size??e.width??PG.width)/Number(t.size??t.width??PG.width):t.strokeWidth??PG[`stroke-width`];return[`svg`,{...Object.entries(PG).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&FG(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&FG(t.width)&&{[r(`width`)]:t.width},...`height`in t&&FG(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function LG(e,t={}){return IG(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var RG=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},zG=(0,V.createContext)({}),BG=()=>(0,V.useContext)(zG),VG=(0,V.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:h=!1,nonScalingStroke:g=!1,color:_=`currentColor`,className:v=``}=BG()??{},y=!!c||RG(d),[b,x,S=[]]=LG(u,{color:e??_,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??h,nonScalingStroke:o??g,className:NG(v,s),hasA11yProp:y,attributes:d});return(0,V.createElement)(b,{ref:f,...x},[...S.map(([e,t])=>(0,V.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function HG(e,t=[],n=[]){let r=typeof e==`string`?AG(e,t,n):e,i=(0,V.forwardRef)(({className:e,...t},n)=>(0,V.createElement)(VG,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=MG(r.name)),i}var UG={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};UG.node;var WG=HG(UG),GG={name:`arrow-up-right`,size:24,node:[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]};GG.node;var KG=HG(GG),qG={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};qG.node;var JG=HG(qG),YG={name:`compass`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`,key:`9ktpf1`}]]};YG.node;var XG=HG(YG),ZG={name:`download`,size:24,node:[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]};ZG.node;var QG=HG(ZG),$G={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};$G.node;var eK=HG($G),tK={name:`lock`,size:24,node:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]};tK.node;var nK=HG(tK),rK={name:`palette`,size:24,node:[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]};rK.node;var iK=HG(rK),aK={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};aK.node;var oK=HG(aK),sK={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};sK.node;var cK=HG(sK),lK={name:`smartphone`,size:24,node:[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]};lK.node;var uK=HG(lK),dK={name:`sparkles`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`stars`]};dK.node;var fK=HG(dK),pK={name:`type`,size:24,node:[[`path`,{d:`M12 4v16`,key:`1654pz`}],[`path`,{d:`M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2`,key:`e0r10z`}],[`path`,{d:`M9 20h6`,key:`s66wpe`}]]};pK.node;var mK=HG(pK),hK={name:`upload`,size:24,node:[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]};hK.node;var gK=HG(hK),_K={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};_K.node;var vK=HG(_K),yK=null,bK=null,xK=()=>bK??=Le(()=>import(`./ModelPickerMenu-DVDLitAq.js`).then(e=>yK=e.ModelPickerMenu),__vite__mapDeps([0,1,2,3,4])),SK=32,CK=44;function wK({models:e,value:t,onChange:n,scope:r,limits:i,loading:o=!1,error:s=null,disabled:c=!1,quiet:l=!1,size:u=`md`,placeholder:d,name:f,describe:p,granted:m,onUpgrade:h,funded:g,balance:_,onTopUp:v,open:b,onOpenChange:x}){let{t:S}=R(),C=f??S(`Model`),[w,T]=(0,V.useState)(!1),E=b??w,D=(0,V.useCallback)(e=>{b===void 0&&T(e),x?.(e)},[b,x]),O=!te().sm,k=O?CK:SK,[A,j]=(0,V.useState)(0),ee=(0,V.useRef)(null),M=t?e.find(e=>e.id===t):void 0,N=M?Zt(M):t||(d??S(`Choose a model`)),P=(0,V.useCallback)(()=>{D(!1),queueMicrotask(()=>ee.current?.focus?.())},[D]),[F,I]=(0,V.useState)(()=>yK),ne=(0,V.useCallback)(()=>{F||xK().then(e=>I(()=>e))},[F]);(0,V.useEffect)(()=>{E&&ne()},[E,ne]);let re=(0,V.useRef)(!1);(0,V.useEffect)(()=>{F&&re.current&&ee.current?.focus?.()},[F]);let ie=u===`sm`,L=(0,H.jsxs)(y,{ref:ee,...B(`model-picker`),role:`button`,tabIndex:c?-1:0,"aria-label":p??S(`{name}: {model}`,{name:C,model:N}),"aria-haspopup":`listbox`,"aria-expanded":E,"aria-disabled":c||void 0,height:l||ie?28:36,px:l?5:ie?`$2`:`$3`,gap:`$2`,items:`center`,maxW:`100%`,rounded:l?8:`$3`,...l?{"$max-sm":{height:36},transition:`quickest`}:null,borderWidth:+!l,borderColor:`$borderColor`,bg:l?`transparent`:`$background`,cursor:c?`default`:`pointer`,opacity:c?.5:1,hoverStyle:c?void 0:l?{bg:`$hover`}:{borderColor:`$rim`},pressStyle:c?void 0:{bg:`$hover`},focusVisibleStyle:at,onLayout:e=>j(e.nativeEvent?.layout?.width??0),onPress:c||F&&!O?void 0:()=>D(!0),onMouseEnter:c?void 0:ne,onFocus:c?void 0:()=>{re.current=!0,ne()},onBlur:e=>{e.relatedTarget&&(re.current=!1)},onKeyDown:e=>{c||(e.key===`Enter`||e.key===` `||e.key===`ArrowDown`||e.key===`ArrowUp`)&&(e.preventDefault?.(),D(!0))},children:[(0,H.jsx)(a,{size:l?`$3`:ie?`$1`:`$2`,color:`$ink`,fontWeight:l?`500`:void 0,numberOfLines:1,shrink:1,minW:0,children:N}),M&&!l?(0,H.jsx)(a,{size:ie?`$1`:`$2`,color:`$soft`,numberOfLines:1,shrink:2,minW:0,children:sn(M)}):null,l?null:(0,H.jsx)(Dp,{size:ie?12:14,color:`$soft`,shrink:0,"aria-hidden":!0})]});return F?(0,H.jsx)(F,{trigger:L,open:E,onOpen:()=>D(!0),onClose:P,disabled:c,width:A,focusTrigger:()=>ee.current?.focus?.(),models:e,value:t,onChange:n,scope:r,limits:i,loading:o,error:s,name:C,sheet:O,row:k,granted:m,onUpgrade:h,funded:g,balance:_,onTopUp:v}):L}var TK=[{id:`auto`,label:D(`Auto`),note:D(`Adaptive reasoning based on task complexity`)},{id:`instant`,label:D(`Instant`),note:D(`Answers right away, without thinking`)},{id:`low`,label:D(`Low`),note:D(`A quick pass with minimal thinking`)},{id:`medium`,label:D(`Medium`),note:D(`Thinks before answering`)},{id:`high`,label:D(`High`),note:D(`Deep reasoning for complex problems`)},{id:`max`,label:D(`Max`),note:D(`Maximum compute and exhaustive verification`)}],EK={px:`$2`,py:`$1.5`,rounded:`$3`};function DK({label:e,children:t,...n}){return(0,H.jsxs)(z,{...B(`sidebar-section`),mt:`$3`,gap:`$0.5`,...n,children:[e?(0,H.jsx)(a,{size:`$1`,px:`$2`,py:`$1`,color:`$soft`,fontWeight:`500`,children:e}):null,t]})}function OK({children:e,active:t=!1,onPress:n,icon:r,...i}){return(0,H.jsxs)(y,{...B(`sidebar-item`),...EK,items:`center`,gap:`$2`,cursor:`pointer`,onPress:n,role:`button`,tabIndex:0,"aria-current":t?`page`:void 0,bg:t?`$edge`:void 0,hoverStyle:{bg:t?`$edge`:`$hover`},pressStyle:{bg:`$raised`},...i,children:[r?(0,H.jsx)(z,{opacity:.7,children:r}):null,(0,H.jsx)(a,{size:`$2`,numberOfLines:1,flex:1,color:t?`$color`:`$quiet`,children:e})]})}var kK=(e,t)=>e.product?e.label:t(e.label),AK=[{label:D(`Settings`),rows:[{id:`general`,label:D(`General`)},{id:`account`,label:D(`Account`)},{id:`billing`,label:D(`Billing`)},{id:`referrals`,label:D(`Referrals & Rewards`)},{id:`usage`,label:D(`Usage`)},{id:`capabilities`,label:D(`Capabilities`),note:D(`What a model may reach for on your behalf.`)},{id:`privacy`,label:D(`Privacy`),href:vW(`/legal/privacy`)},{id:`dev`,label:`Hanzo Dev`,product:!0,href:ZW()},{id:`browser`,label:`Hanzo Browser`,product:!0,href:vW(`/extension`)}]},{label:D(`Preferences`),rows:[{id:`model`,label:D(`Default model`)},{id:`agent`,label:D(`Personal agent`),note:D(`The agent that answers as you — its capabilities, its modes, and what it is allowed to do on your behalf. Nothing is bound to this surface yet, so there is nothing here to change; it is listed because this is where it will live.`)}]},{label:D(`Customize`),rows:[{id:`apps`,label:D(`Apps`)},{id:`channels`,label:D(`Channels`)},{id:`plugins`,label:D(`Plugins`),href:vW(YW(`-/customize/plugins`))},{id:`skills`,label:D(`Skills`),href:vW(YW(`-/customize`))},{id:`memory`,label:D(`Memory`),note:D(`Nothing is remembered between conversations yet.`)}]},{label:D(`Platform`),rows:[{id:`models`,label:D(`Models`)},{id:`base`,label:`Base`,product:!0,href:vW(`/base`)},{id:`functions`,label:`Functions`,product:!0,href:vW(`/functions`)},{id:`realtime`,label:`Realtime`,product:!0,href:vW(`/realtime`)},{id:`keys`,label:D(`API keys`),href:`https://platform.hanzo.ai/api-keys`}]},{label:D(`Help & Support`),rows:[{id:`docs`,label:D(`Documentation`),href:`https://docs.hanzo.ai`},{id:`support`,label:D(`Help center`),href:vW(`/support`)},{id:`contact`,label:D(`Contact us`),href:vW(`/contact`)},{id:`status`,label:D(`Status`),href:`https://status.hanzo.ai`},{id:`releases`,label:D(`Release notes`),href:`https://github.com/hanzoai/cli/releases`}]}],jK=AK.flatMap(e=>e.rows),MK=jK[0].id;function NK({active:e,filter:t,onPick:n,onBack:r}){let{t:i}=R(),a=t.trim().toLowerCase(),o=a?AK.map(e=>({...e,rows:e.rows.filter(e=>[kK(e,i),e.label].some(e=>e.toLowerCase().includes(a)))})).filter(e=>e.rows.length>0):AK;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(OK,{icon:(0,H.jsx)(WG,{size:15,"aria-hidden":!0,"data-i18n-mirror":!0}),onPress:r,children:i(`Workspace`)}),a&&o.length===0?(0,H.jsx)(U,{px:`$3`,py:`$2`,fontSize:`$2`,color:`$quiet`,children:i(`No matches for “{query}”.`,{query:t.trim()})}):null,o.map(t=>(0,H.jsx)(DK,{label:i(t.label),children:t.rows.map(t=>(0,H.jsx)(OK,{icon:t.href?(0,H.jsx)(KG,{size:13,"aria-hidden":!0}):void 0,active:t.id===e,"aria-current":t.id===e?`true`:void 0,onPress:()=>n(t),children:kK(t,i)},t.id))},t.label))]})}var PK=((e,t)=>ce({},e,t)),FK=class extends Error{status;constructor(e,t){super(t),this.status=e,this.name=`Refusal`}},IK=class extends Error{source;values;constructor(e,t={}){super(ce({},e,t)),this.source=e,this.values=t}};function LK(e,t=PK){return e instanceof IK?t(e.source,e.values):t(e instanceof Error?e.message:String(e))}function RK(e,t){let n=new Headers(t),r=e.token();return r&&!n.has(`Authorization`)&&n.set(`Authorization`,`Bearer ${r}`),e.org&&!n.has(`X-Org-Id`)&&n.set(`X-Org-Id`,e.org),n}async function zK(e){try{let t=await e.json(),n=typeof t.error==`string`?t.error:t.error?.message;return t.detail||n||t.msg||t.message||t.title||``}catch{return``}}var BK=e=>encodeURIComponent(e);async function VK(e,t,n,r,i){let a=RK(e,r===void 0?void 0:{"Content-Type":`application/json`}),o=await fetch(`${e.api}${n}`,{method:t,headers:a,body:r===void 0?void 0:JSON.stringify(r),cache:`no-store`,signal:i?.signal});if(!o.ok){let e=await zK(o);throw new FK(o.status,e||`${t} ${n.split(`?`)[0]} answered ${o.status}`)}if(o.status===204)return;let s=await o.text();return s?JSON.parse(s):void 0}var HK=e=>typeof e==`string`?e:``,UK=e=>typeof e==`number`&&Number.isFinite(e)?e:0,WK=e=>e&&typeof e==`object`?e:{},GK=e=>Array.isArray(e)?e:[];function KK(e,t=`usd`){let n=e%100==0;try{return new Intl.NumberFormat(`en-US`,{style:`currency`,currency:(t||`usd`).toUpperCase(),minimumFractionDigits:n?0:2,maximumFractionDigits:2}).format(e/100)}catch{return`${(e/100).toFixed(n?0:2)} ${t.toUpperCase()}`}}function qK(e){let t=e.replace(/[$,\s]/g,``);if(!/^\d+(\.\d{1,2})?$/.test(t))return null;let n=Math.round(Number(t)*100);return n>0?n:null}function JK(e){let t=WK(e),n=WK(t.card),r=WK(t.billingAddress),i=UK(n.expMonth),a=UK(n.expYear);return{id:HK(t.id),type:HK(t.type)||`card`,brand:HK(n.brand),last4:HK(n.last4),expires:i&&a?`${String(i).padStart(2,`0`)}/${String(a%100).padStart(2,`0`)}`:``,default:t.isDefault===!0,name:HK(t.name),billingAddress:r&&(r.line1||r.city||r.country||r.name||r.postalCode||r.state)?{name:HK(r.name),line1:HK(r.line1),line2:HK(r.line2),city:HK(r.city),state:HK(r.state),postalCode:HK(r.postalCode),country:HK(r.country)}:void 0}}function YK(e){return e.last4?`${e.brand?e.brand.charAt(0).toUpperCase()+e.brand.slice(1):`Card`} •••• ${e.last4}`:e.name||e.type}async function XK(e){let t=await VK(e,`GET`,`/v1/billing/methods`);return(Array.isArray(t)?t:GK(WK(t).data)).map(JK).filter(e=>e.id)}function ZK(e){return e.find(e=>e.default)??e[0]??null}async function QK(e){let t=WK(await VK(e,`GET`,`/v1/billing/balance`));return UK(t.available??t.balance)}async function $K(e){return GK(WK(await VK(e,`GET`,`/v1/billing/credit-balance`)).balances).map(WK).filter(e=>(HK(e.currency)||`usd`).toLowerCase()===`usd`).reduce((e,t)=>e+UK(t.available),0)}async function eq(e){return GK(WK(await VK(e,`GET`,`/v1/billing/credits`)).grants).map(WK).map(e=>({id:HK(e.id),name:HK(e.name),amount:UK(e.amountCents),remaining:UK(e.remainingCents),currency:HK(e.currency)||`usd`,expires:HK(e.expiresAt),active:e.active===!0&&e.voided!==!0})).filter(e=>e.id)}async function tq(e){let t=WK(await VK(e,`GET`,`/v1/billing/tier`));return{plan:HK(t.plan),tier:HK(WK(t.tier).name),name:HK(t.planName)}}function nq(e){let t=WK(e);return{enabled:t.enabled===!0,threshold:UK(t.thresholdCents),amount:UK(t.amountCents),currency:HK(t.currency)||`usd`,last:HK(t.lastRechargedAt)}}async function rq(e){return nq(await VK(e,`GET`,`/v1/billing/recharge`))}async function iq(e,t){return nq(await VK(e,`PUT`,`/v1/billing/recharge`,{enabled:t.enabled,thresholdCents:t.threshold,amountCents:t.amount,currency:`usd`}))}async function aq(e,t,n){if(!Number.isInteger(t)||t<=0)throw Error(D(`Enter an amount to add`));if(!n)throw Error(D(`Add a card before buying more`));return UK(WK(await VK(e,`POST`,`/v1/billing/topup`,{amountCents:t,paymentMethodId:n})).balanceCents)}async function oq(e){let t=WK(WK(await VK(e,`GET`,`/v1/usage/summary?range=month`)).spend);return{known:t.available===!0,total:UK(t.mtdCents)||UK(t.totalCents),categories:GK(t.byCategory).map(WK).map(e=>({name:HK(e.category)||`Uncategorized`,cents:UK(e.cents)})).filter(e=>e.cents>0)}}var sq=e=>UK(e)>0?new Date(UK(e)*1e3).toISOString():``;async function cq(e){let t=WK(await VK(e,`GET`,`/v1/allowance`)),n=t.pool&&typeof t.pool==`object`?WK(t.pool):null;return{plan:HK(t.plan),limit:UK(t.limit),used:UK(t.used),spent:t.spent===!0,window:HK(t.window),resets:sq(t.resets),pooled:t.pooled===!0,pool:n&&HK(n.state)?{state:HK(n.state),resets:sq(n.resets)}:null}}function lq(e){let t=WK(e);return{id:HK(t.id),title:HK(t.title),threshold:UK(t.threshold),enforce:t.enforce===!0,project:HK(t.project),service:HK(t.service),spent:typeof t.periodSpentCents==`number`?t.periodSpentCents:null,resets:HK(t.resetsAt)}}async function uq(e){return GK(await VK(e,`GET`,`/v1/billing/alerts`)).map(lq).filter(e=>e.id)}function dq(e){return e.find(e=>!e.project&&!e.service&&e.threshold>0)??null}async function fq(e,t,n){if(!Number.isInteger(n)||n<=0)throw Error(D(`Enter a monthly limit`));let r=dq(t);return lq(r?await VK(e,`PATCH`,`/v1/billing/alerts/${BK(r.id)}`,{threshold:n}):await VK(e,`POST`,`/v1/billing/alerts`,{title:`Monthly limit`,threshold:n,currency:`usd`,project:``,service:``,enforce:!0,softPct:80,rateLimitRpm:0}))}async function pq(e,t){await VK(e,`DELETE`,`/v1/billing/alerts/${BK(t)}`)}var mq=TK.filter(e=>[`auto`,`high`,`max`].includes(e.id)),hq={model:Tn,effort:`auto`},gq=`hanzo.mind`,_q=`hanzo:mind`,vq=e=>e===`xhigh`?`max`:mq.some(t=>t.id===e)?e:hq.effort;function yq(){try{return typeof window>`u`?null:window.localStorage}catch{return null}}var bq,xq=hq,Sq=null;function Cq(){if(Sq)return Sq;let e=null;try{e=yq()?.getItem(gq)??null}catch{e=null}if(e===bq)return xq;bq=e;try{let t=JSON.parse(e??`null`);xq={model:typeof t?.model==`string`&&t.model.trim()?t.model:hq.model,effort:vq(t?.effort)}}catch{xq=hq}return xq}function wq(e){let t=Cq(),n={...t,...e,effort:e.effort===void 0?t.effort:vq(e.effort)};try{yq()?.setItem(gq,JSON.stringify(n)),Sq=null}catch{Sq=n}typeof window<`u`&&window.dispatchEvent(new Event(_q))}function Tq(e){return window.addEventListener(_q,e),window.addEventListener(`storage`,e),()=>{window.removeEventListener(_q,e),window.removeEventListener(`storage`,e)}}function Eq(){return[(0,V.useSyncExternalStore)(Tq,Cq,()=>hq),wq]}Mn([{id:Tn,name:`Enso Auto`,family:`enso`,class:`ours`}]);var Dq=`auto`,Oq=`hanzo.chat.preferences`,kq=`hanzo.agent.autonomy`,Aq=`hanzo:chat:preferences`,jq=4,Mq={allowThirdPartyModels:!1,effort:Dq,approvalMode:`auto`,showLanguage:!1,effortVersion:jq};function Nq(e){return mq.some(t=>t.id===e)?e:null}function Pq(e){return TK.some(t=>t.id===e)?e:Dq}function Fq(e,t){return e===`manual`||e===`auto`?e:t===`supervised`?`manual`:`auto`}function Iq(){if(typeof window>`u`)return Mq;try{let e=window.localStorage.getItem(Oq),t=window.localStorage.getItem(kq);if(!e)return{...Mq,approvalMode:Fq(void 0,t)};let n=JSON.parse(e),r=n.effortVersion===jq?Pq(n.effort):Dq;return{allowThirdPartyModels:n.thirdPartyChosen?!!n.allowThirdPartyModels:n.allowThirdPartyModels===!0,...n.thirdPartyChosen?{thirdPartyChosen:!0}:{},effort:r,approvalMode:Fq(n.approvalMode,t),showLanguage:!!n.showLanguage,effortVersion:jq}}catch{return Mq}}function Lq(e){let t={...Iq(),...e,effortVersion:jq};if(typeof window<`u`){try{window.localStorage.setItem(Oq,JSON.stringify(t)),e.approvalMode&&window.localStorage.setItem(kq,e.approvalMode===`manual`?`supervised`:`autonomous`)}catch{}window.dispatchEvent(new CustomEvent(Aq,{detail:t}))}return t}function Rq(){let[e,t]=(0,V.useState)(Iq);return(0,V.useEffect)(()=>{let e=e=>{let n=e.detail;t(n||Iq())};return window.addEventListener(Aq,e),window.addEventListener(`storage`,e),()=>{window.removeEventListener(Aq,e),window.removeEventListener(`storage`,e)}},[]),[e,Lq]}var zq={display:`inline-flex`,flexDirection:`row`,items:`center`,$touchable:{minH:44,minW:44}},Bq=`#181717`,Vq=V.forwardRef(function({title:e=`GitHub`,color:t=`currentColor`,size:n=24,...r},i){return t==="default"&&(t=Bq),(0,H.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:n,height:n,fill:t,viewBox:`0 0 24 24`,ref:i,...r,children:[(0,H.jsx)(`title`,{children:e}),(0,H.jsx)(`path`,{d:`M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12`})]})}),Hq=`#4285F4`,Uq=V.forwardRef(function({title:e=`Google`,color:t=`currentColor`,size:n=24,...r},i){return t==="default"&&(t=Hq),(0,H.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:n,height:n,fill:t,viewBox:`0 0 24 24`,ref:i,...r,children:[(0,H.jsx)(`title`,{children:e}),(0,H.jsx)(`path`,{d:`M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z`})]})}),Wq=`hanzo_iam_`,Gq=`${Wq}access_token`,Kq=`${Wq}refresh_token`;`${Wq}`;var qq=`${Wq}id_token`,Jq=e=>{if(typeof window>`u`)return null;try{return window.localStorage.getItem(e)}catch{return null}},Yq=e=>{if(typeof window>`u`)return null;try{return window.sessionStorage?.getItem(e)??null}catch{return null}},Xq=e=>{if(typeof document>`u`||!document.cookie)return null;try{let t=document.cookie.split(`; `).find(t=>t.startsWith(`${e}=`));if(t){let e=t.split(`=`)[1];return e?decodeURIComponent(e):null}return null}catch{return null}},Zq=()=>Jq(Gq)||Jq(`hanzo_access_token`)||Jq(`token`)||Jq(`auth_token`)||Yq(Gq)||Yq(`hanzo_access_token`)||Yq(`token`)||Xq(Gq)||Xq(`auth_token`)||Xq(`token`)||Xq(`hanzo_access_token`),Qq=()=>Jq(Kq),$q=()=>Jq(qq),eJ=`https://hanzo.ai`;function tJ(e,t,n=eJ){let r=new URL(e).searchParams,i=n.replace(/\/+$/,``);switch(t.kind){case`provider`:return r.set(`provider`,t.provider),`${i}/v1/iam/oauth/authorize?${r}`;case`email`:return r.set(`login_hint`,t.email),`${i}/login?${r}`;case`another`:return r.set(`prompt`,`select_account`),`${i}/login?${r}`;case`signup`:return`${i}/signup?${r}`;case`login`:return`${i}/login?${r}`}}function nJ(e){let t=e.trim();return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)?t:null}var rJ={google:`Google`,github:`GitHub`},iJ=`[data-slot="signin-panel"]`,aJ=`var(--popover,var(--panel))`,oJ=`var(--border,var(--edge))`,sJ=`var(--border-strong,var(--bound))`,cJ=`var(--foreground,var(--ink))`,lJ=`var(--muted-foreground,var(--quiet))`,uJ=`${iJ} [data-signin-body]{container-type:inline-size;display:flex;flex-direction:column;gap:10px;width:100%}${iJ} [data-signin-pair]{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%}@container (max-width:379.98px){${iJ} [data-signin-pair]{grid-template-columns:1fr}}${iJ} [data-signin-btn]{box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:9px;width:100%;height:46px;margin:0;padding:0 14px;border-radius:14px;border:1px solid ${oJ};background:${aJ};color:${cJ};font-family:var(--font-sans,Zen,system-ui,sans-serif);font-size:14px;font-weight:500;line-height:1;white-space:nowrap;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.04);transition:transform .2s cubic-bezier(.16,1,.3,1),border-color .2s,background-color .2s,opacity .2s}${iJ} [data-signin-btn]:hover:not(:disabled){border-color:${sJ};transform:translateY(-2px)}${iJ} [data-signin-btn]:active:not(:disabled){transform:scale(.98)}${iJ} [data-signin-btn]:disabled{opacity:.55;cursor:not-allowed}${iJ} [data-signin-btn][data-solid]{background:${cJ};color:var(--background);border-color:${cJ}}${iJ} [data-signin-btn][data-solid]:hover:not(:disabled){opacity:.92;transform:none}${iJ} [data-signin-btn] svg{flex-shrink:0}${iJ} [data-signin-or]{display:flex;align-items:center;gap:12px;font-size:12.5px;color:${lJ}}${iJ} [data-signin-or]::before,${iJ} [data-signin-or]::after{content:'';flex:1;height:1px;background:${oJ}}${iJ} [data-signin-form]{display:flex;flex-direction:column;gap:10px;margin:0}${iJ} [data-signin-field]{box-sizing:border-box;width:100%;height:46px;margin:0;padding:0 16px;border-radius:14px;border:1px solid ${oJ};background-color:${aJ};color:${cJ};font-family:var(--font-sans,Zen,system-ui,sans-serif);font-size:14px;outline:none}${iJ} [data-signin-field]::placeholder{color:${lJ}}${iJ} [data-signin-field]:focus-visible{border-color:${sJ};box-shadow:0 0 0 2px var(--ring,${sJ})}${iJ} [data-signin-wrong]{margin:0;font-size:13px;color:var(--destructive,#e5484d)}${iJ} [data-signin-quiet]{margin:0;font-size:13px;color:${lJ}}${iJ} [data-signin-quiet] button{padding:0;border:0;background:none;color:${cJ};font:inherit;cursor:pointer}${iJ} [data-signin-quiet] button:hover:not(:disabled){text-decoration:underline}${iJ} [data-signin-terms]{margin:0;max-width:400px;text-align:center;font-size:12px;line-height:18px;color:${lJ}}${iJ} [data-signin-terms] a{color:${cJ};text-decoration:none}${iJ} [data-signin-terms] a:hover{text-decoration:underline;text-underline-offset:2px}`;function dJ(e){return e.request?(0,H.jsx)(pJ,{...e,mint:e.request}):(0,H.jsx)(fJ,{...e})}function fJ(e){let{sdk:t}=lW();return(0,H.jsx)(pJ,{...e,mint:e=>t.getSigninUrl(e)})}function pJ({title:e,line:t,providers:n=[`google`,`github`],signin:r=eJ,signup:i=!1,termsHref:a=`https://hanzo.ai/terms`,privacyHref:o=`https://hanzo.ai/privacy`,authorize:s=e=>e,track:c,mint:l,background:u=`$background`,borderColor:d=`$borderColor`,bare:f=!1}){let{t:p}=R(),[m,h]=(0,V.useState)(``),[g,_]=(0,V.useState)(!1),[v,y]=(0,V.useState)(null),[b,x]=(0,V.useState)(null);async function S(e,t,n){x(null),y(e),c?.(`signin_started`,{method:e});try{let e=await l(n?{additionalParams:{login_hint:n}}:void 0);window.location.assign(s(tJ(e,t,r)))}catch(e){x(e instanceof Error&&e.message?e.message:`Signing in could not start. Try again.`),y(null)}}function C(e){e.preventDefault();let t=nJ(m);if(!t){x(`Enter your email address.`);return}S(`email`,{kind:`email`,email:t},t)}let w=f?{}:{bg:u,borderWidth:1,borderColor:d,rounded:`$6`,p:`$6`},T=p(v===`email`?`One moment…`:`Continue with email`);return(0,H.jsxs)(z,{"data-slot":`signin-panel`,"data-surface":f?`bare`:`card`,width:`100%`,maxW:f?400:464,items:`center`,gap:`$3`,...w,children:[(0,H.jsx)(`style`,{dangerouslySetInnerHTML:{__html:uJ}}),e?(0,H.jsx)(Xt,{render:`h1`,size:`$8`,fontWeight:`500`,color:`$ink`,m:0,text:`center`,children:e}):null,t?(0,H.jsx)(Nt,{size:`$3`,color:`$quiet`,m:0,text:`center`,maxW:360,children:t}):null,(0,H.jsxs)(`div`,{"data-signin-body":``,style:e||t?{marginTop:12}:void 0,children:[n.length?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{"data-signin-pair":``,children:n.map(e=>(0,H.jsxs)(`button`,{"data-signin-btn":``,type:`button`,disabled:v!==null,onClick:()=>void S(e,{kind:`provider`,provider:e}),children:[e===`google`?(0,H.jsx)(Uq,{size:17,"aria-hidden":!0}):(0,H.jsx)(Vq,{size:17,"aria-hidden":!0}),p(`Continue with {provider}`,{provider:rJ[e]})]},e))}),(0,H.jsx)(`div`,{"data-signin-or":``,children:p(`or`)})]}):null,g?(0,H.jsxs)(`form`,{"data-signin-form":``,onSubmit:C,noValidate:!0,children:[(0,H.jsx)(`input`,{id:`hanzo-signin-email`,"data-signin-field":``,type:`email`,name:`email`,autoComplete:`username`,"aria-label":p(`Email`),"aria-invalid":b?!0:void 0,value:m,onChange:e=>h(e.target.value),placeholder:`you@company.com`,autoFocus:!0}),b?(0,H.jsx)(`p`,{"data-signin-wrong":``,role:`alert`,children:p(b)}):null,(0,H.jsx)(`button`,{"data-signin-btn":``,"data-solid":``,type:`submit`,disabled:v!==null,children:T})]}):(0,H.jsxs)(H.Fragment,{children:[b?(0,H.jsx)(`p`,{"data-signin-wrong":``,role:`alert`,children:p(b)}):null,(0,H.jsx)(`button`,{"data-signin-btn":``,"data-solid":``,type:`button`,disabled:v!==null,onClick:()=>{x(null),_(!0)},children:T})]})]}),i?(0,H.jsxs)(`p`,{"data-signin-quiet":``,children:[`${p(`New to Hanzo?`)} `,(0,H.jsx)(`button`,{type:`button`,disabled:v!==null,onClick:()=>void S(`signup`,{kind:`signup`}),children:p(`Create account`)})]}):null,(0,H.jsx)(`p`,{"data-signin-terms":``,children:p(`By continuing, you agree to Hanzo's {terms} and {privacy}.`,{terms:(0,H.jsx)(`a`,{href:a,children:p(`Terms`)}),privacy:(0,H.jsx)(`a`,{href:o,children:p(`Privacy Policy`)})})})]})}async function mJ(e,t,n,r,i){if(t)try{await fetch(`${e}/v1/iam/oauth/revoke`,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`,...r?{Authorization:`Bearer ${r}`}:{}},body:new URLSearchParams({token:t,token_type_hint:n,...i?{client_id:i}:{}}).toString()})}catch{}}async function hJ(e,t,n,r){try{await fetch(`${e}/v1/iam/oauth/logout`,{method:`POST`,credentials:`include`,redirect:`manual`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:new URLSearchParams({...n?{client_id:n}:{},...t?{id_token_hint:t}:{},...r?{everywhere:`true`}:{}}).toString()})}catch{}}function gJ(e,t,n){let r=new URLSearchParams({...n?{client_id:n}:{},everywhere:`true`,post_logout_redirect_uri:new URL(t,window.location.origin).href});return`${e.replace(/\/+$/,``)}/v1/iam/oauth/logout?${r}`}async function _J(e,{via:t,to:n=`/login?from=logout`,clientId:r,track:i,everywhere:a,issuer:o}={}){let s=t??window.location.origin,c=Zq(),l=Qq(),u=$q();e.clearTokens();try{await mJ(s,l,`refresh_token`,c,r),await mJ(s,c,`access_token`,c,r),await hJ(s,u,r,a)}finally{i?.(`logout_completed`,{}),window.location.assign(a&&o?gJ(o,n,r):n)}}function vJ(e={}){let{sdk:t,config:n}=lW(),{via:r,to:i,track:a,clientId:o=n.clientId,everywhere:s,issuer:c=n.serverUrl}=e;return(0,V.useCallback)(()=>_J(t,{via:r,to:i,track:a,clientId:o,everywhere:s,issuer:c}),[t,r,i,a,o,s,c])}var yJ;function bJ(e,t={}){let n=gW().track;n?n(e,t):ze(yJ,e,t)}var xJ=e=>e===`localhost`||e===`127.0.0.1`||e===`[::1]`||e.endsWith(`.localhost`);function SJ(e,t){if(xJ(t))return``;try{let t=new URL(e).hostname;if(t===`api.hanzo.ai`||t===`hanzo.id`||t===`hanzo.ai`)return nG}catch{return``}return e}function CJ(e=`/`){let{config:t}=lW(),n=vJ({to:e,track:bJ,everywhere:!0,issuer:(e===`/`||e===`/login?from=logout`)&&typeof window<`u`?SJ(t.serverUrl,window.location.hostname):``});return(0,V.useCallback)(async()=>{window.google?.accounts?.id?.disableAutoSelect?.(),await n()},[n])}var wJ=class{constructor(e){this.http=e}http;get(e){return this.http.enveloped({method:`GET`,path:`/v1/ai/account`,...e?.signal?{signal:e.signal}:{}})}},TJ=class extends Error{constructor(e){super(e),this.name=`HanzoAIError`}},EJ=class extends TJ{status;body;constructor(e,t,n){super(e),this.name=`APIError`,this.status=t,this.body=n}},DJ=class extends TJ{constructor(e="No auth token available. Pass `token` or `getToken` to createAiClient."){super(e),this.name=`AuthError`}},OJ=`/v1/agents`,kJ=/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/,AJ=131072;function jJ(e,t=``){if(!kJ.test(e))throw new TJ(`Not a valid agent ref: ${JSON.stringify(e)}`);return`${OJ}/${e}${t}`}var MJ=class{constructor(e){this.http=e}http;list(e){return this.http.collection(`agents`,{method:`GET`,path:OJ,...e?.signal?{signal:e.signal}:{}})}create(e,t){return this.http.json({method:`POST`,path:OJ,body:e,...t?.signal?{signal:t.signal}:{}})}async get(e,t){return this.http.json({method:`GET`,path:jJ(e),...t?.signal?{signal:t.signal}:{}})}async update(e,t,n){return this.http.json({method:`PATCH`,path:jJ(e),body:t,...n?.signal?{signal:n.signal}:{}})}async delete(e,t){await this.http.raw({method:`DELETE`,path:jJ(e),...t?.signal?{signal:t.signal}:{}})}async run(e,t,n){let r=jJ(e,`/run`);if(new TextEncoder().encode(t).length>AJ)throw new TJ(`Input exceeds ${AJ} bytes.`);return this.http.json({method:`POST`,path:r,body:{input:t},...n?.signal?{signal:n.signal}:{}})}runs(e={},t){let{agent:n,...r}=e;return this.http.collection(`runs`,{method:`GET`,path:n?jJ(n,`/runs`):`${OJ}/runs`,...Object.keys(r).length?{query:r}:{},...t?.signal?{signal:t.signal}:{}})}metrics(e,t){return this.http.json({method:`GET`,path:`${OJ}/metrics`,...e?.range?{query:{range:e.range}}:{},...t?.signal?{signal:t.signal}:{}})}activity(e){return this.http.collection(`activity`,{method:`GET`,path:`${OJ}/activity`,...e?.signal?{signal:e.signal}:{}})}};function NJ(e){let t=e??{};return{status:`held`,id:typeof t.id==`string`?t.id:``,clause:typeof t.clause==`string`?t.clause:``,reason:typeof t.reason==`string`?t.reason:``}}var PJ=`https://api.hanzo.ai`;function FJ(e,t){return e.replace(/\/+$/,``)+(t.startsWith(`/`)?t:`/${t}`)}function IJ(e){if(!e)return``;let t=new URLSearchParams;for(let[n,r]of Object.entries(e))r!==void 0&&t.set(n,String(r));let n=t.toString();return n?`?${n}`:``}function LJ(e){return typeof FormData<`u`&&e instanceof FormData}var RJ=class{baseUrl;issuer;auth;token;getToken;fetchImpl;extraHeaders;constructor(e){this.baseUrl=e.baseUrl??PJ,this.issuer=e.issuer,this.auth=e.auth,this.token=e.token??e.secretKey??e.publishableKey,this.getToken=e.getToken,this.extraHeaders=e.headers??{};let t=e.fetch??globalThis.fetch;if(typeof t!=`function`)throw new EJ("No fetch implementation available; pass `fetch` in the client config.",0);this.fetchImpl=t.bind(globalThis)}async resolveToken(){if(this.auth){let e=this.auth.getValidAccessToken?await this.auth.getValidAccessToken():this.auth.getAccessToken?.()??null;if(e)return e;if(!this.getToken&&!this.token)throw new DJ}if(this.getToken)return await this.getToken();if(this.token)return this.token;throw new DJ}async buildHeaders(e){let t=new Headers(this.extraHeaders);for(let[n,r]of Object.entries(e.headers??{}))t.set(n,r);return e.body!==void 0&&!LJ(e.body)&&!t.has(`Content-Type`)&&t.set(`Content-Type`,`application/json`),!e.anonymous&&!t.has(`Authorization`)&&t.set(`Authorization`,`Bearer ${await this.resolveToken()}`),t}async send(e,t){let n=await this.buildHeaders(t),r={method:t.method??`GET`,headers:n};return t.body!==void 0&&(r.body=LJ(t.body)?t.body:JSON.stringify(t.body)),t.signal&&(r.signal=t.signal),this.fetchImpl(e,r)}async raw(e){let t=FJ(e.baseUrl??this.baseUrl,e.path)+IJ(e.query),n=await this.send(t,e);return!e.anonymous&&this.auth?.invalidate&&await zJ(n)&&(this.auth.invalidate(),n=await this.send(t,e)),n.ok||await VJ(n),n}async result(e){let t=await this.raw(e),n=await t.json().catch(()=>({}));return t.status===202&&n.status===`held`?NJ(n):{status:`done`,value:n}}scoped(e){return{baseUrl:this.baseUrl,issuer:this.issuer,auth:e,fetch:this.fetchImpl,headers:this.extraHeaders}}async json(e){return await(await this.raw(e)).json()}async collection(e,t){let n=(await this.json(t))?.[e];return Array.isArray(n)?n:[]}async bearer(){try{return await this.resolveToken()}catch{return}}async enveloped(e){let t=await this.json(e);if(t.status!==`ok`)throw new EJ(t.msg||`Request failed`,200,t);return t.data}};async function zJ(e){if(e.status===401)return!0;if(e.status!==403)return!1;let t=(await e.clone().json().catch(()=>void 0))?.detail;return typeof t==`string`&&t.includes(`validated principal`)}var BJ={502:`The service did not answer. Nothing was run; try again.`,503:`The service is not running right now.`,504:`The service took too long to answer.`};async function VJ(e){let t=await e.text().catch(()=>``),n=t,r=BJ[e.status]??`HTTP ${e.status}`;if(t)try{n=JSON.parse(t),r=HJ(n)??r}catch{n=t}throw new EJ(r,e.status,n)}function HJ(e){if(e&&typeof e==`object`){let t=e;if(typeof t.msg==`string`&&t.msg)return t.msg;let n=t.error;if(typeof n==`string`)return n;if(n&&typeof n==`object`){let e=n.message;if(typeof e==`string`)return e}if(typeof t.detail==`string`&&t.detail)return t.detail;if(typeof t.title==`string`&&t.title)return t.title}}async function*UJ(e){let t=e.getReader(),n=new TextDecoder,r=``;try{for(;;){let{value:e,done:i}=await t.read();if(i)break;r+=n.decode(e,{stream:!0});let a;for(;(a=WJ(r))!==-1;){let e=r.slice(0,a);r=r.slice(GJ(r,a));let t=KJ(e);t&&(yield t)}}let e=r.trim();if(e){let t=KJ(e);t&&(yield t)}}finally{t.releaseLock()}}function WJ(e){let t=e.indexOf(`
|
|
96
|
+
`)}function fU(e){let t=`0x`;for(let n of new TextEncoder().encode(e))t+=n.toString(16).padStart(2,`0`);return t}function pU(e){let t=typeof e==`string`?Number.parseInt(e,16):typeof e==`number`?e:NaN;return Number.isSafeInteger(t)&&t>0?t:1}var mU=1500,hU=`hanzo_iam_`,gU=`${hU}state`,_U=`${hU}code_verifier`,vU=`${hU}access_token`,yU=`${hU}refresh_token`,bU=`${hU}id_token`,xU=`${hU}expires_at`,SU=`${hU}hold`,CU=`${hU}spent`,wU=`${hU}refresh`,TU=`${hU}refresh_lease`,EU=3e4,DU=50,OU=50,kU=`${_U}:`;function AU(e){return`${kU}${e}`}var jU=12;function MU(e,t){return`${t}.${e}`}function NU(e){let t=e.indexOf(`.`);if(t>0){let n=e.slice(0,t);if(/^\d+$/.test(n))return{issuedAt:Number(n),codeVerifier:e.slice(t+1)}}return{issuedAt:0,codeVerifier:e}}var PU=`hanzo_iam_login`,FU=`hanzo-iam`;function IU(e,t){let n=new URLSearchParams({code:t});e.state&&n.set(`state`,e.state);let r=e.redirectUri.includes(`?`)?`&`:`?`;return`${e.redirectUri}${r}${n.toString()}`}var LU=9e5,RU=class extends Error{constructor(e,t){super(e),this.code=t,this.name=`Refused`}code},zU=class extends Error{constructor(e,t=[],n){super(`this account signs in with a second factor`),this.directive=e,this.factors=t,this.request=n,this.name=`SecondFactor`}directive;factors;request},BU=class extends Error{constructor(e,t){super(`confirm the account's email address to finish signing in`),this.email=e,this.request=t,this.name=`EmailRequired`}email;request};function VU(e){return`recovery`in e?{recoveryCode:e.recovery}:{mfaType:e.type,passcode:e.passcode}}function HU(e){if(!Array.isArray(e))return[];let t=e.flatMap(e=>{let t=e??{};return typeof t.mfaType!=`string`||!t.mfaType?[]:[{type:t.mfaType,preferred:t.isPreferred===!0,remember:typeof t.mfaRememberInHours==`number`?t.mfaRememberInHours:0}]}),n=``;for(let e of t)(e.type===`email`||e.type===`sms`)&&(n===``||e.preferred)&&(n=e.type);return t.map(({type:e,remember:t})=>({type:e,sent:e===n,remember:t}))}var UU=class extends Error{constructor(){super(`no account holds this address; accept the terms to create one`),this.name=`SignupRequired`}},WU=class extends Error{constructor(e){super(`the session has ended: ${e}`),this.reason=e,this.name=`SessionEnded`}reason},GU=class extends Error{constructor(e,t){super(e),this.reason=t,this.name=`Unmatched`}reason};function KU(e){try{let t=e(),n=`${hU}probe`;return t.setItem(n,`1`),t.removeItem(n),t}catch{return null}}function qU(){return KU(()=>localStorage)??KU(()=>sessionStorage)}function JU(){let e=new Map;return{get length(){return e.size},clear:()=>e.clear(),getItem:t=>e.has(t)?e.get(t):null,key:t=>Array.from(e.keys())[t]??null,removeItem:t=>{e.delete(t)},setItem:(t,n)=>{e.set(t,String(n))}}}var YU=e=>new Promise(t=>setTimeout(t,e));function XU(){try{return typeof navigator<`u`&&navigator.locks?navigator.locks:null}catch{return null}}async function ZU(e,t){let n=XU();if(n)return n.request(wU,t);let r=$H(),i=()=>e.getItem(TU)?.startsWith(`${r}.`)===!0;for(;;){let t=e.getItem(TU);if((t?Number(t.slice(t.indexOf(`.`)+1)):0)>Date.now()){await YU(OU);continue}if(e.setItem(TU,`${r}.${Date.now()+EU}`),await YU(DU),i())break}try{return await t()}finally{i()&&e.removeItem(TU)}}function QU(e){try{let t=JSON.parse(e);return{error:typeof t.error==`string`?t.error:``,description:typeof t.error_description==`string`?t.error_description:``}}catch{return{error:``,description:``}}}async function $U(e,t){let n=await e.json().catch(()=>({}));if(!e.ok||n.status===`error`)throw new RU(typeof n.msg==`string`&&n.msg?n.msg:`${t} (${e.status})`,typeof n.code==`string`?n.code:``);return n}async function eW(e,t){return(await $U(e,t)).data}var tW=class{config;storage;txStorage;redeemable;discoveryCache=null;callbackInFlight=null;held;refreshing=null;constructor(e){this.config=e;let t=qU();this.storage=e.storage??t??JU(),this.txStorage=t??this.storage,this.redeemable=t!==null||e.storage!==void 0,this.held=this.stored()}async getDiscovery(){if(this.discoveryCache)return this.discoveryCache;let e=nU(this.config.serverUrl);try{let t=await fetch(`${e}${eU.discovery}`,{headers:{Accept:`application/json`}});if(t.ok)return this.discoveryCache=await t.json(),this.discoveryCache}catch{}return this.discoveryCache={issuer:e,authorization_endpoint:rU(e,`authorize`),token_endpoint:rU(e,`token`),userinfo_endpoint:rU(e,`userinfo`),jwks_uri:rU(e,`jwks`),revocation_endpoint:rU(e,`revoke`),end_session_endpoint:rU(e,`logout`),response_types_supported:[`code`],grant_types_supported:[`authorization_code`,`refresh_token`],scopes_supported:[`openid`,`email`,`profile`]},this.discoveryCache}async tokenEndpoint(){return this.config.proxyBaseUrl?rU(this.config.proxyBaseUrl,`token`):(await this.getDiscovery()).token_endpoint}async userinfoEndpoint(){return this.config.proxyBaseUrl?rU(this.config.proxyBaseUrl,`userinfo`):(await this.getDiscovery()).userinfo_endpoint}async revocationEndpoint(){return this.config.proxyBaseUrl?rU(this.config.proxyBaseUrl,`revoke`):(await this.getDiscovery()).revocation_endpoint??rU(this.config.serverUrl,`revoke`)}async endSessionEndpoint(){return this.config.proxyBaseUrl?rU(this.config.proxyBaseUrl,`logout`):(await this.getDiscovery()).end_session_endpoint??rU(this.config.serverUrl,`logout`)}stashPkce(e,t){this.sweepStaleVerifiers(),this.txStorage.setItem(AU(e),MU(t,Date.now())),this.txStorage.setItem(gU,e),this.txStorage.setItem(_U,t)}sweepStaleVerifiers(){let e=[];for(let t=this.txStorage.length-1;t>=0;t--){let n=this.txStorage.key(t);if(!n||!n.startsWith(kU))continue;let r=this.txStorage.getItem(n);e.push({key:n,issuedAt:r?NU(r).issuedAt:0})}e.sort((e,t)=>t.issuedAt-e.issuedAt);for(let t of e.slice(jU-1))this.txStorage.removeItem(t.key)}async buildAuthorizeUrl(e){if(!this.redeemable)throw Error(`@hanzo/iam: this browser keeps neither localStorage nor sessionStorage, so the PKCE verifier cannot outlive the redirect to IAM and the callback would fail. Call usableStorage() before starting a login to catch this on the page.`);let t=await this.getDiscovery(),{codeVerifier:n,codeChallenge:r}=await QH(),i=$H();return this.stashPkce(i,n),{url:iU({endpoint:t.authorization_endpoint,serverUrl:this.config.serverUrl,clientId:this.config.clientId,redirectUri:this.config.redirectUri,state:i,scope:this.config.scope,codeChallenge:r,prompt:e?.prompt,params:e?.additionalParams}),codeVerifier:n,state:i}}async signinRedirect(e){let{url:t}=await this.buildAuthorizeUrl(e);window.location.replace(t.toString())}async getSigninUrl(e){let{url:t}=await this.buildAuthorizeUrl(e);return t.toString()}asking=null;parties=new Map;ask(e){this.asking=e&&e.state?{...e,state:e.state}:null}get client(){return this.asking?.clientId??this.config.clientId}async party(e){if(e===this.config.clientId)return{application:this.config.application??this.config.clientId,organization:this.config.organization};let t=this.parties.get(e);if(t)return t;let n=new URL(`${nU(this.config.serverUrl)}${tU.authApplication}`);n.searchParams.set(`clientId`,e);let r=await eW(await fetch(n.toString(),{headers:{Accept:`application/json`}}),`could not read the application`)??{};if(typeof r.organization!=`string`||!r.organization)throw Error(`IAM did not name the application's organization`);let i={application:typeof r.name==`string`&&r.name?r.name:e,organization:r.organization};return this.parties.set(e,i),i}async own(){return this.asking??await this.mine()}async mine(){let{codeVerifier:e,codeChallenge:t}=await QH(),n=$H();return this.stashPkce(n,e),{clientId:this.config.clientId,redirectUri:this.config.redirectUri,scope:this.config.scope,state:n,codeChallenge:t,codeChallengeMethod:`S256`}}async credentialLogin(e){return this.post(e,await this.own())}async post(e,t,n){let r=this.config.proxyBaseUrl??this.config.serverUrl,i=new URL(n??`${nU(r)}${tU.login}`);i.searchParams.set(`clientId`,t.clientId),i.searchParams.set(`responseType`,`code`),i.searchParams.set(`redirectUri`,t.redirectUri),i.searchParams.set(`scope`,t.scope??`openid profile email`),t.state&&i.searchParams.set(`state`,t.state),t.nonce&&i.searchParams.set(`nonce`,t.nonce),t.prompt&&i.searchParams.set(`prompt`,t.prompt),t.loginHint&&i.searchParams.set(`login_hint`,t.loginHint),i.searchParams.set(`type`,`code`),t.codeChallenge&&(i.searchParams.set(`code_challenge`,t.codeChallenge),i.searchParams.set(`code_challenge_method`,t.codeChallengeMethod??`S256`));let a=await fetch(i.toString(),{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},credentials:`include`,body:JSON.stringify({type:`code`,...await this.party(t.clientId),autoSignin:!0,...e})}),o;try{o=await $U(a,`sign-in failed`)}catch(e){throw e instanceof RU&&e.code===`login_required`&&this.release(),e}let s=o.data;if(s===`NextMfa`||s===`RequiredMfa`)throw s===`NextMfa`&&this.hold(),new zU(s,HU(o.data2),t);if(s===`RequiredEmail`){this.hold();let e=o.data2??{};throw new BU(typeof e.email==`string`?e.email:``,t)}if(s===`SignupRequired`)throw new UU;if(typeof s!=`string`||s.length===0)throw Error(`IAM did not return an authorization code`);return this.release(),IU(t,s)}hold(){this.txStorage.setItem(SU,String(Date.now()+LU))}release(){this.txStorage.removeItem(SU)}holding(){return Number(this.txStorage.getItem(SU)??0)>Date.now()}async resume(e){if(this.holding())return null;try{return await this.credentialLogin(e?{loginHint:e}:{})}catch{return null}}loginWithPassword(e,t){return this.credentialLogin({username:e,password:t,signinMethod:`Password`})}loginWithCode(e,t){let n=e.includes(`@`);return this.credentialLogin({username:e,code:t,signinMethod:`Verification code`,...n?{email:e}:{phone:e}})}createAccountWithCode(e,t,n){return this.credentialLogin({username:e,code:t,signinMethod:`Verification code`,email:e,create:!0,terms:n.terms,aup:n.aup})}async verifyFactor(e,t,n=!1){if(!e.request)throw Error(`this second factor names no sign-in to finish`);try{return await this.post({...VU(t),enableMfaRemember:n},e.request)}catch(e){throw e instanceof RU&&this.release(),e}}async finishFederation(e){let t=this.config.proxyBaseUrl??this.config.serverUrl,n=(await $U(await fetch(`${nU(t)}${tU.federationMfa}`,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},credentials:`include`,body:JSON.stringify(VU(e))}),`the sign-in could not be finished`)).data;if(typeof n!=`string`||!n)throw Error(`IAM did not say where the sign-in goes`);return n}confirmEmail(e,t){return this.post({passcode:t},e.request)}async changeEmail(e,t){try{await this.post({email:t},e.request)}catch(e){if(e instanceof BU)return e;throw e}throw Error(`IAM granted the sign-in without confirming the address`)}async resetPassword(e,t,n){await eW(await fetch(`${nU(this.config.serverUrl)}${tU.password}`,{method:`PUT`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify({organization:this.config.organization,username:e,code:t,password:n})}),`could not set the password`)}async acceptInvite(e,t,n){let r=await this.getValidAccessToken();if(!r)throw new RU(`please sign in first`,`login_required`);let i=await eW(await fetch(`${nU(this.config.serverUrl)}${tU.accept}`,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`,Authorization:`Bearer ${r}`},body:JSON.stringify({owner:e,code:t,...n?{emailCode:n}:{}})}),`could not join the organization`)??{};if(i.joined!==!0)throw Error(`IAM did not join the organization`);return typeof i.org==`string`&&i.org?i.org:e}async acceptTerms(e){let t=await this.getValidAccessToken();if(!t)throw Error(`No valid access token — user must log in`);let n=this.config.proxyBaseUrl??this.config.serverUrl;await eW(await fetch(`${nU(n)}${tU.terms}`,{method:`PUT`,headers:{"Content-Type":`application/json`,Accept:`application/json`,Authorization:`Bearer ${t}`},body:JSON.stringify({terms:e.terms,aup:e.aup})}),`could not record the acceptance`)}async addAddress(e,t){let n=await this.getValidAccessToken();if(!n)throw new RU(`please sign in first`,`login_required`);let r=this.config.proxyBaseUrl??this.config.serverUrl,i=await eW(await fetch(`${nU(r)}${tU.address}`,{method:`PUT`,headers:{"Content-Type":`application/json`,Accept:`application/json`,Authorization:`Bearer ${n}`},body:JSON.stringify({clientId:this.client,address:e,code:t})}),`could not add the address`)??{};return{email:typeof i.email==`string`?i.email:``,phone:typeof i.phone==`string`?i.phone:``}}async sendLoginCode(e){let t=e.includes(`@`),n=this.config.proxyBaseUrl??this.config.serverUrl;await eW(await fetch(`${nU(n)}${tU.sendCode}`,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`,Accept:`application/json`},body:new URLSearchParams({applicationId:`admin/${(await this.party(this.client)).application}`,dest:e,type:t?`email`:`phone`}).toString()}),`could not send code`)}async signup(e){let t=this.config.proxyBaseUrl??this.config.serverUrl,n=new URL(`${nU(t)}${tU.signup}`);return n.searchParams.set(`clientId`,this.config.clientId),await eW(await fetch(n.toString(),{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify({application:this.config.application??this.config.clientId,clientId:this.config.clientId,organization:this.config.organization,email:e.email,password:e.password,code:e.code,...e.name?{name:e.name}:{},...e.terms?{terms:e.terms.terms,aup:e.terms.aup}:{}})}),`sign-up failed`),this.loginWithPassword(e.email,e.password)}async methods(){let e=new URL(`${nU(this.config.serverUrl)}${tU.authMethods}`);e.searchParams.set(`clientId`,this.client);let t=await eW(await fetch(e.toString(),{headers:{Accept:`application/json`}}),`could not read the sign-in methods`)??{},n=Array.isArray(t.oauth)?t.oauth:[];return{password:t.password===!0,code:t.code===!0,signup:t.signup===!0,wallet:t.web3===!0&&(!Array.isArray(t.web3Chains)||t.web3Chains.includes(lU.chain)),address:t.address===!0,providers:n.filter(e=>typeof e.name==`string`&&typeof e.type==`string`).map(e=>({name:e.name,type:e.type}))}}async identify(e){let t=this.config.proxyBaseUrl??this.config.serverUrl,n=await eW(await fetch(`${nU(t)}${tU.authIdentifier}`,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify({clientId:this.client,identifier:e})}),`could not look up the address`)??{};return{account:n.account===!0,password:n.password===!0}}async handleCallback(e){let t=new URL(e??window.location.href),n=t.searchParams.get(`error`);if(n)throw this.isOwnAttempt(t.searchParams.get(`state`))?new RU(`OAuth error: ${t.searchParams.get(`error_description`)??n}`,n):new GU(`OAuth error on a sign-in this browser did not start. Restart sign-in.`,`foreign`);let r=t.searchParams.get(`code`);if(!r)throw new GU(`Missing authorization code in callback URL`,`empty`);let i=this.callbackInFlight;if(i&&i.code===r)return i.promise;let a=this.exchangeCode(t,r);return this.callbackInFlight={code:r,promise:a},a.catch(()=>{this.callbackInFlight?.promise===a&&(this.callbackInFlight=null)}),a}isOwnAttempt(e){if(!e)return!1;let t=AU(e);return this.txStorage.getItem(t)??this.storage.getItem(t)?!0:(this.txStorage.getItem(gU)??this.storage.getItem(gU))===e}async exchangeCode(e,t){let n=e.searchParams.get(`state`),r=n?AU(n):null,i=r?this.txStorage.getItem(r)??this.storage.getItem(r):null,a=i?NU(i).codeVerifier:null;if(a&&r)this.txStorage.removeItem(r),this.storage.removeItem(r),(this.txStorage.getItem(gU)===n||this.storage.getItem(gU)===n)&&(this.txStorage.removeItem(gU),this.txStorage.removeItem(_U),this.storage.removeItem(gU),this.storage.removeItem(_U));else{if(n&&this.spent().includes(n))throw new GU(`This sign-in already finished in this browser.`,`spent`);let e=this.txStorage.getItem(gU)??this.storage.getItem(gU);if(!e||n!==e)throw new GU(`OAuth state mismatch — stale, concurrent, or forged login. Restart sign-in.`,`foreign`);if(a=this.txStorage.getItem(_U)??this.storage.getItem(_U),!a)throw Error(`Missing PKCE code verifier — start sign-in via signinRedirect() or the embedded credential login.`);this.txStorage.removeItem(gU),this.txStorage.removeItem(_U),this.storage.removeItem(gU),this.storage.removeItem(_U)}let o=new URLSearchParams({grant_type:`authorization_code`,client_id:this.config.clientId,code:t,redirect_uri:this.config.redirectUri,code_verifier:a}),s=await this.tokenEndpoint(),c=await fetch(s,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:o.toString()});if(!c.ok){let e=await c.text().catch(()=>``);throw Error(`Token exchange failed (${c.status}): ${e}`)}let l=await c.json();return this.storeTokens(l),n&&this.spend(n),nW(l)}spent(){try{let e=JSON.parse(this.txStorage.getItem(CU)??`[]`);return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}catch{return[]}}spend(e){let t=this.spent().filter(t=>t!==e);t.push(e),this.txStorage.setItem(CU,JSON.stringify(t.slice(-12)))}refreshAccessToken(){return this.refreshing??=ZU(this.storage,()=>this.refreshHeld()).finally(()=>{this.refreshing=null}),this.refreshing}async refreshHeld(){let e=this.stored(),t=e.access!==this.held.access||e.refresh!==this.held.refresh;if(e.access&&t&&!this.isTokenExpired()){this.held=e;let t=this.getExpiresAt();return{accessToken:e.access,refreshToken:e.refresh??void 0,idToken:this.getIdToken()??void 0,expiresIn:t===null?void 0:Math.max(0,Math.floor((t-Date.now())/1e3)),tokenType:`Bearer`}}if(!e.refresh)throw this.clearTokens(),new WU(`no refresh token is stored`);let n=await fetch(await this.tokenEndpoint(),{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:new URLSearchParams({grant_type:`refresh_token`,client_id:this.config.clientId,refresh_token:e.refresh}).toString()});if(!n.ok){let t=await n.text().catch(()=>``),{error:r,description:i}=QU(t);throw r===`invalid_grant`?(this.storage.getItem(yU)===e.refresh&&this.clearTokens(),new WU(i||r)):Error(`Token refresh failed (${n.status}): ${t}`)}let r=await n.json();return this.storeTokens(r),nW(r)}stored(){return{access:this.storage.getItem(vU),refresh:this.storage.getItem(yU)}}async signinPopup(e){let{url:t,state:n}=await this.buildAuthorizeUrl({additionalParams:e?.additionalParams}),r=e?.width??600,i=e?.height??700,a=window.screenX+(window.outerWidth-r)/2,o=window.screenY+(window.outerHeight-i)/2,s=new URL(this.config.redirectUri,window.location.href).origin;return new Promise((c,l)=>{let u=window.open(t.toString(),PU,`width=${r},height=${i},left=${a},top=${o},menubar=no,toolbar=no`);if(!u){l(Error(`Failed to open login popup — blocked by browser?`));return}let d=!1,f=null,p=()=>{if(!d){d=!0,window.removeEventListener(`message`,m),clearInterval(h),clearTimeout(g),f&&clearTimeout(f);try{u.closed||u.close()}catch{}}},m=e=>{if(d||e.origin!==s)return;let t=e.data;if(!t||typeof t!=`object`||t.source!==FU)return;if(typeof t.state!=`string`||t.state!==n){p(),l(Error(`OAuth state mismatch — possible CSRF (popup)`));return}if(t.error){p(),l(Error(`OAuth error: ${t.error}`));return}if(typeof t.code!=`string`||t.code.length===0){p(),l(Error(`Login popup returned no authorization code`));return}let r=t.code,i=t.state;p();let a=this.config.redirectUri.includes(`?`)?`&`:`?`,o=`${this.config.redirectUri}${a}code=${encodeURIComponent(r)}&state=${encodeURIComponent(i)}`;this.handleCallback(o).then(c,l)};window.addEventListener(`message`,m);let h=setInterval(()=>{d||!u.closed||f||(f=setTimeout(()=>{d||(p(),l(Error(`Login popup was closed before completing`)))},1e3))},300),g=setTimeout(()=>{d||(p(),l(Error(`Login popup timed out`)))},e?.timeoutMs??3e5)})}async loginWithWallet(e){let t=e?.provider??globalThis.ethereum;if(!t||typeof t.request!=`function`)throw Error(`No EIP-1193 wallet provider found (window.ethereum).`);let n=await t.request({method:`eth_requestAccounts`}),r=Array.isArray(n)?n[0]:void 0;if(typeof r!=`string`||!r)throw Error(`Wallet did not return an address`);let i=await uU(r),a=pU(await t.request({method:`eth_chainId`}).catch(()=>void 0)),o=await this.own(),s=nU(this.config.serverUrl),c=new URL(`${s}${tU.web3Nonce}`);c.searchParams.set(`chain`,lU.chain),c.searchParams.set(`address`,i),c.searchParams.set(`clientId`,o.clientId);let l=await eW(await fetch(c.toString(),{headers:{Accept:`application/json`},credentials:`include`}),`could not start the wallet sign-in`);if(!l||typeof l.nonce!=`string`||typeof l.domain!=`string`)throw Error(`IAM did not return a sign-in challenge`);let u=dU(l,i,a),d=await t.request({method:`personal_sign`,params:[fU(u),i]});if(typeof d!=`string`||!d)throw Error(`Wallet did not return a signature`);return this.post({...lU,address:i,message:u,signature:d,clientId:o.clientId,redirectUri:o.redirectUri,scope:o.scope??`openid profile email`,state:o.state,nonce:o.nonce,codeChallenge:o.codeChallenge,codeChallengeMethod:o.codeChallengeMethod},o,`${s}${tU.web3Verify}`)}storeTokens(e){if(this.storage.setItem(vU,e.access_token),e.refresh_token&&this.storage.setItem(yU,e.refresh_token),e.id_token&&this.storage.setItem(bU,e.id_token),e.expires_in){let t=Date.now()+e.expires_in*1e3;this.storage.setItem(xU,String(t))}else{let t=aU(e.access_token).exp;typeof t==`number`&&Number.isFinite(t)&&this.storage.setItem(xU,String(t*1e3))}this.held=this.stored()}getAccessToken(){return this.storage.getItem(vU)}getRefreshToken(){return this.storage.getItem(yU)}getIdToken(){return this.storage.getItem(bU)}getExpiresAt(){let e=this.storage.getItem(xU);if(!e)return null;let t=Number(e);return Number.isFinite(t)?t:null}isTokenExpired(){let e=this.storage.getItem(xU);return e?Date.now()>=Number(e):!1}async getValidAccessToken(){let e=this.getAccessToken();if(e&&!this.isTokenExpired())return e;if(this.getRefreshToken())try{return(await this.refreshAccessToken()).accessToken}catch{return null}return null}clearTokens(){this.storage.removeItem(vU),this.storage.removeItem(yU),this.storage.removeItem(bU),this.storage.removeItem(xU),this.held={access:null,refresh:null}}async logout(){let e=this.storage.getItem(vU),t=this.storage.getItem(yU),n=this.storage.getItem(bU);this.clearTokens();let r=await Promise.race([(async()=>(await this.revoke(t,`refresh_token`,e),await this.revoke(e,`access_token`,e),this.endSessionEndpoint()))(),new Promise(e=>setTimeout(()=>e(rU(this.config.serverUrl,`logout`)),mU))]),i=new URL(r);n&&i.searchParams.set(`id_token_hint`,n),i.searchParams.set(`client_id`,this.config.clientId),this.config.postLogoutRedirectUri&&i.searchParams.set(`post_logout_redirect_uri`,this.config.postLogoutRedirectUri),window.location.href=i.toString()}async end(){let e=this.storage.getItem(vU),t=this.storage.getItem(yU),n=this.storage.getItem(bU);this.clearTokens();let r=this.config.proxyBaseUrl??this.config.serverUrl,i=new URLSearchParams({client_id:this.config.clientId});n&&i.set(`id_token_hint`,n),await Promise.race([(async()=>{await this.revoke(t,`refresh_token`,e,rU(r,`revoke`)),await this.revoke(e,`access_token`,e,rU(r,`revoke`)),await fetch(rU(r,`logout`),{method:`POST`,credentials:`include`,redirect:`manual`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:i.toString()}).catch(()=>void 0)})(),new Promise(e=>setTimeout(e,mU))])}async revoke(e,t,n,r){if(e)try{await fetch(r??await this.revocationEndpoint(),{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/x-www-form-urlencoded`,...n?{Authorization:`Bearer ${n}`}:{}},body:new URLSearchParams({token:e,token_type_hint:t,client_id:this.config.clientId}).toString()})}catch{}}async getUserInfo(){let e=await this.getValidAccessToken();if(!e)throw Error(`No valid access token — user must log in`);let t=await this.userinfoEndpoint(),n=await fetch(t,{headers:{Authorization:`Bearer ${e}`}});if(!n.ok)throw Error(`Userinfo fetch failed (${n.status})`);return await n.json()}async getUser(){if(!await this.getValidAccessToken())return null;let e=await this.getUserInfo();return{sub:e.sub??``,email:e.email,name:e.name,givenName:e.given_name,familyName:e.family_name,phoneNumber:e.phone_number,emailVerified:e.email_verified,picture:e.picture,owner:e.owner}}};function nW(e){return{accessToken:e.access_token,refreshToken:e.refresh_token,idToken:e.id_token,expiresIn:e.expires_in,tokenType:e.token_type,scope:e.scope}}var rW=2147483647,iW=3e4,aW=(0,V.createContext)(null);aW.displayName=`IamContext`;var oW=`hanzo_iam_current_org`,sW=`hanzo_iam_current_project`;function cW(e){let{config:t,autoInit:n=!0,onAuthChange:r,children:i}=e,a=(0,V.useMemo)(()=>new tW(t),[t.serverUrl,t.clientId,t.redirectUri]),[o,s]=(0,V.useState)(null),[c,l]=(0,V.useState)(!1),[u,d]=(0,V.useState)(n),[f,p]=(0,V.useState)(a.getAccessToken()),[m,h]=(0,V.useState)(null),g=(0,V.useRef)(null),_=(0,V.useCallback)(()=>{if(g.current&&clearTimeout(g.current),a.isTokenExpired())return;let e=a.getExpiresAt();if(e===null)return;let t=async()=>{try{let e=await a.refreshAccessToken();p(e.accessToken),_()}catch(e){if(e instanceof WU){l(!1),s(null),p(null);return}g.current=setTimeout(t,iW)}},n=e-Date.now()-6e4;if(n>rW){g.current=setTimeout(_,rW);return}if(n<=0){t();return}g.current=setTimeout(t,n)},[a]);(0,V.useEffect)(()=>{if(!n){d(!1);return}let e=!1;return(async()=>{try{let t=await a.getValidAccessToken();if(e)return;if(t){p(t),l(!0);try{let t=await a.getUserInfo();e||s(t)}catch{}_(),r?.(!0)}else r?.(!1)}catch(t){e||(h(t instanceof Error?t:Error(String(t))),r?.(!1))}finally{e||d(!1)}})(),()=>{e=!0}},[a,n]),(0,V.useEffect)(()=>()=>{g.current&&clearTimeout(g.current)},[]);let v=(0,V.useCallback)(async e=>{p(e.accessToken),l(!0);try{let e=await a.getUserInfo();s(e)}catch{}_(),r?.(!0)},[a,_,r]),y=(0,V.useCallback)(async e=>{h(null),await a.signinRedirect(e)},[a]),b=(0,V.useCallback)(async e=>{h(null);try{let t=await a.signinPopup(e);await v(t)}catch(e){let t=e instanceof Error?e:Error(String(e));throw h(t),t}},[a,v]),x=(0,V.useCallback)(async e=>{h(null);try{let t=await a.handleCallback(e);return await v(t),t}catch(e){let t=e instanceof Error?e:Error(String(e));throw h(t),t}},[a,v]),S=(0,V.useCallback)(async()=>{g.current&&clearTimeout(g.current);try{localStorage.removeItem(oW),localStorage.removeItem(sW)}catch{}try{await a.logout()}catch{a.clearTokens(),s(null),l(!1),p(null),h(null),r?.(!1)}},[a,r]),C=(0,V.useMemo)(()=>({sdk:a,config:t,user:o,isAuthenticated:c,isLoading:u,accessToken:f,login:y,loginPopup:b,handleCallback:x,logout:S,error:m}),[a,t,o,c,u,f,y,b,x,S,m]);return(0,V.createElement)(aW.Provider,{value:C},i)}function lW(){let e=(0,V.useContext)(aW);if(!e)throw Error(`useIam() must be used within an <IamProvider>`);return e}function uW(){let{isAuthenticated:e,accessToken:t}=lW(),[n,r]=(0,V.useState)([]),[i,a]=(0,V.useState)({}),[o,s]=(0,V.useState)(()=>{try{return localStorage.getItem(oW)}catch{return null}}),[c,l]=(0,V.useState)(()=>{try{return localStorage.getItem(sW)}catch{return null}});(0,V.useEffect)(()=>{if(!e||!t){r([]),a({});return}let{organizations:n,roles:i}=oU(t);r(n.map(e=>({name:e,displayName:e}))),a(i);let c=n[0];if(c&&(!o||!n.includes(o))){s(c);try{localStorage.setItem(oW,c)}catch{}}},[e,t]);let u=[],d=(0,V.useMemo)(()=>n.find(e=>e.name===o)??null,[n,o]),f=(0,V.useCallback)(e=>{s(e),l(null);try{localStorage.setItem(oW,e),localStorage.removeItem(sW)}catch{}},[]),p=(0,V.useCallback)(e=>{l(e);try{e?localStorage.setItem(sW,e):localStorage.removeItem(sW)}catch{}},[]);return{organizations:n,roles:i,currentRole:o?i[o]??null:null,currentOrg:d,currentOrgId:o,switchOrg:f,projects:u,currentProject:null,currentProjectId:c,switchProject:p,isLoading:!1}}function dW(){let{sdk:e,accessToken:t,isAuthenticated:n}=lW(),r=(0,V.useCallback)(async()=>{try{return await e.getValidAccessToken()}catch{return null}},[e]);return{token:t,isValid:n&&!!t&&!e.isTokenExpired(),refresh:r}}function fW(){return pW((0,V.useContext)(aW))}function pW(e){let t=e?.user??null,n=e?.accessToken??null,r=e?.isAuthenticated??!1;return(0,V.useMemo)(()=>r?cU(t,aU(n)):null,[t,n,r])}var mW={site:``,home:`/home`,signUp:`/signup`};function hW(e){mW={...mW,...e}}var gW=()=>mW,_W=()=>mW.brand??`Hanzo`,vW=e=>`${mW.site}${e}`,yW=`admin`;function bW(e){if(!e||e.type===`application`)return!1;let t=e.orgs;return!Array.isArray(t)||t.length===0?!1:t[0]?.org===yW}var xW=[`/board`,`/bots`,`/cal`,`/chat`,`/chat/shared`,`/contacts`,`/dev`,`/drive`,`/home`,`/inbox`,`/meet`,`/settings`,`/settings/organization`,`/settings/organization/billing`,`/settings/organization/members`,`/settings/organization/usage`,`/work`],SW=[`general`,`account`,`privacy`,`billing`,`usage`,`capabilities`,`memory`,`code`,`environments`,`machines`,`keys`,`members`,`integrations`,`notifications`],CW=[`agents`,`bots`,`skills`,`connectors`,`plugins`],wW=[`image`,`video`,`audio`,`document`,`slides`,`type`,`model`,`code`,`file`,`sites`,`new`],TW=/^sess_[0-9a-f]{32}$/,EW=/^[a-z0-9]([a-z0-9-]{0,38}[a-z0-9])?$/,DW=/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/,OW=/^(flow_[0-9a-f]{32}|new)$/,kW=[`artifacts`,`templates`,`projects`,`issues`,`automations`,`sync`,`mcp`,`plans`];function AW(e){let t=e.replace(/^\/+|\/+$/g,``);if(TW.test(t))return{kind:`run`,id:t};if(t===`-/settings`||t.startsWith(`-/settings/`)){let e=t.slice(11)||`general`;return SW.includes(e)?{kind:`settings`,section:e}:{kind:`new`}}if(t.startsWith(`-/customize/agents/`)){let e=t.slice(19);return DW.test(e)?{kind:`agent`,name:e}:{kind:`new`}}if(t===`-/customize`||t.startsWith(`-/customize/`)){let e=t.slice(12)||`agents`;return CW.includes(e)?{kind:`customize`,tab:e}:{kind:`new`}}if(t.startsWith(`-/automations/`)){let e=t.slice(14);return OW.test(e)?{kind:`automation`,id:e}:{kind:`new`}}if(t.startsWith(`-/artifacts/`)){let e=t.slice(12);return wW.includes(e)?{kind:`screen`,screen:`artifacts`,of:e}:{kind:`new`}}if(t.startsWith(`-/`)){let e=t.slice(2);return kW.includes(e)?{kind:`screen`,screen:e}:{kind:`new`}}if(EW.test(t))return{kind:`project`,slug:t};let[n,r,...i]=t.split(`/`);return!i.length&&n&&r&&DW.test(n)&&DW.test(r)?{kind:`repo`,org:n,name:r}:{kind:`new`}}[...kW.map(e=>({kind:`screen`,screen:e})),...SW.map(e=>({kind:`settings`,section:e})),...CW.map(e=>({kind:`customize`,tab:e}))];var jW=new Map([[`-/settings/machines`,`machines`],[`-/settings/environments`,`environments`]]);new Map([...jW].map(([e,t])=>[t,e]));function MW(e){if(e.kind===`run`)return`/run/${e.id}`;if(e.kind===`repo`)return`/projects/${e.org}/${e.name}`;if(e.kind===`project`)return`/projects/${e.slug}`;let t=NW(e);return t&&`/${jW.get(t)??t.slice(2)}`}function NW(e){switch(e.kind){case`new`:return``;case`run`:return e.id;case`screen`:return e.of?`-/${e.screen}/${e.of}`:`-/${e.screen}`;case`settings`:return e.section===`general`?`-/settings`:`-/settings/${e.section}`;case`customize`:return e.tab===`agents`?`-/customize`:`-/customize/${e.tab}`;case`agent`:return`-/customize/agents/${e.name}`;case`project`:return e.slug;case`repo`:return`${e.org}/${e.name}`;case`automation`:return`-/automations/${e.id}`}}var PW=`hanzo.optin`,FW=D(`Sign in to choose experimental features.`);async function IW(e,t,n){let r;try{r=await fetch(`${uG()}${e}`,{...t,headers:{...t?.body?{"Content-Type":`application/json`}:{},...TG()}})}catch{throw Error(n.offline)}if(r.status===401)throw Error(FW);if(r.status===403&&n.refused)throw Error(n.refused);if(!r.ok)throw Error(n.failed);return r.json()}var LW=()=>{typeof window<`u`&&window.dispatchEvent(new Event(PW))};function RW(e){let t=e??{};return{on:t.on===!0,blocked:t.blocked===!0,public:Array.isArray(t.public)?t.public.filter(e=>typeof e==`string`):[]}}async function zW(){return RW(await IW(`/v1/flag/optin`,void 0,{offline:D(`Your experimental features setting could not be read. Check your connection and try again.`),failed:D(`Your experimental features setting could not be read. Try again in a moment.`)}))}async function BW(e){let t=RW(await IW(`/v1/flag/optin`,{method:`PUT`,body:JSON.stringify({on:e})},{offline:D(`Your choice was not saved. Check your connection and try again.`),failed:D(`Your choice was not saved. Try again in a moment.`),refused:D(`Your team or organization has turned experimental features off.`)}));return LW(),t}var VW=`https://hanzo.team`;`${VW}`,`${VW}`;var HW=`/dev`,UW=`/library`,WW=`/settings`,GW=`${WW}/organization`,KW={general:WW,organization:GW,members:`${GW}/members`,billing:`${GW}/billing`,usage:`${GW}/usage`,keys:`${GW}/keys`},qW=e=>Object.hasOwn(KW,e),JW=e=>e&&qW(e)?KW[e]:WW;function YW(e){let t=AW(e),n=MW(t);return n===`/artifacts`||n.startsWith(`/artifacts/`)?`${UW}${n.slice(10)}`:t.kind===`settings`&&(n===`/settings`||n.startsWith(`/settings/`))?JW(t.section):HW+n}var XW=/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}\/[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/,ZW=e=>vW(YW(e&&(TW.test(e)||XW.test(e)||EW.test(e))?e:``)),QW=new Set([`/chat`,`/chat/shared`,`/dev`]);xW.filter(e=>!QW.has(e)&&e!==`/settings`&&!e.startsWith(`/settings/`));var $W=[`hanzo.app`],eG=e=>$W.includes(e),tG=e=>e===`hanzo.team`||e===`www.hanzo.team`,nG=`https://hanzo.ai`,rG=e=>e===`hanzo.ai`||e===`www.hanzo.ai`,iG=`https://hanzo.app`;`${iG}`,`${iG}`;var aG=e=>e.endsWith(`.hanzo.app`)||e===`hanzo.chat`,oG=`-dev.hanzo.ai`;function sG(e){let t=e.endsWith(`.`)?e.slice(0,-1):e;if(!t.endsWith(oG))return!1;let n=t.slice(0,-9);return n.length>4&&!n.includes(`.`)}[...$W],[...$W];var cG=`https://api-dev.hanzo.ai`,lG=()=>typeof window<`u`&&sG(window.location.hostname);function uG(){if(lG())return cG;let e=gW().api;if(e)return e.replace(/\/+$/,``);if(typeof window<`u`){let e=window.location.hostname;return eG(e)||e===`hanzo.ai`||e.endsWith(`.hanzo.ai`)||tG(e)||e===`hanzo.bot`||aG(e)?`https://api.hanzo.ai`:window.location.origin}return`https://api.hanzo.ai`}var dG=`hanzo_iam_`,fG=`${dG}access_token`;`${dG}`;var pG=`${dG}expires_at`;`${dG}`;function mG(){return gW().session??window.localStorage}function hG(){if(typeof window>`u`)return null;try{return mG().getItem(fG)}catch{return null}}`${fG}${pG}`;function gG(){if(typeof window>`u`)return!1;try{return!!(hG()||vG()||window.localStorage.getItem(`hanzo_access_token`)||window.localStorage.getItem(_G)||window.sessionStorage?.getItem(fG))}catch{return!1}}var _G=`hanzo:who`;`${dG}`,`${dG}`;function vG(){let e=hG();if(e)try{let t=e.split(`.`)[1],n=JSON.parse(atob(t.replace(/-/g,`+`).replace(/_/g,`/`)));return typeof n.sub==`string`&&n.sub?n.sub:void 0}catch{return}}function yG(e){if(!e)return null;try{let t=e.split(`.`)[1];return JSON.parse(atob(t.replace(/-/g,`+`).replace(/_/g,`/`)))}catch{return null}}var bG=[`hanzo-id`,`lux-id`,`zoo-id`,`pars-id`],xG=[`hanzo`,`lux`,`zoo`,`pars`,`platform`,`hanzoai`,`luxfi`,`zooai`,`hanzo-inc`,`hanzo-apps`,`hanzo-community`];function SG(e){let t=yG(e),n=bW(t),r=t?.orgs,i=[];for(let e of Array.isArray(r)?r:[]){let t=e,r=t?.org;if(typeof r!=`string`||!r||i.includes(r)||bG.includes(r))continue;let a=typeof t?.role==`string`&&[`owner`,`admin`].includes(t.role.trim().toLowerCase());(r===`admin`?n:!xG.includes(r)||n||a)&&i.push(r)}return i}function CG(){return SG(hG())}function wG(){try{let e=CG(),t=window.localStorage.getItem(`${dG}current_org`);return t&&e.includes(t)?t:e.length===1?e[0]:null}catch{return null}}function TG(){let e={},t=hG();t&&(e.Authorization=`Bearer ${t}`);let n=wG();return n&&(e[`X-Org-Id`]=n),e}var EG=`hanzo:org`;function DG(e){OG(e),window.dispatchEvent(new Event(EG))}function OG(e){try{window.localStorage.setItem(`${dG}current_org`,e)}catch{}}var kG=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function AG(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:kG(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var jG=e=>{let t=``,n=!1;for(let r of e){if(r===`-`||r===`_`||r<=` `){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t},MG=e=>{let t=jG(e);return t.charAt(0).toUpperCase()+t.slice(1)},NG=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),PG={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function FG(e){return e!=null}function IG(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??PG.width,a=e.size??e.height??PG.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?NG(...c):NG(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??PG[`stroke-width`])*Number(e.size??e.width??PG.width)/Number(t.size??t.width??PG.width):t.strokeWidth??PG[`stroke-width`];return[`svg`,{...Object.entries(PG).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&FG(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&FG(t.width)&&{[r(`width`)]:t.width},...`height`in t&&FG(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function LG(e,t={}){return IG(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var RG=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},zG=(0,V.createContext)({}),BG=()=>(0,V.useContext)(zG),VG=(0,V.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:h=!1,nonScalingStroke:g=!1,color:_=`currentColor`,className:v=``}=BG()??{},y=!!c||RG(d),[b,x,S=[]]=LG(u,{color:e??_,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??h,nonScalingStroke:o??g,className:NG(v,s),hasA11yProp:y,attributes:d});return(0,V.createElement)(b,{ref:f,...x},[...S.map(([e,t])=>(0,V.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function HG(e,t=[],n=[]){let r=typeof e==`string`?AG(e,t,n):e,i=(0,V.forwardRef)(({className:e,...t},n)=>(0,V.createElement)(VG,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=MG(r.name)),i}var UG={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};UG.node;var WG=HG(UG),GG={name:`arrow-up-right`,size:24,node:[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]};GG.node;var KG=HG(GG),qG={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};qG.node;var JG=HG(qG),YG={name:`compass`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`,key:`9ktpf1`}]]};YG.node;var XG=HG(YG),ZG={name:`download`,size:24,node:[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]};ZG.node;var QG=HG(ZG),$G={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};$G.node;var eK=HG($G),tK={name:`lock`,size:24,node:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]};tK.node;var nK=HG(tK),rK={name:`palette`,size:24,node:[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]};rK.node;var iK=HG(rK),aK={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};aK.node;var oK=HG(aK),sK={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};sK.node;var cK=HG(sK),lK={name:`smartphone`,size:24,node:[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]};lK.node;var uK=HG(lK),dK={name:`sparkles`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`stars`]};dK.node;var fK=HG(dK),pK={name:`type`,size:24,node:[[`path`,{d:`M12 4v16`,key:`1654pz`}],[`path`,{d:`M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2`,key:`e0r10z`}],[`path`,{d:`M9 20h6`,key:`s66wpe`}]]};pK.node;var mK=HG(pK),hK={name:`upload`,size:24,node:[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]};hK.node;var gK=HG(hK),_K={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};_K.node;var vK=HG(_K),yK=null,bK=null,xK=()=>bK??=Le(()=>import(`./ModelPickerMenu-YflOqlVY.js`).then(e=>yK=e.ModelPickerMenu),__vite__mapDeps([0,1,2,3,4])),SK=32,CK=44;function wK({models:e,value:t,onChange:n,scope:r,limits:i,loading:o=!1,error:s=null,disabled:c=!1,quiet:l=!1,size:u=`md`,placeholder:d,name:f,describe:p,granted:m,onUpgrade:h,funded:g,balance:_,onTopUp:v,open:b,onOpenChange:x}){let{t:S}=R(),C=f??S(`Model`),[w,T]=(0,V.useState)(!1),E=b??w,D=(0,V.useCallback)(e=>{b===void 0&&T(e),x?.(e)},[b,x]),O=!te().sm,k=O?CK:SK,[A,j]=(0,V.useState)(0),ee=(0,V.useRef)(null),M=t?e.find(e=>e.id===t):void 0,N=M?Zt(M):t||(d??S(`Choose a model`)),P=(0,V.useCallback)(()=>{D(!1),queueMicrotask(()=>ee.current?.focus?.())},[D]),[F,I]=(0,V.useState)(()=>yK),ne=(0,V.useCallback)(()=>{F||xK().then(e=>I(()=>e))},[F]);(0,V.useEffect)(()=>{E&&ne()},[E,ne]);let re=(0,V.useRef)(!1);(0,V.useEffect)(()=>{F&&re.current&&ee.current?.focus?.()},[F]);let ie=u===`sm`,L=(0,H.jsxs)(y,{ref:ee,...B(`model-picker`),role:`button`,tabIndex:c?-1:0,"aria-label":p??S(`{name}: {model}`,{name:C,model:N}),"aria-haspopup":`listbox`,"aria-expanded":E,"aria-disabled":c||void 0,height:l||ie?28:36,px:l?5:ie?`$2`:`$3`,gap:`$2`,items:`center`,maxW:`100%`,rounded:l?8:`$3`,...l?{"$max-sm":{height:36},transition:`quickest`}:null,borderWidth:+!l,borderColor:`$borderColor`,bg:l?`transparent`:`$background`,cursor:c?`default`:`pointer`,opacity:c?.5:1,hoverStyle:c?void 0:l?{bg:`$hover`}:{borderColor:`$rim`},pressStyle:c?void 0:{bg:`$hover`},focusVisibleStyle:at,onLayout:e=>j(e.nativeEvent?.layout?.width??0),onPress:c||F&&!O?void 0:()=>D(!0),onMouseEnter:c?void 0:ne,onFocus:c?void 0:()=>{re.current=!0,ne()},onBlur:e=>{e.relatedTarget&&(re.current=!1)},onKeyDown:e=>{c||(e.key===`Enter`||e.key===` `||e.key===`ArrowDown`||e.key===`ArrowUp`)&&(e.preventDefault?.(),D(!0))},children:[(0,H.jsx)(a,{size:l?`$3`:ie?`$1`:`$2`,color:`$ink`,fontWeight:l?`500`:void 0,numberOfLines:1,shrink:1,minW:0,children:N}),M&&!l?(0,H.jsx)(a,{size:ie?`$1`:`$2`,color:`$soft`,numberOfLines:1,shrink:2,minW:0,children:sn(M)}):null,l?null:(0,H.jsx)(Dp,{size:ie?12:14,color:`$soft`,shrink:0,"aria-hidden":!0})]});return F?(0,H.jsx)(F,{trigger:L,open:E,onOpen:()=>D(!0),onClose:P,disabled:c,width:A,focusTrigger:()=>ee.current?.focus?.(),models:e,value:t,onChange:n,scope:r,limits:i,loading:o,error:s,name:C,sheet:O,row:k,granted:m,onUpgrade:h,funded:g,balance:_,onTopUp:v}):L}var TK=[{id:`auto`,label:D(`Auto`),note:D(`Adaptive reasoning based on task complexity`)},{id:`instant`,label:D(`Instant`),note:D(`Answers right away, without thinking`)},{id:`low`,label:D(`Low`),note:D(`A quick pass with minimal thinking`)},{id:`medium`,label:D(`Medium`),note:D(`Thinks before answering`)},{id:`high`,label:D(`High`),note:D(`Deep reasoning for complex problems`)},{id:`max`,label:D(`Max`),note:D(`Maximum compute and exhaustive verification`)}],EK={px:`$2`,py:`$1.5`,rounded:`$3`};function DK({label:e,children:t,...n}){return(0,H.jsxs)(z,{...B(`sidebar-section`),mt:`$3`,gap:`$0.5`,...n,children:[e?(0,H.jsx)(a,{size:`$1`,px:`$2`,py:`$1`,color:`$soft`,fontWeight:`500`,children:e}):null,t]})}function OK({children:e,active:t=!1,onPress:n,icon:r,...i}){return(0,H.jsxs)(y,{...B(`sidebar-item`),...EK,items:`center`,gap:`$2`,cursor:`pointer`,onPress:n,role:`button`,tabIndex:0,"aria-current":t?`page`:void 0,bg:t?`$edge`:void 0,hoverStyle:{bg:t?`$edge`:`$hover`},pressStyle:{bg:`$raised`},...i,children:[r?(0,H.jsx)(z,{opacity:.7,children:r}):null,(0,H.jsx)(a,{size:`$2`,numberOfLines:1,flex:1,color:t?`$color`:`$quiet`,children:e})]})}var kK=(e,t)=>e.product?e.label:t(e.label),AK=[{label:D(`Settings`),rows:[{id:`general`,label:D(`General`)},{id:`account`,label:D(`Account`)},{id:`billing`,label:D(`Billing`)},{id:`referrals`,label:D(`Referrals & Rewards`)},{id:`usage`,label:D(`Usage`)},{id:`capabilities`,label:D(`Capabilities`),note:D(`What a model may reach for on your behalf.`)},{id:`privacy`,label:D(`Privacy`),href:vW(`/legal/privacy`)},{id:`dev`,label:`Hanzo Dev`,product:!0,href:ZW()},{id:`browser`,label:`Hanzo Browser`,product:!0,href:vW(`/extension`)}]},{label:D(`Preferences`),rows:[{id:`model`,label:D(`Default model`)},{id:`agent`,label:D(`Personal agent`),note:D(`The agent that answers as you — its capabilities, its modes, and what it is allowed to do on your behalf. Nothing is bound to this surface yet, so there is nothing here to change; it is listed because this is where it will live.`)}]},{label:D(`Customize`),rows:[{id:`apps`,label:D(`Apps`)},{id:`channels`,label:D(`Channels`)},{id:`plugins`,label:D(`Plugins`),href:vW(YW(`-/customize/plugins`))},{id:`skills`,label:D(`Skills`),href:vW(YW(`-/customize`))},{id:`memory`,label:D(`Memory`),note:D(`Nothing is remembered between conversations yet.`)}]},{label:D(`Platform`),rows:[{id:`models`,label:D(`Models`)},{id:`base`,label:`Base`,product:!0,href:vW(`/base`)},{id:`functions`,label:`Functions`,product:!0,href:vW(`/functions`)},{id:`realtime`,label:`Realtime`,product:!0,href:vW(`/realtime`)},{id:`keys`,label:D(`API keys`),href:`https://platform.hanzo.ai/api-keys`}]},{label:D(`Help & Support`),rows:[{id:`docs`,label:D(`Documentation`),href:`https://docs.hanzo.ai`},{id:`support`,label:D(`Help center`),href:vW(`/support`)},{id:`contact`,label:D(`Contact us`),href:vW(`/contact`)},{id:`status`,label:D(`Status`),href:`https://status.hanzo.ai`},{id:`releases`,label:D(`Release notes`),href:`https://github.com/hanzoai/cli/releases`}]}],jK=AK.flatMap(e=>e.rows),MK=jK[0].id;function NK({active:e,filter:t,onPick:n,onBack:r}){let{t:i}=R(),a=t.trim().toLowerCase(),o=a?AK.map(e=>({...e,rows:e.rows.filter(e=>[kK(e,i),e.label].some(e=>e.toLowerCase().includes(a)))})).filter(e=>e.rows.length>0):AK;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(OK,{icon:(0,H.jsx)(WG,{size:15,"aria-hidden":!0,"data-i18n-mirror":!0}),onPress:r,children:i(`Workspace`)}),a&&o.length===0?(0,H.jsx)(U,{px:`$3`,py:`$2`,fontSize:`$2`,color:`$quiet`,children:i(`No matches for “{query}”.`,{query:t.trim()})}):null,o.map(t=>(0,H.jsx)(DK,{label:i(t.label),children:t.rows.map(t=>(0,H.jsx)(OK,{icon:t.href?(0,H.jsx)(KG,{size:13,"aria-hidden":!0}):void 0,active:t.id===e,"aria-current":t.id===e?`true`:void 0,onPress:()=>n(t),children:kK(t,i)},t.id))},t.label))]})}var PK=((e,t)=>ce({},e,t)),FK=class extends Error{status;constructor(e,t){super(t),this.status=e,this.name=`Refusal`}},IK=class extends Error{source;values;constructor(e,t={}){super(ce({},e,t)),this.source=e,this.values=t}};function LK(e,t=PK){return e instanceof IK?t(e.source,e.values):t(e instanceof Error?e.message:String(e))}function RK(e,t){let n=new Headers(t),r=e.token();return r&&!n.has(`Authorization`)&&n.set(`Authorization`,`Bearer ${r}`),e.org&&!n.has(`X-Org-Id`)&&n.set(`X-Org-Id`,e.org),n}async function zK(e){try{let t=await e.json(),n=typeof t.error==`string`?t.error:t.error?.message;return t.detail||n||t.msg||t.message||t.title||``}catch{return``}}var BK=e=>encodeURIComponent(e);async function VK(e,t,n,r,i){let a=RK(e,r===void 0?void 0:{"Content-Type":`application/json`}),o=await fetch(`${e.api}${n}`,{method:t,headers:a,body:r===void 0?void 0:JSON.stringify(r),cache:`no-store`,signal:i?.signal});if(!o.ok){let e=await zK(o);throw new FK(o.status,e||`${t} ${n.split(`?`)[0]} answered ${o.status}`)}if(o.status===204)return;let s=await o.text();return s?JSON.parse(s):void 0}var HK=e=>typeof e==`string`?e:``,UK=e=>typeof e==`number`&&Number.isFinite(e)?e:0,WK=e=>e&&typeof e==`object`?e:{},GK=e=>Array.isArray(e)?e:[];function KK(e,t=`usd`){let n=e%100==0;try{return new Intl.NumberFormat(`en-US`,{style:`currency`,currency:(t||`usd`).toUpperCase(),minimumFractionDigits:n?0:2,maximumFractionDigits:2}).format(e/100)}catch{return`${(e/100).toFixed(n?0:2)} ${t.toUpperCase()}`}}function qK(e){let t=e.replace(/[$,\s]/g,``);if(!/^\d+(\.\d{1,2})?$/.test(t))return null;let n=Math.round(Number(t)*100);return n>0?n:null}function JK(e){let t=WK(e),n=WK(t.card),r=WK(t.billingAddress),i=UK(n.expMonth),a=UK(n.expYear);return{id:HK(t.id),type:HK(t.type)||`card`,brand:HK(n.brand),last4:HK(n.last4),expires:i&&a?`${String(i).padStart(2,`0`)}/${String(a%100).padStart(2,`0`)}`:``,default:t.isDefault===!0,name:HK(t.name),billingAddress:r&&(r.line1||r.city||r.country||r.name||r.postalCode||r.state)?{name:HK(r.name),line1:HK(r.line1),line2:HK(r.line2),city:HK(r.city),state:HK(r.state),postalCode:HK(r.postalCode),country:HK(r.country)}:void 0}}function YK(e){return e.last4?`${e.brand?e.brand.charAt(0).toUpperCase()+e.brand.slice(1):`Card`} •••• ${e.last4}`:e.name||e.type}async function XK(e){let t=await VK(e,`GET`,`/v1/billing/methods`);return(Array.isArray(t)?t:GK(WK(t).data)).map(JK).filter(e=>e.id)}function ZK(e){return e.find(e=>e.default)??e[0]??null}async function QK(e){let t=WK(await VK(e,`GET`,`/v1/billing/balance`));return UK(t.available??t.balance)}async function $K(e){return GK(WK(await VK(e,`GET`,`/v1/billing/credit-balance`)).balances).map(WK).filter(e=>(HK(e.currency)||`usd`).toLowerCase()===`usd`).reduce((e,t)=>e+UK(t.available),0)}async function eq(e){return GK(WK(await VK(e,`GET`,`/v1/billing/credits`)).grants).map(WK).map(e=>({id:HK(e.id),name:HK(e.name),amount:UK(e.amountCents),remaining:UK(e.remainingCents),currency:HK(e.currency)||`usd`,expires:HK(e.expiresAt),active:e.active===!0&&e.voided!==!0})).filter(e=>e.id)}async function tq(e){let t=WK(await VK(e,`GET`,`/v1/billing/tier`));return{plan:HK(t.plan),tier:HK(WK(t.tier).name),name:HK(t.planName)}}function nq(e){let t=WK(e);return{enabled:t.enabled===!0,threshold:UK(t.thresholdCents),amount:UK(t.amountCents),currency:HK(t.currency)||`usd`,last:HK(t.lastRechargedAt)}}async function rq(e){return nq(await VK(e,`GET`,`/v1/billing/recharge`))}async function iq(e,t){return nq(await VK(e,`PUT`,`/v1/billing/recharge`,{enabled:t.enabled,thresholdCents:t.threshold,amountCents:t.amount,currency:`usd`}))}async function aq(e,t,n){if(!Number.isInteger(t)||t<=0)throw Error(D(`Enter an amount to add`));if(!n)throw Error(D(`Add a card before buying more`));return UK(WK(await VK(e,`POST`,`/v1/billing/topup`,{amountCents:t,paymentMethodId:n})).balanceCents)}async function oq(e){let t=WK(WK(await VK(e,`GET`,`/v1/usage/summary?range=month`)).spend);return{known:t.available===!0,total:UK(t.mtdCents)||UK(t.totalCents),categories:GK(t.byCategory).map(WK).map(e=>({name:HK(e.category)||`Uncategorized`,cents:UK(e.cents)})).filter(e=>e.cents>0)}}var sq=e=>UK(e)>0?new Date(UK(e)*1e3).toISOString():``;async function cq(e){let t=WK(await VK(e,`GET`,`/v1/allowance`)),n=t.pool&&typeof t.pool==`object`?WK(t.pool):null;return{plan:HK(t.plan),limit:UK(t.limit),used:UK(t.used),spent:t.spent===!0,window:HK(t.window),resets:sq(t.resets),pooled:t.pooled===!0,pool:n&&HK(n.state)?{state:HK(n.state),resets:sq(n.resets)}:null}}function lq(e){let t=WK(e);return{id:HK(t.id),title:HK(t.title),threshold:UK(t.threshold),enforce:t.enforce===!0,project:HK(t.project),service:HK(t.service),spent:typeof t.periodSpentCents==`number`?t.periodSpentCents:null,resets:HK(t.resetsAt)}}async function uq(e){return GK(await VK(e,`GET`,`/v1/billing/alerts`)).map(lq).filter(e=>e.id)}function dq(e){return e.find(e=>!e.project&&!e.service&&e.threshold>0)??null}async function fq(e,t,n){if(!Number.isInteger(n)||n<=0)throw Error(D(`Enter a monthly limit`));let r=dq(t);return lq(r?await VK(e,`PATCH`,`/v1/billing/alerts/${BK(r.id)}`,{threshold:n}):await VK(e,`POST`,`/v1/billing/alerts`,{title:`Monthly limit`,threshold:n,currency:`usd`,project:``,service:``,enforce:!0,softPct:80,rateLimitRpm:0}))}async function pq(e,t){await VK(e,`DELETE`,`/v1/billing/alerts/${BK(t)}`)}var mq=TK.filter(e=>[`auto`,`high`,`max`].includes(e.id)),hq={model:Tn,effort:`auto`},gq=`hanzo.mind`,_q=`hanzo:mind`,vq=e=>e===`xhigh`?`max`:mq.some(t=>t.id===e)?e:hq.effort;function yq(){try{return typeof window>`u`?null:window.localStorage}catch{return null}}var bq,xq=hq,Sq=null;function Cq(){if(Sq)return Sq;let e=null;try{e=yq()?.getItem(gq)??null}catch{e=null}if(e===bq)return xq;bq=e;try{let t=JSON.parse(e??`null`);xq={model:typeof t?.model==`string`&&t.model.trim()?t.model:hq.model,effort:vq(t?.effort)}}catch{xq=hq}return xq}function wq(e){let t=Cq(),n={...t,...e,effort:e.effort===void 0?t.effort:vq(e.effort)};try{yq()?.setItem(gq,JSON.stringify(n)),Sq=null}catch{Sq=n}typeof window<`u`&&window.dispatchEvent(new Event(_q))}function Tq(e){return window.addEventListener(_q,e),window.addEventListener(`storage`,e),()=>{window.removeEventListener(_q,e),window.removeEventListener(`storage`,e)}}function Eq(){return[(0,V.useSyncExternalStore)(Tq,Cq,()=>hq),wq]}Mn([{id:Tn,name:`Enso Auto`,family:`enso`,class:`ours`}]);var Dq=`auto`,Oq=`hanzo.chat.preferences`,kq=`hanzo.agent.autonomy`,Aq=`hanzo:chat:preferences`,jq=4,Mq={allowThirdPartyModels:!1,effort:Dq,approvalMode:`auto`,showLanguage:!1,effortVersion:jq};function Nq(e){return mq.some(t=>t.id===e)?e:null}function Pq(e){return TK.some(t=>t.id===e)?e:Dq}function Fq(e,t){return e===`manual`||e===`auto`?e:t===`supervised`?`manual`:`auto`}function Iq(){if(typeof window>`u`)return Mq;try{let e=window.localStorage.getItem(Oq),t=window.localStorage.getItem(kq);if(!e)return{...Mq,approvalMode:Fq(void 0,t)};let n=JSON.parse(e),r=n.effortVersion===jq?Pq(n.effort):Dq;return{allowThirdPartyModels:n.thirdPartyChosen?!!n.allowThirdPartyModels:n.allowThirdPartyModels===!0,...n.thirdPartyChosen?{thirdPartyChosen:!0}:{},effort:r,approvalMode:Fq(n.approvalMode,t),showLanguage:!!n.showLanguage,effortVersion:jq}}catch{return Mq}}function Lq(e){let t={...Iq(),...e,effortVersion:jq};if(typeof window<`u`){try{window.localStorage.setItem(Oq,JSON.stringify(t)),e.approvalMode&&window.localStorage.setItem(kq,e.approvalMode===`manual`?`supervised`:`autonomous`)}catch{}window.dispatchEvent(new CustomEvent(Aq,{detail:t}))}return t}function Rq(){let[e,t]=(0,V.useState)(Iq);return(0,V.useEffect)(()=>{let e=e=>{let n=e.detail;t(n||Iq())};return window.addEventListener(Aq,e),window.addEventListener(`storage`,e),()=>{window.removeEventListener(Aq,e),window.removeEventListener(`storage`,e)}},[]),[e,Lq]}var zq={display:`inline-flex`,flexDirection:`row`,items:`center`,$touchable:{minH:44,minW:44}},Bq=`#181717`,Vq=V.forwardRef(function({title:e=`GitHub`,color:t=`currentColor`,size:n=24,...r},i){return t==="default"&&(t=Bq),(0,H.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:n,height:n,fill:t,viewBox:`0 0 24 24`,ref:i,...r,children:[(0,H.jsx)(`title`,{children:e}),(0,H.jsx)(`path`,{d:`M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12`})]})}),Hq=`#4285F4`,Uq=V.forwardRef(function({title:e=`Google`,color:t=`currentColor`,size:n=24,...r},i){return t==="default"&&(t=Hq),(0,H.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:n,height:n,fill:t,viewBox:`0 0 24 24`,ref:i,...r,children:[(0,H.jsx)(`title`,{children:e}),(0,H.jsx)(`path`,{d:`M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z`})]})}),Wq=`hanzo_iam_`,Gq=`${Wq}access_token`,Kq=`${Wq}refresh_token`;`${Wq}`;var qq=`${Wq}id_token`,Jq=e=>{if(typeof window>`u`)return null;try{return window.localStorage.getItem(e)}catch{return null}},Yq=e=>{if(typeof window>`u`)return null;try{return window.sessionStorage?.getItem(e)??null}catch{return null}},Xq=e=>{if(typeof document>`u`||!document.cookie)return null;try{let t=document.cookie.split(`; `).find(t=>t.startsWith(`${e}=`));if(t){let e=t.split(`=`)[1];return e?decodeURIComponent(e):null}return null}catch{return null}},Zq=()=>Jq(Gq)||Jq(`hanzo_access_token`)||Jq(`token`)||Jq(`auth_token`)||Yq(Gq)||Yq(`hanzo_access_token`)||Yq(`token`)||Xq(Gq)||Xq(`auth_token`)||Xq(`token`)||Xq(`hanzo_access_token`),Qq=()=>Jq(Kq),$q=()=>Jq(qq),eJ=`https://hanzo.ai`;function tJ(e,t,n=eJ){let r=new URL(e).searchParams,i=n.replace(/\/+$/,``);switch(t.kind){case`provider`:return r.set(`provider`,t.provider),`${i}/v1/iam/oauth/authorize?${r}`;case`email`:return r.set(`login_hint`,t.email),`${i}/login?${r}`;case`another`:return r.set(`prompt`,`select_account`),`${i}/login?${r}`;case`signup`:return`${i}/signup?${r}`;case`login`:return`${i}/login?${r}`}}function nJ(e){let t=e.trim();return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)?t:null}var rJ={google:`Google`,github:`GitHub`},iJ=`[data-slot="signin-panel"]`,aJ=`var(--popover,var(--panel))`,oJ=`var(--border,var(--edge))`,sJ=`var(--border-strong,var(--bound))`,cJ=`var(--foreground,var(--ink))`,lJ=`var(--muted-foreground,var(--quiet))`,uJ=`${iJ} [data-signin-body]{container-type:inline-size;display:flex;flex-direction:column;gap:10px;width:100%}${iJ} [data-signin-pair]{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%}@container (max-width:379.98px){${iJ} [data-signin-pair]{grid-template-columns:1fr}}${iJ} [data-signin-btn]{box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:9px;width:100%;height:46px;margin:0;padding:0 14px;border-radius:14px;border:1px solid ${oJ};background:${aJ};color:${cJ};font-family:var(--font-sans,Zen,system-ui,sans-serif);font-size:14px;font-weight:500;line-height:1;white-space:nowrap;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.04);transition:transform .2s cubic-bezier(.16,1,.3,1),border-color .2s,background-color .2s,opacity .2s}${iJ} [data-signin-btn]:hover:not(:disabled){border-color:${sJ};transform:translateY(-2px)}${iJ} [data-signin-btn]:active:not(:disabled){transform:scale(.98)}${iJ} [data-signin-btn]:disabled{opacity:.55;cursor:not-allowed}${iJ} [data-signin-btn][data-solid]{background:${cJ};color:var(--background);border-color:${cJ}}${iJ} [data-signin-btn][data-solid]:hover:not(:disabled){opacity:.92;transform:none}${iJ} [data-signin-btn] svg{flex-shrink:0}${iJ} [data-signin-or]{display:flex;align-items:center;gap:12px;font-size:12.5px;color:${lJ}}${iJ} [data-signin-or]::before,${iJ} [data-signin-or]::after{content:'';flex:1;height:1px;background:${oJ}}${iJ} [data-signin-form]{display:flex;flex-direction:column;gap:10px;margin:0}${iJ} [data-signin-field]{box-sizing:border-box;width:100%;height:46px;margin:0;padding:0 16px;border-radius:14px;border:1px solid ${oJ};background-color:${aJ};color:${cJ};font-family:var(--font-sans,Zen,system-ui,sans-serif);font-size:14px;outline:none}${iJ} [data-signin-field]::placeholder{color:${lJ}}${iJ} [data-signin-field]:focus-visible{border-color:${sJ};box-shadow:0 0 0 2px var(--ring,${sJ})}${iJ} [data-signin-wrong]{margin:0;font-size:13px;color:var(--destructive,#e5484d)}${iJ} [data-signin-quiet]{margin:0;font-size:13px;color:${lJ}}${iJ} [data-signin-quiet] button{padding:0;border:0;background:none;color:${cJ};font:inherit;cursor:pointer}${iJ} [data-signin-quiet] button:hover:not(:disabled){text-decoration:underline}${iJ} [data-signin-terms]{margin:0;max-width:400px;text-align:center;font-size:12px;line-height:18px;color:${lJ}}${iJ} [data-signin-terms] a{color:${cJ};text-decoration:none}${iJ} [data-signin-terms] a:hover{text-decoration:underline;text-underline-offset:2px}`;function dJ(e){return e.request?(0,H.jsx)(pJ,{...e,mint:e.request}):(0,H.jsx)(fJ,{...e})}function fJ(e){let{sdk:t}=lW();return(0,H.jsx)(pJ,{...e,mint:e=>t.getSigninUrl(e)})}function pJ({title:e,line:t,providers:n=[`google`,`github`],signin:r=eJ,signup:i=!1,termsHref:a=`https://hanzo.ai/terms`,privacyHref:o=`https://hanzo.ai/privacy`,authorize:s=e=>e,track:c,mint:l,background:u=`$background`,borderColor:d=`$borderColor`,bare:f=!1}){let{t:p}=R(),[m,h]=(0,V.useState)(``),[g,_]=(0,V.useState)(!1),[v,y]=(0,V.useState)(null),[b,x]=(0,V.useState)(null);async function S(e,t,n){x(null),y(e),c?.(`signin_started`,{method:e});try{let e=await l(n?{additionalParams:{login_hint:n}}:void 0);window.location.assign(s(tJ(e,t,r)))}catch(e){x(e instanceof Error&&e.message?e.message:`Signing in could not start. Try again.`),y(null)}}function C(e){e.preventDefault();let t=nJ(m);if(!t){x(`Enter your email address.`);return}S(`email`,{kind:`email`,email:t},t)}let w=f?{}:{bg:u,borderWidth:1,borderColor:d,rounded:`$6`,p:`$6`},T=p(v===`email`?`One moment…`:`Continue with email`);return(0,H.jsxs)(z,{"data-slot":`signin-panel`,"data-surface":f?`bare`:`card`,width:`100%`,maxW:f?400:464,items:`center`,gap:`$3`,...w,children:[(0,H.jsx)(`style`,{dangerouslySetInnerHTML:{__html:uJ}}),e?(0,H.jsx)(Xt,{render:`h1`,size:`$8`,fontWeight:`500`,color:`$ink`,m:0,text:`center`,children:e}):null,t?(0,H.jsx)(Nt,{size:`$3`,color:`$quiet`,m:0,text:`center`,maxW:360,children:t}):null,(0,H.jsxs)(`div`,{"data-signin-body":``,style:e||t?{marginTop:12}:void 0,children:[n.length?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{"data-signin-pair":``,children:n.map(e=>(0,H.jsxs)(`button`,{"data-signin-btn":``,type:`button`,disabled:v!==null,onClick:()=>void S(e,{kind:`provider`,provider:e}),children:[e===`google`?(0,H.jsx)(Uq,{size:17,"aria-hidden":!0}):(0,H.jsx)(Vq,{size:17,"aria-hidden":!0}),p(`Continue with {provider}`,{provider:rJ[e]})]},e))}),(0,H.jsx)(`div`,{"data-signin-or":``,children:p(`or`)})]}):null,g?(0,H.jsxs)(`form`,{"data-signin-form":``,onSubmit:C,noValidate:!0,children:[(0,H.jsx)(`input`,{id:`hanzo-signin-email`,"data-signin-field":``,type:`email`,name:`email`,autoComplete:`username`,"aria-label":p(`Email`),"aria-invalid":b?!0:void 0,value:m,onChange:e=>h(e.target.value),placeholder:`you@company.com`,autoFocus:!0}),b?(0,H.jsx)(`p`,{"data-signin-wrong":``,role:`alert`,children:p(b)}):null,(0,H.jsx)(`button`,{"data-signin-btn":``,"data-solid":``,type:`submit`,disabled:v!==null,children:T})]}):(0,H.jsxs)(H.Fragment,{children:[b?(0,H.jsx)(`p`,{"data-signin-wrong":``,role:`alert`,children:p(b)}):null,(0,H.jsx)(`button`,{"data-signin-btn":``,"data-solid":``,type:`button`,disabled:v!==null,onClick:()=>{x(null),_(!0)},children:T})]})]}),i?(0,H.jsxs)(`p`,{"data-signin-quiet":``,children:[`${p(`New to Hanzo?`)} `,(0,H.jsx)(`button`,{type:`button`,disabled:v!==null,onClick:()=>void S(`signup`,{kind:`signup`}),children:p(`Create account`)})]}):null,(0,H.jsx)(`p`,{"data-signin-terms":``,children:p(`By continuing, you agree to Hanzo's {terms} and {privacy}.`,{terms:(0,H.jsx)(`a`,{href:a,children:p(`Terms`)}),privacy:(0,H.jsx)(`a`,{href:o,children:p(`Privacy Policy`)})})})]})}async function mJ(e,t,n,r,i){if(t)try{await fetch(`${e}/v1/iam/oauth/revoke`,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`,...r?{Authorization:`Bearer ${r}`}:{}},body:new URLSearchParams({token:t,token_type_hint:n,...i?{client_id:i}:{}}).toString()})}catch{}}async function hJ(e,t,n,r){try{await fetch(`${e}/v1/iam/oauth/logout`,{method:`POST`,credentials:`include`,redirect:`manual`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:new URLSearchParams({...n?{client_id:n}:{},...t?{id_token_hint:t}:{},...r?{everywhere:`true`}:{}}).toString()})}catch{}}function gJ(e,t,n){let r=new URLSearchParams({...n?{client_id:n}:{},everywhere:`true`,post_logout_redirect_uri:new URL(t,window.location.origin).href});return`${e.replace(/\/+$/,``)}/v1/iam/oauth/logout?${r}`}async function _J(e,{via:t,to:n=`/login?from=logout`,clientId:r,track:i,everywhere:a,issuer:o}={}){let s=t??window.location.origin,c=Zq(),l=Qq(),u=$q();e.clearTokens();try{await mJ(s,l,`refresh_token`,c,r),await mJ(s,c,`access_token`,c,r),await hJ(s,u,r,a)}finally{i?.(`logout_completed`,{}),window.location.assign(a&&o?gJ(o,n,r):n)}}function vJ(e={}){let{sdk:t,config:n}=lW(),{via:r,to:i,track:a,clientId:o=n.clientId,everywhere:s,issuer:c=n.serverUrl}=e;return(0,V.useCallback)(()=>_J(t,{via:r,to:i,track:a,clientId:o,everywhere:s,issuer:c}),[t,r,i,a,o,s,c])}var yJ;function bJ(e,t={}){let n=gW().track;n?n(e,t):ze(yJ,e,t)}var xJ=e=>e===`localhost`||e===`127.0.0.1`||e===`[::1]`||e.endsWith(`.localhost`);function SJ(e,t){if(xJ(t))return``;try{let t=new URL(e).hostname;if(t===`api.hanzo.ai`||t===`hanzo.id`||t===`hanzo.ai`)return nG}catch{return``}return e}function CJ(e=`/`){let{config:t}=lW(),n=vJ({to:e,track:bJ,everywhere:!0,issuer:(e===`/`||e===`/login?from=logout`)&&typeof window<`u`?SJ(t.serverUrl,window.location.hostname):``});return(0,V.useCallback)(async()=>{window.google?.accounts?.id?.disableAutoSelect?.(),await n()},[n])}var wJ=class{constructor(e){this.http=e}http;get(e){return this.http.enveloped({method:`GET`,path:`/v1/ai/account`,...e?.signal?{signal:e.signal}:{}})}},TJ=class extends Error{constructor(e){super(e),this.name=`HanzoAIError`}},EJ=class extends TJ{status;body;constructor(e,t,n){super(e),this.name=`APIError`,this.status=t,this.body=n}},DJ=class extends TJ{constructor(e="No auth token available. Pass `token` or `getToken` to createAiClient."){super(e),this.name=`AuthError`}},OJ=`/v1/agents`,kJ=/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/,AJ=131072;function jJ(e,t=``){if(!kJ.test(e))throw new TJ(`Not a valid agent ref: ${JSON.stringify(e)}`);return`${OJ}/${e}${t}`}var MJ=class{constructor(e){this.http=e}http;list(e){return this.http.collection(`agents`,{method:`GET`,path:OJ,...e?.signal?{signal:e.signal}:{}})}create(e,t){return this.http.json({method:`POST`,path:OJ,body:e,...t?.signal?{signal:t.signal}:{}})}async get(e,t){return this.http.json({method:`GET`,path:jJ(e),...t?.signal?{signal:t.signal}:{}})}async update(e,t,n){return this.http.json({method:`PATCH`,path:jJ(e),body:t,...n?.signal?{signal:n.signal}:{}})}async delete(e,t){await this.http.raw({method:`DELETE`,path:jJ(e),...t?.signal?{signal:t.signal}:{}})}async run(e,t,n){let r=jJ(e,`/run`);if(new TextEncoder().encode(t).length>AJ)throw new TJ(`Input exceeds ${AJ} bytes.`);return this.http.json({method:`POST`,path:r,body:{input:t},...n?.signal?{signal:n.signal}:{}})}runs(e={},t){let{agent:n,...r}=e;return this.http.collection(`runs`,{method:`GET`,path:n?jJ(n,`/runs`):`${OJ}/runs`,...Object.keys(r).length?{query:r}:{},...t?.signal?{signal:t.signal}:{}})}metrics(e,t){return this.http.json({method:`GET`,path:`${OJ}/metrics`,...e?.range?{query:{range:e.range}}:{},...t?.signal?{signal:t.signal}:{}})}activity(e){return this.http.collection(`activity`,{method:`GET`,path:`${OJ}/activity`,...e?.signal?{signal:e.signal}:{}})}};function NJ(e){let t=e??{};return{status:`held`,id:typeof t.id==`string`?t.id:``,clause:typeof t.clause==`string`?t.clause:``,reason:typeof t.reason==`string`?t.reason:``}}var PJ=`https://api.hanzo.ai`;function FJ(e,t){return e.replace(/\/+$/,``)+(t.startsWith(`/`)?t:`/${t}`)}function IJ(e){if(!e)return``;let t=new URLSearchParams;for(let[n,r]of Object.entries(e))r!==void 0&&t.set(n,String(r));let n=t.toString();return n?`?${n}`:``}function LJ(e){return typeof FormData<`u`&&e instanceof FormData}var RJ=class{baseUrl;issuer;auth;token;getToken;fetchImpl;extraHeaders;constructor(e){this.baseUrl=e.baseUrl??PJ,this.issuer=e.issuer,this.auth=e.auth,this.token=e.token??e.secretKey??e.publishableKey,this.getToken=e.getToken,this.extraHeaders=e.headers??{};let t=e.fetch??globalThis.fetch;if(typeof t!=`function`)throw new EJ("No fetch implementation available; pass `fetch` in the client config.",0);this.fetchImpl=t.bind(globalThis)}async resolveToken(){if(this.auth){let e=this.auth.getValidAccessToken?await this.auth.getValidAccessToken():this.auth.getAccessToken?.()??null;if(e)return e;if(!this.getToken&&!this.token)throw new DJ}if(this.getToken)return await this.getToken();if(this.token)return this.token;throw new DJ}async buildHeaders(e){let t=new Headers(this.extraHeaders);for(let[n,r]of Object.entries(e.headers??{}))t.set(n,r);return e.body!==void 0&&!LJ(e.body)&&!t.has(`Content-Type`)&&t.set(`Content-Type`,`application/json`),!e.anonymous&&!t.has(`Authorization`)&&t.set(`Authorization`,`Bearer ${await this.resolveToken()}`),t}async send(e,t){let n=await this.buildHeaders(t),r={method:t.method??`GET`,headers:n};return t.body!==void 0&&(r.body=LJ(t.body)?t.body:JSON.stringify(t.body)),t.signal&&(r.signal=t.signal),this.fetchImpl(e,r)}async raw(e){let t=FJ(e.baseUrl??this.baseUrl,e.path)+IJ(e.query),n=await this.send(t,e);return!e.anonymous&&this.auth?.invalidate&&await zJ(n)&&(this.auth.invalidate(),n=await this.send(t,e)),n.ok||await VJ(n),n}async result(e){let t=await this.raw(e),n=await t.json().catch(()=>({}));return t.status===202&&n.status===`held`?NJ(n):{status:`done`,value:n}}scoped(e){return{baseUrl:this.baseUrl,issuer:this.issuer,auth:e,fetch:this.fetchImpl,headers:this.extraHeaders}}async json(e){return await(await this.raw(e)).json()}async collection(e,t){let n=(await this.json(t))?.[e];return Array.isArray(n)?n:[]}async bearer(){try{return await this.resolveToken()}catch{return}}async enveloped(e){let t=await this.json(e);if(t.status!==`ok`)throw new EJ(t.msg||`Request failed`,200,t);return t.data}};async function zJ(e){if(e.status===401)return!0;if(e.status!==403)return!1;let t=(await e.clone().json().catch(()=>void 0))?.detail;return typeof t==`string`&&t.includes(`validated principal`)}var BJ={502:`The service did not answer. Nothing was run; try again.`,503:`The service is not running right now.`,504:`The service took too long to answer.`};async function VJ(e){let t=await e.text().catch(()=>``),n=t,r=BJ[e.status]??`HTTP ${e.status}`;if(t)try{n=JSON.parse(t),r=HJ(n)??r}catch{n=t}throw new EJ(r,e.status,n)}function HJ(e){if(e&&typeof e==`object`){let t=e;if(typeof t.msg==`string`&&t.msg)return t.msg;let n=t.error;if(typeof n==`string`)return n;if(n&&typeof n==`object`){let e=n.message;if(typeof e==`string`)return e}if(typeof t.detail==`string`&&t.detail)return t.detail;if(typeof t.title==`string`&&t.title)return t.title}}async function*UJ(e){let t=e.getReader(),n=new TextDecoder,r=``;try{for(;;){let{value:e,done:i}=await t.read();if(i)break;r+=n.decode(e,{stream:!0});let a;for(;(a=WJ(r))!==-1;){let e=r.slice(0,a);r=r.slice(GJ(r,a));let t=KJ(e);t&&(yield t)}}let e=r.trim();if(e){let t=KJ(e);t&&(yield t)}}finally{t.releaseLock()}}function WJ(e){let t=e.indexOf(`
|
|
97
97
|
|
|
98
98
|
`),n=e.indexOf(`\r
|
|
99
99
|
\r
|
|
@@ -171,7 +171,7 @@ ${cZ.map(e=>` <path d="${e}"/>`).join(`
|
|
|
171
171
|
@media (prefers-color-scheme: dark) { .rim { fill: #ffffff; stroke: #ffffff } }
|
|
172
172
|
</style>
|
|
173
173
|
${SZ(`class="rim"`,`class="core"`)}
|
|
174
|
-
</svg>`}function wZ(e={}){let{variant:t=`current`}=e,n=``;switch(t){case`mono`:n=pZ();break;case`white`:n=mZ();break;case`light`:n=hZ();break;case`current`:n=gZ();break;case`favicon`:n=CZ();break;case`color`:n=fZ();break;default:n=gZ()}return`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(n)))}`}CZ(),wZ(),wZ({variant:`mono`}),wZ({variant:`white`}),wZ({variant:`favicon`});function TZ(){return`data:image/svg+xml;base64,`+btoa(unescape(encodeURIComponent(sZ)))}TZ();function EZ(e){let t=e.trim();if(!t||/^(https?:|data:|\/)/.test(t)||!/[\p{Extended_Pictographic}\p{Regional_Indicator}]/u.test(t))return!1;let n=Intl.Segmenter;return(n?[...new n().segment(t)].length:[...t].length)<=3}function DZ(e){return(e.trim().split(/[\s._/-]+/).filter(Boolean).slice(0,2).map(e=>e[0]??``).join(``)||e.trim().slice(0,2)).toUpperCase()}var OZ=e=>e<26?`$1`:e<34?`$2`:e<44?`$4`:`$6`;function kZ({org:e,size:t=22,maxW:n}){let[r,i]=(0,V.useState)(!1);return(0,V.useEffect)(()=>i(!1),[e.logo]),e.logo&&EZ(e.logo)?(0,H.jsx)(z,{width:t,height:t,items:`center`,justify:`center`,style:{flexShrink:0},children:(0,H.jsx)(U,{fontSize:Math.round(t*.72),lineHeight:t,children:e.logo.trim()})}):e.logo&&!r?(0,H.jsx)(`img`,{src:e.logo,alt:``,onError:()=>i(!0),style:{height:t,width:n?`auto`:t,maxWidth:n??t,objectFit:`contain`,display:`block`,borderRadius:6,flexShrink:0}}):(0,H.jsx)(z,{width:t,height:t,rounded:`$3`,bg:`$edge`,items:`center`,justify:`center`,style:{flexShrink:0},children:(0,H.jsx)(U,{fontSize:OZ(t),fontWeight:`800`,color:`$ink`,children:DZ(e.displayName||e.name)})})}var AZ=`theme`;function jZ(){if(typeof document>`u`)return;let e=document.documentElement;if(e.classList.contains(`dark`))return`dark`;if(e.classList.contains(`light`))return`light`;try{let e=window.localStorage.getItem(AZ);if(e===`light`||e===`dark`)return e}catch{}}function MZ(e){if(typeof document>`u`)return;let t=document.documentElement;t.classList.toggle(`dark`,e===`dark`),t.classList.toggle(`light`,e===`light`),t.style.colorScheme=e;try{window.localStorage.setItem(AZ,e)}catch{}}function NZ({theme:e,defaultTheme:t,onToggle:n,onThemeChange:r,size:i=`$2`,label:a}){let o=e!==void 0,[s,c]=(0,V.useState)(()=>e??t??jZ()??`dark`),l=(o?e:s)===`dark`,u=He(),{t:d}=R();return(0,H.jsx)(Je,{size:i,chromeless:!0,icon:l?(0,H.jsx)(tee,{size:16}):(0,H.jsx)(dm,{size:16}),onPress:()=>{let e=l?`light`:`dark`;u({component:`ThemeToggle`,action:`change`,value:e}),o||(c(e),MZ(e)),n?.(e),r?.(e)},"aria-label":a??d(l?`Switch to light theme`:`Switch to dark theme`)})}var PZ=(0,V.lazy)(()=>Le(()=>import(`./ThemeToggleNext-GGp7XI4T.js`),__vite__mapDeps([5,1,2]))),FZ=class extends V.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}};function IZ(e){if(e.theme!==void 0||e.onToggle!==void 0||e.onThemeChange!==void 0)return(0,H.jsx)(NZ,{...e});let t=(0,H.jsx)(NZ,{...e});return(0,H.jsx)(FZ,{fallback:t,children:(0,H.jsx)(V.Suspense,{fallback:t,children:(0,H.jsx)(PZ,{size:e.size,label:e.label})})})}var LZ=(0,V.createContext)({}),RZ=()=>(0,V.useContext)(LZ);function zZ(e){let t=typeof e?.status==`number`?e.status:0,n=e instanceof Error?e.message:String(e);return t===503?{kind:`not-initialized`,message:n}:t===404||t===405?{kind:`unavailable`,message:n}:t===501?{kind:`not-implemented`,message:n}:t===402?{kind:`billing`,message:n}:t===401?{kind:`signin`,message:n}:t===403?{kind:`access`,message:n}:{kind:`error`,message:n}}var BZ={"not-initialized":D(`Backend not initialized`),unavailable:D(`Not available on this deployment yet`),"not-implemented":D(`Not yet available`),access:D(`Not enabled for your account`),signin:D(`Your session expired`),billing:D(`Add credits to continue`),error:D(`Could not reach the backend`)},VZ={"not-initialized":D(`The /v1 route is mounted but its runtime (or the console API key it proxies to) is not configured on this deployment yet. Real data appears here once it is — no placeholder data is shown.`),unavailable:D(`This endpoint is not mounted at the gateway on this host yet. The view lights up automatically once the route is live.`),"not-implemented":D(`This capability is planned but not wired yet. The backend answers honestly rather than pretending it worked — nothing here is fabricated, and the view lights up automatically once it ships.`),access:D(`You're signed in, but this isn't enabled for your organization on this deployment, or it's an admin-only surface. It appears here automatically once your account has access — nothing is fabricated.`),signin:D(`Your session has expired or isn’t recognized here. Sign in again to continue where you left off.`),billing:``,error:``};function HZ({state:e,onRetry:t,hint:n}){let{signIn:r,addCredits:i}=RZ(),{t:a}=R();return(0,H.jsxs)(oZ,{borderWidth:1,borderColor:`$borderColor`,p:`$4`,gap:`$2`,maxW:640,children:[(0,H.jsxs)(y,{gap:`$2`,items:`center`,children:[(0,H.jsx)(jm,{size:16}),(0,H.jsx)(U,{fontSize:`$4`,fontWeight:`700`,children:a(BZ[e.kind])})]}),(0,H.jsx)(U,{fontSize:`$3`,color:`$quiet`,children:VZ[e.kind]?a(VZ[e.kind]):e.message}),n?(0,H.jsx)(U,{fontSize:`$2`,color:`$soft`,children:n}):null,e.kind===`signin`&&r?(0,H.jsx)(Je,{size:`$2`,theme:`light`,self:`flex-start`,onPress:r,children:a(`Sign in again`)}):e.kind===`billing`&&i?(0,H.jsxs)(y,{gap:`$2`,items:`center`,flexWrap:`wrap`,children:[(0,H.jsx)(Je,{size:`$2`,theme:`light`,self:`flex-start`,icon:(0,H.jsx)(Ip,{size:14}),onPress:i,children:a(`Add credits`)}),t?(0,H.jsx)(Je,{size:`$2`,self:`flex-start`,onPress:t,children:a(`Retry`)}):null]}):t?(0,H.jsx)(Je,{size:`$2`,self:`flex-start`,onPress:t,children:a(`Retry`)}):null]})}var UZ={fontWeight:`600`,px:`$3`};function WZ({onPress:e,...t}){let n=He(),r=st()===`compact`;return(0,H.jsx)(Je,{bg:`var(--primary)`,color:`var(--primary-foreground)`,borderColor:`var(--primary)`,hoverStyle:{bg:`var(--primary-hover)`,borderColor:`var(--primary-hover)`},pressStyle:{bg:`var(--primary-hover)`,borderColor:`var(--primary-hover)`},onPress:r=>{n({component:`PrimaryButton`,action:`click`,id:qe(t.children)??t[`aria-label`]}),e?.(r)},...r?UZ:null,...t})}function GZ(e){typeof window<`u`&&window.open(e,`_blank`,`noopener`)}function KZ({icon:e,title:t,description:n,bullets:r,primary:i,secondary:a}){let o=He();return(0,H.jsxs)(oZ,{borderWidth:1,borderColor:`$borderColor`,borderStyle:`dashed`,p:`$6`,gap:`$4`,items:`center`,maxW:640,self:`center`,width:`100%`,children:[(0,H.jsx)(z,{width:48,height:48,items:`center`,justify:`center`,rounded:`$4`,bg:`$hover`,children:(0,H.jsx)(e,{size:24})}),(0,H.jsxs)(z,{gap:`$2`,items:`center`,maxW:480,children:[(0,H.jsx)(U,{fontSize:`$6`,fontWeight:`500`,text:`center`,letterSpacing:-.3,children:t}),(0,H.jsx)(U,{fontSize:`$3`,color:`$quiet`,text:`center`,children:n})]}),r&&r.length?(0,H.jsx)(z,{gap:`$2`,self:`stretch`,maxW:420,mx:`auto`,children:r.map(e=>(0,H.jsxs)(y,{gap:`$2`,items:`flex-start`,children:[(0,H.jsx)(z,{pt:`$1`,children:(0,H.jsx)(Vt,{size:14,color:`$soft`})}),(0,H.jsx)(U,{fontSize:`$3`,color:`$quiet`,flex:1,children:e})]},e))}):null,i||a?(0,H.jsxs)(y,{gap:`$2`,items:`center`,flexWrap:`wrap`,justify:`center`,children:[i?(0,H.jsx)(WZ,{icon:i.icon,iconAfter:i.href?(0,H.jsx)(Bp,{size:16}):(0,H.jsx)(hp,{...$m,size:16}),onPress:()=>{o({component:`EmptyState`,action:`click`,id:t,value:i.label}),i.href?GZ(i.href):i.onPress?.()},children:i.label}):null,a?(0,H.jsx)(Je,{chromeless:!0,icon:a.icon,iconAfter:a.href?(0,H.jsx)(Bp,{size:14}):void 0,onPress:()=>{o({component:`EmptyState`,action:`click`,id:t,value:a.label}),a.href?GZ(a.href):a.onPress?.()},children:a.label}):null]}):null]})}var qZ=new Map;function JZ(e,t){qZ.set(e,t)}function YZ(e){return qZ.get(e)}var XZ={AC:`247`,AD:`376`,AE:`971`,AF:`93`,AG:`1`,AI:`1`,AL:`355`,AM:`374`,AO:`244`,AR:`54`,AS:`1`,AT:`43`,AU:`61`,AW:`297`,AX:`358`,AZ:`994`,BA:`387`,BB:`1`,BD:`880`,BE:`32`,BF:`226`,BG:`359`,BH:`973`,BI:`257`,BJ:`229`,BL:`590`,BM:`1`,BN:`673`,BO:`591`,BQ:`599`,BR:`55`,BS:`1`,BT:`975`,BW:`267`,BY:`375`,BZ:`501`,CA:`1`,CC:`61`,CD:`243`,CF:`236`,CG:`242`,CH:`41`,CI:`225`,CK:`682`,CL:`56`,CM:`237`,CN:`86`,CO:`57`,CR:`506`,CU:`53`,CV:`238`,CW:`599`,CX:`61`,CY:`357`,CZ:`420`,DE:`49`,DJ:`253`,DK:`45`,DM:`1`,DO:`1`,DZ:`213`,EC:`593`,EE:`372`,EG:`20`,EH:`212`,ER:`291`,ES:`34`,ET:`251`,FI:`358`,FJ:`679`,FK:`500`,FM:`691`,FO:`298`,FR:`33`,GA:`241`,GB:`44`,GD:`1`,GE:`995`,GF:`594`,GG:`44`,GH:`233`,GI:`350`,GL:`299`,GM:`220`,GN:`224`,GP:`590`,GQ:`240`,GR:`30`,GT:`502`,GU:`1`,GW:`245`,GY:`592`,HK:`852`,HN:`504`,HR:`385`,HT:`509`,HU:`36`,ID:`62`,IE:`353`,IL:`972`,IM:`44`,IN:`91`,IO:`246`,IQ:`964`,IR:`98`,IS:`354`,IT:`39`,JE:`44`,JM:`1`,JO:`962`,JP:`81`,KE:`254`,KG:`996`,KH:`855`,KI:`686`,KM:`269`,KN:`1`,KP:`850`,KR:`82`,KW:`965`,KY:`1`,KZ:`7`,LA:`856`,LB:`961`,LC:`1`,LI:`423`,LK:`94`,LR:`231`,LS:`266`,LT:`370`,LU:`352`,LV:`371`,LY:`218`,MA:`212`,MC:`377`,MD:`373`,ME:`382`,MF:`590`,MG:`261`,MH:`692`,MK:`389`,ML:`223`,MM:`95`,MN:`976`,MO:`853`,MP:`1`,MQ:`596`,MR:`222`,MS:`1`,MT:`356`,MU:`230`,MV:`960`,MW:`265`,MX:`52`,MY:`60`,MZ:`258`,NA:`264`,NC:`687`,NE:`227`,NF:`672`,NG:`234`,NI:`505`,NL:`31`,NO:`47`,NP:`977`,NR:`674`,NU:`683`,NZ:`64`,OM:`968`,PA:`507`,PE:`51`,PF:`689`,PG:`675`,PH:`63`,PK:`92`,PL:`48`,PM:`508`,PR:`1`,PS:`970`,PT:`351`,PW:`680`,PY:`595`,QA:`974`,RE:`262`,RO:`40`,RS:`381`,RU:`7`,RW:`250`,SA:`966`,SB:`677`,SC:`248`,SD:`249`,SE:`46`,SG:`65`,SH:`290`,SI:`386`,SJ:`47`,SK:`421`,SL:`232`,SM:`378`,SN:`221`,SO:`252`,SR:`597`,SS:`211`,ST:`239`,SV:`503`,SX:`1`,SY:`963`,SZ:`268`,TA:`290`,TC:`1`,TD:`235`,TG:`228`,TH:`66`,TJ:`992`,TK:`690`,TL:`670`,TM:`993`,TN:`216`,TO:`676`,TR:`90`,TT:`1`,TV:`688`,TW:`886`,TZ:`255`,UA:`380`,UG:`256`,US:`1`,UY:`598`,UZ:`998`,VA:`39`,VC:`1`,VE:`58`,VG:`1`,VI:`1`,VN:`84`,VU:`678`,WF:`681`,WS:`685`,XK:`383`,YE:`967`,YT:`262`,ZA:`27`,ZM:`260`,ZW:`263`},ZZ=e=>e==null?``:String(e),QZ=e=>{if(e==null||e===``)return null;let t=typeof e==`number`?e:Number(e);return Number.isFinite(t)?t:null},$Z=e=>Array.isArray(e)?e:e==null||e===``?[]:[e],eQ=e=>{if(e==null||e===``)return``;if(e instanceof Date)return Number.isNaN(e.getTime())?``:e.toISOString().slice(0,10);let t=String(e),n=t.match(/^(\d{4}-\d{2}-\d{2})/);if(n)return n[1];let r=new Date(t);return Number.isNaN(r.getTime())?``:r.toISOString().slice(0,10)},tQ=e=>{if(e==null||e===``)return null;let t=e instanceof Date?e:new Date(e);return Number.isNaN(t.getTime())?null:t},nQ=e=>{if(e==null||e===``)return{};if(typeof e==`string`){let t=e.trim(),n=t.indexOf(` `);return n<0?{first:t}:{first:t.slice(0,n),last:t.slice(n+1).trim()}}if(typeof e!=`object`)return{first:String(e)};let t=e;return{first:ZZ(t.first??t.firstName).trim()||void 0,last:ZZ(t.last??t.lastName).trim()||void 0}},rQ=e=>{let t=nQ(e);return[t.first,t.last].filter(Boolean).join(` `)},iQ=[`street1`,`street2`,`city`,`state`,`postcode`,`country`],aQ=e=>{if(e==null||e===``)return{};if(typeof e==`string`)return{street1:e};let t=e,n={},r={street1:`addressStreet1`,street2:`addressStreet2`,city:`addressCity`,state:`addressState`,postcode:`addressPostcode`,country:`addressCountry`};for(let e of iQ){let i=ZZ(t[e]??t[r[e]]).trim();i&&(n[e]=i)}return n},oQ=(e,t)=>{if(!e)return``;if(!/^[A-Za-z]{2}$/.test(e))return e;try{return new Intl.DisplayNames(t?[t]:void 0,{type:`region`}).of(e.toUpperCase())??e}catch{return e}},sQ=(e,t)=>{let n=aQ(e);return iQ.map(e=>e===`country`?oQ(n.country,t):n[e]).filter(Boolean).join(`, `)},cQ=e=>$Z(e).map(e=>typeof e==`string`?{url:e}:e).filter(e=>!!e&&typeof e.url==`string`&&e.url.trim()!==``),lQ=e=>{let t=e.trim();try{let e=new URL(/^[a-z][a-z0-9+.-]*:/i.test(t)?t:`https://${t}`);return e.host.replace(/^www\./,``)+(e.pathname===`/`?``:e.pathname.replace(/\/$/,``))}catch{return t}},uQ=e=>{let t=e.trim();if(!t)return;let n=/^[a-z][a-z0-9+.-]*:/i.test(t)?t:`https://${t}`;try{let e=new URL(n);return[`http:`,`https:`,`mailto:`,`tel:`].includes(e.protocol)?e.href:void 0}catch{return}},dQ=e=>{if(e&&typeof e==`object`&&!Array.isArray(e)){let t=e;return[ZZ(t.primaryEmail),...$Z(t.additionalEmails).map(ZZ)].map(e=>e.trim()).filter(Boolean)}return $Z(e).flatMap(e=>ZZ(e).split(/[,;]/)).map(e=>e.trim()).filter(Boolean)},fQ=e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e.trim()),pQ=(()=>{let e={};for(let[t,n]of Object.entries(XZ))(e[n]??=[]).push(t);for(let[t,n]of Object.entries({1:`US`,7:`RU`,44:`GB`,47:`NO`,61:`AU`,212:`MA`,262:`RE`,290:`SH`,358:`FI`,590:`GP`,599:`CW`})){let r=e[t];r?.includes(n)&&(e[t]=[n,...r.filter(e=>e!==n)])}return e})(),mQ=(e,t)=>{if(e&&typeof e==`object`){let t=e,n=ZZ(t.number??t.primaryPhoneNumber).trim(),r=ZZ(t.country??t.countryCode??t.primaryPhoneCountryCode).trim().toUpperCase()||void 0;return{country:r,callingCode:ZZ(t.callingCode??t.primaryPhoneCallingCode).replace(/^\+/,``).trim()||(r?XZ[r]:void 0),number:n}}let n=ZZ(e).trim();if(!n.startsWith(`+`)){let e=t?.toUpperCase();return{country:e,callingCode:e?XZ[e]:void 0,number:n}}let r=n.slice(1).replace(/[^\d]/g,``);for(let e=Math.min(4,r.length);e>0;e--){let i=r.slice(0,e),a=pQ[i];if(a)return{country:t&&a.includes(t.toUpperCase())?t.toUpperCase():a[0],callingCode:i,number:hQ(n.slice(1),e)}}return{number:n}},hQ=(e,t)=>{let n=0,r=0;for(;r<e.length&&n<t;)/\d/.test(e[r++])&&n++;return e.slice(r).replace(/^[\s.()-]+/,``).trim()},gQ=e=>{let t=e.number.trim();return t?e.callingCode?`+${e.callingCode} ${t.replace(/^0+(?=\d)/,``)}`:t:``},_Q=e=>{let t=e.number.replace(/[^\d]/g,``).replace(/^0+(?=\d)/,``);if(t)return`tel:${e.callingCode?`+${e.callingCode}`:``}${t}`},vQ=e=>{if(e==null||e===``)return null;if(typeof e==`string`)return{name:e};let t=e,n=ZZ(t.name??t.workspaceMemberName??t.label).trim();return n?{name:n,source:ZZ(t.source).toLowerCase()||void 0,avatarUrl:ZZ(t.avatarUrl).trim()||void 0}:null},yQ=e=>{if(e==null||e===``)return``;if(typeof e==`object`){let t=e;return typeof t.markdown==`string`&&t.markdown.trim()?yQ(t.markdown):`blocknote`in t||`content`in t||`type`in t||Array.isArray(e)?yQ(bQ(e).join(`
|
|
174
|
+
</svg>`}function wZ(e={}){let{variant:t=`current`}=e,n=``;switch(t){case`mono`:n=pZ();break;case`white`:n=mZ();break;case`light`:n=hZ();break;case`current`:n=gZ();break;case`favicon`:n=CZ();break;case`color`:n=fZ();break;default:n=gZ()}return`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(n)))}`}CZ(),wZ(),wZ({variant:`mono`}),wZ({variant:`white`}),wZ({variant:`favicon`});function TZ(){return`data:image/svg+xml;base64,`+btoa(unescape(encodeURIComponent(sZ)))}TZ();function EZ(e){let t=e.trim();if(!t||/^(https?:|data:|\/)/.test(t)||!/[\p{Extended_Pictographic}\p{Regional_Indicator}]/u.test(t))return!1;let n=Intl.Segmenter;return(n?[...new n().segment(t)].length:[...t].length)<=3}function DZ(e){return(e.trim().split(/[\s._/-]+/).filter(Boolean).slice(0,2).map(e=>e[0]??``).join(``)||e.trim().slice(0,2)).toUpperCase()}var OZ=e=>e<26?`$1`:e<34?`$2`:e<44?`$4`:`$6`;function kZ({org:e,size:t=22,maxW:n}){let[r,i]=(0,V.useState)(!1);return(0,V.useEffect)(()=>i(!1),[e.logo]),e.logo&&EZ(e.logo)?(0,H.jsx)(z,{width:t,height:t,items:`center`,justify:`center`,style:{flexShrink:0},children:(0,H.jsx)(U,{fontSize:Math.round(t*.72),lineHeight:t,children:e.logo.trim()})}):e.logo&&!r?(0,H.jsx)(`img`,{src:e.logo,alt:``,onError:()=>i(!0),style:{height:t,width:n?`auto`:t,maxWidth:n??t,objectFit:`contain`,display:`block`,borderRadius:6,flexShrink:0}}):(0,H.jsx)(z,{width:t,height:t,rounded:`$3`,bg:`$edge`,items:`center`,justify:`center`,style:{flexShrink:0},children:(0,H.jsx)(U,{fontSize:OZ(t),fontWeight:`800`,color:`$ink`,children:DZ(e.displayName||e.name)})})}var AZ=`theme`;function jZ(){if(typeof document>`u`)return;let e=document.documentElement;if(e.classList.contains(`dark`))return`dark`;if(e.classList.contains(`light`))return`light`;try{let e=window.localStorage.getItem(AZ);if(e===`light`||e===`dark`)return e}catch{}}function MZ(e){if(typeof document>`u`)return;let t=document.documentElement;t.classList.toggle(`dark`,e===`dark`),t.classList.toggle(`light`,e===`light`),t.style.colorScheme=e;try{window.localStorage.setItem(AZ,e)}catch{}}function NZ({theme:e,defaultTheme:t,onToggle:n,onThemeChange:r,size:i=`$2`,label:a}){let o=e!==void 0,[s,c]=(0,V.useState)(()=>e??t??jZ()??`dark`),l=(o?e:s)===`dark`,u=He(),{t:d}=R();return(0,H.jsx)(Je,{size:i,chromeless:!0,icon:l?(0,H.jsx)(tee,{size:16}):(0,H.jsx)(dm,{size:16}),onPress:()=>{let e=l?`light`:`dark`;u({component:`ThemeToggle`,action:`change`,value:e}),o||(c(e),MZ(e)),n?.(e),r?.(e)},"aria-label":a??d(l?`Switch to light theme`:`Switch to dark theme`)})}var PZ=(0,V.lazy)(()=>Le(()=>import(`./ThemeToggleNext-BnndB04G.js`),__vite__mapDeps([5,1,2]))),FZ=class extends V.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}};function IZ(e){if(e.theme!==void 0||e.onToggle!==void 0||e.onThemeChange!==void 0)return(0,H.jsx)(NZ,{...e});let t=(0,H.jsx)(NZ,{...e});return(0,H.jsx)(FZ,{fallback:t,children:(0,H.jsx)(V.Suspense,{fallback:t,children:(0,H.jsx)(PZ,{size:e.size,label:e.label})})})}var LZ=(0,V.createContext)({}),RZ=()=>(0,V.useContext)(LZ);function zZ(e){let t=typeof e?.status==`number`?e.status:0,n=e instanceof Error?e.message:String(e);return t===503?{kind:`not-initialized`,message:n}:t===404||t===405?{kind:`unavailable`,message:n}:t===501?{kind:`not-implemented`,message:n}:t===402?{kind:`billing`,message:n}:t===401?{kind:`signin`,message:n}:t===403?{kind:`access`,message:n}:{kind:`error`,message:n}}var BZ={"not-initialized":D(`Backend not initialized`),unavailable:D(`Not available on this deployment yet`),"not-implemented":D(`Not yet available`),access:D(`Not enabled for your account`),signin:D(`Your session expired`),billing:D(`Add credits to continue`),error:D(`Could not reach the backend`)},VZ={"not-initialized":D(`The /v1 route is mounted but its runtime (or the console API key it proxies to) is not configured on this deployment yet. Real data appears here once it is — no placeholder data is shown.`),unavailable:D(`This endpoint is not mounted at the gateway on this host yet. The view lights up automatically once the route is live.`),"not-implemented":D(`This capability is planned but not wired yet. The backend answers honestly rather than pretending it worked — nothing here is fabricated, and the view lights up automatically once it ships.`),access:D(`You're signed in, but this isn't enabled for your organization on this deployment, or it's an admin-only surface. It appears here automatically once your account has access — nothing is fabricated.`),signin:D(`Your session has expired or isn’t recognized here. Sign in again to continue where you left off.`),billing:``,error:``};function HZ({state:e,onRetry:t,hint:n}){let{signIn:r,addCredits:i}=RZ(),{t:a}=R();return(0,H.jsxs)(oZ,{borderWidth:1,borderColor:`$borderColor`,p:`$4`,gap:`$2`,maxW:640,children:[(0,H.jsxs)(y,{gap:`$2`,items:`center`,children:[(0,H.jsx)(jm,{size:16}),(0,H.jsx)(U,{fontSize:`$4`,fontWeight:`700`,children:a(BZ[e.kind])})]}),(0,H.jsx)(U,{fontSize:`$3`,color:`$quiet`,children:VZ[e.kind]?a(VZ[e.kind]):e.message}),n?(0,H.jsx)(U,{fontSize:`$2`,color:`$soft`,children:n}):null,e.kind===`signin`&&r?(0,H.jsx)(Je,{size:`$2`,theme:`light`,self:`flex-start`,onPress:r,children:a(`Sign in again`)}):e.kind===`billing`&&i?(0,H.jsxs)(y,{gap:`$2`,items:`center`,flexWrap:`wrap`,children:[(0,H.jsx)(Je,{size:`$2`,theme:`light`,self:`flex-start`,icon:(0,H.jsx)(Ip,{size:14}),onPress:i,children:a(`Add credits`)}),t?(0,H.jsx)(Je,{size:`$2`,self:`flex-start`,onPress:t,children:a(`Retry`)}):null]}):t?(0,H.jsx)(Je,{size:`$2`,self:`flex-start`,onPress:t,children:a(`Retry`)}):null]})}var UZ={fontWeight:`600`,px:`$3`};function WZ({onPress:e,...t}){let n=He(),r=st()===`compact`;return(0,H.jsx)(Je,{bg:`var(--primary)`,color:`var(--primary-foreground)`,borderColor:`var(--primary)`,hoverStyle:{bg:`var(--primary-hover)`,borderColor:`var(--primary-hover)`},pressStyle:{bg:`var(--primary-hover)`,borderColor:`var(--primary-hover)`},onPress:r=>{n({component:`PrimaryButton`,action:`click`,id:qe(t.children)??t[`aria-label`]}),e?.(r)},...r?UZ:null,...t})}function GZ(e){typeof window<`u`&&window.open(e,`_blank`,`noopener`)}function KZ({icon:e,title:t,description:n,bullets:r,primary:i,secondary:a}){let o=He();return(0,H.jsxs)(oZ,{borderWidth:1,borderColor:`$borderColor`,borderStyle:`dashed`,p:`$6`,gap:`$4`,items:`center`,maxW:640,self:`center`,width:`100%`,children:[(0,H.jsx)(z,{width:48,height:48,items:`center`,justify:`center`,rounded:`$4`,bg:`$hover`,children:(0,H.jsx)(e,{size:24})}),(0,H.jsxs)(z,{gap:`$2`,items:`center`,maxW:480,children:[(0,H.jsx)(U,{fontSize:`$6`,fontWeight:`500`,text:`center`,letterSpacing:-.3,children:t}),(0,H.jsx)(U,{fontSize:`$3`,color:`$quiet`,text:`center`,children:n})]}),r&&r.length?(0,H.jsx)(z,{gap:`$2`,self:`stretch`,maxW:420,mx:`auto`,children:r.map(e=>(0,H.jsxs)(y,{gap:`$2`,items:`flex-start`,children:[(0,H.jsx)(z,{pt:`$1`,children:(0,H.jsx)(Vt,{size:14,color:`$soft`})}),(0,H.jsx)(U,{fontSize:`$3`,color:`$quiet`,flex:1,children:e})]},e))}):null,i||a?(0,H.jsxs)(y,{gap:`$2`,items:`center`,flexWrap:`wrap`,justify:`center`,children:[i?(0,H.jsx)(WZ,{icon:i.icon,iconAfter:i.href?(0,H.jsx)(Bp,{size:16}):(0,H.jsx)(hp,{...$m,size:16}),onPress:()=>{o({component:`EmptyState`,action:`click`,id:t,value:i.label}),i.href?GZ(i.href):i.onPress?.()},children:i.label}):null,a?(0,H.jsx)(Je,{chromeless:!0,icon:a.icon,iconAfter:a.href?(0,H.jsx)(Bp,{size:14}):void 0,onPress:()=>{o({component:`EmptyState`,action:`click`,id:t,value:a.label}),a.href?GZ(a.href):a.onPress?.()},children:a.label}):null]}):null]})}var qZ=new Map;function JZ(e,t){qZ.set(e,t)}function YZ(e){return qZ.get(e)}var XZ={AC:`247`,AD:`376`,AE:`971`,AF:`93`,AG:`1`,AI:`1`,AL:`355`,AM:`374`,AO:`244`,AR:`54`,AS:`1`,AT:`43`,AU:`61`,AW:`297`,AX:`358`,AZ:`994`,BA:`387`,BB:`1`,BD:`880`,BE:`32`,BF:`226`,BG:`359`,BH:`973`,BI:`257`,BJ:`229`,BL:`590`,BM:`1`,BN:`673`,BO:`591`,BQ:`599`,BR:`55`,BS:`1`,BT:`975`,BW:`267`,BY:`375`,BZ:`501`,CA:`1`,CC:`61`,CD:`243`,CF:`236`,CG:`242`,CH:`41`,CI:`225`,CK:`682`,CL:`56`,CM:`237`,CN:`86`,CO:`57`,CR:`506`,CU:`53`,CV:`238`,CW:`599`,CX:`61`,CY:`357`,CZ:`420`,DE:`49`,DJ:`253`,DK:`45`,DM:`1`,DO:`1`,DZ:`213`,EC:`593`,EE:`372`,EG:`20`,EH:`212`,ER:`291`,ES:`34`,ET:`251`,FI:`358`,FJ:`679`,FK:`500`,FM:`691`,FO:`298`,FR:`33`,GA:`241`,GB:`44`,GD:`1`,GE:`995`,GF:`594`,GG:`44`,GH:`233`,GI:`350`,GL:`299`,GM:`220`,GN:`224`,GP:`590`,GQ:`240`,GR:`30`,GT:`502`,GU:`1`,GW:`245`,GY:`592`,HK:`852`,HN:`504`,HR:`385`,HT:`509`,HU:`36`,ID:`62`,IE:`353`,IL:`972`,IM:`44`,IN:`91`,IO:`246`,IQ:`964`,IR:`98`,IS:`354`,IT:`39`,JE:`44`,JM:`1`,JO:`962`,JP:`81`,KE:`254`,KG:`996`,KH:`855`,KI:`686`,KM:`269`,KN:`1`,KP:`850`,KR:`82`,KW:`965`,KY:`1`,KZ:`7`,LA:`856`,LB:`961`,LC:`1`,LI:`423`,LK:`94`,LR:`231`,LS:`266`,LT:`370`,LU:`352`,LV:`371`,LY:`218`,MA:`212`,MC:`377`,MD:`373`,ME:`382`,MF:`590`,MG:`261`,MH:`692`,MK:`389`,ML:`223`,MM:`95`,MN:`976`,MO:`853`,MP:`1`,MQ:`596`,MR:`222`,MS:`1`,MT:`356`,MU:`230`,MV:`960`,MW:`265`,MX:`52`,MY:`60`,MZ:`258`,NA:`264`,NC:`687`,NE:`227`,NF:`672`,NG:`234`,NI:`505`,NL:`31`,NO:`47`,NP:`977`,NR:`674`,NU:`683`,NZ:`64`,OM:`968`,PA:`507`,PE:`51`,PF:`689`,PG:`675`,PH:`63`,PK:`92`,PL:`48`,PM:`508`,PR:`1`,PS:`970`,PT:`351`,PW:`680`,PY:`595`,QA:`974`,RE:`262`,RO:`40`,RS:`381`,RU:`7`,RW:`250`,SA:`966`,SB:`677`,SC:`248`,SD:`249`,SE:`46`,SG:`65`,SH:`290`,SI:`386`,SJ:`47`,SK:`421`,SL:`232`,SM:`378`,SN:`221`,SO:`252`,SR:`597`,SS:`211`,ST:`239`,SV:`503`,SX:`1`,SY:`963`,SZ:`268`,TA:`290`,TC:`1`,TD:`235`,TG:`228`,TH:`66`,TJ:`992`,TK:`690`,TL:`670`,TM:`993`,TN:`216`,TO:`676`,TR:`90`,TT:`1`,TV:`688`,TW:`886`,TZ:`255`,UA:`380`,UG:`256`,US:`1`,UY:`598`,UZ:`998`,VA:`39`,VC:`1`,VE:`58`,VG:`1`,VI:`1`,VN:`84`,VU:`678`,WF:`681`,WS:`685`,XK:`383`,YE:`967`,YT:`262`,ZA:`27`,ZM:`260`,ZW:`263`},ZZ=e=>e==null?``:String(e),QZ=e=>{if(e==null||e===``)return null;let t=typeof e==`number`?e:Number(e);return Number.isFinite(t)?t:null},$Z=e=>Array.isArray(e)?e:e==null||e===``?[]:[e],eQ=e=>{if(e==null||e===``)return``;if(e instanceof Date)return Number.isNaN(e.getTime())?``:e.toISOString().slice(0,10);let t=String(e),n=t.match(/^(\d{4}-\d{2}-\d{2})/);if(n)return n[1];let r=new Date(t);return Number.isNaN(r.getTime())?``:r.toISOString().slice(0,10)},tQ=e=>{if(e==null||e===``)return null;let t=e instanceof Date?e:new Date(e);return Number.isNaN(t.getTime())?null:t},nQ=e=>{if(e==null||e===``)return{};if(typeof e==`string`){let t=e.trim(),n=t.indexOf(` `);return n<0?{first:t}:{first:t.slice(0,n),last:t.slice(n+1).trim()}}if(typeof e!=`object`)return{first:String(e)};let t=e;return{first:ZZ(t.first??t.firstName).trim()||void 0,last:ZZ(t.last??t.lastName).trim()||void 0}},rQ=e=>{let t=nQ(e);return[t.first,t.last].filter(Boolean).join(` `)},iQ=[`street1`,`street2`,`city`,`state`,`postcode`,`country`],aQ=e=>{if(e==null||e===``)return{};if(typeof e==`string`)return{street1:e};let t=e,n={},r={street1:`addressStreet1`,street2:`addressStreet2`,city:`addressCity`,state:`addressState`,postcode:`addressPostcode`,country:`addressCountry`};for(let e of iQ){let i=ZZ(t[e]??t[r[e]]).trim();i&&(n[e]=i)}return n},oQ=(e,t)=>{if(!e)return``;if(!/^[A-Za-z]{2}$/.test(e))return e;try{return new Intl.DisplayNames(t?[t]:void 0,{type:`region`}).of(e.toUpperCase())??e}catch{return e}},sQ=(e,t)=>{let n=aQ(e);return iQ.map(e=>e===`country`?oQ(n.country,t):n[e]).filter(Boolean).join(`, `)},cQ=e=>$Z(e).map(e=>typeof e==`string`?{url:e}:e).filter(e=>!!e&&typeof e.url==`string`&&e.url.trim()!==``),lQ=e=>{let t=e.trim();try{let e=new URL(/^[a-z][a-z0-9+.-]*:/i.test(t)?t:`https://${t}`);return e.host.replace(/^www\./,``)+(e.pathname===`/`?``:e.pathname.replace(/\/$/,``))}catch{return t}},uQ=e=>{let t=e.trim();if(!t)return;let n=/^[a-z][a-z0-9+.-]*:/i.test(t)?t:`https://${t}`;try{let e=new URL(n);return[`http:`,`https:`,`mailto:`,`tel:`].includes(e.protocol)?e.href:void 0}catch{return}},dQ=e=>{if(e&&typeof e==`object`&&!Array.isArray(e)){let t=e;return[ZZ(t.primaryEmail),...$Z(t.additionalEmails).map(ZZ)].map(e=>e.trim()).filter(Boolean)}return $Z(e).flatMap(e=>ZZ(e).split(/[,;]/)).map(e=>e.trim()).filter(Boolean)},fQ=e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e.trim()),pQ=(()=>{let e={};for(let[t,n]of Object.entries(XZ))(e[n]??=[]).push(t);for(let[t,n]of Object.entries({1:`US`,7:`RU`,44:`GB`,47:`NO`,61:`AU`,212:`MA`,262:`RE`,290:`SH`,358:`FI`,590:`GP`,599:`CW`})){let r=e[t];r?.includes(n)&&(e[t]=[n,...r.filter(e=>e!==n)])}return e})(),mQ=(e,t)=>{if(e&&typeof e==`object`){let t=e,n=ZZ(t.number??t.primaryPhoneNumber).trim(),r=ZZ(t.country??t.countryCode??t.primaryPhoneCountryCode).trim().toUpperCase()||void 0;return{country:r,callingCode:ZZ(t.callingCode??t.primaryPhoneCallingCode).replace(/^\+/,``).trim()||(r?XZ[r]:void 0),number:n}}let n=ZZ(e).trim();if(!n.startsWith(`+`)){let e=t?.toUpperCase();return{country:e,callingCode:e?XZ[e]:void 0,number:n}}let r=n.slice(1).replace(/[^\d]/g,``);for(let e=Math.min(4,r.length);e>0;e--){let i=r.slice(0,e),a=pQ[i];if(a)return{country:t&&a.includes(t.toUpperCase())?t.toUpperCase():a[0],callingCode:i,number:hQ(n.slice(1),e)}}return{number:n}},hQ=(e,t)=>{let n=0,r=0;for(;r<e.length&&n<t;)/\d/.test(e[r++])&&n++;return e.slice(r).replace(/^[\s.()-]+/,``).trim()},gQ=e=>{let t=e.number.trim();return t?e.callingCode?`+${e.callingCode} ${t.replace(/^0+(?=\d)/,``)}`:t:``},_Q=e=>{let t=e.number.replace(/[^\d]/g,``).replace(/^0+(?=\d)/,``);if(t)return`tel:${e.callingCode?`+${e.callingCode}`:``}${t}`},vQ=e=>{if(e==null||e===``)return null;if(typeof e==`string`)return{name:e};let t=e,n=ZZ(t.name??t.workspaceMemberName??t.label).trim();return n?{name:n,source:ZZ(t.source).toLowerCase()||void 0,avatarUrl:ZZ(t.avatarUrl).trim()||void 0}:null},yQ=e=>{if(e==null||e===``)return``;if(typeof e==`object`){let t=e;return typeof t.markdown==`string`&&t.markdown.trim()?yQ(t.markdown):`blocknote`in t||`content`in t||`type`in t||Array.isArray(e)?yQ(bQ(e).join(`
|
|
175
175
|
`)):``}for(let t of String(e).split(`
|
|
176
176
|
`)){let e=t.replace(/^\s{0,3}(#{1,6}\s+|>\s?|[-*+]\s+|\d+[.)]\s+|-\s\[[ x]\]\s+)/i,``).replace(/!\[[^\]]*\]\([^)]*\)/g,``).replace(/\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/(\*\*|__|\*|_|~~|`)/g,``).trim();if(e)return e}return``},bQ=e=>{if(typeof e==`string`)try{return bQ(JSON.parse(e))}catch{return[e]}if(Array.isArray(e))return e.flatMap(bQ);if(e&&typeof e==`object`){let t=e,n=typeof t.text==`string`?[t.text]:[],r=[t.content,t.children,t.blocknote].flatMap(e=>e==null?[]:bQ(e));return t.type&&r.length?[[...n,...r].join(``)]:[...n,...r]}return[]},xQ=(e,t)=>{if(typeof t==`string`)return t;if(t&&typeof t==`object`){let n=t;return ZZ(n[e]??n.label??n.name??n.id)}return``};function SQ(){return(0,H.jsx)(U,{fontSize:`$2`,color:`var(--text-faint)`,"aria-label":`Empty`,children:`—`})}var CQ=({text:e,color:t=`$ink`,mono:n})=>(0,H.jsx)(eR,{text:e,size:`$2`,color:t,...n?{fontFamily:`$mono`}:null}),wQ={target:`_blank`,rel:`noopener noreferrer`};function TQ({label:e,color:t}){return(0,H.jsx)(iR,{color:t??`gray`,children:e})}var EQ=(e,t)=>e?.find(e=>e.value===t)??{value:t,label:t};function DQ({value:e}){let t=ZZ(e).trim();return t?(0,H.jsx)(CQ,{text:t}):(0,H.jsx)(SQ,{})}function OQ({value:e}){let t=ZZ(e).trim();return t?(0,H.jsx)(eR,{text:t,lineClamp:2,size:`$2`,color:`$ink`,isTooltipMultiline:!0}):(0,H.jsx)(SQ,{})}function kQ({value:e}){let t=yQ(e);return t?(0,H.jsx)(CQ,{text:t,color:`$aside`}):(0,H.jsx)(SQ,{})}function AQ({value:e}){let t=dQ(e);return t.length===0?(0,H.jsx)(SQ,{}):(0,H.jsx)(a$,{children:t.map((e,t)=>(0,H.jsx)(sR,{shape:`round`,variant:`soft`,label:e,href:`mailto:${e}`},`${e}-${t}`))})}var jQ=({url:e,label:t})=>{let n=uQ(e);return(0,H.jsx)(sR,{shape:`round`,variant:`soft`,label:t?.trim()||lQ(e),tooltipContent:e,...n?{href:n,...wQ}:null})};function MQ({value:e}){let t=cQ(e);return t.length===0?(0,H.jsx)(SQ,{}):t.length===1?(0,H.jsx)(jQ,{url:t[0].url,label:t[0].label}):(0,H.jsx)(a$,{children:t.map((e,t)=>(0,H.jsx)(jQ,{url:e.url,label:e.label},`${e.url}-${t}`))})}function NQ({value:e}){let t=cQ(e);return t.length===0?(0,H.jsx)(SQ,{}):(0,H.jsx)(a$,{children:t.map((e,t)=>(0,H.jsx)(jQ,{url:e.url,label:e.label},`${e.url}-${t}`))})}function PQ({field:e,value:t}){let n=e.metadata?.defaultCountry,r=(Array.isArray(t)?t:[t]).map(e=>mQ(e,n)).filter(e=>e.number);return r.length===0?(0,H.jsx)(SQ,{}):(0,H.jsx)(a$,{children:r.map((e,t)=>{let n=_Q(e);return(0,H.jsx)(sR,{shape:`round`,variant:`soft`,label:gQ(e),...n?{href:n}:null},`${e.number}-${t}`)})})}var FQ={fontVariant:[`tabular-nums`]},IQ=({text:e})=>(0,H.jsx)(U,{fontSize:`$2`,color:`$ink`,numberOfLines:1,...FQ,children:e});function LQ({field:e,value:t}){let n=QZ(t);if(n==null)return(0,H.jsx)(SQ,{});let r=e.metadata??{},i=r.decimals==null?n.toLocaleString():n.toLocaleString(void 0,{minimumFractionDigits:r.decimals,maximumFractionDigits:r.decimals});return(0,H.jsx)(IQ,{text:`${r.prefix??``}${i}${r.suffix??``}`})}function RQ({field:e,value:t}){let n=QZ(t);if(n==null)return(0,H.jsx)(SQ,{});let r=(e.metadata??{}).decimals??0;return(0,H.jsx)(IQ,{text:`${n.toLocaleString(void 0,{minimumFractionDigits:r,maximumFractionDigits:r})}%`})}function zQ({field:e,value:t}){let n=e.metadata??{},r=t??{},i=QZ(typeof r==`object`&&r?r.amount:t);if(i==null)return(0,H.jsx)(SQ,{});let a=typeof r==`object`&&r?.currencyCode||n.currencyCode||`USD`,o;try{o=new Intl.NumberFormat(void 0,{style:`currency`,currency:a,maximumFractionDigits:n.decimals??2}).format(i)}catch{o=`${i} ${a}`}return(0,H.jsx)(IQ,{text:o})}function BQ({value:e,max:t,hover:n}){let r=A().aside?.get?.()??`currentColor`,i=n??e;return(0,H.jsx)(y,{items:`center`,gap:2,"aria-hidden":!0,children:Array.from({length:t},(e,t)=>t+1).map(e=>(0,H.jsx)(Em,{size:16,color:e<=i?`$aside`:`$raised`,fill:e<=i?r:`none`},e))})}function VQ({field:e,value:t}){let n=(e.metadata??{}).max??5,r=Math.max(0,Math.min(n,Math.round(QZ(t)??0)));return(0,H.jsx)(y,{role:`img`,"aria-label":`${r} of ${n}`,children:(0,H.jsx)(BQ,{value:r,max:n})})}function HQ({field:e,value:t}){if(t==null||t===``)return(0,H.jsx)(SQ,{});let n=e.metadata??{},r=t===!0||t===`true`||t===1;return(0,H.jsxs)(y,{items:`center`,gap:`$1`,height:20,children:[(0,H.jsx)(r?Vt:Rn,{size:14,color:`$aside`}),(0,H.jsx)(U,{fontSize:`$2`,color:`$aside`,children:r?n.trueLabel??`Yes`:n.falseLabel??`No`})]})}function UQ({field:e,value:t}){let n=ZZ(t);if(!n)return(0,H.jsx)(SQ,{});let r=e.metadata?.options,i=EQ(r,n);return(0,H.jsx)(TQ,{label:i.label,color:i.color})}function WQ({field:e,value:t}){let n=$Z(t).map(ZZ).filter(Boolean);if(n.length===0)return(0,H.jsx)(SQ,{});let r=e.metadata?.options;return(0,H.jsx)(a$,{children:n.map(e=>{let t=EQ(r,e);return(0,H.jsx)(TQ,{label:t.label,color:t.color},e)})})}var GQ=[[`year`,31536e3],[`month`,2592e3],[`week`,604800],[`day`,86400],[`hour`,3600],[`minute`,60]],KQ=(e,t=Date.now())=>{let n=(e.getTime()-t)/1e3,r=new Intl.RelativeTimeFormat(void 0,{numeric:`auto`});for(let[e,t]of GQ)if(Math.abs(n)>=t)return r.format(Math.round(n/t),e);return r.format(Math.round(n),`second`)};function qQ({field:e,value:t}){let n=eQ(t);if(!n)return(0,H.jsx)(SQ,{});let r=new Date(`${n}T00:00:00Z`);if(e.metadata?.display===`relative`){let e=new Date(new Date().toISOString().slice(0,10)+`T00:00:00Z`);return(0,H.jsx)(CQ,{text:KQ(r,e.getTime())})}return(0,H.jsx)(CQ,{text:r.toLocaleDateString(void 0,{timeZone:`UTC`,year:`numeric`,month:`short`,day:`numeric`})})}function JQ({field:e,value:t}){let n=tQ(t);if(!n)return(0,H.jsx)(SQ,{});let r=e.metadata?.display===`relative`;return(0,H.jsx)(CQ,{text:r?KQ(n):n.toLocaleString(void 0,{year:`numeric`,month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`,timeZoneName:`short`})})}function YQ({label:e,seed:t,src:n,shape:r=`square`,href:i,onPress:a}){return(0,H.jsx)(sR,{label:e,startElement:(0,H.jsx)(Bh,{size:`md`,shape:r===`circle`?`circle`:`square`,name:e,colorSeed:t??e,src:n??null}),...i?{href:i}:null,...a?{onPress:a}:null})}function XQ({field:e,value:t}){let n=e.metadata??{},r=n.labelField??`name`,i=$Z(t).map(e=>{let t=xQ(r,e),i=e&&typeof e==`object`?e:null,a=i&&ZZ(i[n.avatarField??`avatarUrl`]).trim()||void 0;return{label:t,seed:i&&ZZ(i.id)||t,src:a}}).filter(e=>e.label);if(i.length===0)return(0,H.jsx)(SQ,{});let a=i.map((e,t)=>(0,H.jsx)(YQ,{label:e.label,seed:e.seed,src:e.src,shape:n.shape},`${e.seed}-${t}`));return i.length===1?a[0]:(0,H.jsx)(a$,{children:a})}var ZQ={api:jp,import:Nm,email:im,calendar:Cp,workflow:zm,webhook:Lm,system:vp,manual:Rp};function QQ({value:e}){let t=vQ(e);if(!t)return(0,H.jsx)(SQ,{});let n=t.source&&t.source!==`member`?ZQ[t.source]:void 0;return(0,H.jsx)(sR,{label:t.name,startElement:n?(0,H.jsx)(n,{size:14,color:`$hint`}):(0,H.jsx)(Bh,{size:`md`,shape:`circle`,name:t.name,src:t.avatarUrl??null})})}function $Q({value:e}){let t=rQ(e);return t?(0,H.jsx)(CQ,{text:t}):(0,H.jsx)(SQ,{})}function e$({value:e}){let t=sQ(e);return t?(0,H.jsx)(CQ,{text:t}):(0,H.jsx)(SQ,{})}function t$({value:e}){let t=ZZ(e);return t?(0,H.jsx)(CQ,{text:t,color:`$hint`,mono:!0}):(0,H.jsx)(SQ,{})}function n$({value:e}){let t=$Z(e).map(e=>typeof e==`string`?{name:e}:e).map(e=>({name:ZZ(e?.label??e?.name).trim()||`file`,url:ZZ(e?.url).trim()}));return t.length===0?(0,H.jsx)(SQ,{}):(0,H.jsx)(a$,{children:t.map((e,t)=>{let n=e.url?uQ(e.url):void 0;return(0,H.jsx)(sR,{variant:`soft`,label:e.name,maxW:120,startElement:(0,H.jsx)(pm,{size:14,color:`$hint`}),...n?{href:n,...wQ}:null},`${e.name}-${t}`)})})}function r$({value:e}){if(e==null)return(0,H.jsx)(SQ,{});let t;try{t=JSON.stringify(e)}catch{t=String(e)}return(0,H.jsx)(CQ,{text:t,color:`$hint`,mono:!0})}function i$({value:e}){if(typeof e==`object`&&e)return(0,H.jsx)(r$,{field:{name:``,label:``,type:`json`},value:e});let t=ZZ(e);return t?(0,H.jsx)(CQ,{text:t}):(0,H.jsx)(SQ,{})}function a$({children:e}){return(0,H.jsx)(fR,{flex:1,minW:0,children:e})}var o$=e=>{let t=new Map;return n=>{let r=n??``,i=t.get(r);return i===void 0&&t.set(r,i=e(n)),i}},s$=(e,t)=>{try{return new Intl.DisplayNames(e?[e]:void 0,{type:t})}catch{return null}},c$=o$(e=>{let t=s$(e,`region`),n=new Intl.Collator(e);return Object.entries(XZ).map(([e,n])=>{let r=e;try{r=t?.of(e)??e}catch{r=e}return{value:e,label:r,callingCode:n}}).sort((e,t)=>n.compare(e.label,t.label))}),l$=(e,t)=>{try{let n=new Intl.NumberFormat(t,{style:`currency`,currency:e,currencyDisplay:`narrowSymbol`}).formatToParts(0).find(e=>e.type===`currency`)?.value;return n&&n!==e?n:void 0}catch{return}},u$=o$(e=>{let t=Intl.supportedValuesOf,n=t?t(`currency`):[`USD`,`EUR`,`GBP`,`JPY`,`CNY`,`CAD`,`AUD`,`CHF`,`INR`,`BRL`],r=s$(e,`currency`);return n.map(t=>{let n=t;try{n=r?.of(t)??t}catch{n=t}return{code:t,name:n,symbol:l$(t,e)}})}),d$=e=>e.field.metadata?.options??[],f$=(e,t)=>{let n=e=>e.normalize(`NFD`).replace(/\p{M}/gu,``).toLowerCase(),r=n(t.trim());return r?e.filter(e=>n(e.label).includes(r)||n(e.value).includes(r)):e};function p$({onSubmit:e,onCancel:t,multiline:n,children:r}){return(0,H.jsx)(z,{width:`100%`,minW:0,onKeyDown:r=>{r.nativeEvent?.isComposing||(r.key===`Enter`&&!(n&&r.shiftKey)?(r.preventDefault?.(),e?.()):r.key===`Escape`&&(r.preventDefault?.(),t?.()))},children:r})}var m$=e=>e.field.label;function h$({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=e.metadata?.placeholder;return(0,H.jsx)(p$,{onSubmit:r,onCancel:i,children:(0,H.jsx)(k_,{"aria-label":e.label,value:ZZ(t),onChangeText:e=>n(e),placeholder:o,autoFocus:a})})}function g$({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=ZZ(Array.isArray(t)?t[0]:t),s=e.metadata?.placeholder??`name@example.com`;return(0,H.jsx)(p$,{onSubmit:r,onCancel:i,children:(0,H.jsx)(k_,{"aria-label":e.label,type:`email`,inputMode:`email`,autoComplete:`email`,value:o,onChangeText:e=>n(e.trim()),placeholder:s,autoFocus:a,"aria-invalid":o!==``&&!fQ(o)||void 0})})}function _$({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=ZZ(typeof t==`object`&&t&&!Array.isArray(t)?t.url:t),s=e.metadata?.placeholder??`https://`;return(0,H.jsx)(p$,{onSubmit:r,onCancel:i,children:(0,H.jsx)(k_,{"aria-label":e.label,type:`url`,inputMode:`url`,value:o,onChangeText:e=>n(e.trim()),placeholder:s,autoFocus:a})})}function v$({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=e.metadata??{},s=mQ(t,o.defaultCountry),[c,l]=(0,V.useState)(s.country??o.defaultCountry?.toUpperCase()),u=(0,V.useMemo)(()=>c$(),[]),d=(e,r)=>{let i=e?XZ[e]:void 0;n(typeof t==`object`&&t&&!Array.isArray(t)?{...t,number:r,countryCode:e,callingCode:i?`+${i}`:void 0}:r.trim()?i?`+${i} ${r.trim()}`:r.trim():null)};return(0,H.jsx)(p$,{onSubmit:r,onCancel:i,children:(0,H.jsxs)(T_,{children:[(0,H.jsx)(AR,{countries:u,value:c??null,onValueChange:e=>{l(e??void 0),d(e??void 0,s.number)}}),(0,H.jsx)(k_,{"aria-label":e.label,type:`tel`,inputMode:`tel`,autoComplete:`tel`,value:s.number,onChangeText:e=>d(c,e),placeholder:o.placeholder??`Phone number`,autoFocus:a})]})})}function y$({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=e.metadata??{};return(0,H.jsx)(p$,{onSubmit:r,onCancel:i,multiline:!0,children:(0,H.jsx)(hv,{"aria-label":e.label,value:ZZ(t),onChangeText:e=>n(e),placeholder:o.placeholder,autoFocus:a,rows:o.rows??3,maxRows:o.rows&&o.rows>10?o.rows:10})})}function b$({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=e.metadata??{};return(0,H.jsx)(p$,{onSubmit:r,onCancel:i,children:(0,H.jsx)(bR,{"aria-label":e.label,value:QZ(t),onValueChange:e=>n(e),placeholder:o.placeholder,autoFocus:a,allowOutOfRange:!0,...o.decimals==null?null:{format:{maximumFractionDigits:o.decimals}}})})}function x$({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=(e.metadata??{}).decimals;return(0,H.jsx)(p$,{onSubmit:r,onCancel:i,children:(0,H.jsx)(T_,{end:(0,H.jsx)(U,{fontSize:`$2`,color:`$hint`,children:`%`}),children:(0,H.jsx)(bR,{"aria-label":e.label,value:QZ(t),onValueChange:e=>n(e),autoFocus:a,allowOutOfRange:!0,...o==null?null:{format:{maximumFractionDigits:o}}})})})}function S$({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=e.metadata??{},s=t??{},c=QZ(typeof s==`object`&&s?s.amount:t),l=typeof s==`object`&&s?.currencyCode||o.currencyCode||`USD`,u=(0,V.useMemo)(()=>u$(),[]);return(0,H.jsx)(p$,{onSubmit:r,onCancel:i,children:(0,H.jsxs)(T_,{children:[(0,H.jsx)(DR,{currencies:u,value:l,onValueChange:e=>n({amount:c,currencyCode:e??l}),selectedFirst:!0}),(0,H.jsx)(bR,{"aria-label":e.label,value:c,onValueChange:e=>n({amount:e,currencyCode:l}),autoFocus:a,allowOutOfRange:!0,format:{maximumFractionDigits:o.decimals??2}})]})})}function C$({field:e,value:t,onChange:n}){let r=(e.metadata??{}).max??5,i=Math.max(0,Math.min(r,Math.round(QZ(t)??0))),[a,o]=(0,V.useState)(null),s=e=>n(Math.max(0,Math.min(r,e)));return(0,H.jsx)(y,{role:`slider`,tabIndex:0,onKeyDown:e=>{let t=e.key===`ArrowRight`||e.key===`ArrowUp`?i+1:e.key===`ArrowLeft`||e.key===`ArrowDown`?i-1:e.key===`Home`?0:e.key===`End`?r:null;t!=null&&(e.preventDefault?.(),s(t))},"aria-label":e.label,"aria-valuemin":0,"aria-valuemax":r,"aria-valuenow":i,"aria-valuetext":`${i} of ${r}`,items:`center`,height:20,rounded:`$xs`,focusVisibleStyle:{outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},onHoverOut:()=>o(null),children:(0,H.jsxs)(y,{position:`relative`,children:[(0,H.jsx)(BQ,{value:i,max:r,hover:a}),(0,H.jsx)(y,{position:`absolute`,t:0,l:0,r:0,b:0,children:Array.from({length:r},(e,t)=>t+1).map(e=>(0,H.jsx)(y,{flex:1,cursor:`pointer`,onHoverIn:()=>o(e),onPress:()=>s(e===i?0:e),"data-star":e},e))})]})})}function w$({field:e,value:t,onChange:n}){let r=e.metadata??{},i=t===!0||t===`true`||t===1;return(0,H.jsxs)(y,{items:`center`,gap:`$2`,children:[(0,H.jsx)(rv,{"aria-label":e.label,checked:i,onCheckedChange:e=>n(e)}),(0,H.jsx)(U,{fontSize:`$2`,color:`$aside`,children:i?r.trueLabel??`Yes`:r.falseLabel??`No`})]})}function T$({children:e,...t}){return(0,H.jsx)(W,{variant:`outline`,width:`100%`,justify:`space-between`,endIcon:(0,H.jsx)(wp,{color:`$hint`}),...t,children:(0,H.jsx)(y,{flex:1,minW:0,items:`center`,gap:`$1`,overflow:`hidden`,children:e})})}var E$=({text:e})=>(0,H.jsx)(U,{fontSize:`$2`,color:`$hush`,numberOfLines:1,children:e}),D$=e=>(0,V.useState)(!!e);function O$(e){let{value:t,onChange:n,autoFocus:r}=e,i=d$(e),[a,o]=D$(r),[s,c]=(0,V.useState)(``),l=ZZ(t),u=i.find(e=>e.value===l),d=f$(i,s);return(0,H.jsxs)(Rg,{open:a,onOpenChange:e=>{o(e),e||c(``)},children:[(0,H.jsx)(Bg,{asChild:!0,children:(0,H.jsx)(T$,{"aria-label":m$(e),children:u?(0,H.jsx)(TQ,{label:u.label,color:u.color}):(0,H.jsx)(E$,{text:`Select…`})})}),(0,H.jsxs)(Wg,{minW:240,children:[(0,H.jsx)(e_,{value:s,onValueChange:c,placeholder:`Search options`,"aria-label":`Search ${m$(e)}`}),l?(0,H.jsx)(Jg,{onSelect:()=>n(null),children:`No ${m$(e)}`}):null,(0,H.jsx)(Qg,{value:l||null,onValueChange:e=>n(e??null),children:(0,H.jsx)(t_,{scrollable:!0,children:d.map(e=>(0,H.jsx)($g,{value:e.value,children:(0,H.jsx)(TQ,{label:e.label,color:e.color})},e.value))})}),d.length===0?(0,H.jsx)(c_,{children:`No options`}):null]})]})}function k$(e){let{value:t,onChange:n,autoFocus:r}=e,i=d$(e),[a,o]=D$(r),[s,c]=(0,V.useState)(``),l=$Z(t).map(ZZ).filter(Boolean),u=f$(i,s);return(0,H.jsxs)(Rg,{open:a,onOpenChange:e=>{o(e),e||c(``)},children:[(0,H.jsx)(Bg,{asChild:!0,children:(0,H.jsx)(T$,{"aria-label":m$(e),children:l.length>0?l.map(e=>{let t=i.find(t=>t.value===e)??{value:e,label:e};return(0,H.jsx)(TQ,{label:t.label,color:t.color},e)}):(0,H.jsx)(E$,{text:`Select…`})})}),(0,H.jsxs)(Wg,{minW:240,children:[(0,H.jsx)(e_,{value:s,onValueChange:c,placeholder:`Search options`,"aria-label":`Search ${m$(e)}`}),(0,H.jsx)(Qg,{multiple:!0,value:l,onValueChange:e=>n($Z(e).map(ZZ)),children:(0,H.jsx)(t_,{scrollable:!0,children:u.map(e=>(0,H.jsx)($g,{value:e.value,children:(0,H.jsx)(TQ,{label:e.label,color:e.color})},e.value))})}),u.length===0?(0,H.jsx)(c_,{children:`No options`}):null]})]})}function A$(e){let{field:t,value:n,onChange:r,onSubmit:i,onCancel:a,autoFocus:o}=e,s=d$(e),c=(t.metadata??{}).shape??`square`,[l,u]=D$(o),[d,f]=(0,V.useState)(``);if(s.length===0){let e=ZZ(typeof n==`object`&&n?n.name??n.id:n);return(0,H.jsx)(p$,{onSubmit:i,onCancel:a,children:(0,H.jsx)(k_,{"aria-label":t.label,value:e,onChangeText:e=>r(e),placeholder:`Related record id…`,autoFocus:o})})}let p=ZZ(typeof n==`object`&&n?n.id??n.value:n),m=s.find(e=>e.value===p),h=f$(s,d),g=e=>(0,H.jsxs)(y,{items:`center`,gap:`$2`,minW:0,children:[(0,H.jsx)(Bh,{size:`md`,shape:c,name:e.label,colorSeed:e.value,src:e.avatarUrl??null}),(0,H.jsx)(U,{fontSize:`$2`,color:`$ink`,numberOfLines:1,children:e.label})]});return(0,H.jsxs)(Rg,{open:l,onOpenChange:e=>{u(e),e||f(``)},children:[(0,H.jsx)(Bg,{asChild:!0,children:(0,H.jsx)(T$,{"aria-label":t.label,children:m?g(m):(0,H.jsx)(E$,{text:`Link a record…`})})}),(0,H.jsxs)(Wg,{minW:280,children:[(0,H.jsx)(e_,{value:d,onValueChange:f,placeholder:`Search records`,"aria-label":`Search ${t.label}`}),p?(0,H.jsx)(Jg,{onSelect:()=>r(null),children:`No ${t.label}`}):null,(0,H.jsx)(Qg,{value:p||null,onValueChange:e=>r(e??null),children:(0,H.jsx)(t_,{scrollable:!0,children:h.map(e=>(0,H.jsx)($g,{value:e.value,children:g(e)},e.value))})}),h.length===0?(0,H.jsx)(c_,{children:`No record found`}):null]})]})}var j$=e=>String(e).padStart(2,`0`),M$=e=>{let[t,n,r]=e.split(`-`).map(Number);return new Date(t,n-1,r)},N$=e=>`${e.getFullYear()}-${j$(e.getMonth()+1)}-${j$(e.getDate())}`;function P$({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=e.type===`dateTime`,[s,c]=D$(a),l=o&&t!=null&&t!==``?new Date(t):null,u=o&&l&&!Number.isNaN(l.getTime())?N$(l):eQ(t),d=l&&!Number.isNaN(l.getTime())?`${j$(l.getHours())}:${j$(l.getMinutes())}`:``,[f,p]=(0,V.useState)(null),m=(e,t=d)=>{if(!e)return n(null);if(!o)return n(e);let r=new Date(`${e}T${/^\d{2}:\d{2}$/.test(t)?t:`00:00`}`);n(Number.isNaN(r.getTime())?null:r.toISOString())},h=u?M$(u).toLocaleDateString(void 0,{year:`numeric`,month:`short`,day:`numeric`})+(o&&d?` ${d}`:``):``;return(0,H.jsxs)(P_,{open:s,onOpenChange:c,placement:`bottom-start`,children:[(0,H.jsx)(F_,{asChild:!0,children:(0,H.jsxs)(T$,{"aria-label":e.label,children:[(0,H.jsx)(Cp,{size:14,color:`$hint`}),h?(0,H.jsx)(U,{fontSize:`$2`,color:`$ink`,numberOfLines:1,children:h}):(0,H.jsx)(E$,{text:`Pick a date…`})]})}),(0,H.jsx)(I_,{size:`sm`,width:280,children:(0,H.jsx)(p$,{onSubmit:r,onCancel:i,children:(0,H.jsxs)(z,{gap:`$2`,children:[(0,H.jsxs)(y,{gap:`$1`,children:[(0,H.jsx)(k_,{"aria-label":`${e.label}, as YYYY-MM-DD`,size:`sm`,flex:1,value:f??u,placeholder:`YYYY-MM-DD`,onChangeText:e=>{p(e),/^\d{4}-\d{2}-\d{2}$/.test(e)&&!Number.isNaN(M$(e).getTime())?m(e):e===``&&m(``)},onBlur:()=>p(null)}),o?(0,H.jsx)(k_,{"aria-label":`${e.label}, time`,size:`sm`,width:72,value:d,placeholder:`HH:mm`,onChangeText:e=>{/^\d{2}:\d{2}$/.test(e)&&m(u||N$(new Date),e)}}):null]}),(0,H.jsx)(Gee,{mode:`single`,selected:u?M$(u):void 0,defaultMonth:u?M$(u):void 0,onSelect:e=>{m(e?N$(e):``),o||c(!1)}}),u?(0,H.jsx)(W,{size:`xs`,variant:`ghost`,emphasis:`subtle`,onPress:()=>{m(``),c(!1)},children:`Clear`}):null]})})})]})}function F$({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=cQ(t),[s,c]=(0,V.useState)(``);return(0,H.jsxs)(z,{gap:`$1`,width:`100%`,minW:0,children:[o.map((e,t)=>(0,H.jsxs)(y,{items:`center`,gap:`$2`,minH:24,children:[(0,H.jsx)(U,{flex:1,minW:0,fontSize:`$2`,color:`$ink`,numberOfLines:1,children:e.label?.trim()||lQ(e.url)}),(0,H.jsx)(W,{size:`icon-2xs`,variant:`ghost`,emphasis:`subtle`,"aria-label":`Remove ${e.label?.trim()||lQ(e.url)}`,onPress:()=>n(o.filter((e,n)=>n!==t)),children:(0,H.jsx)(Rn,{})})]},`${e.url}-${t}`)),(0,H.jsx)(p$,{onSubmit:()=>{let e=s.trim();if(!e)return r?.();n([...o,{url:e}]),c(``)},onCancel:i,children:(0,H.jsx)(k_,{"aria-label":`Add to ${e.label}`,type:`url`,inputMode:`url`,value:s,onChangeText:c,placeholder:`Add a link`,autoFocus:a})})]})}function I$({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=nQ(t),s=(e,t)=>n(!e?.trim()&&!t?.trim()?null:{first:e??``,last:t??``});return(0,H.jsx)(p$,{onSubmit:r,onCancel:i,children:(0,H.jsxs)(y,{gap:`$1`,children:[(0,H.jsx)(k_,{"aria-label":`${e.label}, first name`,flex:1,value:o.first??``,placeholder:`First name`,autoFocus:a,onChangeText:e=>{let t=nQ(e);t.last&&!o.last&&e.includes(` `)?s(t.first,t.last):s(e,o.last)}}),(0,H.jsx)(k_,{"aria-label":`${e.label}, last name`,flex:1,value:o.last??``,placeholder:`Last name`,onChangeText:e=>s(o.first,e)})]})})}var L$={street1:`Address 1`,street2:`Address 2`,city:`City`,state:`State`,postcode:`Post code`,country:`Country`};function R$({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=(e.metadata??{}).defaultCountry,s=aQ(t),c=(0,V.useMemo)(()=>c$().map(e=>({value:e.value,label:e.label})),[]),l=(e,t)=>{let r={...s,[e]:t??void 0};t||delete r[e],n(Object.keys(r).length?r:null)};return(0,H.jsx)(p$,{onSubmit:r,onCancel:i,children:(0,H.jsxs)(z,{gap:`$1`,width:344,maxW:`100%`,children:[[`street1`,`street2`].map((e,t)=>(0,H.jsx)(k_,{"aria-label":L$[e],placeholder:L$[e],value:s[e]??``,autoFocus:a&&t===0,onChangeText:t=>l(e,t)},e)),(0,H.jsxs)(y,{gap:`$1`,children:[(0,H.jsx)(k_,{"aria-label":L$.city,placeholder:L$.city,flex:1,value:s.city??``,onChangeText:e=>l(`city`,e)}),(0,H.jsx)(k_,{"aria-label":L$.state,placeholder:L$.state,flex:1,value:s.state??``,onChangeText:e=>l(`state`,e)})]}),(0,H.jsxs)(y,{gap:`$1`,children:[(0,H.jsx)(k_,{"aria-label":L$.postcode,placeholder:L$.postcode,flex:1,value:s.postcode??``,onChangeText:e=>l(`postcode`,e)}),(0,H.jsx)(z,{flex:1,minW:0,children:(0,H.jsx)(NR,{"aria-label":L$.country,countries:c,value:(s.country&&/^[A-Za-z]{2}$/.test(s.country)?s.country.toUpperCase():null)??o?.toUpperCase()??null,onValueChange:e=>l(`country`,e)})})]})]})})}function z$({value:e,onChange:t}){let n=$Z(e),r=e=>typeof e==`string`?e:ZZ(e?.label??e?.name??`file`);return(0,H.jsxs)(z,{gap:`$2`,children:[typeof document<`u`?(0,H.jsx)(W,{size:`sm`,variant:`outline`,startIcon:(0,H.jsx)(Nm,{}),onPress:()=>{if(typeof document>`u`)return;let e=document.createElement(`input`);e.type=`file`,e.multiple=!0,e.onchange=()=>t(e.files?[...n,...Array.from(e.files)]:n),e.click()},self:`flex-start`,children:`Choose files`}):(0,H.jsx)(U,{fontSize:`$2`,color:`$hint`,children:`File upload is available on the web.`}),n.length>0?(0,H.jsx)(y,{gap:`$1`,flexWrap:`wrap`,children:n.map((e,i)=>(0,H.jsxs)(y,{items:`center`,gap:`$1`,height:24,pl:`$2`,pr:`$1`,rounded:`$xs`,bg:`$hover`,children:[(0,H.jsx)(U,{fontSize:`$2`,color:`$ink`,numberOfLines:1,maxW:160,children:r(e)}),(0,H.jsx)(W,{size:`icon-2xs`,variant:`ghost`,emphasis:`subtle`,"aria-label":`Remove ${r(e)}`,onPress:()=>t(n.filter((e,t)=>t!==i)),children:(0,H.jsx)(Rn,{})})]},`${r(e)}-${i}`))}):null]})}function B$(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function V$({field:e,value:t,onChange:n,onCancel:r}){let[i,a]=(0,V.useState)(()=>t==null?``:typeof t==`string`?t:B$(t));return(0,H.jsx)(z,{gap:`$1`,width:400,maxW:`100%`,onKeyDown:e=>e.key===`Escape`&&r?.(),children:(0,H.jsx)(NL,{label:e.label,language:`json`,value:i,minHeight:120,maxHeight:300,onChange:e=>{a(e);let t=cL(e);t.kind===`empty`?n(null):t.kind===`json`&&n(t.value)}})})}var H$=!1;function U$(){H$||(H$=!0,JZ(`text`,{Display:DQ,Input:h$}),JZ(`longText`,{Display:OQ,Input:y$}),JZ(`richText`,{Display:kQ,Input:y$}),JZ(`number`,{Display:LQ,Input:b$}),JZ(`percent`,{Display:RQ,Input:x$}),JZ(`currency`,{Display:zQ,Input:S$}),JZ(`boolean`,{Display:HQ,Input:w$}),JZ(`select`,{Display:UQ,Input:O$}),JZ(`multiSelect`,{Display:WQ,Input:k$}),JZ(`date`,{Display:qQ,Input:P$}),JZ(`dateTime`,{Display:JQ,Input:P$}),JZ(`email`,{Display:AQ,Input:g$}),JZ(`url`,{Display:MQ,Input:_$}),JZ(`phone`,{Display:PQ,Input:v$}),JZ(`rating`,{Display:VQ,Input:C$}),JZ(`links`,{Display:NQ,Input:F$}),JZ(`relation`,{Display:XQ,Input:A$}),JZ(`json`,{Display:r$,Input:V$}),JZ(`files`,{Display:n$,Input:z$}),JZ(`uuid`,{Display:t$}),JZ(`fullName`,{Display:$Q,Input:I$}),JZ(`address`,{Display:e$,Input:R$}),JZ(`position`,{Display:LQ}),JZ(`actor`,{Display:QQ}))}U$();function W$(e){let t=YZ(e.field.type)?.Display??i$;return(0,H.jsx)(t,{...e})}function G$(e){let t=YZ(e.field.type)?.Input;return t?(0,H.jsx)(t,{...e}):null}function K$(e){return!!YZ(e)?.Input}function q$({trigger:e,children:t,open:n,onOpenChange:r,placement:i=`bottom-start`,width:a=240,maxHeight:o=320,header:s}){return(0,H.jsxs)(P_,{placement:i,open:n,onOpenChange:r,allowFlip:!0,children:[(0,H.jsx)(F_,{asChild:!0,children:e}),(0,H.jsxs)(I_,{size:`sm`,p:0,gap:0,width:a,overflow:`hidden`,children:[s?(0,H.jsx)(z,{p:`$1`,borderBottomWidth:1,borderColor:`$borderColor`,children:s}):null,(0,H.jsx)(Mt,{style:{maxHeight:o},children:(0,H.jsx)(z,{p:`$1`,gap:2,children:t})})]})]})}function J$({children:e,onPress:t,active:n,icon:r,trailing:i,tone:a=`default`}){return(0,H.jsxs)(y,{role:`menuitem`,tabIndex:0,onPress:t,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault?.(),t?.())},cursor:`pointer`,items:`center`,gap:`$2`,minH:32,px:`$2`,rounded:`$xs`,bg:n?`$hover`:`transparent`,hoverStyle:{bg:a===`danger`?`var(--state-error-bg)`:`$hover`},focusVisibleStyle:{outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},children:[r?(0,H.jsx)(y,{items:`center`,justify:`center`,shrink:0,children:r}):null,(0,H.jsx)(z,{flex:1,minW:0,children:typeof e==`string`?(0,H.jsx)(U,{fontSize:`$2`,color:a===`danger`?`$bad`:`$aside`,numberOfLines:1,children:e}):e}),i??null]})}function Y$({checked:e,indeterminate:t,onChange:n,size:r=16,label:i}){return(0,H.jsx)(ng,{size:r>16?`md`:`sm`,variant:`solid`,hoverable:!0,checked:t?`indeterminate`:!!e,onCheckedChange:()=>n?.(t?!0:!e),"aria-label":i??(t?`Select all`:`Select`)})}var X$=e=>e==null?``:String(e),Z$=e=>{if(e==null||e===``)return null;if(typeof e==`object`&&!Array.isArray(e)&&`amount`in e)return Z$(e.amount);let t=typeof e==`number`?e:Number(e);return Number.isFinite(t)?t:null},Q$=e=>Array.isArray(e)?e:e==null?[]:[e],$$=864e5,e1=e=>typeof e==`string`&&/^\d{4}-\d{2}-\d{2}$/.test(e.trim()),t1=e=>{if(e==null||e===``)return null;let t=(e instanceof Date?e:new Date(e)).getTime();return Number.isNaN(t)?null:t},n1=(e,t)=>(e?.metadata?.options)?.find(e=>e.value===t)?.label??t;function r1(e,t){let n=e?.metadata?.labelField??`name`;if(typeof t==`string`)return t;if(t&&typeof t==`object`){let e=t;return X$(e[n]??e.label??e.name??e.id)}return``}function i1(e,t){switch(e?.type){case`number`:case`percent`:case`rating`:case`position`:return Z$(t);case`currency`:{let e=t??{};return Z$(typeof e==`object`&&e?e.amount:t)}case`boolean`:return+(t===!0||t===`true`||t===1);case`date`:case`dateTime`:return t1(t);case`select`:return t==null||t===``?null:n1(e,X$(t)).toLowerCase();case`multiSelect`:return Q$(t).map(t=>n1(e,X$(t))).join(`, `).toLowerCase()||null;case`relation`:return r1(e,t).toLowerCase()||null;case`links`:return Q$(t).map(e=>typeof e==`string`?e:e?.url??``).join(`, `).toLowerCase()||null;case`fullName`:return rQ(t).toLowerCase()||null;case`address`:return sQ(t).toLowerCase()||null;case`phone`:return gQ(mQ(t)).toLowerCase()||null;case`email`:return dQ(t).join(`, `).toLowerCase()||null;case`actor`:return vQ(t)?.name.toLowerCase()||null;case`richText`:return yQ(t).toLowerCase()||null;default:{let e=X$(t);return e===``?null:e.toLowerCase()}}}var a1=(e,t)=>e.find(e=>e.name===t);function o1(e,t){return typeof e==`number`&&typeof t==`number`?e-t:String(e).localeCompare(String(t))}function s1(e,t,n){return t.length===0?e.slice():e.map((e,t)=>[e,t]).sort(([e,r],[i,a])=>{for(let r of t){let t=a1(n,r.field),a=i1(t,e[r.field]),o=i1(t,i[r.field]);if(a===null&&o===null)continue;if(a===null)return 1;if(o===null)return-1;let s=o1(a,o);if(s!==0)return r.dir===`asc`?s:-s}return r-a}).map(([e])=>e)}function c1(e,t){let n=e.length===1&&e[0].field===t?e[0]:void 0;return n?n.dir===`asc`?[{field:t,dir:`desc`}]:[]:[{field:t,dir:`asc`}]}function l1(e,t){return e.find(e=>e.field===t)?.dir}function u1(e){let t=Array.isArray(e)?e:[],n=e=>e==null||e===``?void 0:e;return[n(t[0]),n(t[1])]}function d1(e){return e.op===`isEmpty`||e.op===`isNotEmpty`?!0:e.op===`between`?u1(e.value).some(e=>e!==void 0):e.op===`isAnyOf`?Array.isArray(e.value)&&e.value.length>0:e.value!=null&&e.value!==``}var f1={contains:`contains`,notContains:`does not contain`,is:`is`,isNot:`is not`,gt:`is greater than`,gte:`is at least`,lt:`is less than`,lte:`is at most`,isEmpty:`is empty`,isNotEmpty:`is not empty`,isAnyOf:`is any of`,between:`is between`},p1=[`contains`,`notContains`,`is`,`isNot`,`isEmpty`,`isNotEmpty`],m1=[`is`,`isNot`,`between`,`gt`,`gte`,`lt`,`lte`,`isEmpty`,`isNotEmpty`],h1=[`is`,`isNot`,`isAnyOf`,`isEmpty`,`isNotEmpty`],g1=[`is`];function _1(e){switch(e){case`number`:case`percent`:case`currency`:case`rating`:case`date`:case`dateTime`:return m1;case`select`:case`multiSelect`:case`relation`:return h1;case`boolean`:return g1;default:return p1}}var v1=(e,t)=>t==null||t===``?!0:Array.isArray(t)?t.length===0:e?.type===`currency`&&Z$(t?.amount)==null,y1=e=>e===`number`||e===`percent`||e===`currency`||e===`rating`||e===`date`||e===`dateTime`;function b1(e,t){if(e?.type===`multiSelect`)return Q$(t).map(X$).filter(e=>e!==``);if(e?.type===`relation`){let e=x1(t);return e?[e]:[]}let n=X$(t);return n===``?[]:[n]}var x1=e=>{if(typeof e==`string`)return e;if(e&&typeof e==`object`){let t=e;return X$(t.id??t.value??``)}return``};function S1(e,t,n){if(n.op===`isEmpty`)return v1(e,t);if(n.op===`isNotEmpty`)return!v1(e,t);let r=e?.type;if(r===`boolean`){let e=t===!0||t===`true`||t===1,r=n.value===!0||n.value===`true`||n.value===1;return n.op===`isNot`?e!==r:e===r}if(r===`select`||r===`multiSelect`||r===`relation`){let r=new Set(b1(e,t));if(n.op===`isAnyOf`){let e=new Set((Array.isArray(n.value)?n.value:[]).map(X$));return e.size===0||[...r].some(t=>e.has(t))}let i=X$(n.value);return n.op===`is`?r.has(i):n.op!==`isNot`||!r.has(i)}if(y1(r)){let i=i1(e,t),a=typeof i==`number`?i:null,o=r===`date`||r===`dateTime`,s=e=>o?t1(e):Z$(e);if(n.op===`between`){let[e,t]=u1(n.value),r=e===void 0?null:s(e),i=t===void 0?null:s(t);if(a==null)return!1;let c=i!=null&&o&&e1(t)?i+$$-1:i;return(r==null||a>=r)&&(c==null||a<=c)}let c=s(n.value);if(a==null||c==null)return n.op===`isNot`;switch(n.op){case`is`:return a===c;case`isNot`:return a!==c;case`gt`:return a>c;case`gte`:return a>=c;case`lt`:return a<c;case`lte`:return a<=c;default:return!0}}let i=X$(i1(e,t)),a=X$(n.value).toLowerCase();switch(n.op){case`contains`:return i.includes(a);case`notContains`:return!i.includes(a);case`is`:return i===a;case`isNot`:return i!==a;default:return!0}}function C1(e,t,n,r=`and`){let i=t.filter(d1);if(i.length===0)return e.slice();let a=e=>t=>S1(a1(n,t.field),e[t.field],t);return e.filter(e=>r===`or`?i.some(a(e)):i.every(a(e)))}function w1(e,t,n){let r=t.trim().toLowerCase();return r?e.filter(e=>n.some(t=>{let n=i1(t,e[t.name]);return n!=null&&String(n).toLowerCase().includes(r)})):e.slice()}function T1(e,t,n){let r=e.length,i=Math.max(1,Math.ceil(r/n)),a=Math.min(Math.max(1,t),i),o=(a-1)*n,s=e.slice(o,o+n);return{items:s,page:a,pageCount:i,total:r,from:r===0?0:o+1,to:o+s.length}}function E1(e,t,n){let r=e.filter(e=>!n?.has(e.name));if(!t||t.length===0)return r;let i=new Map(r.map(e=>[e.name,e])),a=[];for(let e of t){let t=i.get(e);t&&(a.push(t),i.delete(e))}for(let e of r)i.has(e.name)&&a.push(e);return a}var D1=new Set([`boolean`,`select`,`multiSelect`,`date`,`dateTime`,`relation`,`rating`,`files`]),O1=80,k1={regular:{row:44,pad:12,select:44},compact:{row:32,pad:8,select:28}};function A1(e){let{fields:t,records:n,getRowKey:r,loading:i,empty:a=`No records yet.`,sorts:o=[],onSortChange:s,onOpen:c,selectable:l,onSelectionChange:u,bulkActions:d,editable:f,onEditCommit:p,fieldOptions:m,columnOrder:h,onColumnOrderChange:g,hiddenFields:_,pageSize:v=25,remote:b}=e,x=k1[st()],S=e.rowHeight??x.row,C=x.select,w=(0,V.useMemo)(()=>new Set(_??[]),[_]),[T,E]=(0,V.useState)(h);(0,V.useEffect)(()=>{h&&E(h)},[h]);let D=(0,V.useMemo)(()=>E1(t,T,w),[t,T,w]),[O,k]=(0,V.useState)({}),[A,j]=(0,V.useState)(new Set),[ee,M]=(0,V.useState)(null),[N,P]=(0,V.useState)(void 0),[te,F]=(0,V.useState)(null),[I,ne]=(0,V.useState)(1),re=(0,V.useCallback)((e,t)=>r?r(e,t):e.id==null?String(t):String(e.id),[r]),ie=(0,V.useMemo)(()=>{if(b){let e=v>0?v:Math.max(1,n.length),t=b.total===0||n.length===0?0:(b.page-1)*e+1;return{items:n,page:b.page,pageCount:Math.max(1,Math.ceil(b.total/e)),total:b.total,from:t,to:t===0?0:t+n.length-1}}return v>0?T1(n,I,v):{items:n,page:1,pageCount:1,total:n.length,from:+!!n.length,to:n.length}},[n,I,v,b]);(0,V.useEffect)(()=>{!b&&I>ie.pageCount&&ne(ie.pageCount)},[b,I,ie.pageCount]);let L=e=>{let t=Math.min(Math.max(1,e),ie.pageCount);b?b.onPage(t):ne(t)},ae=(0,V.useCallback)(e=>{j(e),u?.([...e])},[u]),oe=ie.items.map((e,t)=>re(e,t)),R=oe.length>0&&oe.every(e=>A.has(e)),se=oe.some(e=>A.has(e)),ce=()=>{let e=new Set(A);R?oe.forEach(t=>e.delete(t)):oe.forEach(t=>e.add(t)),ae(e)},le=e=>{let t=new Set(A);t.has(e)?t.delete(e):t.add(e),ae(t)},ue=e=>s?.(c1(o,e)),de=(0,V.useRef)([]),[fe,pe]=(0,V.useState)(null),me=(e,t)=>n=>{let r=n.clientX??n.nativeEvent?.clientX??0,i=t?.getBoundingClientRect().width??O1,a=t=>k(n=>({...n,[e]:Math.max(O1,i+(t.clientX-r))})),o=()=>{window.removeEventListener(`pointermove`,a),window.removeEventListener(`pointerup`,o)};window.addEventListener(`pointermove`,a),window.addEventListener(`pointerup`,o)},he=e=>t=>{if(!g&&h)return;let n=de.current.map(e=>e?.getBoundingClientRect()??null),r=t.clientX??t.nativeEvent?.clientX??0;pe({from:e,x:r,target:e});let i=t=>{let r=n.length-1;for(let e=0;e<n.length;e++){let i=n[e];if(i&&t.clientX<i.left+i.width/2){r=e;break}}pe({from:e,x:t.clientX,target:r})},a=()=>{window.removeEventListener(`pointermove`,i),window.removeEventListener(`pointerup`,a),pe(e=>{if(e&&e.target!==e.from){let t=D.map(e=>e.name),[n]=t.splice(e.from,1);t.splice(e.target,0,n),E(t),g?.(t)}return null})};window.addEventListener(`pointermove`,i),window.addEventListener(`pointerup`,a)},ge=(e,t,n)=>{f&&!t.readOnly&&K$(t.type)&&(M({key:e,field:t.name}),P(n))},_e=()=>{M(null),P(void 0)},ve=(0,V.useCallback)(async(e,t,n)=>{let r=`${ee?.key}:${t.name}`;if(M(null),P(void 0),p)try{F(r),await p(e,t,n)}finally{F(null)}},[ee,p]),ye=!f&&!!c,be=(l?C:0)+D.reduce((e,t)=>e+(O[t.name]??t.width??160),0),xe=e=>{let t=O[e.name]??e.width;return t?{width:t}:{flex:1,minW:140}},Se={borderBottomWidth:1,borderColor:`$borderColor`};return(0,H.jsxs)(z,{"data-slot":`data-table`,rounded:`$3`,overflow:`hidden`,borderWidth:1,borderColor:`$borderColor`,bg:`$background`,children:[l&&A.size>0?(0,H.jsxs)(y,{items:`center`,justify:`space-between`,px:x.pad,py:`$2`,bg:`$panel`,...Se,children:[(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`600`,color:`$ink`,children:`${A.size} selected`}),(0,H.jsxs)(y,{items:`center`,gap:`$2`,children:[d?.([...A]),(0,H.jsx)(W,{size:`xs`,variant:`ghost`,emphasis:`subtle`,onPress:()=>ae(new Set),children:`Clear`})]})]}):null,(0,H.jsxs)(z,{role:`table`,"aria-rowcount":ie.total+1,style:{minWidth:be},children:[(0,H.jsxs)(y,{bg:`$panel`,minH:S,...Se,role:`row`,children:[l?(0,H.jsx)(y,{width:C,items:`center`,justify:`center`,shrink:0,role:`columnheader`,children:(0,H.jsx)(Y$,{checked:R,indeterminate:!R&&se,onChange:ce,label:`Select all rows`})}):null,D.map((e,t)=>{let n=l1(o,e.name),r=fe&&fe.target===t&&fe.from!==t;return(0,H.jsxs)(y,{...xe(e),role:`columnheader`,"aria-sort":n===`asc`?`ascending`:n===`desc`?`descending`:void 0,items:`center`,gap:`$1`,px:x.pad,borderLeftWidth:r?2:0,borderLeftColor:`var(--primary)`,opacity:fe?.from===t?.5:1,ref:e=>{de.current[t]=e},style:{position:`relative`},children:[(0,H.jsxs)(y,{items:`center`,gap:`$1`,flex:1,minW:0,cursor:`pointer`,onPress:()=>ue(e.name),onPointerDown:he(t),children:[(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`500`,numberOfLines:1,color:`$aside`,children:e.label}),n===`asc`?(0,H.jsx)(gp,{size:12,color:`$hint`}):n===`desc`?(0,H.jsx)(pp,{size:12,color:`$hint`}):s?(0,H.jsx)(Dp,{size:12,color:`$hush`}):null]}),(0,H.jsx)(z,{width:8,height:`100%`,cursor:`col-resize`,onPointerDown:me(e.name,de.current[t]),style:{position:`absolute`,right:-4,top:0,zIndex:2}})]},e.name)})]}),i?(0,H.jsx)(y,{role:`row`,children:(0,H.jsxs)(y,{flex:1,px:`$4`,py:`$6`,items:`center`,justify:`center`,gap:`$2`,role:`cell`,"aria-live":`polite`,children:[(0,H.jsx)(op,{size:`small`,"aria-hidden":!0}),(0,H.jsx)(U,{fontSize:`$2`,color:`$hint`,children:`Loading…`})]})}):ie.items.length===0?(0,H.jsx)(y,{role:`row`,children:(0,H.jsx)(z,{flex:1,px:`$4`,py:`$7`,items:`center`,gap:`$1`,role:`cell`,children:typeof a==`string`?(0,H.jsx)(U,{fontSize:`$2`,color:`$hint`,children:a}):a})}):ie.items.map((e,t)=>{let n=re(e,t),r=A.has(n);return(0,H.jsxs)(y,{group:!0,role:`row`,"aria-selected":l?r:void 0,items:`stretch`,cursor:ye?`pointer`:void 0,onPress:ye?()=>c?.(e):void 0,bg:r?`$hover`:`transparent`,hoverStyle:{bg:`$hover`},minH:S,...Se,children:[l?(0,H.jsx)(y,{width:C,items:`center`,justify:`center`,shrink:0,role:`cell`,children:(0,H.jsx)(Y$,{checked:r,onChange:()=>le(n),label:`Select row ${ie.from+t}`})}):null,D.map((t,r)=>{let i=f&&ee?.key===n&&ee.field===t.name,a=f&&!t.readOnly&&K$(t.type),o=`${n}:${t.name}`,s=m?.(t)?{...t,metadata:{...t.metadata,options:m(t)}}:t;return(0,H.jsxs)(y,{...xe(t),role:`cell`,items:`center`,px:x.pad,minW:0,style:{position:`relative`},children:[i?(0,H.jsx)(z,{flex:1,minW:0,py:`$1`,onPress:e=>e.stopPropagation?.(),children:(0,H.jsx)(G$,{field:s,value:N,autoFocus:!0,onChange:n=>D1.has(t.type)?void ve(e,t,n):P(n),onSubmit:()=>void ve(e,t,N),onCancel:_e})}):(0,H.jsxs)(y,{flex:1,minW:0,items:`center`,gap:`$1`,minH:S-8,cursor:a?`text`:void 0,onPress:a?()=>ge(n,t,e[t.name]):void 0,hoverStyle:a?{bg:`$raised`}:void 0,rounded:`$xs`,px:a?`$1`:0,mx:a?-4:0,overflow:`hidden`,children:[(0,H.jsx)(W$,{field:t,value:e[t.name]}),te===o?(0,H.jsx)(op,{size:`small`,"aria-hidden":!0}):null]}),r===0&&c&&f&&!i?(0,H.jsx)(y,{position:`absolute`,r:x.pad/2,opacity:0,"$group-hover":{opacity:1},focusWithinStyle:{opacity:1},children:(0,H.jsx)(Wm,{framed:!0,size:`icon-2xs`,variant:`ghost`,children:(0,H.jsx)(W,{size:`icon-2xs`,variant:`ghost`,emphasis:`subtle`,"aria-label":`Open record`,onPress:()=>c(e),children:(0,H.jsx)(om,{})})})}):null]},t.name)})]},n)})]}),!i&&v>0&&ie.total>0?(0,H.jsxs)(y,{items:`center`,justify:`space-between`,px:x.pad,py:`$1`,bg:`$panel`,borderTopWidth:1,borderColor:`$borderColor`,children:[(0,H.jsx)(U,{fontSize:`$1`,color:`$hint`,children:`${ie.from.toLocaleString()}–${ie.to.toLocaleString()} of ${ie.total.toLocaleString()}`}),(0,H.jsxs)(y,{items:`center`,gap:`$1`,children:[(0,H.jsx)(W,{size:`icon-xs`,variant:`ghost`,emphasis:`subtle`,"aria-label":`Previous page`,disabled:ie.page<=1,onPress:()=>L(ie.page-1),children:(0,H.jsx)(Tp,{})}),(0,H.jsx)(U,{fontSize:`$1`,px:`$1`,color:`$hint`,children:`${ie.page.toLocaleString()} / ${ie.pageCount.toLocaleString()}`}),(0,H.jsx)(W,{size:`icon-xs`,variant:`ghost`,emphasis:`subtle`,"aria-label":`Next page`,disabled:ie.page>=ie.pageCount,onPress:()=>L(ie.page+1),children:(0,H.jsx)(rt,{})})]})]}):null]})}var j1=`red.ruby.crimson.tomato.orange.amber.yellow.lime.grass.green.jade.mint.teal.cyan.sky.blue.iris.violet.purple.plum.pink.bronze.gold.brown.gray.mauve.olive.sage.sand.slate`.split(`.`),M1=e=>({bg:`var(--data-${e}-3)`,fg:`var(--data-${e}-11)`,border:`var(--data-${e}-6)`});Object.fromEntries(j1.map(e=>[e,M1(e)]));var N1={text:`#f4f4f5`,textMuted:`#a1a1aa`,textFaint:`#71717a`,surface:`#09090b`,surfaceRaised:`#0a0a0a`,border:`#27272a`,hover:`#18181b`,accent:`#60a5fa`,danger:`#fca5a5`},P1=M(z,{name:`Card`,backgroundColor:`$background`,position:`relative`,borderRadius:`$true`}),F1={header:32,check:24,value:156,icon:16,rows:2};function I1(e){return st()===`compact`?(0,H.jsx)(z1,{...e}):(0,H.jsx)(B1,{...e})}var L1=(e,t,n)=>{let r=e??t[0]?.name,i=r==null?void 0:n[r];return{name:r,text:i==null||i===``?`Untitled`:String(i)}},R1=e=>{let t=e?.target;return!!(t instanceof Element&&t.closest(`button, a, [role="button"], [role="checkbox"], [role="link"]`))};function z1({titleField:e,fields:t,record:n,onPress:r,selected:i=!1,onSelectedChange:a,active:o=!1,fieldIcons:s,imageField:c,drag:l}){let[u,d]=(0,V.useState)(!1),[f,p]=(0,V.useState)(!1),m=L1(e,t,n),h=t.filter(e=>e.name!==m.name&&e.name!==c),g=n.id==null?m.text:String(n.id),_=c?n[c]:void 0,v=r?()=>r(n):void 0,b=a&&(u||i);return(0,H.jsxs)(z,{"data-slot":`record-card`,"data-selected":i?``:void 0,"data-active":o?``:void 0,bg:i||o||f?`$hover`:`$panel`,borderWidth:1,borderColor:o?`$rim`:`$borderColor`,hoverStyle:{borderColor:`$rim`},rounded:`$xs`,overflow:`hidden`,cursor:v?`pointer`:void 0,opacity:l===`source`?.3:1,scale:l===`preview`?1.02:1,onHoverIn:()=>d(!0),onHoverOut:()=>d(!1),onFocus:()=>p(!0),onBlur:()=>p(!1),onPress:v?e=>R1(e)?void 0:v():void 0,children:[(0,H.jsxs)(y,{"data-slot":`record-card-header`,minH:F1.header,items:`center`,pt:`$2`,pr:`$2`,pb:`$1`,pl:`$2`,children:[(0,H.jsx)(y,{flex:1,minW:0,children:(0,H.jsx)(sR,{size:`sm`,weight:`medium`,label:m.text,startElement:(0,H.jsx)(Bh,{size:`sm`,shape:`rounded`,name:m.text,colorSeed:g,src:_??null}),...v?{onPress:v}:null})}),a?(0,H.jsx)(y,{"data-slot":`record-card-check`,height:20,width:b?F1.check:0,$touchable:{width:F1.check},overflow:`hidden`,justify:`flex-end`,items:`center`,shrink:0,style:{transition:`width 160ms var(--ease-out, ease)`},children:(0,H.jsx)(ng,{variant:`outline`,checked:i,onCheckedChange:e=>a(e===!0),"aria-label":`Select ${m.text}`})}):null]}),h.length?(0,H.jsx)(z,{"data-slot":`record-card-body`,gap:F1.rows,pt:0,pr:`$2`,pb:`$2`,pl:10,children:h.map(e=>(0,H.jsxs)(y,{items:`center`,gap:`$2`,minH:24,children:[s?.[e.name]?(0,H.jsx)(y,{width:F1.icon,height:F1.icon,items:`center`,justify:`center`,shrink:0,children:s[e.name]}):(0,H.jsx)(U,{fontSize:`$1`,color:`$hint`,numberOfLines:1,shrink:0,children:e.label}),(0,H.jsx)(z,{flex:1,minW:0,maxW:F1.value,children:(0,H.jsx)(W$,{field:e,value:n[e.name]})})]},e.name))}):null]})}function B1({titleField:e,fields:t,record:n,onPress:r}){let i=L1(e,t,n),a=t.filter(e=>e.name!==i.name);return(0,H.jsxs)(P1,{p:12,gap:8,borderWidth:1,rounded:8,cursor:r?`pointer`:void 0,hoverStyle:r?{bg:N1.hover}:void 0,onPress:r?()=>r(n):void 0,style:{backgroundColor:N1.surface,borderColor:N1.border},children:[(0,H.jsx)(U,{fontSize:14,fontWeight:`700`,numberOfLines:1,style:{color:N1.text},children:i.text}),a.map(e=>(0,H.jsxs)(y,{gap:8,items:`center`,children:[(0,H.jsx)(U,{fontSize:11,numberOfLines:1,width:84,style:{color:N1.textFaint},children:e.label}),(0,H.jsx)(z,{flex:1,children:(0,H.jsx)(W$,{field:e,value:n[e.name]})})]},e.name))]})}var V1=e=>e==null?``:String(e),H1=new Set([`select`,`boolean`,`relation`]);function U1(e){return e.filter(e=>H1.has(e.type))}function W1(e){let t=e.filter(e=>e.type===`select`);return t.length>0?t[0].name:U1(e)[0]?.name}function G1(e,t){if(e.type===`boolean`)return t==null||t===``?``:t===!0||t===`true`||t===1?`true`:`false`;if(e.type===`relation`){if(t&&typeof t==`object`){let e=t;return V1(e.id??e.value??``)}return V1(t)}return V1(t)}function K1(e){if(e.type===`boolean`){let t=e.metadata??{};return[{key:`true`,label:t.trueLabel??`Yes`,color:`green`},{key:`false`,label:t.falseLabel??`No`,color:`gray`}]}return(e.metadata?.options??[]).map(e=>({key:e.value,label:e.label,color:e.color}))}function q1(e,t,n={}){let r=n.includeEmpty??!0,i=K1(t),a=[],o=new Map,s=new Map,c=(e,t,n)=>{s.has(e)||(s.set(e,[]),a.push(e),o.set(e,{label:t,color:n}))};r&&c(``,n.emptyLabel??`No ${t.label.toLowerCase()}`);for(let e of i)c(e.key,e.label,e.color);for(let i of e){let e=G1(t,i[t.name]);(e!==``||r)&&(s.has(e)||c(e,e||(n.emptyLabel??`No ${t.label.toLowerCase()}`)),s.get(e).push(i))}return a.filter(e=>!(e===``&&(s.get(e)?.length??0)===0&&i.length>0)).map(e=>({key:e,...o.get(e),records:s.get(e)??[]}))}function J1(e,t){return e.type===`boolean`?{[e.name]:t===`true`}:{[e.name]:t===``?null:t}}var Y1=300,X1=200;function Z1(e){let{fields:t,records:n,groupField:r,titleField:i,cardFields:a,onOpen:o,onRecordChange:s,onCreate:c,getRowKey:l}=e,{selectedIds:u,onSelectedChange:d,activeId:f,fieldIcons:p}=e,m=e=>l?l(e):String(e.id??``),h=st()===`compact`,g=h?X1:Y1,_=(e,t)=>h?{selected:u?.has(m(e))??!1,onSelectedChange:d?t=>d(e,t):void 0,active:f!=null&&f===m(e),fieldIcons:p,drag:t}:null,v=t.find(e=>e.name===r),[b,x]=(0,V.useState)({});(0,V.useEffect)(()=>{x({})},[n]);let S=(0,V.useRef)(null),C=(0,V.useRef)([]),[w,T]=(0,V.useState)(null),E=(0,V.useMemo)(()=>v?n.map(e=>b[m(e)]==null?e:{...e,[v.name]:b[m(e)]===``?null:b[m(e)]}):n,[n,b,v]),D=(0,V.useMemo)(()=>v?q1(E,v):[],[E,v]);if(!v)return h?(0,H.jsx)(z,{p:`$5`,items:`center`,borderWidth:1,rounded:`$xs`,borderColor:`$borderColor`,bg:`$panel`,children:(0,H.jsx)(U,{fontSize:`$2`,color:`$hint`,children:`Pick a select or status field to group the board by.`})}):(0,H.jsx)(z,{p:24,items:`center`,borderWidth:1,rounded:10,style:{borderColor:N1.border,backgroundColor:N1.surface},children:(0,H.jsx)(U,{style:{color:N1.textFaint},children:`Pick a select or status field to group the board by.`})});let O=e=>t=>{if(!s)return;let n=m(e),r=G1(v,e[v.name]),i=C.current.map(e=>e?.getBoundingClientRect()??null),a=t.clientX??t.nativeEvent?.clientX??0,o=t.clientY??t.nativeEvent?.clientY??0;T({id:n,from:r,x:a,y:o,target:r});let c=e=>{let t=r;for(let n=0;n<i.length;n++){let a=i[n];if(a&&e.clientX>=a.left&&e.clientX<=a.right){t=D[n]?.key??r;break}}T({id:n,from:r,x:e.clientX,y:e.clientY,target:t})},l=()=>{window.removeEventListener(`pointermove`,c),window.removeEventListener(`pointerup`,l),T(t=>(t&&t.target!==t.from&&(x(e=>({...e,[t.id]:t.target})),Promise.resolve(s(e,J1(v,t.target))).catch(()=>x(e=>{let n={...e};return delete n[t.id],n}))),null))};window.addEventListener(`pointermove`,c),window.addEventListener(`pointerup`,l)},k=w?E.find(e=>m(e)===w.id):void 0,A=()=>S.current?.getBoundingClientRect();return(0,H.jsxs)(z,{ref:e=>{S.current=e},style:{position:`relative`},children:[(0,H.jsx)(Mt,{horizontal:!0,showsHorizontalScrollIndicator:!1,children:(0,H.jsx)(y,{gap:h?8:12,py:2,items:`flex-start`,children:D.map((e,n)=>{let r=w&&w.target===e.key&&w.from!==e.key,l=h?{gap:8,p:4,rounded:`$xs`,bg:r?`$hover`:`transparent`}:{gap:8,p:8,rounded:12,style:{backgroundColor:N1.surfaceRaised,borderWidth:1,borderColor:r?N1.accent:N1.border}};return(0,H.jsxs)(z,{"data-slot":`board-column`,width:g,ref:e=>{C.current[n]=e},...l,children:[h?(0,H.jsxs)(y,{items:`center`,justify:`space-between`,minH:24,px:4,children:[(0,H.jsxs)(y,{items:`center`,gap:`$2`,minW:0,children:[e.key===``?(0,H.jsx)(iR,{variant:`outline`,borderStyle:`dashed`,color:`transparent`,children:e.label}):(0,H.jsx)(iR,{color:e.color??`gray`,children:e.label}),(0,H.jsx)(U,{fontSize:`$1`,color:`$hint`,children:e.records.length})]}),c?(0,H.jsx)(W,{size:`icon-xs`,variant:`ghost`,emphasis:`subtle`,"aria-label":`Add to ${e.label}`,onPress:()=>c(e.key),children:(0,H.jsx)(hm,{})}):null]}):(0,H.jsxs)(y,{items:`center`,justify:`space-between`,px:4,py:2,children:[(0,H.jsxs)(y,{items:`center`,gap:8,children:[e.key===``?(0,H.jsx)(U,{fontSize:13,fontWeight:`700`,style:{color:N1.textMuted},children:e.label}):(0,H.jsx)(TQ,{label:e.label,color:e.color}),(0,H.jsx)(U,{fontSize:12,style:{color:N1.textFaint},children:e.records.length})]}),c?(0,H.jsx)(z,{cursor:`pointer`,p:3,rounded:6,hoverStyle:{bg:N1.hover},onPress:()=>c(e.key),children:(0,H.jsx)(hm,{size:14,color:N1.textMuted})}):null]}),(0,H.jsxs)(z,{gap:8,style:{minHeight:40},children:[e.records.map(e=>{let n=w?.id===m(e);return(0,H.jsx)(z,{onPointerDown:O(e),style:{opacity:n&&!h?.35:1,cursor:s?`grab`:void 0},children:(0,H.jsx)(I1,{titleField:i,fields:a??t.filter(e=>e.name!==v.name),record:e,onPress:o,..._(e,n?`source`:void 0)})},m(e))}),e.records.length===0?h?(0,H.jsx)(z,{items:`center`,justify:`center`,py:`$4`,rounded:`$xs`,borderWidth:1,borderStyle:`dashed`,borderColor:`$borderColor`,children:(0,H.jsx)(U,{fontSize:`$1`,color:`$hint`,children:`Drop here`})}):(0,H.jsx)(z,{items:`center`,justify:`center`,py:16,rounded:8,style:{borderWidth:1,borderColor:N1.border,borderStyle:`dashed`},children:(0,H.jsx)(U,{fontSize:12,style:{color:N1.textFaint},children:`Drop here`})}):null]})]},e.key||`∅`)})})}),w&&k?(0,H.jsx)(z,{width:g-(h?8:20),style:{position:`absolute`,left:w.x-(A()?.left??0)-(g-(h?8:20))/2,top:w.y-(A()?.top??0)-20,pointerEvents:`none`,zIndex:50,...h?null:{transform:[{rotate:`2deg`}],boxShadow:`0 12px 32px rgba(0,0,0,0.4)`}},...h?{className:`elevation-2`}:null,children:(0,H.jsx)(I1,{titleField:i,fields:a??t.filter(e=>e.name!==v.name),record:k,..._(k,`preview`)})}):null]})}var Q1=new Set([`boolean`,`select`,`multiSelect`,`date`,`dateTime`,`relation`,`rating`,`files`]),$1=({children:e})=>(0,H.jsx)(U,{fontSize:`$1`,fontWeight:`500`,color:`$hint`,numberOfLines:1,children:e});function e0({field:e,value:t,editable:n,onCommit:r,options:i}){let[a,o]=(0,V.useState)(!1),[s,c]=(0,V.useState)(t),l=n&&!e.readOnly&&K$(e.type)&&!!r,u=i?{...e,metadata:{...e.metadata,options:i}}:e,d=e=>{o(!1),r?.(e)};return(0,H.jsxs)(z,{gap:`$1`,py:`$2`,borderBottomWidth:1,borderColor:`$borderColor`,children:[(0,H.jsx)($1,{children:e.label}),a?(0,H.jsx)(G$,{field:u,value:s,autoFocus:!0,onChange:t=>Q1.has(e.type)?d(t):c(t),onSubmit:()=>d(s),onCancel:()=>{c(t),o(!1)}}):(0,H.jsx)(y,{items:`center`,minH:24,minW:0,cursor:l?`text`:void 0,rounded:`$xs`,px:l?`$1`:0,mx:l?-4:0,hoverStyle:l?{bg:`$hover`}:void 0,...l?{role:`button`,tabIndex:0,"aria-label":`Edit ${e.label}`}:null,onKeyDown:l?e=>{e.key===`Enter`&&(e.preventDefault?.(),c(t),o(!0))}:void 0,onPress:l?()=>{c(t),o(!0)}:void 0,children:(0,H.jsx)(W$,{field:e,value:t})})]})}function t0({fields:e,record:t,title:n,editable:r,onEditCommit:i,fieldOptions:a,related:o}){return(0,H.jsxs)(z,{gap:2,children:[n?(0,H.jsx)(z,{pb:`$3`,mb:`$1`,borderBottomWidth:1,borderColor:`$borderColor`,children:(0,H.jsx)(U,{fontSize:`$7`,fontWeight:`600`,numberOfLines:2,color:`$ink`,children:n})}):null,e.map(e=>(0,H.jsx)(e0,{field:e,value:t[e.name],editable:r,onCommit:i?t=>i(e,t):void 0,options:a?.(e)},e.name)),o?(0,H.jsx)(z,{pt:`$4`,gap:`$2`,children:o}):null]})}function n0(e,t=`default`,n=e===`board`?`Board`:`All records`){return{id:t,name:n,kind:e,filters:[],sorts:[]}}function r0(e,t,n){let r=e;return t.search&&t.search.trim()&&(r=w1(r,t.search,n)),r=C1(r,t.filters,n,t.match),r=s1(r,t.sorts,n),r}function i0(e){let t=_1(e.type);return{field:e.name,op:t[0]??`contains`}}function a0(e,t){return{...e,filters:[...e.filters,t]}}function o0(e,t,n){return{...e,filters:e.filters.map((e,r)=>r===t?{...e,...n}:e)}}function s0(e,t){return{...e,filters:e.filters.filter((e,n)=>n!==t)}}function c0(e,t){return{...e,match:t}}var l0=e=>e===`or`?`and`:`or`;function u0(e,t){return{...e,sorts:t}}function d0(e,t){return{...e,search:t}}function f0(e,t){return{...e,kind:t}}function p0(e,t){return{...e,groupField:t}}function m0(e,t){let n=new Set(e.hiddenFields??[]);return n.has(t)?n.delete(t):n.add(t),{...e,hiddenFields:[...n]}}var h0=new Set([`text`,`longText`,`email`,`url`]),g0=new Set([`contains`,`notContains`,`is`,`isNot`]);function _0(e,t,n){let r=e.type===`currency`||e.type===`percent`||e.type===`rating`,i=g0.has(t.op)&&!h0.has(e.type)&&e.type!==`select`&&e.type!==`multiSelect`&&e.type!==`relation`&&e.type!==`boolean`&&!r&&e.type!==`date`&&e.type!==`dateTime`&&e.type!==`number`,a=t.op===`isAnyOf`?{...e,type:`multiSelect`}:r?{...e,type:`number`}:i?{...e,type:`text`,metadata:void 0}:e;return n?{...a,metadata:{...a.metadata,options:n}}:a}function v0(e,t){let n=t?.metadata?.options,r=e=>n?.find(t=>t.value===e)?.label??String(e);if(e.op===`between`){let[t,n]=u1(e.value);return t!==void 0&&n!==void 0?`${r(t)} to ${r(n)}`:t===void 0?n===void 0?``:`to ${r(n)}`:`from ${r(t)}`}return e.value==null||e.value===``?``:Array.isArray(e.value)?e.value.map(r).join(`, `):r(e.value)}var y0=e=>e.op!==`isEmpty`&&e.op!==`isNotEmpty`;function b0({field:e,rule:t,onChange:n,fieldOptions:r}){let i=r?.(e),a=(0,V.useMemo)(()=>_0(e,t,i),[e,t,i]);if(t.op!==`between`)return(0,H.jsx)(G$,{field:a,value:t.value,onChange:n});let[o,s]=u1(t.value);return(0,H.jsxs)(y,{items:`center`,gap:6,flex:1,children:[(0,H.jsx)(y,{flex:1,minW:90,"aria-label":`From`,children:(0,H.jsx)(G$,{field:a,value:o,onChange:e=>n([e,s])})}),(0,H.jsx)(U,{fontSize:12,style:{color:N1.textFaint},children:`to`}),(0,H.jsx)(y,{flex:1,minW:90,"aria-label":`To`,children:(0,H.jsx)(G$,{field:a,value:s,onChange:e=>n([o,e])})})]})}var x0={top:39,details:32,chip:24,remove:20,name:130,menu:200,wide:240},S0=(e,t)=>e.find(e=>e.name===t),C0=(e,t)=>e.filter(e=>e.label.toLowerCase().includes(t.trim().toLowerCase()));function w0({open:e,icon:t,children:n,...r}){return(0,H.jsx)(W,{size:`xs`,variant:`ghost`,color:`$aside`,startIcon:t,bg:e?`$hover`:void 0,...r,children:n})}function T0(e){let{fields:t,view:n,onView:r,extra:i,onCreate:a,createLabel:o=`New`,boardDisabled:s}=e,{savedViews:c,dirty:l=!1,onResetView:u,onSaveView:d,onSaveAsView:f}=e,[p,m]=(0,V.useState)(!1),h=n.sorts.length>0||n.filters.length>0||l&&(u||d);return(0,H.jsxs)(z,{"data-slot":`view-bar`,children:[(0,H.jsxs)(y,{"data-slot":`view-bar-top`,minH:x0.top+1,items:`center`,justify:`space-between`,gap:`$2`,ml:`$1`,pr:`$2`,borderBottomWidth:1,borderColor:`$borderColor`,children:[(0,H.jsx)(E0,{...e}),(0,H.jsxs)(y,{items:`center`,gap:`$0.5`,shrink:1,minW:0,children:[(0,H.jsx)(T_,{size:`xs`,start:(0,H.jsx)(vm,{size:14}),width:180,shrink:1,children:(0,H.jsx)(k_,{value:n.search??``,onChangeText:e=>r(d0(n,e)),placeholder:`Search…`,"aria-label":`Search records`})}),(0,H.jsx)(D0,{fields:t,view:n,onView:r,open:p,onOpenChange:m,children:(0,H.jsx)(w0,{open:p,icon:(0,H.jsx)(em,{}),children:`Filter`})}),(0,H.jsx)(k0,{fields:t,view:n,onView:r}),(0,H.jsx)(A0,{fields:t,view:n,onView:r,boardDisabled:s}),i,a?(0,H.jsx)(W,{size:`xs`,variant:`primary`,startIcon:(0,H.jsx)(hm,{}),onPress:a,children:o}):null]})]}),h?(0,H.jsxs)(y,{"data-slot":`view-bar-details`,minH:x0.details,items:`center`,gap:`$2`,py:`$1`,px:`$2`,borderTopWidth:1,borderColor:`$borderColor`,flexWrap:`wrap`,children:[n.sorts.map(e=>(0,H.jsx)(N0,{rule:e,fields:t,view:n,onView:r},`sort-${e.field}`)),n.sorts.length>0&&n.filters.length>0?(0,H.jsx)(z,{"data-slot":`view-bar-rule`,width:1,height:16,bg:`$raised`}):null,n.filters.map((t,i)=>(0,H.jsxs)(V.Fragment,{children:[i>0?(0,H.jsx)(W,{size:`xs`,variant:`ghost`,color:`$aside`,fontWeight:`400`,"aria-label":`Rules combine by ${n.match===`or`?`or`:`and`}; press for ${l0(n.match)}`,onPress:()=>r(c0(n,l0(n.match))),children:n.match===`or`?`or`:`and`}):null,(0,H.jsx)(P0,{index:i,rule:t,...e})]},`filter-${i}`)),(0,H.jsx)(W,{size:`xs`,variant:`ghost`,color:`$aside`,fontWeight:`400`,startIcon:(0,H.jsx)(hm,{}),onPress:()=>m(!0),children:`Add filter`}),(0,H.jsx)(y,{flex:1}),l&&u?(0,H.jsx)(W,{size:`xs`,variant:`ghost`,color:`$aside`,fontWeight:`400`,onPress:u,children:`Reset`}):null,l&&d?(0,H.jsxs)(Wm,{size:`xs`,variant:`outline`,"aria-label":`Update view`,children:[(0,H.jsx)(W,{onPress:d,children:`Update view`}),f?(0,H.jsxs)(Rg,{children:[(0,H.jsx)(Bg,{asChild:!0,children:(0,H.jsx)(W,{size:`icon-xs`,"aria-label":`More ways to save the view`,children:(0,H.jsx)(wp,{})})}),(0,H.jsx)(Wg,{align:`end`,minW:x0.menu,children:(0,H.jsx)(Jg,{onSelect:f,children:`Save as new view`})})]}):null]}):null]}):null]})}function E0({view:e,onView:t,count:n,savedViews:r,boardDisabled:i}){let[a,o]=(0,V.useState)(!1),s=e.kind===`board`?Qp:Dm;return(0,H.jsxs)(Rg,{open:a,onOpenChange:o,children:[(0,H.jsx)(Bg,{asChild:!0,children:(0,H.jsxs)(W,{size:`xs`,variant:`ghost`,color:`$aside`,pl:`$1`,startIcon:(0,H.jsx)(s,{size:16}),endIcon:(0,H.jsx)(wp,{size:14,color:`$hush`}),bg:a?`$hover`:void 0,"aria-label":`View: ${e.name}`,children:[(0,H.jsx)(eR,{text:e.name,maxW:x0.name,fontSize:`$2`,fontWeight:`500`,color:`$aside`}),n==null?null:(0,H.jsx)(U,{fontSize:`$2`,color:`$hint`,children:`· ${n}`})]})}),(0,H.jsxs)(Wg,{minW:x0.menu,children:[r&&r.views.length?(0,H.jsx)(Qg,{value:r.activeId??e.id,onValueChange:e=>{let n=r?.views.find(t=>t.id===e);n&&r&&(r.onSelect(n.id),t(n))},children:(0,H.jsx)(t_,{label:`Views`,children:r.views.map(e=>(0,H.jsx)($g,{value:e.id,children:e.name},e.id))})}):null,i?null:(0,H.jsxs)(Qg,{value:e.kind,onValueChange:n=>n===`table`||n===`board`?t(f0(e,n)):void 0,children:[(0,H.jsx)(u_,{variant:`band`,children:`Layout`}),(0,H.jsx)($g,{value:`table`,children:`Table`}),(0,H.jsx)($g,{value:`board`,children:`Board`})]})]})]})}function D0({fields:e,view:t,onView:n,open:r,onOpenChange:i,children:a}){let[o,s]=(0,V.useState)(``),c=C0(e,o);return(0,H.jsxs)(Rg,{open:r,onOpenChange:e=>{i(e),e||s(``)},children:[(0,H.jsx)(Bg,{asChild:!0,children:a}),(0,H.jsxs)(Wg,{minW:x0.menu,children:[(0,H.jsx)(e_,{value:o,onValueChange:s,placeholder:`Search fields`}),(0,H.jsx)(t_,{scrollable:!0,children:c.map(e=>(0,H.jsx)(Jg,{onSelect:()=>n(a0(t,i0(e))),children:e.label},e.name))}),c.length===0?(0,H.jsx)(c_,{children:`No field matches`}):null]})]})}var O0=(e,t)=>{let n=e.find(e=>e.field===t);return n?n.dir===`asc`?e.map(e=>e.field===t?{...e,dir:`desc`}:e):e.filter(e=>e.field!==t):[...e,{field:t,dir:`asc`}]};function k0({fields:e,view:t,onView:n}){let[r,i]=(0,V.useState)(!1),[a,o]=(0,V.useState)(``),s=C0(e,a);return(0,H.jsxs)(Rg,{open:r,onOpenChange:e=>{i(e),e||o(``)},children:[(0,H.jsx)(Bg,{asChild:!0,children:(0,H.jsx)(w0,{open:r,icon:(0,H.jsx)(fp,{}),children:`Sort`})}),(0,H.jsxs)(Wg,{minW:x0.menu,children:[(0,H.jsx)(e_,{value:a,onValueChange:o,placeholder:`Search fields`}),(0,H.jsx)(t_,{scrollable:!0,children:s.map(e=>{let r=t.sorts.find(t=>t.field===e.name)?.dir;return(0,H.jsx)(Jg,{onSelect:()=>n(u0(t,O0(t.sorts,e.name))),children:(0,H.jsxs)(y,{flex:1,items:`center`,justify:`space-between`,gap:`$2`,children:[(0,H.jsx)(U,{fontSize:`$2`,color:`$aside`,numberOfLines:1,children:e.label}),r===`asc`?(0,H.jsx)(gp,{size:14,color:`$aside`}):r===`desc`?(0,H.jsx)(pp,{size:14,color:`$aside`}):null]})},e.name)})}),s.length===0?(0,H.jsx)(c_,{children:`No field matches`}):null]})]})}function A0({fields:e,view:t,onView:n,boardDisabled:r}){let[i,a]=(0,V.useState)(!1),o=new Set(t.hiddenFields??[]),s=e.filter(e=>!o.has(e.name)).map(e=>e.name),c=U1(e);return(0,H.jsxs)(Rg,{open:i,onOpenChange:a,defaultPage:`options`,children:[(0,H.jsx)(Bg,{asChild:!0,children:(0,H.jsx)(w0,{open:i,icon:(0,H.jsx)(Sm,{}),children:`Options`})}),(0,H.jsxs)(Wg,{align:`end`,minW:x0.wide,children:[(0,H.jsxs)(n_,{id:`options`,children:[(0,H.jsx)(i_,{children:(0,H.jsx)(a_,{children:`View options`})}),(0,H.jsx)(Jg,{page:`fields`,children:`Fields`}),t.kind===`board`&&c.length?(0,H.jsx)(Jg,{page:`group`,children:`Group by`}):null,r?null:(0,H.jsxs)(Qg,{value:t.kind,onValueChange:e=>e===`table`||e===`board`?n(f0(t,e)):void 0,children:[(0,H.jsx)(u_,{variant:`band`,children:`Layout`}),(0,H.jsx)($g,{value:`table`,children:`Table`}),(0,H.jsx)($g,{value:`board`,children:`Board`})]})]}),(0,H.jsxs)(n_,{id:`fields`,children:[(0,H.jsx)(o_,{children:`Fields`}),(0,H.jsx)(Qg,{multiple:!0,value:s,onValueChange:r=>{let i=new Set(Array.isArray(r)?r:r?[r]:[]),a=t;for(let t of e)i.has(t.name)===o.has(t.name)&&(a=m0(a,t.name));n(a)},children:(0,H.jsx)(t_,{scrollable:!0,children:e.map(e=>(0,H.jsx)($g,{value:e.name,children:e.label},e.name))})})]}),(0,H.jsxs)(n_,{id:`group`,children:[(0,H.jsx)(o_,{children:`Group by`}),(0,H.jsx)(Qg,{value:t.groupField??null,onValueChange:e=>n(p0(t,typeof e==`string`?e:void 0)),children:c.map(e=>(0,H.jsx)($g,{value:e.name,children:e.label},e.name))})]})]})]})}function j0({label:e,onRemove:t,children:n}){return(0,H.jsxs)(y,{"data-slot":`view-chip`,height:x0.chip,items:`center`,gap:`$1`,p:`$0.5`,pl:`$1`,rounded:`$xs`,bg:`$hover`,borderWidth:1,borderColor:`$borderColor`,children:[n,(0,H.jsx)(W,{size:`icon-2xs`,variant:`ghost`,emphasis:`subtle`,"aria-label":`Remove ${e}`,onPress:t,children:(0,H.jsx)(Rn,{})})]})}var M0=(e,t,n={})=>(0,H.jsxs)(y,{role:`button`,tabIndex:0,"data-slot":`view-chip-body`,items:`center`,gap:`$1`,cursor:`pointer`,rounded:`$2xs`,focusVisibleStyle:{outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},...n,children:[(0,H.jsx)(U,{fontSize:`$1`,fontWeight:`500`,color:`$ink`,numberOfLines:1,children:e}),t]});function N0({rule:e,fields:t,view:n,onView:r}){let i=S0(t,e.field)?.label??e.field,a=()=>r(u0(n,n.sorts.map(t=>t.field===e.field?{...t,dir:t.dir===`asc`?`desc`:`asc`}:t)));return(0,H.jsx)(j0,{label:`sort by ${i}`,onRemove:()=>r(u0(n,n.sorts.filter(t=>t.field!==e.field))),children:M0(i,e.dir===`asc`?(0,H.jsx)(gp,{size:14,color:`$ink`}):(0,H.jsx)(pp,{size:14,color:`$ink`}),{"aria-label":`Sort by ${i}, ${e.dir===`asc`?`ascending`:`descending`}`,onPress:a,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault?.(),a())}})})}function P0({index:e,rule:t,fields:n,view:r,onView:i,fieldOptions:a}){let[o,s]=(0,V.useState)(!1),c=S0(n,t.field)??n[0],l=_1(c.type),u=v0(t,c);return(0,H.jsx)(j0,{label:`filter on ${c.label}`,onRemove:()=>i(s0(r,e)),children:(0,H.jsxs)(Rg,{open:o,onOpenChange:s,children:[(0,H.jsx)(Bg,{asChild:!0,children:M0(c.label,(0,H.jsx)(U,{fontSize:`$1`,color:`$ink`,numberOfLines:1,children:`: ${f1[t.op]}${u?` ${u}`:``}`}),{"aria-label":`Filter: ${c.label} ${f1[t.op]} ${u}`.trim()})}),(0,H.jsxs)(Wg,{minW:x0.wide,children:[(0,H.jsxs)(Qg,{value:t.op,closeOnSelect:!1,onValueChange:n=>{if(typeof n!=`string`)return;let a=n;i(o0(r,e,a===`between`||t.op===`between`?{op:a,value:void 0}:{op:a}))},children:[(0,H.jsx)(u_,{variant:`band`,children:c.label}),l.map(e=>(0,H.jsx)($g,{value:e,children:f1[e]},e))]}),y0(t)?(0,H.jsx)(z,{p:`$1`,children:(0,H.jsx)(b0,{field:c,rule:t,fieldOptions:a,onChange:t=>i(o0(r,e,{value:t}))})}):null]})]})})}var F0=(e,t)=>e.find(e=>e.name===t);function I0({icon:e,label:t,count:n,active:r,style:i,...a}){return(0,H.jsxs)(y,{role:`button`,tabIndex:0,"aria-label":t,...a,items:`center`,gap:6,px:10,py:7,rounded:8,borderWidth:1,cursor:`pointer`,hoverStyle:{borderColor:N1.textMuted},style:{...i,borderColor:r?N1.accent:N1.border,backgroundColor:r?N1.hover:`transparent`},children:[e,(0,H.jsx)(U,{fontSize:13,fontWeight:`600`,style:{color:r?N1.text:N1.textMuted},children:t}),n?(0,H.jsx)(y,{items:`center`,justify:`center`,width:18,height:18,rounded:9,style:{backgroundColor:N1.accent},children:(0,H.jsx)(U,{fontSize:11,fontWeight:`700`,style:{color:`#0b1220`},children:n})}):null]})}function L0({view:e,onView:t,boardDisabled:n}){let r=(n,r,i)=>{let a=e.kind===n;return(0,H.jsxs)(y,{items:`center`,gap:6,px:10,py:6,rounded:7,cursor:`pointer`,onPress:()=>t(f0(e,n)),style:{backgroundColor:a?N1.surface:`transparent`},hoverStyle:a?void 0:{bg:N1.hover},children:[r,(0,H.jsx)(U,{fontSize:13,fontWeight:`600`,style:{color:a?N1.text:N1.textFaint},children:i})]})};return(0,H.jsxs)(y,{p:3,gap:2,rounded:9,borderWidth:1,style:{borderColor:N1.border,backgroundColor:N1.surfaceRaised},children:[r(`table`,(0,H.jsx)(Dm,{size:14,color:e.kind===`table`?N1.text:N1.textFaint}),`Table`),n?null:r(`board`,(0,H.jsx)(Qp,{size:14,color:e.kind===`board`?N1.text:N1.textFaint}),`Board`)]})}function R0({fields:e,value:t,onPick:n,trigger:r}){let[i,a]=(0,V.useState)(!1);return(0,H.jsx)(q$,{open:i,onOpenChange:a,width:220,trigger:r,children:e.map(e=>(0,H.jsx)(J$,{active:e.name===t,onPress:()=>{n(e.name),a(!1)},children:(0,H.jsx)(U,{fontSize:13,style:{color:N1.text},children:e.label})},e.name))})}function z0({ops:e,value:t,onPick:n}){let[r,i]=(0,V.useState)(!1);return(0,H.jsx)(q$,{open:r,onOpenChange:i,width:200,trigger:(0,H.jsx)(B0,{text:f1[t]}),children:e.map(e=>(0,H.jsx)(J$,{active:e===t,onPress:()=>{n(e),i(!1)},children:(0,H.jsx)(U,{fontSize:13,style:{color:N1.text},children:f1[e]})},e))})}function B0({text:e,style:t,...n}){return(0,H.jsx)(y,{role:`button`,tabIndex:0,...n,items:`center`,px:8,py:5,rounded:7,borderWidth:1,cursor:`pointer`,hoverStyle:{borderColor:N1.textMuted},style:{...t,borderColor:N1.border,backgroundColor:N1.surface},children:(0,H.jsx)(U,{fontSize:12,numberOfLines:1,style:{color:N1.text},children:e})})}function V0({fields:e,view:t,onView:n,fieldOptions:r}){let[i,a]=(0,V.useState)(!1),o=t.filters.filter(d1).length;return(0,H.jsx)(q$,{open:i,onOpenChange:a,width:420,trigger:(0,H.jsx)(I0,{icon:(0,H.jsx)(em,{size:14,color:N1.textMuted}),label:`Filter`,count:o,active:o>0}),children:(0,H.jsxs)(z,{gap:8,p:4,children:[t.filters.length===0?(0,H.jsx)(U,{px:6,py:4,fontSize:12,style:{color:N1.textFaint},children:`No filters yet.`}):null,t.filters.map((i,a)=>{let o=F0(e,i.field)??e[0],s=_1(o.type);return(0,H.jsxs)(y,{items:`center`,gap:6,children:[a===0?(0,H.jsx)(U,{fontSize:12,width:36,style:{color:N1.textFaint},children:`Where`}):(0,H.jsx)(y,{width:36,cursor:`pointer`,onPress:()=>n(c0(t,l0(t.match))),role:`button`,"aria-label":`Rules combine by ${t.match===`or`?`or`:`and`}; press for ${l0(t.match)}`,children:(0,H.jsx)(U,{fontSize:12,fontWeight:`600`,style:{color:N1.accent},children:t.match===`or`?`or`:`and`})}),(0,H.jsx)(R0,{fields:e,value:i.field,onPick:r=>{n(o0(t,a,{field:r,op:_1(F0(e,r).type)[0],value:void 0}))},trigger:(0,H.jsx)(B0,{text:o.label})}),(0,H.jsx)(z0,{ops:s,value:i.op,onPick:e=>n(o0(t,a,e===`between`||i.op===`between`?{op:e,value:void 0}:{op:e}))}),y0(i)?(0,H.jsx)(y,{flex:1,minW:120,children:(0,H.jsx)(b0,{field:o,rule:i,fieldOptions:r,onChange:e=>n(o0(t,a,{value:e}))})}):(0,H.jsx)(y,{flex:1}),(0,H.jsx)(z,{cursor:`pointer`,p:4,rounded:6,hoverStyle:{bg:N1.hover},onPress:()=>n(s0(t,a)),children:(0,H.jsx)(Rn,{size:14,color:N1.textFaint})})]},a)}),(0,H.jsx)(y,{children:(0,H.jsx)(Je,{size:`$2`,icon:(0,H.jsx)(hm,{size:14}),onPress:()=>n(a0(t,i0(e[0]))),children:`Add filter`})})]})})}function H0({fields:e,view:t,onView:n}){let[r,i]=(0,V.useState)(!1),a=e=>t.sorts.find(t=>t.field===e)?.dir,o=e=>{let r=t.sorts.find(t=>t.field===e),i;i=r?r.dir===`asc`?t.sorts.map(t=>t.field===e?{...t,dir:`desc`}:t):t.sorts.filter(t=>t.field!==e):[...t.sorts,{field:e,dir:`asc`}],n(u0(t,i))};return(0,H.jsx)(q$,{open:r,onOpenChange:i,width:240,trigger:(0,H.jsx)(I0,{icon:(0,H.jsx)(fp,{size:14,color:N1.textMuted}),label:`Sort`,count:t.sorts.length,active:t.sorts.length>0}),children:e.map(e=>{let t=a(e.name);return(0,H.jsx)(J$,{active:!!t,onPress:()=>o(e.name),trailing:t===`asc`?(0,H.jsx)(gp,{size:13,color:N1.accent}):t===`desc`?(0,H.jsx)(pp,{size:13,color:N1.accent}):null,children:(0,H.jsx)(U,{fontSize:13,style:{color:N1.text},children:e.label})},e.name)})})}function U0({fields:e,view:t,onView:n}){let[r,i]=(0,V.useState)(!1),a=U1(e),o=F0(e,t.groupField??``);return(0,H.jsxs)(q$,{open:r,onOpenChange:i,width:220,trigger:(0,H.jsx)(I0,{icon:(0,H.jsx)(Np,{size:14,color:N1.textMuted}),label:o?`Group: ${o.label}`:`Group by`,active:!!o}),children:[a.length===0?(0,H.jsx)(U,{px:10,py:6,fontSize:12,style:{color:N1.textFaint},children:`No groupable fields`}):null,a.map(e=>(0,H.jsx)(J$,{active:e.name===t.groupField,onPress:()=>{n(p0(t,e.name)),i(!1)},children:(0,H.jsx)(U,{fontSize:13,style:{color:N1.text},children:e.label})},e.name))]})}function W0(e){return st()===`compact`?(0,H.jsx)(T0,{...e}):(0,H.jsx)(G0,{...e})}function G0(e){let{fields:t,view:n,onView:r,onCreate:i,createLabel:a=`New`,extra:o,boardDisabled:s}=e;return(0,H.jsxs)(y,{items:`center`,gap:8,style:{flexWrap:`wrap`},children:[(0,H.jsx)(L0,{view:n,onView:r,boardDisabled:s}),(0,H.jsx)(V0,{...e}),(0,H.jsx)(H0,{fields:t,view:n,onView:r}),n.kind===`board`?(0,H.jsx)(U0,{fields:t,view:n,onView:r}):null,(0,H.jsxs)(y,{flex:1,minW:160,items:`center`,gap:6,px:10,py:6,rounded:8,borderWidth:1,style:{borderColor:N1.border,backgroundColor:N1.surface},children:[(0,H.jsx)(vm,{size:14,color:N1.textFaint}),(0,H.jsx)(ht,{flex:1,size:`$2`,value:n.search??``,onChangeText:e=>r(d0(n,e)),placeholder:`Search…`,style:{borderWidth:0,backgroundColor:`transparent`,paddingLeft:0,paddingRight:0}})]}),o?(0,H.jsx)(V.Fragment,{children:o}):null,i?(0,H.jsx)(Je,{size:`$3`,icon:(0,H.jsx)(hm,{size:16}),theme:`blue`,onPress:i,children:a}):null]})}function K0(e){let{fields:t,records:n,loading:r,empty:i,view:a,onViewChange:o,defaultKind:s=`table`,savedViews:c,title:l,onOpen:u,onCreate:d,createLabel:f,onEditCommit:p,onRecordChange:m,fieldOptions:h,selectable:g=!0,editable:_=!0,bulkActions:v,toolbarExtra:y,boardDisabled:b,titleField:x,cardFields:S,remote:C}=e,[w,T]=(0,V.useState)(()=>{let e=n0(s);return s===`board`?{...e,groupField:W1(t)}:e}),E=a??w,D=e=>{let n=e.kind===`board`&&!e.groupField?{...e,groupField:W1(t)}:e;o?o(n):T(n)},O=(0,V.useMemo)(()=>C?n:r0(n,E,t),[C,n,E,t]),k=st()===`compact`,A=c?.views.find(e=>e.id===(c.activeId??E.id)),j=!!A&&JSON.stringify(A)!==JSON.stringify(E),ee=k&&c?{savedViews:{views:c.views,activeId:c.activeId,onSelect:c.onSelect},dirty:j,onResetView:A?()=>D(A):void 0,onSaveView:()=>c.onSave(E),onSaveAsView:()=>c.onSave({...E,id:`view-${Date.now()}`,name:`View ${c.views.length+1}`})}:null,M=m??(p?(e,n)=>{let[r]=Object.keys(n),i=t.find(e=>e.name===r);if(i)return p(e,i,n[r])}:void 0);return(0,H.jsxs)(z,{gap:12,children:[l?typeof l==`string`?(0,H.jsx)(U,{fontSize:20,fontWeight:`800`,style:{color:N1.text},children:l}):l:null,c&&!k?(0,H.jsx)(q0,{saved:c,current:E,onLoad:D}):null,(0,H.jsx)(W0,{fields:t,view:E,onView:D,onCreate:d,createLabel:f,fieldOptions:h,extra:y,boardDisabled:b,...k?{count:C?C.total:O.length}:null,...ee}),E.kind===`board`?(0,H.jsx)(Z1,{fields:t,records:O,groupField:E.groupField??W1(t)??``,titleField:x,cardFields:S,onOpen:u,onRecordChange:M,onCreate:d?()=>d():void 0}):(0,H.jsx)(A1,{fields:t,records:O,loading:r,empty:i,sorts:E.sorts,onSortChange:e=>D(u0(E,e)),onOpen:u,selectable:g,bulkActions:v,editable:_,onEditCommit:p,fieldOptions:h,hiddenFields:E.hiddenFields,columnOrder:E.columnOrder,onColumnOrderChange:e=>D({...E,columnOrder:e}),pageSize:E.pageSize??25,remote:C})]})}function q0({saved:e,current:t,onLoad:n}){return(0,H.jsxs)(y,{items:`center`,gap:4,style:{flexWrap:`wrap`},children:[e.views.map(r=>{let i=r.id===(e.activeId??t.id);return(0,H.jsxs)(y,{items:`center`,gap:6,px:10,py:6,rounded:8,cursor:`pointer`,onPress:()=>{e.onSelect(r.id),n(r)},style:{backgroundColor:i?N1.hover:`transparent`,borderBottomWidth:2,borderBottomColor:i?N1.accent:`transparent`},hoverStyle:i?void 0:{bg:N1.surfaceRaised},children:[(0,H.jsx)(U,{fontSize:13,fontWeight:i?`700`:`500`,style:{color:i?N1.text:N1.textMuted},children:r.name}),e.onDelete&&e.views.length>1&&(e.deletable?.(r.id)??!0)?(0,H.jsx)(z,{role:`button`,tabIndex:0,"aria-label":`Delete view ${r.name}`,cursor:`pointer`,onPress:t=>{t?.stopPropagation?.(),e.onDelete?.(r.id)},children:(0,H.jsx)(Rn,{size:12,color:N1.textFaint})}):null]},r.id)}),(0,H.jsxs)(y,{items:`center`,gap:4,px:10,py:6,rounded:8,cursor:`pointer`,hoverStyle:{bg:N1.surfaceRaised},onPress:()=>e.onSave({...t,id:`view-${Date.now()}`,name:`View ${e.views.length+1}`}),children:[(0,H.jsx)(hm,{size:13,color:N1.textFaint}),(0,H.jsx)(U,{fontSize:13,style:{color:N1.textFaint},children:`New view`})]})]})}var J0=e=>(e.kind===`upgrade`||e.kind===`topup`)&&!!e.url,Y0=[`premium`,`ours`,`free`],X0=(e,t)=>e===`premium`?t(`Premium`):e===`ours`?`Hanzo`:t(`Free`),Z0=[`ok`,`near`,`limited`],Q0=[`plan`,`credits`,`free`,`none`],$0=[`upgrade`,`topup`,`credits`,`switch`],e2={upgrade:`Upgrade`,topup:`Add prepaid credit`,credits:`Continue with credits`,switch:`Switch model`,later:`Try again later`},t2=(e,t)=>t(e===`upgrade`?`Upgrade`:e===`topup`?`Add prepaid credit`:e===`credits`?`Continue with credits`:`Switch model`),n2={ok:0,near:1,limited:2},r2=e=>typeof e==`string`?e:null,i2=(e,t)=>typeof t==`string`&&e.includes(t)?t:null,a2=e=>e&&typeof e==`object`&&!Array.isArray(e)?e:null,o2=e=>!!e?.plan&&e?.plan!==`free`,s2=(e,t)=>n2[t]>n2[e]?t:e,c2=e=>typeof e==`number`&&Number.isFinite(e)?Math.min(100,Math.max(0,Math.round(e))):null;function l2(e){let t=a2(e),n=c2(t?.percent);return n===null?null:{percent:n,state:i2(Z0,t?.state)??(n>=80?`near`:`ok`),resets_at:r2(t?.resets_at)}}function u2(e){let t=l2(e);if(!t)return null;let n=a2(e),r=l2(n?.window);return{...t,paying:i2(Q0,n?.paying)??`plan`,...r?{window:r}:{}}}function d2(e){return Array.isArray(e)?e.flatMap(e=>{let t=a2(e),n=i2($0,t?.kind);if(!n)return[];let r=r2(t?.url)??void 0,i=r2(t?.model)??void 0,a=r2(t?.plan)??void 0;return(n===`upgrade`||n===`topup`)&&!r||n===`switch`&&!i?[]:[{kind:n,label:r2(t?.label)||e2[n],...r?{url:r}:{},...i?{model:i}:{},...a?{plan:a}:{}}]}):[]}var f2=e=>Array.isArray(e)?e.flatMap(e=>i2(Y0,e)?[e]:[]):[];function p2(e){return Array.isArray(e)?e.flatMap(e=>{let t=a2(e),n=r2(t?.model);if(!n)return[];let r=r2(t?.fallback);return[{model:n,...r?{fallback:r}:{},resets_at:r2(t?.resets_at)}]}):[]}function m2(e){let t=a2(e),n=r2(t?.plan);if(n===null)return null;let r={},i=a2(t?.classes);for(let e of Y0){let t=u2(i?.[e]);t&&(r[e]=t)}let a=p2(t?.paused),o=a2(t?.limited),s=o?{reason:r2(o.reason)??``,classes:f2(o.classes),message:r2(o.message)??``}:void 0,c=i2(Z0,t?.state)??Object.values(r).reduce((e,t)=>s2(e,t?s2(t.state,t.window?.state??`ok`):`ok`),`ok`);return{plan:n,period_start:r2(t?.period_start)??void 0,period_end:r2(t?.period_end)??void 0,state:c,classes:r,...s?{limited:s}:{},...a.length?{paused:a}:{},actions:d2(t?.actions),upgrade:r2(t?.upgrade)??void 0,...typeof t?.credits_after_allowance==`boolean`?{creditsAfterAllowance:t.credits_after_allowance}:{}}}function h2(e){let t=i2(Z0,e.get(`x-hanzo-usage`)),n=e.get(`x-hanzo-fallback`)||null,r=n&&(e.get(`x-hanzo-served`)||n);return!t&&!r?null:{state:t??`limited`,class:i2(Y0,e.get(`x-hanzo-usage-class`)),paidBy:i2(Q0,e.get(`x-hanzo-paid-by`)),fallback:r,reason:e.get(`x-hanzo-usage-reason`)||null}}var g2=new Map([[`free_plan_cap`,`rate_limit_error`],[`usage_cap_exceeded`,`rate_limit_error`],[`allowance_spent`,`insufficient_quota`]]),_2=86400;function v2(e,t,n){let r=a2(a2(e)?.error);if(!r)return null;let i=r2(r.code)??``;if(r.type!==`billing_error`&&(!g2.has(i)||g2.get(i)!==r.type))return null;let a=n?Number(n):NaN;return{status:t,code:i,message:r2(r.message)??``,class:i2(Y0,r.class),resets_at:r2(r.resets_at),actions:d2(r.actions),retry:a>=0&&a<=_2?a:null}}function y2(e,t){if(!e)return null;let n={...e.classes},{served:r,refusal:i}=t;if(r?.class&&n[r.class]){let e=n[r.class];n[r.class]={...e,state:r.state}}if(i?.class&&n[i.class]){let e=n[i.class];n[i.class]={...e,state:`limited`,paying:`none`,resets_at:i.resets_at??e.resets_at}}let a=Object.values(n).reduce((e,t)=>s2(e,t?s2(t.state,t.window?.state??`ok`):`ok`),t.served||t.refusal?`ok`:e.state);return{...e,classes:n,state:s2(a,i?`limited`:`ok`)}}var b2=e=>e?e.window&&n2[e.window.state]>n2[e.state]?e.window.resets_at:e.resets_at:null,x2=e=>e.reduce((e,t)=>t&&(!e||Date.parse(t)<Date.parse(e))?t:e,null);function S2(e,t=Ft){let[n,r,i]=Y0.filter(t=>e.includes(t)).map(e=>X0(e,t));return n?r?i?t(`{a}, {b} and {c} models`,{a:n,b:r,c:i}):t(`{a} and {b} models`,{a:n,b:r}):t(`{a} models`,{a:n}):t(`Models`)}function C2(e,t=Date.now()){let n=e?Date.parse(e):NaN;if(Number.isNaN(n))return``;let r=new Date(n);return n-t<864e5?r.toLocaleTimeString(`en-US`,{hour:`numeric`,minute:`2-digit`}):r.toLocaleDateString(`en-US`,{timeZone:`UTC`,month:`short`,day:`numeric`})}var w2=(e,t)=>e===`paid_plan_required`?t(`This model needs a paid plan.`):e===`free_plan_cap`?t(`You've used the free plan's usage for now.`):e===`insufficient_balance`?t(`Your credits have run out.`):void 0,T2=(e,t,n)=>e.endsWith(`*`)?n(`{family} models`,{family:`${e.slice(0,-1).split(`/`).pop()?.replace(/[-.]$/,``)}`}):t(e),E2=(e,t,n,r)=>n?r?e(`{what} are paused until {until}.`,{what:t,until:r}):e(`{what} are paused.`,{what:t}):r?e(`{what} is paused until {until}.`,{what:t,until:r}):e(`{what} is paused.`,{what:t});function D2(e,t,n=e=>e,r=Date.now(),i=Ft){let{served:a,refusal:o}=t,s=a?.fallback??null,c=new Set(e?.limited?.classes??[]);for(let t of Y0)t!==`free`&&e?.classes[t]?.state===`limited`&&c.add(t);if(o?.class&&c.add(o.class),s&&a?.class&&a.class!==`free`&&c.add(a.class),!o&&!s&&!e?.limited&&e?.state!==`limited`)return null;let l=o?.code||e?.limited?.reason||a?.reason||``,u=l===`model_cap`?e?.paused?.find(e=>s!==null&&e.fallback===s)??e?.paused?.[0]??null:null;u&&a?.class&&c.delete(a.class);let d=Y0.filter(e=>c.has(e)),f=u?u.resets_at??o?.resets_at??null:x2([...d.map(t=>b2(e?.classes[t])),o?.resets_at??null]),p=l===`plan_allowance_used`||!l&&d.length>0,m=C2(f,r),h=u?E2(i,T2(u.model,n,i),u.model.endsWith(`*`),m):p?E2(i,S2(d,i),!0,m):o?.message||e?.limited?.message||(l===`paid_plan_required`&&d.length?i(`{classes} need a paid plan.`,{classes:S2(d,i)}):w2(l,i))||i(`Usage is paused for now.`),g=o?.actions.length?o.actions:e?.actions??[];return{reason:l,classes:d,message:s?`${h} ${i(`You're chatting on {model}.`,{model:n(s)})}`:h,actions:g.map(e=>e.label===e2[e.kind]?{...e,label:t2(e.kind,i)}:e),resets_at:f,fallback:s,refused:o!==null}}function O2(e,t=Date.now(),n=Ft){if(!e||e.state===`limited`)return null;let r=Y0.filter(t=>{let n=e.classes[t];return t!==`free`&&n&&(n.state===`near`||n.window?.state===`near`)});if(!r.length)return null;let i=C2(x2(r.map(t=>b2(e.classes[t]))),t),a=r.length>1?n(`You're close to your plan's included premium and Hanzo model usage.`):r[0]===`premium`?n(`You're close to your plan's included premium model usage.`):n(`You're close to your plan's included Hanzo model usage.`);return i?`${a} ${n(`Resets {until}.`,{until:i})}`:a}var k2={served:null,refusal:null,at:0},A2=new Set,j2=e=>{k2=e;for(let e of A2)e()},M2=e=>(A2.add(e),()=>{A2.delete(e)}),N2=()=>k2,P2={served:null,refusal:null,at:0},F2=()=>P2;function I2(e){let t=h2(e.headers);if(e.ok){(t||k2.served||k2.refusal)&&j2({served:t,refusal:null,at:Date.now()});return}if(e.status!==402&&e.status!==429)return;let n=e.headers.get(`retry-after`);e.clone().json().then(r=>{let i=v2(r,e.status,n);i&&j2({served:t??k2.served,refusal:i,at:Date.now()})}).catch(()=>{})}function L2(e,t=null,n){let[r,i]=(0,V.useState)(null),[a,o]=(0,V.useState)(!1),[s,c]=(0,V.useState)(0),[l,u]=(0,V.useState)(0),d=(0,V.useRef)(e);d.current=e;let f=e!==null,p=(0,V.useSyncExternalStore)(M2,N2,F2),{t:m}=R();(0,V.useEffect)(()=>{let e=d.current;if(!e){i(null);return}let t=new AbortController,n=Date.now();return e(t.signal).then(e=>{t.signal.aborted||(i(m2(e)),c(n))}).catch(()=>{t.signal.aborted||i(null)}).finally(()=>{t.signal.aborted||o(!0)}),()=>t.abort()},[f,t,l]);let h=p.at>s,g=h&&(p.refusal!==null||p.served!==null&&(p.served.fallback!==null||p.served.class!==null&&r?.classes[p.served.class]?.state!==p.served.state));(0,V.useEffect)(()=>{g&&f&&u(e=>e+1)},[g,f,p.at]);let _=(0,V.useMemo)(()=>{if(h)return p;let e=p.served;return{served:e!==null&&(e.fallback!==null&&e.reason!==`plan_allowance_used`||r?.state===`limited`)?e:null,refusal:p.refusal}},[h,p,r?.state]),v=(0,V.useMemo)(()=>y2(r,_),[r,_]),y=(0,V.useRef)(n);y.current=n;let b=(0,V.useMemo)(()=>D2(v,_,e=>y.current?.(e)??e,Date.now(),m),[v,_,m]);return{limits:v,answered:a,notice:b,near:(0,V.useMemo)(()=>b?null:O2(v,Date.now(),m),[b,v,m]),reload:(0,V.useCallback)(()=>u(e=>e+1),[])}}function R2(e,t,n){let[r,i]=(0,V.useState)(t),[a,o]=(0,V.useState)(null),[s,c]=(0,V.useState)(!!e),[l,u]=(0,V.useState)(0),d=(0,V.useCallback)(()=>u(e=>e+1),[]);return(0,V.useEffect)(()=>{if(!e){c(!1);return}let t=!0;return c(!0),e().then(e=>{t&&(i(e),o(null))}).catch(e=>t&&o(e)).finally(()=>t&&c(!1)),()=>{t=!1}},[...n,l]),{value:r,error:a,loading:s,reload:d}}function z2({title:e,detail:t,action:n,children:r}){return(0,H.jsxs)(z,{gap:`$2`,children:[(0,H.jsxs)(y,{items:`center`,gap:`$2`,children:[(0,H.jsxs)(z,{flex:1,minW:0,gap:`$0.5`,children:[(0,H.jsx)(a,{size:`$3`,color:`$ink`,children:e}),t?(0,H.jsx)(a,{size:`$1`,color:`$soft`,children:t}):null]}),n]}),r]})}function B2({children:e}){return(0,H.jsx)(z,{borderWidth:1,borderColor:`$borderColor`,rounded:`$3`,overflow:`hidden`,children:e})}function V2({title:e,detail:t,leading:n,trailing:r,first:i,mono:o}){return(0,H.jsxs)(y,{items:`center`,gap:`$3`,px:`$3`,py:`$2.5`,borderTopWidth:+!i,borderColor:`$borderColor`,children:[n,(0,H.jsxs)(z,{flex:1,minW:0,gap:`$0.5`,children:[(0,H.jsx)(a,{size:`$2`,color:`$ink`,numberOfLines:1,style:o?{fontFamily:`var(--f-mono, ui-monospace, monospace)`}:void 0,children:e}),t?(0,H.jsx)(a,{size:`$1`,color:`$soft`,numberOfLines:2,children:t}):null]}),r]})}function H2({children:e}){return(0,H.jsx)(z,{py:`$5`,items:`center`,children:(0,H.jsx)(a,{size:`$2`,color:`$soft`,style:{textAlign:`center`},children:e})})}function U2(e){let t=e?new Date(e):null;return t&&!Number.isNaN(t.getTime())?t.toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`,timeZone:`UTC`}):``}function W2({children:e}){return e?(0,H.jsx)(a,{size:`$1`,color:`$soft`,role:`status`,children:e}):null}var G2={free:D(`Free`),go:`Go`,dev:`Pro`,pro:`Pro`,max:`Max`,team:`Team`,agency:`Agency`,advisory:`Agency`,dedicated:`Agency`,pod:`Agency`,enterprise:`Enterprise`},K2={pro:`Pro`,enterprise:`Enterprise`},q2=/^[0-9a-f]{8}-[0-9a-f]{4}-|[0-9a-f]{12,}|^[a-z]+_[0-9a-z]{6,}$|^\d+$/i,J2=e=>/^\d+x$/.test(e)?e:e.charAt(0).toUpperCase()+e.slice(1);function Y2(e,t,n){let r=(n??``).trim();if(r)return{name:r,tag:``};let i=(e??``).trim().toLowerCase(),a=()=>{let e=K2[(t??``).trim().toLowerCase()];return e?{name:e,tag:``}:null};if(!i)return a();if(q2.test(i))return a()??{name:D(`Paid plan`),tag:``};let o=i.replace(/[\s_]+/g,`-`),[s,...c]=o.split(`-`).filter(Boolean),l=G2[s];if(!l)return{name:o.split(`-`).filter(Boolean).map(J2).join(` `),tag:``};let u=c.join(`-`);return{name:l,tag:/^\d+x$/.test(u)?u:/^(annual|yearly|year)$/.test(u)?D(`Annual`):u?c.map(J2).join(` `):``}}var X2=e=>e?e.tag?`${e.name} ${e.tag}`:e.name:``,Z2=[`ok`,`near`,`limited`],Q2=e=>e&&typeof e==`object`&&!Array.isArray(e)?e:null;function $2(e){let t=Q2(e),n=Z2.find(e=>e===t?.state);return!t||!n||typeof t.percent!=`number`||!Number.isFinite(t.percent)?null:{percent:Math.min(100,Math.max(0,Math.round(t.percent))),state:n,resets:typeof t.resets_at==`string`?t.resets_at:``}}function e4(e,t,n){let r=(e??``).trim().toLowerCase();return r&&r!==`free`||K2[(n??``).trim().toLowerCase()]?`plan`:t!==null&&t>0?`credits`:`free`}function t4(e,t=Date.now()){let n=e?Date.parse(e):NaN;if(Number.isNaN(n))return``;let r=new Date(n);return n-t<864e5?r.toLocaleTimeString(`en-US`,{hour:`numeric`,minute:`2-digit`}):r.toLocaleDateString(`en-US`,{timeZone:`UTC`,month:`short`,day:`numeric`})}var n4={premium:`premium`,ours:`Hanzo`},r4={"":D(`usage`),premium:D(`premium model usage`),Hanzo:D(`Hanzo model usage`),"premium and Hanzo":D(`premium and Hanzo model usage`)};function i4(e,t,n,r=Date.now(),i=PK){let a=t.map(e=>n4[e]).filter(Boolean).join(` and `),o=r4[a]===void 0?`${a} model usage`:i(r4[a]),s=t4(n,r);if(!e)return s?i(`Your plan’s included {what} is used until {time}.`,{what:o,time:s}):i(`Your plan’s included {what} is used.`,{what:o});let c=X2({name:i(e.name),tag:e.tag?i(e.tag):``});return s?i(`Your {plan} plan’s included {what} is used until {time}.`,{plan:c,what:o,time:s}):i(`Your {plan} plan’s included {what} is used.`,{plan:c,what:o})}function a4(e,t=PK){let n=t=>e.find(e=>e.kind===t),r=n(`topup`);return[n(`credits`)??(r?{...r,label:t(`Add credits`)}:void 0),n(`upgrade`),n(`switch`)].filter(e=>e!==void 0)}var o4=[`premium`,`ours`],s4=e=>typeof e==`string`?e:``,c4=e=>e&&typeof e==`object`&&!Array.isArray(e)?e:{},l4=e=>Array.isArray(e)?e:[],u4=[`upgrade`,`topup`,`credits`,`switch`],d4=[`ok`,`near`,`limited`];function f4(e){let t=$2(e);if(!t)return null;let n=c4(e);return{...t,paying:s4(n.paying)||`none`,window:$2(n.window)}}function p4(e){let t=c4(e),n={};for(let e of o4){let r=f4(c4(t.classes)[e]);r&&(n[e]=r)}let r=t.limited?c4(t.limited):null;return{plan:s4(t.plan)||`free`,start:s4(t.period_start),end:s4(t.period_end),state:d4.find(e=>e===t.state)??`ok`,session:$2(t.session),day:$2(t.day),classes:n,limited:r?{reason:s4(r.reason),classes:l4(r.classes).filter(e=>o4.includes(e)),message:s4(r.message)}:null,actions:l4(t.actions).map(c4).flatMap(e=>{let t=u4.find(t=>t===e.kind);if(!t)return[];let n=s4(e.url),r=s4(e.model);return(t===`upgrade`||t===`topup`)&&!n||t===`switch`&&!r?[]:[{kind:t,label:s4(e.label),url:n,plan:s4(e.plan),model:r}]}),upgrade:s4(t.upgrade),credits:t.credits_after_allowance===!0,paused:l4(t.paused).map(c4).filter(e=>s4(e.model)).map(e=>({model:s4(e.model),fallback:s4(e.fallback),resets:s4(e.resets_at)}))}}async function m4(e){return p4(await VK(e,`GET`,`/v1/ai/limits`))}async function h4(e,t){return p4(await VK(e,`PUT`,`/v1/ai/limits`,{creditsAfterAllowance:t}))}var g4=e=>e.status===`fulfilled`?e.value:null;async function _4(e){let t=await Promise.allSettled([tq(e),m4(e),cq(e),QK(e)]);if(t.every(e=>e.status===`rejected`))throw t[0].reason;let[n,r,i,a]=[g4(t[0]),g4(t[1]),g4(t[2]),g4(t[3])],o=n?.plan||(r&&r.plan!==`free`?r.plan:``),s=e4(o,a,n?.tier);return{kind:s,label:s===`plan`?Y2(o,n?.tier,n?.name):s===`free`?{name:D(`Free`),tag:``}:{name:D(`Pay as you go`),tag:``},limits:r,allowance:i,balance:a}}function v4(e,t=!0){return R2(t&&e.token()?()=>_4(e):null,null,[e,t])}function y4(e){return!e||e.limit<=0?null:Math.max(0,100-Math.round(Math.min(e.used,e.limit)/e.limit*100))}var b4={ok:`$soft`,near:`$yellow10`,limited:`$red10`};D(`Session`),D(`Today`),D(`Month`);function x4({label:e,size:t=`$3`}){let{t:n}=R();return(0,H.jsxs)(y,{items:`baseline`,gap:`$1.5`,minW:0,"data-slot":`plan-name`,children:[(0,H.jsx)(a,{size:t,color:`$ink`,style:{fontWeight:600},numberOfLines:1,children:n(e.name)}),e.tag?(0,H.jsx)(a,{size:`$1`,color:`$soft`,px:`$1.5`,rounded:`$2`,borderWidth:1,borderColor:`$borderColor`,"data-slot":`plan-tag`,children:n(e.tag)}):null]})}function S4(e){if(!e)return null;try{let t=e.split(`.`)[1];return t?JSON.parse(atob(t.replace(/-/g,`+`).replace(/_/g,`/`))):null}catch{return null}}var C4=[`owner`,`admin`];function w4(e,t){if(!t)return!1;let n=S4(e)?.orgs;return(Array.isArray(n)?n:[]).some(e=>{let n=e;return n?.org===t&&C4.includes(n.role)})}var T4=D(`Credits are separate from your plan’s usage allowance. They pay for usage past it when you choose to continue with credits, and for all usage when there is no plan.`);function E4({read:e}){let{t}=R();return(0,H.jsx)(a,{size:`$2`,color:e.error?`$soft`:`$ink`,numberOfLines:1,maxW:200,children:e.error?t(`Unavailable`):e.loading?`…`:KK(e.value)})}function D4({part:e,whole:t,limit:n}){let r=Math.min(100,Math.max(0,e/t*100));return(0,H.jsx)(z,{height:6,rounded:999,bg:`$hover`,overflow:`hidden`,role:`progressbar`,"aria-valuenow":Math.round(r),"aria-valuemin":0,"aria-valuemax":100,children:(0,H.jsx)(z,{height:6,width:`${r}%`,rounded:999,bg:n&&r>=100?`$red10`:`$ink`})})}function O4({title:e,used:t,of:n,says:r,first:i,limit:o=!0}){return(0,H.jsxs)(z,{gap:`$2`,px:`$3`,py:`$3`,borderTopWidth:+!i,borderColor:`$borderColor`,children:[(0,H.jsxs)(y,{items:`baseline`,justify:`space-between`,flexWrap:`wrap`,columnGap:`$3`,rowGap:`$1`,children:[(0,H.jsx)(a,{size:`$2`,color:`$ink`,children:e}),(0,H.jsx)(a,{size:`$1`,color:`$soft`,children:r})]}),(0,H.jsx)(D4,{part:t,whole:n,limit:o})]})}var k4=(e,t)=>U2(e)?t(`Resets {date}`,{date:U2(e)}):``;function A4({target:e,admin:t,add:n,onCard:r}){let{t:i}=R(),o=R2(()=>QK(e),0,[e]),s=R2(()=>$K(e),0,[e]),c=R2(()=>eq(e),[],[e]),l=R2(()=>oq(e),null,[e]),u=R2(()=>rq(e),null,[e]),d=R2(()=>uq(e),[],[e]),f=R2(n?null:()=>XK(e),[],[e,n]),[p,m]=(0,V.useState)(!1),[h,g]=(0,V.useState)(`25`),[_,v]=(0,V.useState)(``),[b,x]=(0,V.useState)(``),[S,C]=(0,V.useState)(``),[w,T]=(0,V.useState)(!1),[E,D]=(0,V.useState)(``);(0,V.useEffect)(()=>{u.value&&(x(u.value.threshold?String(u.value.threshold/100):``),C(u.value.amount?String(u.value.amount/100):``))},[u.value]);let O=async(e,t,n)=>{T(!0),D(``);try{await e(),n(),D(t)}catch(e){D(LK(e,i))}finally{T(!1)}},k=ZK(f.value),A=qK(h),j=dq(d.value),ee=d.value.filter(e=>e!==j),M=l.value,N=Math.max(0,...(M?.categories??[]).map(e=>e.cents)),P=c.value.filter(e=>e.active&&e.remaining>0),te=()=>{if(!A)return D(i(`Enter an amount in dollars`));O(()=>aq(e,A,k.id),i(`{amount} is added to the balance`,{amount:KK(A)}),()=>{m(!1),o.reload()})},F=()=>{let t=qK(_);if(!t)return D(i(`Enter a monthly limit in dollars`));O(()=>fq(e,d.value,t),i(`Spend stops at {amount} a month`,{amount:KK(t)}),()=>{v(``),d.reload()})},I=t=>{let n=b.trim()===``||b.trim()===`0`?0:qK(b),r=qK(S);if(t&&(n===null||!r))return D(i(`Enter the balance to reload below and the amount to add, in dollars`));O(()=>iq(e,{enabled:t,threshold:n??0,amount:r??u.value?.amount??0}),t?i(`Adds {amount} whenever the balance falls below {floor}`,{amount:KK(r??0),floor:KK(n??0)}):i(`Auto-reload is off`),u.reload)};return(0,H.jsxs)(z,{gap:`$6`,"data-slot":`credits`,children:[(0,H.jsxs)(z2,{title:i(`Credits`),detail:i(T4),action:n?(0,H.jsx)(W,{size:`sm`,variant:`outline`,onPress:()=>window.open(n,`_blank`,`noopener`),children:i(`Add funds`)}):p||!t?void 0:(0,H.jsx)(W,{size:`sm`,variant:`outline`,onPress:()=>m(!0),children:i(`Buy more`)}),children:[(0,H.jsxs)(B2,{children:[(0,H.jsx)(V2,{first:!0,title:i(`Prepaid balance`),detail:i(`Bought with a card`),trailing:(0,H.jsx)(E4,{read:o})}),(0,H.jsx)(V2,{title:i(`Granted credit`),detail:i(`Given by Hanzo; some models take only prepaid`),trailing:(0,H.jsx)(E4,{read:s})}),(0,H.jsx)(V2,{title:i(`Spent this month`),detail:M&&!M.known?i(`The ledger did not answer, so this is not a measurement`):void 0,trailing:(0,H.jsx)(E4,{read:{...l,value:M?.total??0}})}),p?(0,H.jsx)(z,{gap:`$2`,px:`$3`,py:`$3`,borderTopWidth:1,borderColor:`$borderColor`,children:k?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(y,{gap:`$2`,items:`center`,flexWrap:`wrap`,children:[(0,H.jsx)(z,{width:140,children:(0,H.jsx)(k_,{value:h,onChangeText:g,"aria-label":i(`Amount in dollars`),placeholder:`25`,inputMode:`decimal`})}),(0,H.jsx)(a,{flex:1,minW:160,size:`$1`,color:`$soft`,children:i(`Charged to {card}`,{card:YK(k)})})]}),(0,H.jsxs)(y,{gap:`$2`,justify:`flex-end`,children:[(0,H.jsx)(W,{size:`sm`,variant:`ghost`,onPress:()=>m(!1),children:i(`Cancel`)}),(0,H.jsx)(W,{size:`sm`,disabled:w,onPress:te,children:A?i(`Add {amount}`,{amount:KK(A)}):i(`Add funds`)})]})]}):(0,H.jsxs)(y,{gap:`$2`,items:`center`,flexWrap:`wrap`,children:[(0,H.jsx)(a,{flex:1,minW:160,size:`$2`,color:`$soft`,children:f.loading?i(`Reading cards…`):i(`Add a card to buy more.`)}),r?(0,H.jsx)(W,{size:`sm`,variant:`outline`,onPress:r,children:i(`Add card`)}):null]})}):null]}),P.length?(0,H.jsx)(B2,{children:P.map((e,t)=>(0,H.jsx)(V2,{first:t===0,title:e.name||i(`Credit grant`),detail:[i(`{left} left of {amount}`,{left:KK(e.remaining,e.currency),amount:KK(e.amount,e.currency)}),e.expires?i(`expires {date}`,{date:U2(e.expires)}):``].filter(Boolean).join(` · `)},e.id))}):null]}),(0,H.jsx)(z2,{title:i(`Auto-reload`),detail:i(`Tops the balance up from the card on file whenever it falls below a floor.`),children:u.error?(0,H.jsx)(H2,{children:LK(u.error,i)}):u.value?(0,H.jsxs)(B2,{children:[(0,H.jsx)(V2,{first:!0,title:u.value.enabled?i(`Adds {amount} below {floor}`,{amount:KK(u.value.amount),floor:KK(u.value.threshold)}):i(`Off`),detail:u.value.last?i(`Last reloaded {date}`,{date:U2(u.value.last)}):t?void 0:i(`An org admin sets auto-reload.`),trailing:t?(0,H.jsx)(rv,{"aria-label":i(`Auto-reload`),checked:u.value.enabled,disabled:w,onCheckedChange:e=>I(e)}):void 0}),t?(0,H.jsxs)(y,{gap:`$2`,items:`center`,px:`$3`,py:`$3`,borderTopWidth:1,borderColor:`$borderColor`,flexWrap:`wrap`,children:[(0,H.jsx)(z,{width:150,children:(0,H.jsx)(k_,{value:b,onChangeText:x,"aria-label":i(`Reload below, in dollars`),placeholder:i(`Below {amount}`,{amount:`$5`}),inputMode:`decimal`})}),(0,H.jsx)(z,{width:150,children:(0,H.jsx)(k_,{value:S,onChangeText:C,"aria-label":i(`Amount to add, in dollars`),placeholder:i(`Add {amount}`,{amount:`$25`}),inputMode:`decimal`})}),(0,H.jsx)(y,{flex:1,justify:`flex-end`,children:(0,H.jsx)(W,{size:`sm`,variant:`outline`,disabled:w,onPress:()=>I(!0),children:u.value.enabled?i(`Save`):i(`Turn on`)})})]}):null]}):(0,H.jsx)(H2,{children:i(`Reading auto-reload…`)})}),(0,H.jsx)(z2,{title:i(`Spend this month`),detail:i(`What credits paid for, by kind.`),children:l.error?(0,H.jsx)(H2,{children:LK(l.error,i)}):M?M.categories.length===0?(0,H.jsx)(B2,{children:(0,H.jsx)(H2,{children:i(`Nothing spent this month.`)})}):(0,H.jsx)(B2,{children:M.categories.map((e,t)=>(0,H.jsx)(O4,{first:t===0,title:e.name,used:e.cents,of:N,says:KK(e.cents),limit:!1},e.name))}):(0,H.jsx)(H2,{children:i(`Reading spend…`)})}),(0,H.jsxs)(z2,{title:i(`Monthly limit`),detail:i(`Spend from credits past it is refused until the month starts over.`),children:[d.error?(0,H.jsx)(H2,{children:LK(d.error,i)}):(0,H.jsxs)(B2,{children:[j?(0,H.jsx)(O4,{first:!0,title:i(`{amount} a month`,{amount:KK(j.threshold)}),used:j.spent??0,of:j.threshold,says:[j.spent===null?i(`Spend unknown`):i(`{amount} spent`,{amount:KK(j.spent)}),k4(j.resets,i)].filter(Boolean).join(` · `)}):(0,H.jsx)(V2,{first:!0,title:i(`No monthly limit`),detail:i(`Spend is bounded by the balance alone.`)}),ee.map(e=>(0,H.jsx)(V2,{title:e.title||i(`Limit`),detail:[e.project&&i(`project {name}`,{name:e.project}),e.service&&i(`service {name}`,{name:e.service}),e.enforce?i(`refuses spend past it`):i(`warns only`)].filter(Boolean).join(` · `),trailing:(0,H.jsx)(a,{size:`$2`,color:`$ink`,children:e.threshold?KK(e.threshold):`—`})},e.id)),t?(0,H.jsxs)(y,{gap:`$2`,items:`center`,px:`$3`,py:`$3`,borderTopWidth:1,borderColor:`$borderColor`,flexWrap:`wrap`,children:[(0,H.jsx)(z,{width:160,children:(0,H.jsx)(k_,{value:_,onChangeText:v,"aria-label":i(`Monthly limit in dollars`),placeholder:j?String(j.threshold/100):`500`,inputMode:`decimal`})}),(0,H.jsxs)(y,{flex:1,gap:`$2`,justify:`flex-end`,children:[j?(0,H.jsx)(W,{size:`sm`,variant:`ghost`,disabled:w,onPress:()=>void O(()=>pq(e,j.id),i(`The monthly limit is lifted`),d.reload),children:i(`Remove`)}):null,(0,H.jsx)(W,{size:`sm`,variant:`outline`,disabled:w||!_.trim(),onPress:F,children:i(j?`Change limit`:`Set limit`)})]})]}):null]}),t?null:(0,H.jsx)(a,{size:`$1`,color:`$soft`,children:i(`An org admin sets the monthly limit.`)})]}),(0,H.jsx)(W2,{children:E})]})}var j4={premium:D(`Premium models`),ours:D(`Hanzo models`)},M4={ok:`$ink`,near:`$yellow10`,limited:`$red10`};function N4({percent:e,state:t}){return(0,H.jsx)(z,{height:6,rounded:999,bg:`$hover`,overflow:`hidden`,role:`progressbar`,"aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":100,children:(0,H.jsx)(z,{height:6,width:`${e}%`,rounded:999,bg:M4[t]})})}function P4({title:e,w:t,first:n,says:r,now:i,children:o}){let{t:s}=R(),c=t4(t.resets,i);return(0,H.jsxs)(z,{gap:`$2`,px:`$3`,py:`$3`,borderTopWidth:+!n,borderColor:`$borderColor`,"data-slot":`plan-window`,"data-state":t.state,children:[(0,H.jsxs)(y,{items:`baseline`,justify:`space-between`,flexWrap:`wrap`,columnGap:`$3`,rowGap:`$1`,children:[(0,H.jsx)(a,{size:`$2`,color:`$ink`,children:e}),(0,H.jsx)(a,{size:`$1`,color:b4[t.state],style:{fontVariantNumeric:`tabular-nums`},children:[r??s(`{n}% used`,{n:t.percent}),c?s(`Resets {time}`,{time:c}):``].filter(Boolean).join(` · `)})]}),(0,H.jsx)(N4,{percent:t.percent,state:t.state}),o]})}function F4({s:e,target:t,onPlans:n,onBilling:r,now:i}){let{t:o}=R(),[s,c]=(0,V.useState)(null),[l,u]=(0,V.useState)(!1),[d,f]=(0,V.useState)(``),p=s??e.limits,m=p?.actions.find(e=>e.kind===`upgrade`),h=async e=>{u(!0),f(``);try{c(await h4(t,e))}catch(e){f(LK(e,o))}finally{u(!1)}},g=e=>{if(e.kind===`credits`)return void h(!0);if(e.kind===`upgrade`&&n)return n();if(e.kind===`topup`)return r();e.url&&window.location.assign(e.url)},_=e.kind===`plan`&&p?o4.filter(e=>p.classes[e]?.state===`limited`):[],v=e.kind===`plan`?p?.paused[0]??null:null,b=_.map(e=>p.classes[e].resets).sort()[0]??``,x=v?t4(v.resets,i):``,S=v?v.model.replace(/\*$/,``):``,C=_.length?i4(e.label,_,b,i,o):v?v.fallback?x?o(`{model} is paused until {time}; chat continues on {fallback}.`,{model:S,time:x,fallback:v.fallback}):o(`{model} is paused; chat continues on {fallback}.`,{model:S,fallback:v.fallback}):x?o(`{model} is paused until {time}.`,{model:S,time:x}):o(`{model} is paused.`,{model:S}):``,w=(0,H.jsxs)(y,{items:`center`,gap:`$3`,flexWrap:`wrap`,"data-slot":`plan-head`,children:[(0,H.jsxs)(z,{flex:1,minW:200,gap:`$1`,children:[e.label?(0,H.jsx)(x4,{label:e.label,size:`$5`}):null,(0,H.jsx)(a,{size:`$2`,color:`$soft`,children:e.kind===`plan`?p?.start&&p.end?o(`Current period {start} – {end}`,{start:U2(p.start),end:U2(p.end)}):o(`Your plan`):e.kind===`free`?o(`Limited usage of free models, from a pool every free account shares.`):o(`No plan. Usage is paid from your credits.`)})]}),m&&!C||e.kind!==`plan`&&n?(0,H.jsx)(W,{size:`sm`,variant:e.kind===`plan`?`outline`:`primary`,onPress:()=>m?g(m):n?.(),children:m?.label||o(`Upgrade`)}):null]});if(e.kind===`free`){let t=y4(e.allowance),n=e.allowance;return(0,H.jsxs)(z,{gap:`$5`,"data-slot":`plan-usage`,"data-kind":`free`,children:[w,n&&t!==null?(0,H.jsxs)(B2,{children:[(0,H.jsx)(P4,{first:!0,title:n.window===`hour`?o(`This hour`):o(`Today`),w:{percent:100-t,state:t===0?`limited`:t<=20?`near`:`ok`,resets:n.resets},says:o(`{n}% left`,{n:t}),now:i}),n.pool?(0,H.jsx)(V2,{title:o(`Shared pool`),detail:n.pool.state===`exhausted`?t4(n.pool.resets,i)?o(`Used up until {time}`,{time:t4(n.pool.resets,i)}):o(`Used up`):n.pool.state===`busy`?o(`Busy. Try again in a minute.`):o(`Every free request is being served.`)}):null]}):(0,H.jsx)(H2,{children:o(`The free allowance could not be read.`)}),(0,H.jsxs)(y,{items:`center`,gap:`$3`,flexWrap:`wrap`,children:[(0,H.jsx)(a,{size:`$2`,color:`$soft`,flex:1,minW:200,children:o(`Credits pay as you go for any model, with or without a plan.`)}),(0,H.jsx)(W,{size:`sm`,variant:`outline`,onPress:r,children:o(`Add credits`)})]})]})}if(e.kind===`credits`)return(0,H.jsxs)(z,{gap:`$5`,"data-slot":`plan-usage`,"data-kind":`credits`,children:[w,(0,H.jsx)(B2,{children:(0,H.jsx)(V2,{first:!0,title:o(`Credits`),detail:o(`What your usage is paid from, at each model’s list price.`),trailing:(0,H.jsx)(a,{size:`$2`,color:`$ink`,"data-slot":`plan-balance`,children:e.balance===null?o(`Unavailable`):KK(e.balance)})})}),(0,H.jsx)(y,{children:(0,H.jsx)(W,{size:`sm`,variant:`outline`,onPress:r,children:o(`Add funds`)})})]});let T=p?.credits??!1;return(0,H.jsxs)(z,{gap:`$5`,"data-slot":`plan-usage`,"data-kind":`plan`,children:[w,C?(0,H.jsxs)(y,{items:`center`,gap:`$2.5`,flexWrap:`wrap`,px:`$3`,py:`$2.5`,rounded:`$3`,borderWidth:1,borderColor:`$borderColor`,"data-slot":`plan-spent`,children:[(0,H.jsx)(z,{width:8,height:8,rounded:4,bg:`$red10`,shrink:0,"aria-hidden":!0}),(0,H.jsx)(a,{size:`$2`,color:`$ink`,flex:1,minW:200,children:C}),(0,H.jsx)(y,{gap:`$2`,flexWrap:`wrap`,children:a4(p?.actions??[],o).map((e,t)=>(0,H.jsx)(W,{size:`sm`,variant:t===0?`primary`:`outline`,disabled:l,"data-kind":e.kind,onPress:()=>g(e),children:e.label},e.kind))})]}):null,p?!p.session&&!p.day&&!Object.keys(p.classes).length?(0,H.jsx)(H2,{children:o(`This plan sets no usage limits.`)}):(0,H.jsxs)(H.Fragment,{children:[p.session||p.day?(0,H.jsx)(z2,{title:o(`Requests`),detail:o(`Every request the plan covers counts in both.`),children:(0,H.jsxs)(B2,{children:[p.session?(0,H.jsx)(P4,{first:!0,title:o(`Session`),w:p.session,says:p.session.resets?void 0:[o(`{n}% used`,{n:p.session.percent}),o(`Starts with your next request`)].join(` · `),now:i}):null,p.day?(0,H.jsx)(P4,{first:!p.session,title:o(`Today`),w:p.day,now:i}):null]})}):null,Object.keys(p.classes).length?(0,H.jsx)(z2,{title:o(`By model class`),detail:o(`Each class’s share of the billing period, and of its shorter window where the plan sets one.`),children:(0,H.jsx)(B2,{children:o4.filter(e=>p.classes[e]).map((e,t)=>{let n=p.classes[e];return(0,H.jsx)(z,{"data-class":e,children:(0,H.jsx)(P4,{first:t===0,title:o(j4[e]),w:n,says:n.paying===`credits`?[o(`{n}% used`,{n:n.percent}),o(`Paying from credits`)].join(` · `):void 0,now:i,children:n.window?(0,H.jsxs)(y,{gap:`$2`,items:`center`,"data-slot":`plan-short`,children:[(0,H.jsx)(a,{size:`$1`,color:`$soft`,shrink:0,children:o(`Shorter window`)}),(0,H.jsx)(z,{flex:1,children:(0,H.jsx)(N4,{percent:n.window.percent,state:n.window.state})}),(0,H.jsx)(a,{size:`$1`,color:`$soft`,shrink:0,children:[`${n.window.percent}%`,t4(n.window.resets,i)?o(`Resets {time}`,{time:t4(n.window.resets,i)}):``].filter(Boolean).join(` · `)})]}):null})},e)})})}):null,(0,H.jsx)(z2,{title:o(`When the allowance runs out`),detail:o(`Credits are separate from your plan’s usage allowance. They live in Billing.`),children:(0,H.jsxs)(B2,{children:[(0,H.jsx)(V2,{first:!0,title:o(`Use credits when my plan’s allowance runs out`),detail:o(T?`On. A model whose included usage is used keeps working, paid from credits — prepaid first, then granted credit where the model takes it — at its list price.`:`Off. Chat continues on a free model, and other requests wait for the plan to reset.`),trailing:(0,H.jsx)(rv,{"aria-label":o(`Use credits when my plan’s allowance runs out`),checked:T,disabled:l,onCheckedChange:e=>void h(e)})}),(0,H.jsx)(V2,{title:o(`Credits`),detail:e.balance===0?o(`There are no credits to spend yet.`):o(`The balance, top-ups and auto-reload.`),trailing:(0,H.jsx)(W,{size:`sm`,variant:`ghost`,onPress:r,children:e.balance===0?o(`Add credits`):o(`Billing`)})})]})})]}):(0,H.jsx)(H2,{children:o(`The plan’s usage could not be read.`)}),(0,H.jsx)(W2,{children:d})]})}function I4({target:e,onPlans:t,onBilling:n,now:r}){let{t:i}=R(),a=v4(e);return a.value?(0,H.jsx)(F4,{s:a.value,target:e,onPlans:t,onBilling:n,now:r}):(0,H.jsx)(H2,{children:a.error?LK(a.error,i):i(`Reading the plan…`)})}function L4(e){if(e.includes(`/`)){let[t,...n]=e.split(`/`);return{org:t,slug:n.join(`/`)}}return{org:`hanzo`,slug:e}}var R4={hanzo:`Hanzo`,openai:`OpenAI`,anthropic:`Anthropic`,google:`Google`,"meta-llama":`Meta`,"x-ai":`xAI`,mistralai:`Mistral`,deepseek:`DeepSeek`,qwen:`Qwen`,nvidia:`NVIDIA`,"z-ai":`Z.ai`,"arcee-ai":`Arcee AI`,minimax:`Minimax`,allenai:`Allen AI`,nousresearch:`Nous Research`,liquid:`Liquid AI`,moonshotai:`Moonshot AI`,amazon:`Amazon`,perplexity:`Perplexity`,baidu:`Baidu`,cohere:`Cohere`,"bytedance-seed":`ByteDance Seed`,openrouter:`OpenRouter`,microsoft:`Microsoft`,inflection:`Inflection`,sao10k:`Sao10K`,"aion-labs":`Aion Labs`,thedrummer:`TheDrummer`,stepfun:`StepFun`,relace:`Relace`,morph:`Morph`,inception:`Inception`,neversleep:`NeverSleep`,upstage:`Upstage`,writer:`Writer`,xiaomi:`Xiaomi`,"nex-agi":`Nex-AGI`,essentialai:`EssentialAI`,"prime-intellect":`Prime Intellect`,deepcogito:`DeepCogito`,kwaipilot:`KwaiPilot`,"ibm-granite":`IBM Granite`,alibaba:`Alibaba`,opengvlab:`OpenGVLab`,meituan:`Meituan`,ai21:`AI21`,bytedance:`ByteDance`,switchpoint:`Switchpoint`,cognitivecomputations:`Cognitive Computations`,tencent:`Tencent`,tngtech:`TNG Tech`,eleutherai:`EleutherAI`,alfredpros:`AlfredPros`,raifle:`Raifle`,"anthracite-org":`Anthracite`,alpindale:`Alpindale`,mancer:`Mancer`,undi95:`Undi95`,gryphe:`Gryphe`,meta:`Meta`,inclusionai:`inclusionAI`,thinkingmachines:`Thinking Machines`,rekaai:`Reka AI`,sakana:`Sakana AI`,perceptron:`Perceptron`};function z4(e){return e?R4[e]??e:`Hanzo`}var B4=`<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>`,V4=`</title><path d="`,H4=`"/></svg>`,U4={title:`Adroll`,slug:`adroll`,get svg(){return B4+`Adroll`+V4+this.path+H4},path:`M24 12c0-6.01-4.727-10.886-10.886-10.886a10.863 10.863 0 0 0-9.508 5.578L8.914 12c0-2.323 1.958-4.2 4.2-4.2 2.377 0 4.2 1.877 4.2 4.2s-1.836 4.2-4.2 4.2H4.065A4.07 4.07 0 0 0 0 20.266v2.62h13.114C19.232 22.886 24 18.01 24 12`,source:`https://www.adroll.com`,hex:`0DBDFF`},W4={title:`Cloudflare`,slug:`cloudflare`,get svg(){return B4+`Cloudflare`+V4+this.path+H4},path:`M16.5088 16.8447c.1475-.5068.0908-.9707-.1553-1.3154-.2246-.3164-.6045-.499-1.0615-.5205l-8.6592-.1123a.1559.1559 0 0 1-.1333-.0713c-.0283-.042-.0351-.0986-.021-.1553.0278-.084.1123-.1484.2036-.1562l8.7359-.1123c1.0351-.0489 2.1601-.8868 2.5537-1.9136l.499-1.3013c.0215-.0561.0293-.1128.0147-.168-.5625-2.5463-2.835-4.4453-5.5499-4.4453-2.5039 0-4.6284 1.6177-5.3876 3.8614-.4927-.3658-1.1187-.5625-1.794-.499-1.2026.119-2.1665 1.083-2.2861 2.2856-.0283.31-.0069.6128.0635.894C1.5683 13.171 0 14.7754 0 16.752c0 .1748.0142.3515.0352.5273.0141.083.0844.1475.1689.1475h15.9814c.0909 0 .1758-.0645.2032-.1553l.12-.4268zm2.7568-5.5634c-.0771 0-.1611 0-.2383.0112-.0566 0-.1054.0415-.127.0976l-.3378 1.1744c-.1475.5068-.0918.9707.1543 1.3164.2256.3164.6055.498 1.0625.5195l1.8437.1133c.0557 0 .1055.0263.1329.0703.0283.043.0351.1074.0214.1562-.0283.084-.1132.1485-.204.1553l-1.921.1123c-1.041.0488-2.1582.8867-2.5527 1.914l-.1406.3585c-.0283.0713.0215.1416.0986.1416h6.5977c.0771 0 .1474-.0489.169-.126.1122-.4082.1757-.837.1757-1.2803 0-2.6025-2.125-4.727-4.7344-4.727`,source:`https://www.cloudflare.com/logo/`,hex:`F38020`,guidelines:`https://www.cloudflare.com/trademark/`},G4={title:`Discord`,slug:`discord`,get svg(){return B4+`Discord`+V4+this.path+H4},path:`M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z`,source:`https://discord.com/branding`,hex:`5865F2`,guidelines:`https://discord.com/branding`},K4={title:`Dropbox`,slug:`dropbox`,get svg(){return B4+`Dropbox`+V4+this.path+H4},path:`M6 1.807L0 5.629l6 3.822 6.001-3.822L6 1.807zM18 1.807l-6 3.822 6 3.822 6-3.822-6-3.822zM0 13.274l6 3.822 6.001-3.822L6 9.452l-6 3.822zM18 9.452l-6 3.822 6 3.822 6-3.822-6-3.822zM6 18.371l6.001 3.822 6-3.822-6-3.822L6 18.371z`,source:`https://www.dropbox.com/branding`,hex:`0061FF`},q4={title:`Facebook`,slug:`facebook`,get svg(){return B4+`Facebook`+V4+this.path+H4},path:`M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z`,source:`https://about.meta.com/brand/resources/facebook/logo`,hex:`0866FF`,guidelines:`https://about.meta.com/brand/resources/facebook/logo`},J4={title:`Farcaster`,slug:`farcaster`,get svg(){return B4+`Farcaster`+V4+this.path+H4},path:`M18.24.24H5.76C2.5789.24 0 2.8188 0 6v12c0 3.1811 2.5789 5.76 5.76 5.76h12.48c3.1812 0 5.76-2.5789 5.76-5.76V6C24 2.8188 21.4212.24 18.24.24m.8155 17.1662v.504c.2868-.0256.5458.1905.5439.479v.5688h-5.1437v-.5688c-.0019-.2885.2576-.5047.5443-.479v-.504c0-.22.1525-.402.358-.458l-.0095-4.3645c-.1589-1.7366-1.6402-3.0979-3.4435-3.0979-1.8038 0-3.2846 1.3613-3.4435 3.0979l-.0096 4.3578c.2276.0424.5318.2083.5395.4648v.504c.2863-.0256.5457.1905.5438.479v.5688H4.3915v-.5688c-.0019-.2885.2575-.5047.5438-.479v-.504c0-.2529.2011-.4548.4536-.4724v-7.895h-.4905L4.2898 7.008l2.6405-.0005V5.0419h9.9495v1.9656h2.8219l-.6091 2.0314h-.4901v7.8949c.2519.0177.453.2195.453.4724`,source:`https://www.farcaster.xyz`,hex:`855DCD`},Y4={title:`GitHub`,slug:`github`,get svg(){return B4+`GitHub`+V4+this.path+H4},path:`M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12`,source:`https://github.com/logos`,hex:`181717`,guidelines:`https://github.com/logos`},X4={title:`GitLab`,slug:`gitlab`,get svg(){return B4+`GitLab`+V4+this.path+H4},path:`m23.6004 9.5927-.0337-.0862L20.3.9814a.851.851 0 0 0-.3362-.405.8748.8748 0 0 0-.9997.0539.8748.8748 0 0 0-.29.4399l-2.2055 6.748H7.5375l-2.2057-6.748a.8573.8573 0 0 0-.29-.4412.8748.8748 0 0 0-.9997-.0537.8585.8585 0 0 0-.3362.4049L.4332 9.5015l-.0325.0862a6.0657 6.0657 0 0 0 2.0119 7.0105l.0113.0087.03.0213 4.976 3.7264 2.462 1.8633 1.4995 1.1321a1.0085 1.0085 0 0 0 1.2197 0l1.4995-1.1321 2.4619-1.8633 5.006-3.7489.0125-.01a6.0682 6.0682 0 0 0 2.0094-7.003z`,source:`https://about.gitlab.com/press/press-kit/`,hex:`FC6D26`,guidelines:`https://about.gitlab.com/handbook/marketing/corporate-marketing/brand-activation/trademark-guidelines/`},Z4={title:`Gmail`,slug:`gmail`,get svg(){return B4+`Gmail`+V4+this.path+H4},path:`M24 5.457v13.909c0 .904-.732 1.636-1.636 1.636h-3.819V11.73L12 16.64l-6.545-4.91v9.273H1.636A1.636 1.636 0 0 1 0 19.366V5.457c0-2.023 2.309-3.178 3.927-1.964L5.455 4.64 12 9.548l6.545-4.91 1.528-1.145C21.69 2.28 24 3.434 24 5.457z`,source:`https://fonts.gstatic.com/s/i/productlogos/gmail_2020q4/v8/192px.svg`,hex:`EA4335`},Q4={title:`Google Ads`,slug:`googleads`,get svg(){return B4+`Google Ads`+V4+this.path+H4},path:`M3.9998 22.9291C1.7908 22.9291 0 21.1383 0 18.9293s1.7908-3.9998 3.9998-3.9998 3.9998 1.7908 3.9998 3.9998-1.7908 3.9998-3.9998 3.9998zm19.4643-6.0004L15.4632 3.072C14.3586 1.1587 11.9121.5028 9.9988 1.6074S7.4295 5.1585 8.5341 7.0718l8.0009 13.8567c1.1046 1.9133 3.5511 2.5679 5.4644 1.4646 1.9134-1.1046 2.568-3.5511 1.4647-5.4644zM7.5137 4.8438L1.5645 15.1484A4.5 4.5 0 0 1 4 14.4297c2.5597-.0075 4.6248 2.1585 4.4941 4.7148l3.2168-5.5723-3.6094-6.25c-.4499-.7793-.6322-1.6394-.5878-2.4784z`,source:`https://ads.google.com/home/`,hex:`4285F4`},$4={title:`Google Calendar`,slug:`googlecalendar`,get svg(){return B4+`Google Calendar`+V4+this.path+H4},path:`M18.316 5.684H24v12.632h-5.684V5.684zM5.684 24h12.632v-5.684H5.684V24zM18.316 5.684V0H1.895A1.894 1.894 0 0 0 0 1.895v16.421h5.684V5.684h12.632zm-7.207 6.25v-.065c.272-.144.5-.349.687-.617s.279-.595.279-.982c0-.379-.099-.72-.3-1.025a2.05 2.05 0 0 0-.832-.714 2.703 2.703 0 0 0-1.197-.257c-.6 0-1.094.156-1.481.467-.386.311-.65.671-.793 1.078l1.085.452c.086-.249.224-.461.413-.633.189-.172.445-.257.767-.257.33 0 .602.088.816.264a.86.86 0 0 1 .322.703c0 .33-.12.589-.36.778-.24.19-.535.284-.886.284h-.567v1.085h.633c.407 0 .748.109 1.02.327.272.218.407.499.407.843 0 .336-.129.614-.387.832s-.565.327-.924.327c-.351 0-.651-.103-.897-.311-.248-.208-.422-.502-.521-.881l-1.096.452c.178.616.505 1.082.977 1.401.472.319.984.478 1.538.477a2.84 2.84 0 0 0 1.293-.291c.382-.193.684-.458.902-.794.218-.336.327-.72.327-1.149 0-.429-.115-.797-.344-1.105a2.067 2.067 0 0 0-.881-.689zm2.093-1.931l.602.913L15 10.045v5.744h1.187V8.446h-.827l-2.158 1.557zM22.105 0h-3.289v5.184H24V1.895A1.894 1.894 0 0 0 22.105 0zm-3.289 23.5l4.684-4.684h-4.684V23.5zM0 22.105C0 23.152.848 24 1.895 24h3.289v-5.184H0v3.289z`,source:`https://fonts.gstatic.com/s/i/productlogos/calendar_2020q4/v8/192px.svg`,hex:`4285F4`},e3={title:`Google Chrome`,slug:`googlechrome`,get svg(){return B4+`Google Chrome`+V4+this.path+H4},path:`M12 0C8.21 0 4.831 1.757 2.632 4.501l3.953 6.848A5.454 5.454 0 0 1 12 6.545h10.691A12 12 0 0 0 12 0zM1.931 5.47A11.943 11.943 0 0 0 0 12c0 6.012 4.42 10.991 10.189 11.864l3.953-6.847a5.45 5.45 0 0 1-6.865-2.29zm13.342 2.166a5.446 5.446 0 0 1 1.45 7.09l.002.001h-.002l-5.344 9.257c.206.01.413.016.621.016 6.627 0 12-5.373 12-12 0-1.54-.29-3.011-.818-4.364zM12 16.364a4.364 4.364 0 1 1 0-8.728 4.364 4.364 0 0 1 0 8.728Z`,source:`https://www.google.com/chrome`,hex:`4285F4`,guidelines:`https://partnermarketinghub.withgoogle.com/brands/chrome`},t3={title:`Google Drive`,slug:`googledrive`,get svg(){return B4+`Google Drive`+V4+this.path+H4},path:`M12.01 1.485c-2.082 0-3.754.02-3.743.047.01.02 1.708 3.001 3.774 6.62l3.76 6.574h3.76c2.081 0 3.753-.02 3.742-.047-.005-.02-1.708-3.001-3.775-6.62l-3.76-6.574zm-4.76 1.73a789.828 789.861 0 0 0-3.63 6.319L0 15.868l1.89 3.298 1.885 3.297 3.62-6.335 3.618-6.33-1.88-3.287C8.1 4.704 7.255 3.22 7.25 3.214zm2.259 12.653-.203.348c-.114.198-.96 1.672-1.88 3.287a423.93 423.948 0 0 1-1.698 2.97c-.01.026 3.24.042 7.222.042h7.244l1.796-3.157c.992-1.734 1.85-3.23 1.906-3.323l.104-.167h-7.249z`,source:`https://developers.google.com/drive/web/branding`,hex:`4285F4`},n3={title:`HubSpot`,slug:`hubspot`,get svg(){return B4+`HubSpot`+V4+this.path+H4},path:`M18.164 7.93V5.084a2.198 2.198 0 001.267-1.978v-.067A2.2 2.2 0 0017.238.845h-.067a2.2 2.2 0 00-2.193 2.193v.067a2.196 2.196 0 001.252 1.973l.013.006v2.852a6.22 6.22 0 00-2.969 1.31l.012-.01-7.828-6.095A2.497 2.497 0 104.3 4.656l-.012.006 7.697 5.991a6.176 6.176 0 00-1.038 3.446c0 1.343.425 2.588 1.147 3.607l-.013-.02-2.342 2.343a1.968 1.968 0 00-.58-.095h-.002a2.033 2.033 0 102.033 2.033 1.978 1.978 0 00-.1-.595l.005.014 2.317-2.317a6.247 6.247 0 104.782-11.134l-.036-.005zm-.964 9.378a3.206 3.206 0 113.215-3.207v.002a3.206 3.206 0 01-3.207 3.207z`,source:`https://www.hubspot.com/style-guide`,hex:`FF7A59`,guidelines:`https://www.hubspot.com/style-guide`},r3={title:`iCloud`,slug:`icloud`,get svg(){return B4+`iCloud`+V4+this.path+H4},path:`M13.762 4.29a6.51 6.51 0 0 0-5.669 3.332 3.571 3.571 0 0 0-1.558-.36 3.571 3.571 0 0 0-3.516 3A4.918 4.918 0 0 0 0 14.796a4.918 4.918 0 0 0 4.92 4.914 4.93 4.93 0 0 0 .617-.045h14.42c2.305-.272 4.041-2.258 4.043-4.589v-.009a4.594 4.594 0 0 0-3.727-4.508 6.51 6.51 0 0 0-6.511-6.27z`,source:`https://commons.wikimedia.org/wiki/File:ICloud_logo.svg`,hex:`3693F3`},i3={title:`Instagram`,slug:`instagram`,get svg(){return B4+`Instagram`+V4+this.path+H4},path:`M7.0301.084c-1.2768.0602-2.1487.264-2.911.5634-.7888.3075-1.4575.72-2.1228 1.3877-.6652.6677-1.075 1.3368-1.3802 2.127-.2954.7638-.4956 1.6365-.552 2.914-.0564 1.2775-.0689 1.6882-.0626 4.947.0062 3.2586.0206 3.6671.0825 4.9473.061 1.2765.264 2.1482.5635 2.9107.308.7889.72 1.4573 1.388 2.1228.6679.6655 1.3365 1.0743 2.1285 1.38.7632.295 1.6361.4961 2.9134.552 1.2773.056 1.6884.069 4.9462.0627 3.2578-.0062 3.668-.0207 4.9478-.0814 1.28-.0607 2.147-.2652 2.9098-.5633.7889-.3086 1.4578-.72 2.1228-1.3881.665-.6682 1.0745-1.3378 1.3795-2.1284.2957-.7632.4966-1.636.552-2.9124.056-1.2809.0692-1.6898.063-4.948-.0063-3.2583-.021-3.6668-.0817-4.9465-.0607-1.2797-.264-2.1487-.5633-2.9117-.3084-.7889-.72-1.4568-1.3876-2.1228C21.2982 1.33 20.628.9208 19.8378.6165 19.074.321 18.2017.1197 16.9244.0645 15.6471.0093 15.236-.005 11.977.0014 8.718.0076 8.31.0215 7.0301.0839m.1402 21.6932c-1.17-.0509-1.8053-.2453-2.2287-.408-.5606-.216-.96-.4771-1.3819-.895-.422-.4178-.6811-.8186-.9-1.378-.1644-.4234-.3624-1.058-.4171-2.228-.0595-1.2645-.072-1.6442-.079-4.848-.007-3.2037.0053-3.583.0607-4.848.05-1.169.2456-1.805.408-2.2282.216-.5613.4762-.96.895-1.3816.4188-.4217.8184-.6814 1.3783-.9003.423-.1651 1.0575-.3614 2.227-.4171 1.2655-.06 1.6447-.072 4.848-.079 3.2033-.007 3.5835.005 4.8495.0608 1.169.0508 1.8053.2445 2.228.408.5608.216.96.4754 1.3816.895.4217.4194.6816.8176.9005 1.3787.1653.4217.3617 1.056.4169 2.2263.0602 1.2655.0739 1.645.0796 4.848.0058 3.203-.0055 3.5834-.061 4.848-.051 1.17-.245 1.8055-.408 2.2294-.216.5604-.4763.96-.8954 1.3814-.419.4215-.8181.6811-1.3783.9-.4224.1649-1.0577.3617-2.2262.4174-1.2656.0595-1.6448.072-4.8493.079-3.2045.007-3.5825-.006-4.848-.0608M16.953 5.5864A1.44 1.44 0 1 0 18.39 4.144a1.44 1.44 0 0 0-1.437 1.4424M5.8385 12.012c.0067 3.4032 2.7706 6.1557 6.173 6.1493 3.4026-.0065 6.157-2.7701 6.1506-6.1733-.0065-3.4032-2.771-6.1565-6.174-6.1498-3.403.0067-6.156 2.771-6.1496 6.1738M8 12.0077a4 4 0 1 1 4.008 3.9921A3.9996 3.9996 0 0 1 8 12.0077`,source:`https://about.meta.com/brand/resources/instagram`,hex:`FF0069`,guidelines:`https://about.meta.com/brand/resources/instagram`},a3={title:`Linear`,slug:`linear`,get svg(){return B4+`Linear`+V4+this.path+H4},path:`M2.886 4.18A11.982 11.982 0 0 1 11.99 0C18.624 0 24 5.376 24 12.009c0 3.64-1.62 6.903-4.18 9.105L2.887 4.18ZM1.817 5.626l16.556 16.556c-.524.33-1.075.62-1.65.866L.951 7.277c.247-.575.537-1.126.866-1.65ZM.322 9.163l14.515 14.515c-.71.172-1.443.282-2.195.322L0 11.358a12 12 0 0 1 .322-2.195Zm-.17 4.862 9.823 9.824a12.02 12.02 0 0 1-9.824-9.824Z`,source:`https://linear.app`,hex:`5E6AD2`},o3={title:`Messenger`,slug:`messenger`,get svg(){return B4+`Messenger`+V4+this.path+H4},path:`M12 0C5.24 0 0 4.952 0 11.64c0 3.499 1.434 6.521 3.769 8.61a.96.96 0 0 1 .323.683l.065 2.135a.96.96 0 0 0 1.347.85l2.381-1.053a.96.96 0 0 1 .641-.046A13 13 0 0 0 12 23.28c6.76 0 12-4.952 12-11.64S18.76 0 12 0m6.806 7.44c.522-.03.971.567.63 1.094l-4.178 6.457a.707.707 0 0 1-.977.208l-3.87-2.504a.44.44 0 0 0-.49.007l-4.363 3.01c-.637.438-1.415-.317-.995-.966l4.179-6.457a.706.706 0 0 1 .977-.21l3.87 2.505c.15.097.344.094.491-.007l4.362-3.008a.7.7 0 0 1 .364-.13`,source:`https://about.meta.com/brand/resources/facebook/messenger-icon`,hex:`0866FF`,guidelines:`https://about.meta.com/brand/resources/facebook/messenger-icon`},s3={title:`Meta`,slug:`meta`,get svg(){return B4+`Meta`+V4+this.path+H4},path:`M6.915 4.03c-1.968 0-3.683 1.28-4.871 3.113C.704 9.208 0 11.883 0 14.449c0 .706.07 1.369.21 1.973a6.624 6.624 0 0 0 .265.86 5.297 5.297 0 0 0 .371.761c.696 1.159 1.818 1.927 3.593 1.927 1.497 0 2.633-.671 3.965-2.444.76-1.012 1.144-1.626 2.663-4.32l.756-1.339.186-.325c.061.1.121.196.183.3l2.152 3.595c.724 1.21 1.665 2.556 2.47 3.314 1.046.987 1.992 1.22 3.06 1.22 1.075 0 1.876-.355 2.455-.843a3.743 3.743 0 0 0 .81-.973c.542-.939.861-2.127.861-3.745 0-2.72-.681-5.357-2.084-7.45-1.282-1.912-2.957-2.93-4.716-2.93-1.047 0-2.088.467-3.053 1.308-.652.57-1.257 1.29-1.82 2.05-.69-.875-1.335-1.547-1.958-2.056-1.182-.966-2.315-1.303-3.454-1.303zm10.16 2.053c1.147 0 2.188.758 2.992 1.999 1.132 1.748 1.647 4.195 1.647 6.4 0 1.548-.368 2.9-1.839 2.9-.58 0-1.027-.23-1.664-1.004-.496-.601-1.343-1.878-2.832-4.358l-.617-1.028a44.908 44.908 0 0 0-1.255-1.98c.07-.109.141-.224.211-.327 1.12-1.667 2.118-2.602 3.358-2.602zm-10.201.553c1.265 0 2.058.791 2.675 1.446.307.327.737.871 1.234 1.579l-1.02 1.566c-.757 1.163-1.882 3.017-2.837 4.338-1.191 1.649-1.81 1.817-2.486 1.817-.524 0-1.038-.237-1.383-.794-.263-.426-.464-1.13-.464-2.046 0-2.221.63-4.535 1.66-6.088.454-.687.964-1.226 1.533-1.533a2.264 2.264 0 0 1 1.088-.285z`,source:`https://www.meta.com`,hex:`0467DF`,guidelines:`https://www.facebook.com/brand/resources/meta/company-brand`},c3={title:`Notion`,slug:`notion`,get svg(){return B4+`Notion`+V4+this.path+H4},path:`M4.459 4.208c.746.606 1.026.56 2.428.466l13.215-.793c.28 0 .047-.28-.046-.326L17.86 1.968c-.42-.326-.981-.7-2.055-.607L3.01 2.295c-.466.046-.56.28-.374.466zm.793 3.08v13.904c0 .747.373 1.027 1.214.98l14.523-.84c.841-.046.935-.56.935-1.167V6.354c0-.606-.233-.933-.748-.887l-15.177.887c-.56.047-.747.327-.747.933zm14.337.745c.093.42 0 .84-.42.888l-.7.14v10.264c-.608.327-1.168.514-1.635.514-.748 0-.935-.234-1.495-.933l-4.577-7.186v6.952L12.21 19s0 .84-1.168.84l-3.222.186c-.093-.186 0-.653.327-.746l.84-.233V9.854L7.822 9.76c-.094-.42.14-1.026.793-1.073l3.456-.233 4.764 7.279v-6.44l-1.215-.139c-.093-.514.28-.887.747-.933zM1.936 1.035l13.31-.98c1.634-.14 2.055-.047 3.082.7l4.249 2.986c.7.513.934.653.934 1.213v16.378c0 1.026-.373 1.634-1.68 1.726l-15.458.934c-.98.047-1.448-.093-1.962-.747l-3.129-4.06c-.56-.747-.793-1.306-.793-1.96V2.667c0-.839.374-1.54 1.447-1.632z`,source:`https://www.notion.so`,hex:`000000`},l3={title:`Pinterest`,slug:`pinterest`,get svg(){return B4+`Pinterest`+V4+this.path+H4},path:`M12.017 0C5.396 0 .029 5.367.029 11.987c0 5.079 3.158 9.417 7.618 11.162-.105-.949-.199-2.403.041-3.439.219-.937 1.406-5.957 1.406-5.957s-.359-.72-.359-1.781c0-1.663.967-2.911 2.168-2.911 1.024 0 1.518.769 1.518 1.688 0 1.029-.653 2.567-.992 3.992-.285 1.193.6 2.165 1.775 2.165 2.128 0 3.768-2.245 3.768-5.487 0-2.861-2.063-4.869-5.008-4.869-3.41 0-5.409 2.562-5.409 5.199 0 1.033.394 2.143.889 2.741.099.12.112.225.085.345-.09.375-.293 1.199-.334 1.363-.053.225-.172.271-.401.165-1.495-.69-2.433-2.878-2.433-4.646 0-3.776 2.748-7.252 7.92-7.252 4.158 0 7.392 2.967 7.392 6.923 0 4.135-2.607 7.462-6.233 7.462-1.214 0-2.354-.629-2.758-1.379l-.749 2.848c-.269 1.045-1.004 2.352-1.498 3.146 1.123.345 2.306.535 3.55.535 6.607 0 11.985-5.365 11.985-11.987C23.97 5.39 18.592.026 11.985.026L12.017 0z`,source:`https://business.pinterest.com/en/brand-guidelines`,hex:`BD081C`,guidelines:`https://business.pinterest.com/en/brand-guidelines`},u3={title:`QuickBooks`,slug:`quickbooks`,get svg(){return B4+`QuickBooks`+V4+this.path+H4},path:`M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm.642 4.1335c.9554 0 1.7296.776 1.7296 1.7332v9.0667h1.6c1.614 0 2.9275-1.3156 2.9275-2.933 0-1.6173-1.3136-2.9333-2.9276-2.9333h-.6654V7.3334h.6654c2.5722 0 4.6577 2.0897 4.6577 4.667 0 2.5774-2.0855 4.6666-4.6577 4.6666H12.642zM7.9837 7.333h3.3291v12.533c-.9555 0-1.73-.7759-1.73-1.7332V9.0662H7.9837c-1.6146 0-2.9277 1.316-2.9277 2.9334 0 1.6175 1.3131 2.9333 2.9277 2.9333h.6654v1.7332h-.6654c-2.5725 0-4.6577-2.0892-4.6577-4.6665 0-2.5771 2.0852-4.6666 4.6577-4.6666Z`,source:`https://design.intuit.com/quickbooks/brand`,hex:`2CA01C`,guidelines:`https://design.intuit.com/quickbooks/brand`},d3={title:`Reddit`,slug:`reddit`,get svg(){return B4+`Reddit`+V4+this.path+H4},path:`M12 0C5.373 0 0 5.373 0 12c0 3.314 1.343 6.314 3.515 8.485l-2.286 2.286C.775 23.225 1.097 24 1.738 24H12c6.627 0 12-5.373 12-12S18.627 0 12 0Zm4.388 3.199c1.104 0 1.999.895 1.999 1.999 0 1.105-.895 2-1.999 2-.946 0-1.739-.657-1.947-1.539v.002c-1.147.162-2.032 1.15-2.032 2.341v.007c1.776.067 3.4.567 4.686 1.363.473-.363 1.064-.58 1.707-.58 1.547 0 2.802 1.254 2.802 2.802 0 1.117-.655 2.081-1.601 2.531-.088 3.256-3.637 5.876-7.997 5.876-4.361 0-7.905-2.617-7.998-5.87-.954-.447-1.614-1.415-1.614-2.538 0-1.548 1.255-2.802 2.803-2.802.645 0 1.239.218 1.712.585 1.275-.79 2.881-1.291 4.64-1.365v-.01c0-1.663 1.263-3.034 2.88-3.207.188-.911.993-1.595 1.959-1.595Zm-8.085 8.376c-.784 0-1.459.78-1.506 1.797-.047 1.016.64 1.429 1.426 1.429.786 0 1.371-.369 1.418-1.385.047-1.017-.553-1.841-1.338-1.841Zm7.406 0c-.786 0-1.385.824-1.338 1.841.047 1.017.634 1.385 1.418 1.385.785 0 1.473-.413 1.426-1.429-.046-1.017-.721-1.797-1.506-1.797Zm-3.703 4.013c-.974 0-1.907.048-2.77.135-.147.015-.241.168-.183.305.483 1.154 1.622 1.964 2.953 1.964 1.33 0 2.47-.81 2.953-1.964.057-.137-.037-.29-.184-.305-.863-.087-1.795-.135-2.769-.135Z`,source:`https://www.redditinc.com/brand`,hex:`FF4500`,guidelines:`https://www.redditinc.com/brand`},f3={title:`Shopify`,slug:`shopify`,get svg(){return B4+`Shopify`+V4+this.path+H4},path:`M15.337 23.979l7.216-1.561s-2.604-17.613-2.625-17.73c-.018-.116-.114-.192-.211-.192s-1.929-.136-1.929-.136-1.275-1.274-1.439-1.411c-.045-.037-.075-.057-.121-.074l-.914 21.104h.023zM11.71 11.305s-.81-.424-1.774-.424c-1.447 0-1.504.906-1.504 1.141 0 1.232 3.24 1.715 3.24 4.629 0 2.295-1.44 3.76-3.406 3.76-2.354 0-3.54-1.465-3.54-1.465l.646-2.086s1.245 1.066 2.28 1.066c.675 0 .975-.545.975-.932 0-1.619-2.654-1.694-2.654-4.359-.034-2.237 1.571-4.416 4.827-4.416 1.257 0 1.875.361 1.875.361l-.945 2.715-.02.01zM11.17.83c.136 0 .271.038.405.135-.984.465-2.064 1.639-2.508 3.992-.656.213-1.293.405-1.889.578C7.697 3.75 8.951.84 11.17.84V.83zm1.235 2.949v.135c-.754.232-1.583.484-2.394.736.466-1.777 1.333-2.645 2.085-2.971.193.501.309 1.176.309 2.1zm.539-2.234c.694.074 1.141.867 1.429 1.755-.349.114-.735.231-1.158.366v-.252c0-.752-.096-1.371-.271-1.871v.002zm2.992 1.289c-.02 0-.06.021-.078.021s-.289.075-.714.21c-.423-1.233-1.176-2.37-2.508-2.37h-.115C12.135.209 11.669 0 11.265 0 8.159 0 6.675 3.877 6.21 5.846c-1.194.365-2.063.636-2.16.674-.675.213-.694.232-.772.87-.075.462-1.83 14.063-1.83 14.063L15.009 24l.927-21.166z`,source:`https://www.shopify.com/brand-assets`,hex:`7AB55C`,guidelines:`https://www.shopify.com/brand-assets`},p3={title:`Signal`,slug:`signal`,get svg(){return B4+`Signal`+V4+this.path+H4},path:`M12 0q-.934 0-1.83.139l.17 1.111a11 11 0 0 1 3.32 0l.172-1.111A12 12 0 0 0 12 0M9.152.34A12 12 0 0 0 5.77 1.742l.584.961a10.8 10.8 0 0 1 3.066-1.27zm5.696 0-.268 1.094a10.8 10.8 0 0 1 3.066 1.27l.584-.962A12 12 0 0 0 14.848.34M12 2.25a9.75 9.75 0 0 0-8.539 14.459c.074.134.1.292.064.441l-1.013 4.338 4.338-1.013a.62.62 0 0 1 .441.064A9.7 9.7 0 0 0 12 21.75c5.385 0 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25m-7.092.068a12 12 0 0 0-2.59 2.59l.909.664a11 11 0 0 1 2.345-2.345zm14.184 0-.664.909a11 11 0 0 1 2.345 2.345l.909-.664a12 12 0 0 0-2.59-2.59M1.742 5.77A12 12 0 0 0 .34 9.152l1.094.268a10.8 10.8 0 0 1 1.269-3.066zm20.516 0-.961.584a10.8 10.8 0 0 1 1.27 3.066l1.093-.268a12 12 0 0 0-1.402-3.383M.138 10.168A12 12 0 0 0 0 12q0 .934.139 1.83l1.111-.17A11 11 0 0 1 1.125 12q0-.848.125-1.66zm23.723.002-1.111.17q.125.812.125 1.66c0 .848-.042 1.12-.125 1.66l1.111.172a12.1 12.1 0 0 0 0-3.662M1.434 14.58l-1.094.268a12 12 0 0 0 .96 2.591l-.265 1.14 1.096.255.36-1.539-.188-.365a10.8 10.8 0 0 1-.87-2.35m21.133 0a10.8 10.8 0 0 1-1.27 3.067l.962.584a12 12 0 0 0 1.402-3.383zm-1.793 3.848a11 11 0 0 1-2.345 2.345l.664.909a12 12 0 0 0 2.59-2.59zm-19.959 1.1L.357 21.48a1.8 1.8 0 0 0 2.162 2.161l1.954-.455-.256-1.095-1.953.455a.675.675 0 0 1-.81-.81l.454-1.954zm16.832 1.769a10.8 10.8 0 0 1-3.066 1.27l.268 1.093a12 12 0 0 0 3.382-1.402zm-10.94.213-1.54.36.256 1.095 1.139-.266c.814.415 1.683.74 2.591.961l.268-1.094a10.8 10.8 0 0 1-2.35-.869zm3.634 1.24-.172 1.111a12.1 12.1 0 0 0 3.662 0l-.17-1.111q-.812.125-1.66.125a11 11 0 0 1-1.66-.125`,source:`https://signal.org/brand`,hex:`3B45FD`,guidelines:`https://signal.org/brand`},m3={title:`Stripe`,slug:`stripe`,get svg(){return B4+`Stripe`+V4+this.path+H4},path:`M13.976 9.15c-2.172-.806-3.356-1.426-3.356-2.409 0-.831.683-1.305 1.901-1.305 2.227 0 4.515.858 6.09 1.631l.89-5.494C18.252.975 15.697 0 12.165 0 9.667 0 7.589.654 6.104 1.872 4.56 3.147 3.757 4.992 3.757 7.218c0 4.039 2.467 5.76 6.476 7.219 2.585.92 3.445 1.574 3.445 2.583 0 .98-.84 1.545-2.354 1.545-1.875 0-4.965-.921-6.99-2.109l-.9 5.555C5.175 22.99 8.385 24 11.714 24c2.641 0 4.843-.624 6.328-1.813 1.664-1.305 2.525-3.236 2.525-5.732 0-4.128-2.524-5.851-6.594-7.305h.003z`,source:`https://stripe.com/newsroom/information`,hex:`635BFF`},h3={title:`Supabase`,slug:`supabase`,get svg(){return B4+`Supabase`+V4+this.path+H4},path:`M11.9 1.036c-.015-.986-1.26-1.41-1.874-.637L.764 12.05C-.33 13.427.65 15.455 2.409 15.455h9.579l.113 7.51c.014.985 1.259 1.408 1.873.636l9.262-11.653c1.093-1.375.113-3.403-1.645-3.403h-9.642z`,source:`https://github.com/supabase/supabase/blob/4031a7549f5d46da7bc79c01d56be4177dc7c114/packages/common/assets/images/supabase-logo-wordmark--light.svg`,hex:`3FCF8E`},g3={title:`Telegram`,slug:`telegram`,get svg(){return B4+`Telegram`+V4+this.path+H4},path:`M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z`,source:`https://telegram.org/tour/screenshots`,hex:`26A5E4`},_3={title:`Threads`,slug:`threads`,get svg(){return B4+`Threads`+V4+this.path+H4},path:`M18.263 11.097c-.03-3.486-1.92-5.586-5.111-5.586-2.13 0-3.922.963-4.863 2.499l2.062 1.438c.535-.843 1.272-1.543 2.628-1.543 1.528 0 2.318.85 2.544 2.431a15 15 0 0 0-2.236-.173c-4.125 0-6.068 1.867-6.068 4.336s1.943 3.99 4.804 3.99c3.139 0 5.013-2.115 5.781-4.735.798.361 1.348 1.204 1.348 2.47 0 3.387-3.907 5.232-7.22 5.232-4.885 0-8.077-3.207-8.077-8.424 0-6.392 4.223-10.487 9.9-10.487 3.808 0 5.69 1.671 6.97 3.914l2.108-1.475C21.44 2.078 18.331 0 13.663 0 6.227 0 1.168 5.277 1.168 12.934c0 7 4.953 11.066 10.856 11.066 4.878 0 9.809-2.846 9.809-7.716 0-2.545-1.46-4.231-3.569-5.187m-6.33 4.855c-1.077 0-2.026-.512-2.026-1.453 0-1.483 1.822-1.934 3.606-1.934.678 0 1.34.045 1.927.173-.422 1.927-1.671 3.215-3.508 3.214Z`,source:`https://www.meta.com/brand/resources/instagram/threads`,hex:`000000`,guidelines:`https://www.meta.com/brand/resources/instagram/threads`},v3={title:`TikTok`,slug:`tiktok`,get svg(){return B4+`TikTok`+V4+this.path+H4},path:`M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z`,source:`https://tiktok.com`,hex:`000000`},y3={title:`Twitch`,slug:`twitch`,get svg(){return B4+`Twitch`+V4+this.path+H4},path:`M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 0L1.714 4.286v15.428h5.143V24l4.286-4.286h3.428L22.286 12V0zm14.571 11.143l-3.428 3.428h-3.429l-3 3v-3H6.857V1.714h13.714Z`,source:`https://brand.twitch.tv`,hex:`9146FF`,guidelines:`https://brand.twitch.tv`},b3={title:`WhatsApp`,slug:`whatsapp`,get svg(){return B4+`WhatsApp`+V4+this.path+H4},path:`M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z`,source:`https://about.meta.com/brand/resources/whatsapp/whatsapp-brand`,hex:`25D366`,guidelines:`https://about.meta.com/brand/resources/whatsapp/whatsapp-brand`},x3={title:`X`,slug:`x`,get svg(){return B4+`X`+V4+this.path+H4},path:`M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z`,source:`https://x.com`,hex:`000000`,guidelines:`https://about.x.com/en/who-we-are/brand-toolkit`},S3={title:`YouTube`,slug:`youtube`,get svg(){return B4+`YouTube`+V4+this.path+H4},path:`M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z`,source:`https://www.youtube.com/howyoutubeworks/resources/brand-resources/#logos-icons-and-colors`,hex:`FF0000`,guidelines:`https://www.youtube.com/howyoutubeworks/resources/brand-resources/#logos-icons-and-colors`},C3={title:`Zoom`,slug:`zoom`,get svg(){return B4+`Zoom`+V4+this.path+H4},path:`M5.033 14.649H.743a.74.74 0 0 1-.686-.458.74.74 0 0 1 .16-.808L3.19 10.41H1.06A1.06 1.06 0 0 1 0 9.35h3.957c.301 0 .57.18.686.458a.74.74 0 0 1-.161.808L1.51 13.59h2.464c.585 0 1.06.475 1.06 1.06zM24 11.338c0-1.14-.927-2.066-2.066-2.066-.61 0-1.158.265-1.537.686a2.061 2.061 0 0 0-1.536-.686c-1.14 0-2.066.926-2.066 2.066v3.311a1.06 1.06 0 0 0 1.06-1.06v-2.251a1.004 1.004 0 0 1 2.013 0v2.251c0 .586.474 1.06 1.06 1.06v-3.311a1.004 1.004 0 0 1 2.012 0v2.251c0 .586.475 1.06 1.06 1.06zM16.265 12a2.728 2.728 0 1 1-5.457 0 2.728 2.728 0 0 1 5.457 0zm-1.06 0a1.669 1.669 0 1 0-3.338 0 1.669 1.669 0 0 0 3.338 0zm-4.82 0a2.728 2.728 0 1 1-5.458 0 2.728 2.728 0 0 1 5.457 0zm-1.06 0a1.669 1.669 0 1 0-3.338 0 1.669 1.669 0 0 0 3.338 0z`,source:`https://brand.zoom.us/media-library/`,hex:`0B5CFF`,guidelines:`https://brand.zoom.us/usage-legal/`},w3={enso:dZ,hanzo:`<g transform="scale(0.3582089552238806)">${uZ}</g>`,ai2:`<path d="M9.553 9.378H4.777V4.835H8.62c.513 0 .932-.42.932-.932V.058h4.544v4.777a4.542 4.542 0 01-4.544 4.543zm-4.776.467H0v4.543h3.845c.512 0 .932.42.932.932v3.845H9.32v-4.777a4.542 4.542 0 00-4.543-4.543zM20.05 9.61a.935.935 0 01-.932-.932V4.835h-4.543V9.61a4.542 4.542 0 004.543 4.544h4.777V9.612H20.05zM9.787 19.166v4.777h4.544v-3.845c0-.513.42-.932.932-.932h3.845V14.62H14.33a4.542 4.542 0 00-4.544 4.544z"></path>`,ai21:`<path d="M6.47 17l-.367-1.189H2.718L2.35 17H0l3.398-9.789h2.026L8.864 17H6.47zm-2.052-6.993l-1.17 4.028H5.56l-1.142-4.028zm4.707-2.796h2.23V17h-2.23V7.211zM11.955 15c.1-.483.277-.946.524-1.37.214-.359.482-.68.795-.951.32-.273.658-.52 1.013-.741.28-.168.54-.33.781-.483.222-.14.433-.296.632-.468.172-.148.317-.325.428-.525.107-.199.16-.423.157-.65 0-.392-.104-.674-.313-.846a1.176 1.176 0 00-.775-.259 1.207 1.207 0 00-.863.329c-.231.219-.347.585-.347 1.098H11.8a3.387 3.387 0 01.224-1.245c.146-.377.371-.716.66-.993.306-.29.667-.514 1.06-.657A4.04 4.04 0 0115.183 7c.42-.002.84.057 1.244.175.376.107.73.287 1.04.531.305.246.55.562.714.923.185.419.275.875.265 1.335.005.39-.084.774-.259 1.12-.167.328-.38.63-.632.894-.246.259-.517.49-.808.693-.29.2-.554.37-.789.51-.326.224-.596.417-.809.58a3.872 3.872 0 00-.51.455 1.229 1.229 0 00-.265.434 1.633 1.633 0 00-.074.517h4.078V17h-6.606a9.24 9.24 0 01.183-2zM18.8 8.93a5.05 5.05 0 001.135-.105c.25-.049.484-.156.686-.314.163-.139.28-.324.34-.532.068-.25.1-.51.095-.77H23V17h-2.243v-6.475H18.8V8.93z"></path>`,aionlabs:`<path d="M8.303.964c.038.016.064.01.076-.016a.487.487 0 00.048-.034L8.76.66a2.845 2.845 0 011.5-.575c.078-.007.148-.007.211 0 .12.01.19.016.21.016.01 0 .02 0 .029.004a.416.416 0 00.148.021c.016 0 .031.002.046.006a.303.303 0 00.15.015c.34-.085.613-.133.82-.144.191-.01.42.012.688.067.454.092.864.288 1.23.588.048.04.13.114.249.223.007.006.015.01.024.011.037.006.07.001.099-.015a1.06 1.06 0 01.716-.12l.367.022c.235.023.446.083.632.18.096.048.223.128.383.238a.05.05 0 00.025.009c.047.003.091-.035.125-.03.033.004.068-.02.106-.024a3.47 3.47 0 01.815 0c.135.015.264.047.386.097.306.127.583.296.83.507.3.255.57.55.765.9.133.239.22.455.263.65.021.1.046.224.073.372.002.01.005.018.009.028.07.172.167.335.23.508.04.113.07.208.087.286.024.108.047.239.069.394.006.051.018.108.034.17a.142.142 0 00.046.073c.273.233.49.514.617.841.037.095.06.207.068.337.013.199.02.41-.042.598-.046.143-.076.23-.089.26a.085.085 0 00-.005.047c.016.105.023.18.02.225-.013.152-.021.265-.026.34a1.14 1.14 0 01-.121.43c-.247.5-.7.773-1.25.844a.236.236 0 00-.09.038c-.018.01-.02.034-.007.07a.062.062 0 01.003.023 2.592 2.592 0 01-.068.463c-.068.3-.205.55-.41.748a1.68 1.68 0 01-.742.41c-.036.01-.116.022-.24.034a.033.033 0 00-.027.022c-.01.033 0 .097-.017.15-.023.069-.006.17-.026.239-.02.065-.015.134-.024.215-.006.044-.023.163-.053.357a12.686 12.686 0 01-1.535 4.4c-.105.184-.23.366-.363.564a.07.07 0 00-.01.052c.089.486.185.956.32 1.416.08.272.182.523.383.715.057.054.155.121.296.203.63.367 1.277.656 1.985.963a.019.019 0 01.007.005.02.02 0 01.004.008.02.02 0 010 .009 2.052 2.052 0 01-.135.176c-.757.875-1.549 1.639-2.448 2.277a7.977 7.977 0 01-2.65 1.23.417.417 0 01-.087.017c-.01 0-.019.002-.027.008-.04.027-.092.01-.138.037a.063.063 0 01-.033.008.275.275 0 00-.12.02.081.081 0 01-.028.007c-.14.004-.259.029-.387.031-.327.007-.686.034-1.02.025a8.142 8.142 0 01-.646-.037 5.625 5.625 0 01-.613-.13 6.23 6.23 0 01-1.764-.73 4.407 4.407 0 01-1.199-1.098 1.296 1.296 0 01-.276-.625.734.734 0 00-.029-.163.679.679 0 00-.022-.192.17.17 0 01-.006-.045.648.648 0 00-.008-.127c-.025-.112-.02-.18-.037-.31a22.16 22.16 0 00-.173-1.086.667.667 0 01-.012-.104c-.002-.053-.027-.086-.026-.14a.28.28 0 00-.023-.129.051.051 0 01-.005-.027.358.358 0 00-.016-.134c-.023-.06-.008-.123-.036-.198a.1.1 0 01-.006-.036.33.33 0 00-.012-.115c-.026-.069-.008-.136-.04-.208a.063.063 0 01-.004-.027.357.357 0 00-.015-.124c-.023-.064-.006-.12-.03-.18-.021-.052-.004-.119-.028-.17-.025-.055-.008-.125-.032-.187-.019-.047-.003-.093-.023-.148-.02-.06-.008-.13-.032-.184-.016-.036-.01-.079-.019-.125l-.05-.267a.98.98 0 00-.061-.24.022.022 0 00-.02-.014.278.278 0 01-.07-.019 2.243 2.243 0 01-.69-.397 1.597 1.597 0 01-.48-.695 2.39 2.39 0 01-.104-.4c-.03-.17-.147-.303-.217-.43a1.498 1.498 0 01-.142-.384c-.01-.041-.004-.115-.028-.147a.017.017 0 01.004-.024c.018-.013.024-.044.016-.092-.006-.037-.024-.055-.053-.054a.03.03 0 01-.013-.002.03.03 0 01-.01-.008c-.26-.308-.456-.554-.545-.897a2.623 2.623 0 01-.086-.483 4.554 4.554 0 00-.021-.279.02.02 0 01-.005-.014.497.497 0 00.046-.183.323.323 0 00-.056-.251.123.123 0 01-.023-.052l-.078-.394a.114.114 0 01-.002-.037c.017-.149.028-.237.034-.264.045-.212.126-.406.244-.583a.025.025 0 00.004-.018.026.026 0 00-.01-.015 2.888 2.888 0 01-.927-1.357A2.66 2.66 0 013 8.36c.001-.148.008-.28.02-.397a2.276 2.276 0 01.656-1.395c.166-.168.356-.318.572-.452.037-.022.053-.053.05-.092a.417.417 0 00-.024-.103.077.077 0 01-.005-.028 20.28 20.28 0 01.004-1.105c.006-.126.038-.28.096-.462.175-.556.438-1.015.79-1.379.215-.222.449-.4.7-.535.162-.087.314-.142.396-.252.173-.233.373-.45.6-.65.312-.274.68-.447 1.103-.519.104-.017.229-.01.345-.027zm.106.32l-.24-.047a1.42 1.42 0 00-.59.115c-.674.296-1.225.917-1.414 1.616-.045.17-.053.305-.075.51a.087.087 0 01-.035.06c-.113.084-.26.186-.363.302a2.227 2.227 0 00-.355.53 1.45 1.45 0 00-.133.55.745.745 0 00-.009.282l.016.24a.016.016 0 01-.015.017.264.264 0 00-.131.046c-.305.204-.512.52-.631.862-.042.12-.118.326-.078.436a.042.042 0 00.043.027.043.043 0 00.018-.005.557.557 0 00.194-.177c.237-.315.489-.593.86-.758a1.79 1.79 0 011.076-.127 7.415 7.415 0 01.518.114.012.012 0 00.007-.016 1.69 1.69 0 01-.134-.5.827.827 0 010-.142l.015-.128a1.89 1.89 0 00.61 1.269c.254.231.557.338.898.375.237.026.46.028.671.006a.32.32 0 01.128-.009 1.735 1.735 0 001.225-.678v-.006a.013.013 0 00-.005-.006.012.012 0 00-.006-.002l-.434-.048a4.718 4.718 0 00-.369-.141c-.138-.046-.271-.05-.41-.068-.453-.058-.831-.371-.914-.841-.028-.318.026-.623.244-.865.065-.072.143-.148.233-.227a.088.088 0 00.03-.096.056.056 0 01-.001-.026l.067-.312.174-.325a.014.014 0 00-.014-.02 1.24 1.24 0 00-.877.605c-.186.309-.264.69-.152 1.03a.004.004 0 01-.002.005h-.003l-.002-.002c-.222-.418-.247-.911.03-1.309.253-.36.775-.712 1.247-.67a.03.03 0 00.024-.01l.203-.214a2.28 2.28 0 01.443-.352c.112-.068.259-.128.379-.194a.016.016 0 00.001-.027.784.784 0 00-.267-.118 2.217 2.217 0 00-.79-.046c-.45.054-.943.304-1.302.596a.012.012 0 01-.013.002.013.013 0 01-.008-.01c0-.01.001-.018.005-.024.16-.231.342-.419.546-.562.507-.357 1.193-.4 1.768-.204.128.061.25.133.367.215a.219.219 0 00.073.037.52.52 0 00.287-.064.36.36 0 00.187-.269.23.23 0 00-.004-.128.065.065 0 00-.016-.023c-.057-.05-.085-.106-.085-.168 0-.12.075-.2.199-.177a.478.478 0 01.168.076.605.605 0 01.11.435l.004.004a.011.011 0 00.011.002c.214-.088.363-.079.641-.091a.019.019 0 01.014.005.019.019 0 01.005.013v.21a.011.011 0 01-.01.011c-.24.026-.398.053-.475.08-.558.201-.93.583-1.113 1.144-.105.38-.085.752.06 1.113.126.301.32.55.578.745.442.332 1.015.404 1.552.291.111-.023.209-.07.3-.11a.004.004 0 00.002-.003.005.005 0 000-.006l-.004-.001a1.237 1.237 0 01-.87-.314 1.726 1.726 0 01-.213-.235.79.79 0 00.546.172c.226-.01.468-.102.6-.297a.024.024 0 00.003-.02.025.025 0 00-.005-.009.025.025 0 00-.008-.006c-.497-.249-.698-.726-.654-1.268a.134.134 0 01.032-.054.014.014 0 01.023.009l.003.038a.537.537 0 00.053.19c.147.316.371.546.67.686.47.221 1.122.188 1.551-.114a.712.712 0 00.258-.32.417.417 0 00-.043-.41c-.122-.153-.27-.194-.44-.123-.117.048-.187.133-.296.164-.55.159-1.123-.414-.907-.96a.503.503 0 01.346-.266l.1.004a1.048 1.048 0 00-.146.241c-.103.23-.046.492.174.62.12.058.235.06.342.004.095-.05.145-.141.213-.22a.394.394 0 01.273-.14c.486-.046.884.347 1.062.77.061.201.09.398.084.591l-.037.278-.024.106c-.08.118-.138.254-.177.406-.07.28.045.482.245.662a.008.008 0 00.01 0 .008.008 0 00.003-.008.977.977 0 01.01-.526l.11-.242c.147-.198.335-.327.563-.387a1.613 1.613 0 01.412-.047.012.012 0 00.004-.003.013.013 0 00.003-.005V3.87c-.049-.26-.03-.483.054-.669.264-.578.864-.658 1.409-.47.262.091.474.247.699.383a.011.011 0 00.012 0 .011.011 0 00.004-.005.454.454 0 00-.048-.163 2.018 2.018 0 00-1.123-1.113 2.008 2.008 0 00-.558-.102.306.306 0 01.276-.158.01.01 0 00.006-.002.01.01 0 00.003-.006.01.01 0 00-.007-.01 2.14 2.14 0 01-.19-.064 1.71 1.71 0 00-1.061-.062.033.033 0 00-.02.05l.087.152a.044.044 0 00.048.021c.057-.012.135-.02.235-.025a.694.694 0 01.415.108 1.79 1.79 0 00-1.339.788.201.201 0 01-.02-.04c-.015-.034-.041-.05-.054-.08-.022-.052.029-.156.058-.2.107-.16.245-.297.412-.41a.021.021 0 00.008-.027.74.74 0 00-.18-.248 1.394 1.394 0 00-.693-.434c-.512-.143-1.04-.067-1.457.256a9.16 9.16 0 00-.268.221c-.046.04-.093.053-.14.04a.798.798 0 00-.52.017c-.307.12-.544.371-.593.71-.004.03-.002.07-.006.104a.026.026 0 01-.02.022 1.331 1.331 0 00-.347.153c-.308.174-.442.441-.403.8.01.083.036.169.079.259l-.052.216c-.064-.083-.137-.169-.18-.255a.988.988 0 01-.035-.814c.08-.214.284-.44.534-.39a.167.167 0 01.119.08.026.026 0 00.025.012.025.025 0 00.02-.019c.01-.036.02-.082.026-.138.074-.558.534-1.062 1.136-1.077.039 0 .077-.012.11-.034l.284-.182a.012.012 0 00.005-.008v-.005a2.488 2.488 0 00-1.269-.735 2.637 2.637 0 00-1.47.116.132.132 0 01-.08.003A2.257 2.257 0 009.123.71a2.2 2.2 0 00-.24.165c-.157.138-.316.274-.474.41zm.965 2.196a1.215 1.215 0 00-.388.183.453.453 0 00-.112.11.057.057 0 00-.01.025c-.061.389-.04.825.21 1.152.455.6 1.252.715 1.936.475.121-.042.246-.124.356-.174a.012.012 0 00.005-.004.011.011 0 00.001-.007.011.011 0 00-.008-.01 1.759 1.759 0 01-.896-.665 1.446 1.446 0 01-.25-.516c-.094-.44-.04-.879.164-1.317.084-.166.184-.323.302-.47a.248.248 0 00.033-.051.01.01 0 000-.006.01.01 0 00-.006-.01 1.398 1.398 0 00-.517.167c-.42.238-.757.638-.82 1.118zm-4.8 2.044c.088-.12.184-.224.285-.31a.128.128 0 00.045-.087l.03-.347c.083-.455.288-.84.613-1.152a1.54 1.54 0 01.302-.211.032.032 0 00.016-.03 1.823 1.823 0 01.121-.713.015.015 0 00-.003-.016.015.015 0 00-.016-.003.59.59 0 00-.076.037 2.595 2.595 0 00-.825.75 3.317 3.317 0 00-.53 1.224 2.961 2.961 0 00-.036.947.005.005 0 00.009 0l.064-.089zm13.143-.942c-.136.069-.282.106-.438.11-.306.01-.548-.09-.7-.357a.018.018 0 00-.027-.005l-.085.071c-.322.25-.288.603-.04.893.168.198.38.326.634.384.448.101.9.014 1.242-.295.233-.21.37-.47.41-.782.01-.071.02-.158.028-.26a.077.077 0 01.063-.069.263.263 0 01.11.012c.435.119.668.58.77.984.003.016 0 .024-.01.025-.121.005-.25.017-.386.035a.016.016 0 00-.013.013l.001.01a.016.016 0 00.007.006c.143.076.274.283.258.445-.016.163-.034.329-.053.5-.015.139-.01.249-.009.422 0 .01.002.02.006.03.04.114.082.196.217.19.01 0 .018-.003.027-.007.166-.069.242-.24.286-.403.08-.282.069-.554-.035-.816a1.831 1.831 0 00-.112-.21 1.95 1.95 0 01-.108-.211 1.833 1.833 0 00-.02-.744c-.16-.667-.796-1.429-1.555-1.175a.81.81 0 00-.56.84c.013.111.06.243.092.364zm-2.6.49a2.111 2.111 0 01-.429.433c-.291.217-.615.349-.97.394-.157.02-.335.01-.48.014a.618.618 0 00-.315.11c-.162.104-.35.23-.53.316-.347.166-.71.25-1.09.25a8.8 8.8 0 01-.405-.007.302.302 0 00-.252.105 38.7 38.7 0 01-.397.443l-.322.215-.319.16c-.223.114-.4.269-.53.466-.119.18-.17.362-.26.626a1.477 1.477 0 01-.374.58l-.337.198a.017.017 0 00-.007.02c.012.033.032.078.058.136.11.24.135.491.077.756a.989.989 0 01-.217.414.846.846 0 01-.428.221c-.456.069-.788-.255-.978-.629l-.002-.002h-.003l-.002.002-.001.003.067.316c.028.131.095.297.17.435.054.096.104.19.15.283-.013.121-.063.2-.15.238-.1.043-.238-.005-.338-.048a15.309 15.309 0 01-.44-.2.372.372 0 01-.205-.209c-.058-.165-.107-.359-.173-.494a1.045 1.045 0 00-.588-.533.36.36 0 00-.121-.024c-.008-.013-.01-.017-.004-.012l-.03-.485c-.024-.32.024-.64.37-.756.48-.057.528.515.79.722a.013.013 0 00.015 0 .012.012 0 00.006-.012c-.044-.306-.09-.588-.296-.818a.518.518 0 00-.465-.176c-.416.047-.58.386-.622.762-.021.193-.024.371-.009.535.023.356.12.796.163 1.006.047.233.11.455.188.665.07.19.212.426.299.554.13.194.301.362.51.504.366.246.76.297 1.186.153.058.431.147.86.266 1.29.026.092.057.177.093.253.186.518.478.98.876 1.384.255.26.515.48.78.664.007.012.033.03.077.05a.6.6 0 00.106.094c.484.329 1.004.613 1.56.852l.239.103c.197.087.36.15.485.191.295.094.462.146.502.158.39.113.79.172 1.2.175.312.004.598-.049.869-.184.207-.105.424-.32.505-.553.162-.468-.062-.95-.47-1.214a1.54 1.54 0 00-.665-.287 1.85 1.85 0 00-.492-.029c.07-.11.115-.178.135-.204.133-.175.385-.209.584-.177.167.028.309.053.426.077.223.045.397-.064.352-.313a.362.362 0 00-.179-.272 2.06 2.06 0 00-.65-.223.944.944 0 00-.268-.02c-.22.028-.395.05-.524.063a.519.519 0 00-.287.152.412.412 0 01-.145-.06.216.216 0 01-.063-.107c.05-.172.161-.264.336-.275a.097.097 0 01.07.026c.162.152.362.091.557.024a.99.99 0 01.715.01c.087.034.298.125.42.112.142-.016.214-.1.215-.251a.062.062 0 00-.03-.054 4.639 4.639 0 01-.144-.1.14.14 0 01-.033-.036 3.76 3.76 0 01-.135-.218c-.085-.147-.238-.192-.397-.23a.506.506 0 01-.246-.154c.1-.196.272-.313.515-.349a.596.596 0 01.32.037c.269.11.46.186.575.227.312.11.649.115.818-.213a.6.6 0 00.086-.284c.02-.508.05-1.347.092-2.517l.039-1.008c.01-.273.084-.515.323-.668.19-.11.433-.097.645-.112.428-.03.485-.436.408-.77-.064-.356-.321-.667-.634-.838a2.432 2.432 0 00-.531-.207 3.244 3.244 0 01-.357-.148 2 2 0 01-.355-.263v-.004l.004-.002h.004l.202.091c.137.056.28.076.428.06.309-.032.485-.33.288-.6-.13-.18-.364-.324-.53-.439a2.118 2.118 0 01-.405-.376 1.616 1.616 0 01-.288-.516.004.004 0 00-.005 0l-.001.002a1.46 1.46 0 01-.241.55zm3.914.445c-.011.02-.018.064-.031.082-.183.239-.33.338-.595.532a.794.794 0 00-.257.319.01.01 0 00.009.01c.105.008.212.002.322-.018.501-.093.61-.479.567-.921l-.002-.005a.008.008 0 00-.009-.002.008.008 0 00-.004.003zM3.266 7.891c-.048.295-.042.593.018.893.09.507.311 1.007.687 1.366.048.046.106.09.175.13.014.014.028.018.042.011.107-.05.223-.125.35-.223a.031.031 0 00.012-.025v-.09a.071.071 0 00-.066-.07.834.834 0 01-.453-.177 1.05 1.05 0 01-.356-.521 6.047 6.047 0 00-.07-.203l.017-.145a.007.007 0 01.015 0c.036.23.177.527.395.634a.29.29 0 00.309-.025.779.779 0 00.173-.35.079.079 0 00-.032-.081c-.355-.24-.385-.6-.078-.88.358-.325.868-.352 1.273-.125.034.019.087.053.157.104.05.036.102.072.155.107.075.074.17.158.285.25.2.163.408.24.67.25.411.017.748-.127 1.01-.432.127-.147.187-.294.292-.512a.919.919 0 01.611-.511.007.007 0 00-.004-.01l-.318-.069a1.755 1.755 0 00-.358-.045 1.02 1.02 0 00-.534.081c-.196.09-.357.28-.555.334-.267.073-.471-.005-.611-.233a.34.34 0 01-.034-.158l.009-.007c.213.276.51.121.558-.178a.66.66 0 00-.106-.473c-.213-.316-.518-.463-.916-.441-.397.022-.773.248-1.022.548-.192.232-.402.547-.709.458-.226-.066-.235-.278-.19-.477a.01.01 0 00-.015-.01c-.09.056-.165.115-.224.176a2.093 2.093 0 00-.562 1.129zm3.221 1.627a.99.99 0 00.174.337c.054.068.115.132.181.193.08.157.178.264.293.321.26.13.554.024.658-.251.078-.237.047-.444-.092-.62a.626.626 0 00-.435-.239 2.97 2.97 0 00-.527.017l-.35-.21a.01.01 0 00-.011 0 .01.01 0 00-.005.011c.016.16.054.307.114.44zM4.23 10.86a1.16 1.16 0 00-.08.132c-.074.158-.109.323-.102.495.01.26.196.672.528.6a.343.343 0 00.249-.202.3.3 0 00.042-.15 1.418 1.418 0 00-.093-.4 2.793 2.793 0 01-.16-.754.036.036 0 00-.008-.019.017.017 0 00-.01-.006c-.004-.001-.008 0-.012.002a1.674 1.674 0 00-.354.302zm.109 2.45a1.921 1.921 0 00.337.464c.002.001.003.002.005.001a.013.013 0 00.01-.004l.08-.096a1.21 1.21 0 01.622-.114c.03.003.06.005.091.004l.15.082c.084.057.17.115.257.176a2.12 2.12 0 01.272.259h.003a.005.005 0 00.002-.002v-.003a1.983 1.983 0 00-.133-.625 1.117 1.117 0 00-.635-.61 33.41 33.41 0 00-.275-.285.482.482 0 00-.413-.152.752.752 0 01-.516-.07.01.01 0 00-.008.004 1.79 1.79 0 00.151.971zm2.137 1.902c.006.025.008.037.006.037.023.307.058.602.106.887.045.443.092.81.14 1.1l.419 2.536c.092.552.126.872.185 1.457.022.214.095.407.218.578.203.283.438.53.705.744.459.367.97.646 1.534.838.444.168.906.28 1.385.339.476.054.963.053 1.461-.004.395-.038.794-.12 1.196-.245.119-.038.304-.104.554-.2a.891.891 0 00.114-.06.588.588 0 00.128-.046c.311-.15.613-.308.905-.473a2.43 2.43 0 00.276-.185v-.007a.012.012 0 00-.005-.005.011.011 0 00-.007-.002c-.716.065-1.372-.067-2.035-.383-.574-.273-1.088-.718-1.552-1.21a26.147 26.147 0 01-1.289-1.46l-2.286-2.761a9.577 9.577 0 01-.753-1.023 4.608 4.608 0 01-.577-1.342l-.147-.61a.018.018 0 00-.019-.014c-.45.038-.68.566-.688.958a3.17 3.17 0 00.026.556zm-1.47-1.214a.506.506 0 00-.027.551.638.638 0 00.231.251.105.105 0 00.088.011c.302-.095.58-.148.887-.034h.004a.008.008 0 00.004-.002.007.007 0 00.001-.008 1.908 1.908 0 00-.302-.475 1.227 1.227 0 00-.432-.357.533.533 0 00-.21-.065c-.098-.003-.18.04-.244.128zm.96 2.255a.76.76 0 00.244.08l.14.016a.033.033 0 00.031-.018 2.273 2.273 0 00-.07-.799.02.02 0 00-.007-.01.019.019 0 00-.012-.004c-.179.008-.356.033-.533.074-.009-.01-.023-.016-.043-.018a1.019 1.019 0 01-.384-.434.012.012 0 00-.017.009c-.069.454.279.892.652 1.104z"></path><path d="M7.126 3.698a2.128 2.128 0 00-.016 1.07l-.091-.023c-.31-.215-.696-.139-.966.09a.02.02 0 01-.018.005.978.978 0 00-.294-.023c.15-.23.352-.383.604-.457.083-.024.187-.044.31-.058a.023.023 0 00.018-.015c.091-.24.242-.436.453-.59zM14.187 8.01c.415.181.695.507.724.97a.035.035 0 01-.009.025l-.018.021c-.241.232-.463.462-.735.66-.23.165-.56.315-.849.297a.335.335 0 01-.24-.112.968.968 0 01-.038-.37.043.043 0 00-.038-.047.448.448 0 01-.148-.045c.06-.134.094-.251.102-.352.029-.327-.238-.5-.53-.538a1.515 1.515 0 00-.7.074c-.1.03-.193.073-.279.126a.756.756 0 00-.164.14 9.013 9.013 0 00-.144.164.02.02 0 00-.004.012c0 .005.002.01.005.013.015.016.022.031.021.046l-.178.074-.172-.031a6.66 6.66 0 00-.755-.142 3.515 3.515 0 01-.465-.116c.215.01.404 0 .565-.033a2.67 2.67 0 00.502-.156c.564-.236.991-.43 1.538-.496a.041.041 0 00.035-.032c.047-.211.19-.285.397-.327.138-.029.313-.035.526-.02.378.028.715.066 1.05.196z"></path>`,alibaba:`<path d="M24 14.014c-2.8 1.512-5.62 2.896-8.759 3.524-.7.139-1.476.139-2.187.043-.678-.085-1.017-.682-.776-1.31.23-.585.536-1.181.93-1.671.852-1.065 1.814-2.034 2.678-3.088a15.75 15.75 0 001.422-2.054c.306-.511.164-1.129-.372-1.384-.897-.437-1.859-.745-2.81-1.075-.11-.043-.274.074-.492.149.273.244.47.425.743.67-2.821.48-5.49 1.16-8.08 2.098-.012.053-.033.095-.023.117.383.585.208 1.032-.35 1.394a2.365 2.365 0 00-.568.522c1.706.5 3.226.213 4.68-.735-.087-.127-.175-.244-.262-.372.546.096.874.394.918.862.011.107-.054.213-.087.32-.077-.086-.175-.17-.24-.267-.045-.064-.056-.138-.088-.245-1.728 1.15-3.587 1.438-5.632.842 0 .404-.022.745.011 1.075.022.287-.098.415-.36.564-.591.362-1.204.735-1.696 1.214-.59.585-.371 1.299.427 1.597.907.34 1.859.35 2.81.234 1.126-.139 2.23-.32 3.456-.49-1.433.67-2.844 1.14-4.33 1.33-1.04.14-2.078.214-3.106-.084-1.476-.415-2.133-1.501-1.75-2.96.361-1.363 1.236-2.449 2.176-3.45 3.139-3.332 7.108-5.024 11.7-5.365 1.072-.074 2.155.064 3.16.511 1.411.639 2.002 1.99 1.313 3.354-.448.905-1.072 1.735-1.695 2.555-.612.809-1.301 1.554-1.946 2.331-.186.234-.361.48-.503.745-.274.5-.088.83.492.778 1.213-.118 2.45-.213 3.62-.511 1.716-.437 3.389-1.054 5.084-1.597.175-.043.339-.107.492-.17z"></path>`,anthropic:`<path d="M13.827 3.52h3.603L24 20h-3.603l-6.57-16.48zm-7.258 0h3.767L16.906 20h-3.674l-1.343-3.461H5.017l-1.344 3.46H0L6.57 3.522zm4.132 9.959L8.453 7.687 6.205 13.48H10.7z"></path>`,antigravity:`<g transform="scale(0.24)"><path d="M85.2843 88.0301C90.1329 91.6664 97.4057 89.2422 90.7389 82.5755C70.7389 63.1816 74.9813 9.84827 50.1329 9.84827C25.2843 9.84827 29.5267 63.1816 9.52673 82.5755C2.25402 89.8483 10.1328 91.6664 14.9813 88.0301C33.7692 75.3028 32.5571 52.8786 50.1329 52.8786C67.7086 52.8786 66.4965 75.3028 85.2843 88.0301Z"></path></g>`,arcee:`<path d="M13.236 2.377L2.751 20.493H0L11.863 0l1.373 2.377zm3.554 6.156l-9.606 11.96H4.13L15.511 6.32l1.279 2.212zm6.908 11.96H14.05l8.406-2.151 1.242 2.15zm-3.42-5.922l-7.843 5.92H8.482l10.597-7.997 1.2 2.077z"></path>`,aws:`<path d="M6.763 11.212c0 .296.032.535.088.71.064.176.144.368.256.576.04.063.056.127.056.183 0 .08-.048.16-.152.24l-.503.335a.383.383 0 01-.208.072c-.08 0-.16-.04-.239-.112a2.47 2.47 0 01-.287-.375 6.18 6.18 0 01-.248-.471c-.622.734-1.405 1.101-2.347 1.101-.67 0-1.205-.191-1.596-.574-.39-.384-.59-.894-.59-1.533 0-.678.24-1.23.726-1.644.487-.415 1.133-.623 1.955-.623.272 0 .551.024.846.064.296.04.6.104.918.176v-.583c0-.607-.127-1.03-.375-1.277-.255-.248-.686-.367-1.3-.367-.28 0-.568.031-.863.103-.295.072-.583.16-.862.272-.09.04-.184.075-.28.104a.488.488 0 01-.127.023c-.112 0-.168-.08-.168-.247v-.391c0-.128.016-.224.056-.28a.597.597 0 01.224-.167 4.577 4.577 0 011.005-.36 4.84 4.84 0 011.246-.151c.95 0 1.644.216 2.091.647.44.43.662 1.085.662 1.963v2.586h.016zm-3.24 1.214c.263 0 .534-.048.822-.144a1.78 1.78 0 00.758-.51 1.27 1.27 0 00.272-.512c.047-.191.08-.423.08-.694v-.335a6.66 6.66 0 00-.735-.136 6.02 6.02 0 00-.75-.048c-.535 0-.926.104-1.19.32-.263.215-.39.518-.39.917 0 .375.095.655.295.846.191.2.47.296.838.296zm6.41.862c-.144 0-.24-.024-.304-.08-.064-.048-.12-.16-.168-.311L7.586 6.726a1.398 1.398 0 01-.072-.32c0-.128.064-.2.191-.2h.783c.151 0 .255.025.31.08.065.048.113.16.16.312l1.342 5.284 1.245-5.284c.04-.16.088-.264.151-.312a.549.549 0 01.32-.08h.638c.152 0 .256.025.32.08.063.048.12.16.151.312l1.261 5.348 1.381-5.348c.048-.16.104-.264.16-.312a.52.52 0 01.311-.08h.743c.127 0 .2.065.2.2 0 .04-.009.08-.017.128a1.137 1.137 0 01-.056.2l-1.923 6.17c-.048.16-.104.263-.168.311a.51.51 0 01-.303.08h-.687c-.15 0-.255-.024-.32-.08-.063-.056-.119-.16-.15-.32L12.32 7.747l-1.23 5.14c-.04.16-.087.264-.15.32-.065.056-.177.08-.32.08l-.686.001zm10.256.215c-.415 0-.83-.048-1.229-.143-.399-.096-.71-.2-.918-.32-.128-.071-.215-.151-.247-.223a.563.563 0 01-.048-.224v-.407c0-.167.064-.247.183-.247.048 0 .096.008.144.024.048.016.12.048.2.08.271.12.566.215.878.279.32.064.63.096.95.096.502 0 .894-.088 1.165-.264a.86.86 0 00.415-.758.777.777 0 00-.215-.559c-.144-.151-.416-.287-.807-.415l-1.157-.36c-.583-.183-1.014-.454-1.277-.813a1.902 1.902 0 01-.4-1.158c0-.335.073-.63.216-.886.144-.255.335-.479.575-.654.24-.184.51-.32.83-.415.32-.096.655-.136 1.006-.136.175 0 .36.008.535.032.183.024.35.056.518.088.16.04.312.08.455.127.144.048.256.096.336.144a.69.69 0 01.24.2.43.43 0 01.071.263v.375c0 .168-.064.256-.184.256a.83.83 0 01-.303-.096 3.652 3.652 0 00-1.532-.311c-.455 0-.815.071-1.062.223-.248.152-.375.383-.375.71 0 .224.08.416.24.567.16.152.454.304.877.44l1.134.358c.574.184.99.44 1.237.767.247.327.367.702.367 1.117 0 .343-.072.655-.207.926a2.157 2.157 0 01-.583.703c-.248.2-.543.343-.886.447-.36.111-.734.167-1.142.167z"></path><path d="M.378 15.475c3.384 1.963 7.56 3.153 11.877 3.153 2.914 0 6.114-.607 9.06-1.852.44-.2.814.287.383.607-2.626 1.94-6.442 2.969-9.722 2.969-4.598 0-8.74-1.7-11.87-4.526-.247-.223-.024-.527.272-.351zm23.531-.2c.287.36-.08 2.826-1.485 4.007-.215.184-.423.088-.327-.151l.175-.439c.343-.88.802-2.198.52-2.555-.336-.43-2.22-.207-3.074-.103-.255.032-.295-.192-.063-.36 1.5-1.053 3.967-.75 4.254-.399z"></path>`,baai:`<path clip-rule="evenodd" d="M0 4.68L8.61 0l3.583 2.004 3.1-1.735L24 5.14v8.701l-3.582 2.004v3.469L12.038 24l-8.482-4.52v-3.847L0 13.9V4.68zm1.284 1.472v2.934l7.936 4.098-.032 1.419-7.904-4.08v2.658l10.043 5.303V11.77L1.284 6.152zm10.741 4.532l9.791-5.33-2.63-1.47-7.398 4.137-1.251-.736 7.366-4.12-2.61-1.46-9.806 5.34 6.538 3.64zM4.2 6.328l6.709-3.606L8.61 1.436l-6.714 3.61L4.2 6.327zm11.04 14.444l-2.618 1.465V11.94l6.512-3.642v10.298l-2.61 1.46v-8.241l-1.283.682v8.277zm-10.4-4.42l6.487 3.568v2.23L4.84 18.763v-2.41zm17.876-3.23v-6.83L20.418 7.58v6.829l2.298-1.286z"></path>`,baidu:`<path d="M8.859 11.735c1.017-1.71 4.059-3.083 6.202.286 1.579 2.284 4.284 4.397 4.284 4.397s2.027 1.601.73 4.684c-1.24 2.956-5.64 1.607-6.005 1.49l-.024-.009s-1.746-.568-3.776-.112c-2.026.458-3.773.286-3.773.286l-.045-.001c-.328-.01-2.38-.187-3.001-2.968-.675-3.028 2.365-4.687 2.592-4.968.226-.288 1.802-1.37 2.816-3.085zm.986 1.738v2.032h-1.64s-1.64.138-2.213 2.014c-.2 1.252.177 1.99.242 2.148.067.157.596 1.073 1.927 1.342h3.078v-7.514l-1.394-.022zm3.588 2.191l-1.44.024v3.956s.064.985 1.44 1.344h3.541v-5.3h-1.528v3.979h-1.46s-.466-.068-.553-.447v-3.556zM9.82 16.715v3.06H8.58s-.863-.045-1.126-1.049c-.136-.445.02-.959.088-1.16.063-.203.353-.671.951-.85H9.82zm9.525-9.036c2.086 0 2.646 2.06 2.646 2.742 0 .688.284 3.597-2.309 3.655-2.595.057-2.704-1.77-2.704-3.08 0-1.374.277-3.317 2.367-3.317zM4.24 6.08c1.523-.135 2.645 1.55 2.762 2.513.07.625.393 3.486-1.975 4-2.364.515-3.244-2.249-2.984-3.544 0 0 .28-2.797 2.197-2.969zm8.847-1.483c.14-1.31 1.69-3.316 2.931-3.028 1.236.285 2.367 1.944 2.137 3.37-.224 1.428-1.345 3.313-3.095 3.082-1.748-.226-2.143-1.823-1.973-3.424zM9.425 1c1.307 0 2.364 1.519 2.364 3.398 0 1.879-1.057 3.4-2.364 3.4s-2.367-1.521-2.367-3.4C7.058 2.518 8.118 1 9.425 1z"></path>`,bytedance:`<path d="M14.944 18.587l-1.704-.445V10.01l1.824-.462c1-.254 1.84-.461 1.88-.453.032 0 .056 2.235.056 4.972v4.973l-.176-.008c-.104 0-.952-.207-1.88-.446z"></path><path d="M7 16.542c0-2.736.024-4.98.064-4.98.032-.008.872.2 1.88.454l1.816.461-.016 4.05-.024 4.049-1.632.422c-.896.23-1.736.445-1.856.469L7 21.523v-4.98z"></path><path d="M19.24 12.477c0-9.03.008-9.515.144-9.475.072.024.784.207 1.576.406.792.207 1.576.405 1.744.445l.296.08-.016 8.56-.024 8.568-1.624.414c-.888.23-1.728.437-1.856.47l-.24.055v-9.523z"></path><path d="M1 12.509c0-4.678.024-8.505.064-8.505.032 0 .872.207 1.872.454l1.824.461v7.582c0 4.16-.016 7.574-.032 7.574-.024 0-.872.215-1.88.47L1 21.013v-8.505z"></path>`,claude:`<path d="M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"></path>`,claudecode:`<path clip-rule="evenodd" d="M20.998 10.949H24v3.102h-3v3.028h-1.487V20H18v-2.921h-1.487V20H15v-2.921H9V20H7.488v-2.921H6V20H4.487v-2.921H3V14.05H0V10.95h3V5h17.998v5.949zM6 10.949h1.488V8.102H6v2.847zm10.51 0H18V8.102h-1.49v2.847z"></path>`,codex:`<path clip-rule="evenodd" d="M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"></path>`,cohere:`<path clip-rule="evenodd" d="M8.128 14.099c.592 0 1.77-.033 3.398-.703 1.897-.781 5.672-2.2 8.395-3.656 1.905-1.018 2.74-2.366 2.74-4.18A4.56 4.56 0 0018.1 1H7.549A6.55 6.55 0 001 7.55c0 3.617 2.745 6.549 7.128 6.549z"></path><path clip-rule="evenodd" d="M9.912 18.61a4.387 4.387 0 012.705-4.052l3.323-1.38c3.361-1.394 7.06 1.076 7.06 4.715a5.104 5.104 0 01-5.105 5.104l-3.597-.001a4.386 4.386 0 01-4.386-4.387z"></path><path d="M4.776 14.962A3.775 3.775 0 001 18.738v.489a3.776 3.776 0 007.551 0v-.49a3.775 3.775 0 00-3.775-3.775z"></path>`,cursor:`<path d="M22.106 5.68L12.5.135a.998.998 0 00-.998 0L1.893 5.68a.84.84 0 00-.419.726v11.186c0 .3.16.577.42.727l9.607 5.547a.999.999 0 00.998 0l9.608-5.547a.84.84 0 00.42-.727V6.407a.84.84 0 00-.42-.726zm-.603 1.176L12.228 22.92c-.063.108-.228.064-.228-.061V12.34a.59.59 0 00-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264 0 .428.286.296.514z"></path>`,deepcogito:`<path d="M19.74 21.618l4.213-10.534a.412.412 0 00.027-.1l.003-.03a.404.404 0 00-.02-.167l-.007-.026a.44.44 0 00-.045-.085l-.003-.005L16.528.13c-.002-.003 0-.006-.003-.01h.004v.173h-.01c-.102-.254-.277-.285-.445-.248l-.001-.003c-.001.001-.003-.003-.003-.003h-.006s0-.038-.002-.038L4.466 3.143c-.006.002-.012-.005-.018-.003-.022.007-.044.01-.064.021a.42.42 0 00-.039.022c-.013.008-.026.015-.037.025a.464.464 0 00-.118.154l-.01.017L0 13.919c-.004.013.023.026.023.04v.148c0 .019 0 .038.003.057l-.003.001v.006c0 .049-.011.096.016.139H.03c0 .002-.008.002-.008.002l-.01.001c.007.012.008.023.016.034l7.377 9.486v.005a.063.063 0 00.006.005c.006.008.013.013.02.02a.258.258 0 00.02.02c.008.008.015.017.023.023l.02.014a.564.564 0 00.104.053c.011.003.021.008.032.01.005.002.01.005.016.006a.445.445 0 00.172.004l11.597-2.108a.362.362 0 00.041-.01l.011.001h.001c.005 0 .01-.007.015-.009.01-.003.02-.008.03-.013a.248.248 0 00.025-.012l.01-.007a.448.448 0 00.096-.072c.004-.004.006-.01.01-.013a.419.419 0 00.069-.1l.005-.008.003-.006.001-.003.006-.015zm-.77-.894l-7.315-4.573 8.229-6.4-.915 10.973zm-7.82-5.27l-2.782-10.2 11.127 3.71-8.345 6.49zm9.611-5.883l2.267 1.512-3.022 7.554.755-9.066zm1.133-.278l-1.168-.778-1.556-3.113 2.724 3.891zm-2.35-1.22L8.862 4.514l7.122-3.56 3.56 7.12zM7.71 4.129L6.063 3.58 12.1 1.932 7.71 4.128zm-2.881-.053l2.201.734-5.137 6.605 2.936-7.34zm2.725 1.46l2.754 10.096-9.179-1.835 6.425-8.26zM10.3 16.508L7.633 22.73l-6.223-8 8.89 1.777zm.803.313l7.065 4.417-9.716 1.767 2.65-6.184z"></path>`,deepseek:`<path d="M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z"></path>`,gemma:`<path d="M12.34 5.953a8.233 8.233 0 01-.247-1.125V3.72a8.25 8.25 0 015.562 2.232H12.34zm-.69 0c.113-.373.199-.755.257-1.145V3.72a8.25 8.25 0 00-5.562 2.232h5.304zm-5.433.187h5.373a7.98 7.98 0 01-.267.696 8.41 8.41 0 01-1.76 2.65L6.216 6.14zm-.264-.187H2.977v.187h2.915a8.436 8.436 0 00-2.357 5.767H0v.186h3.535a8.436 8.436 0 002.357 5.767H2.977v.186h2.976v2.977h.187v-2.915a8.436 8.436 0 005.767 2.357V24h.186v-3.535a8.436 8.436 0 005.767-2.357v2.915h.186v-2.977h2.977v-.186h-2.915a8.436 8.436 0 002.357-5.767H24v-.186h-3.535a8.436 8.436 0 00-2.357-5.767h2.915v-.187h-2.977V2.977h-.186v2.915a8.436 8.436 0 00-5.767-2.357V0h-.186v3.535A8.436 8.436 0 006.14 5.892V2.977h-.187v2.976zm6.14 14.326a8.25 8.25 0 005.562-2.233H12.34c-.108.367-.19.743-.247 1.126v1.107zm-.186-1.087a8.015 8.015 0 00-.258-1.146H6.345a8.25 8.25 0 005.562 2.233v-1.087zm-8.186-7.285h1.107a8.23 8.23 0 001.125-.247V6.345a8.25 8.25 0 00-2.232 5.562zm1.087.186H3.72a8.25 8.25 0 002.232 5.562v-5.304a8.012 8.012 0 00-1.145-.258zm15.47-.186a8.25 8.25 0 00-2.232-5.562v5.315c.367.108.743.19 1.126.247h1.107zm-1.086.186c-.39.058-.772.144-1.146.258v5.304a8.25 8.25 0 002.233-5.562h-1.087zm-1.332 5.69V12.41a7.97 7.97 0 00-.696.267 8.409 8.409 0 00-2.65 1.76l3.346 3.346zm0-6.18v-5.45l-.012-.013h-5.451c.076.235.162.468.26.696a8.698 8.698 0 001.819 2.688 8.698 8.698 0 002.688 1.82c.228.097.46.183.696.259zM6.14 17.848V12.41c.235.078.468.167.696.267a8.403 8.403 0 012.688 1.799 8.404 8.404 0 011.799 2.688c.1.228.19.46.267.696H6.152l-.012-.012zm0-6.245V6.326l3.29 3.29a8.716 8.716 0 01-2.594 1.728 8.14 8.14 0 01-.696.259zm6.257 6.257h5.277l-3.29-3.29a8.716 8.716 0 00-1.728 2.594 8.135 8.135 0 00-.259.696zm-2.347-7.81a9.435 9.435 0 01-2.88 1.96 9.14 9.14 0 012.88 1.94 9.14 9.14 0 011.94 2.88 9.435 9.435 0 011.96-2.88 9.14 9.14 0 012.88-1.94 9.435 9.435 0 01-2.88-1.96 9.434 9.434 0 01-1.96-2.88 9.14 9.14 0 01-1.94 2.88z"></path>`,google:`<path d="M23 12.245c0-.905-.075-1.565-.236-2.25h-10.54v4.083h6.186c-.124 1.014-.797 2.542-2.294 3.569l-.021.136 3.332 2.53.23.022C21.779 18.417 23 15.593 23 12.245z"></path><path d="M12.225 23c3.03 0 5.574-.978 7.433-2.665l-3.542-2.688c-.948.648-2.22 1.1-3.891 1.1a6.745 6.745 0 01-6.386-4.572l-.132.011-3.465 2.628-.045.124C4.043 20.531 7.835 23 12.225 23z"></path><path d="M5.84 14.175A6.65 6.65 0 015.463 12c0-.758.138-1.491.361-2.175l-.006-.147-3.508-2.67-.115.054A10.831 10.831 0 001 12c0 1.772.436 3.447 1.197 4.938l3.642-2.763z"></path><path d="M12.225 5.253c2.108 0 3.529.892 4.34 1.638l3.167-3.031C17.787 2.088 15.255 1 12.225 1 7.834 1 4.043 3.469 2.197 7.062l3.63 2.763a6.77 6.77 0 016.398-4.572z"></path>`,hermesagent:`<path d="M5.938 12.835c.127-.039.285.02.373.143.028.038.036.092.046.14.003.014-.02.033-.04.05-.124-.098-.24-.194-.354-.291-.011-.01-.016-.027-.025-.042zM8.396 9.412c.195-.032.39-.06.588-.05a.54.54 0 01.148.026c.202.071.402.147.601.224.028.01.05.036.075.055l-.013.027a9.203 9.203 0 01-.26-.089c-.115-.038-.213-.077-.315-.098-.25-.05-.25-.046-.292-.014l.574.144c.275.139.55.276.823.417.042.022.09.057.107.098.026.06.063.076.117.072.066-.006.132-.017.213-.027l-.04.086c.051.08.142.02.216.064-.074.13-.247.09-.334.199l.061.074-.12.087c0 .106-.038.168-.306.243l.026.085-.196.042.07.124h-.25l-.007.137c-.081-.01-.161-.018-.244-.027l-.053.123c-.027-.008-.052-.011-.073-.023-.067-.038-.128-.056-.195.006-.019.017-.063.014-.093.008-.026-.006-.05-.029-.07-.042-.11.095-.11.095-.208.003-.057.046-.12.074-.186.011-.063.027-.123-.02-.178-.014-.07.007-.097-.035-.133-.07l-.13.033c-.013-.236-.194-.19-.34-.203.005-.072.05-.092.095-.094a.474.474 0 01.159.022c.164.05.32.12.496.138.203.021.405.029.601-.015.265-.059.52-.149.707-.365.049-.056.083-.127.117-.195.019-.038.02-.084-.02-.116a1.397 1.397 0 00-.382-.217c.024.12-.031.182-.115.221 0 .014-.004.025 0 .03.08.115.084.16-.007.267a1.39 1.39 0 01-.218.211.477.477 0 01-.641-.05 1.36 1.36 0 01-.133-.152c-.078-.107-.076-.108-.033-.236-.165-.08-.128-.226-.104-.364.008-.05.028-.096.049-.163-.04.014-.067.017-.087.032a.897.897 0 00-.316.357c-.007.016-.01.034-.02.047-.012.015-.034.038-.045.035-.02-.006-.037-.027-.05-.045-.008-.012-.007-.032-.012-.057h-.126l.053-.172a14.82 14.82 0 00-.039-.049l.11-.284c-.06.026-.091.044-.124.051-.03.007-.064 0-.095 0 0-.031-.01-.07.004-.092.149-.22.305-.428.593-.476z"></path><path d="M8.06 10.788c-.003-.038-.004-.075.037-.062.016.006.034.048.028.067-.01.04-.038.032-.064-.005z"></path><path clip-rule="evenodd" d="M11.981.009c.226-.012.453-.011.679 0 .247.01.495.024.74.062.401.064.798.157 1.19.273.463.138.92.299 1.356.511a7.31 7.31 0 012.948 2.642c.292.469.536.963.739 1.479.219.556.446 1.11.623 1.683.204.654.329 1.326.458 1.997.097.504.182 1.01.29 1.511.156.722.329 1.44.494 2.16.186.812.4 1.615.63 2.415.102.355.193.713.282 1.072.11.436.202.876.254 1.323.031.278.066.557.073.837a7.56 7.56 0 01-.017.88c-.037.413-.1.818-.226 1.212a5.017 5.017 0 01-.915 1.649l-.13.156.018.023c.043-.023.088-.041.127-.068.2-.138.373-.307.531-.49.4-.46.721-.973.975-1.529a3.59 3.59 0 00.325-1.72c-.024-.424-.097-.834-.3-1.213-.013-.027-.015-.06-.03-.121.05.035.082.048.101.072.107.13.22.258.315.398.33.494.46 1.052.486 1.64a3.75 3.75 0 01-.47 1.97c-.36.655-.887 1.14-1.526 1.506-.193.111-.394.21-.595.308-.157.078-.248.211-.318.365a.522.522 0 00-.033.406.359.359 0 01.013.139c-.005.077-.077.155-.14.162-.054.006-.125-.043-.15-.116a1.206 1.206 0 01-.06-.233c-.04-.314-.155-.6-.308-.87a3.906 3.906 0 00-.73-.91 2.129 2.129 0 00-.897-.524 4.093 4.093 0 00-.692-.131c-.075-.008-.15-.04-.22.01.18.06.363.11.538.18.434.173.82.43 1.18.728.308.255.58.543.794.884.098.155.186.315.227.496.027.123.042.25.067.375.013.062-.002.109-.053.144-.047.033-.122.034-.163-.01a.455.455 0 01-.08-.14c-.03-.073-.038-.159-.078-.225a7.314 7.314 0 00-1.423-1.664c-.16-.137-.329-.26-.537-.323-.376-.114-.753-.203-1.15-.154-.213.025-.427.032-.64.053a1.6 1.6 0 00-.736.278 5.14 5.14 0 00-.834.72c-.329.342-.642.699-.955 1.055-.136.155-.264.319-.314.531a5.227 5.227 0 00-.012.051.096.096 0 01-.09.076h-.31c-.046 0-.082-.048-.072-.094.023-.108.045-.216.07-.324.075-.325.19-.635.368-.917.024-.039.04-.088.104-.08l.01.049.027.077c.28-.435.571-.834.996-1.135.283-.204.584-.378.89-.55a.196.196 0 00-.098-.002c-.162.043-.325.084-.485.134-.402.124-.764.33-1.11.566-.147.1-.298.193-.414.333a7.314 7.314 0 00-1.07 1.767.845.845 0 00-.04.12.075.075 0 01-.072.056h-.494c-.04 0-.062-.051-.036-.082.123-.14.246-.282.377-.415.275-.281.58-.532.777-.884.027-.048.063-.09.095-.135.238-.333.54-.607.818-.902.082-.086.175-.16.26-.24.029-.027.053-.057.079-.085l-.018-.025-.135.041c-.034.017-.07.031-.102.05-.248.144-.494.292-.743.433-.408.23-.825.439-1.209.711-.281.2-.591.358-.889.533-.02.012-.044.015-.08.028-.015-.135.143-.201.108-.336-.033.014-.064.02-.085.038-.111.096-.227.19-.328.296-.148.157-.284.325-.425.488-.125.143-.25.286-.373.431A.153.153 0 019.89 24H8.762a.316.316 0 00.016-.042c.028-.09.085-.172.083-.28-.091-.018-.162.001-.212.077a4.45 4.45 0 00-.136.215c-.01.016-.024.03-.042.03h-.093c-.019 0-.029-.022-.017-.037.071-.088.14-.178.209-.268.001-.002-.006-.012-.012-.024-.014.004-.03.006-.045.013-.176.09-.352.181-.527.274a.363.363 0 01-.168.042H5.202c-.026 0-.039-.036-.019-.053.21-.178.402-.374.558-.605.335-.496.538-1.047.667-1.629.004-.02-.003-.043-.006-.091-.037.048-.059.072-.076.1a1.943 1.943 0 01-.334.415c-.28.258-.59.448-.983.464-.297.012-.588 0-.865-.127-.46-.21-.722-.57-.794-1.072-.025-.17-.017-.171-.182-.219A3.513 3.513 0 011.97 20.6a2.286 2.286 0 01-.808-1.13 3.569 3.569 0 01-.16-1.245c.002-.034.016-.067.024-.1.032.023.046.043.05.066.033.153.059.308.096.46.086.355.257.664.516.92.258.256.571.419.91.532.358.118.717.138 1.07-.016a1.89 1.89 0 00.621-.452c.328-.348.533-.76.648-1.223.009-.034.005-.071.007-.11-.015.006-.026.006-.03.011-.031.05-.064.1-.093.152-.284.502-.679.887-1.196 1.135-.351.17-.718.255-1.11.159a1.607 1.607 0 01-.971-.64 2.006 2.006 0 01-.368-.924 2.903 2.903 0 01.02-.886c.05-.439.466-1.17.742-1.271-.02.063-.035.112-.053.16-.043.116-.097.227-.13.345a1.901 1.901 0 00-.05.82c.033.212.09.416.204.6.147.236.346.407.62.465.11.023.225.014.338.018a.576.576 0 00.386-.131c.164-.128.282-.292.366-.481.168-.375.24-.777.309-1.179.05-.296.093-.594.133-.893.039-.281.071-.563.104-.845.026-.232.048-.464.074-.696.024-.228.052-.455.076-.683.024-.227.047-.455.069-.683.013-.14.022-.28.034-.42l.037-.417c.022-.25.041-.5.065-.748.008-.082-.02-.132-.09-.177a2.46 2.46 0 01-.492-.418c-.1-.109-.188-.228-.282-.342-.035-.042-.056-.097-.116-.118a2.084 2.084 0 00.275.597c.06.092.131.176.196.265.063.086.182.115.234.226-.028.003-.046.01-.06.006a4.74 4.74 0 01-.22-.057 2.71 2.71 0 01-1.287-.819c-.435-.487-.656-1.076-.71-1.723a5.206 5.206 0 01.014-1.06c.072-.602.22-1.186.45-1.745.155-.376.338-.741.526-1.102.205-.393.466-.75.765-1.076.512-.559 1.104-1.024 1.726-1.448.717-.49 1.478-.898 2.277-1.233C8.244.828 8.767.632 9.31.494c.655-.166 1.31-.33 1.982-.415.229-.03.458-.058.688-.07zm-1.847 22.82c-.07.06-.147.111-.207.18-.238.27-.464.549-.668.869l-.044.108a.177.177 0 00.093-.057c.174-.19.351-.378.519-.574.104-.122.195-.255.288-.386.024-.034.03-.08.046-.12l-.027-.02zm1.65-3.695a5.51 5.51 0 00-.653.593l-.37.386a.963.963 0 01-.377.25 1.372 1.372 0 01-.467.09c-.044 0-.087.006-.151.012.028.058.043.097.064.131.15.242.301.482.45.724.136.22.276.438.399.666.068.125.105.267.156.404.077.027.14-.018.202-.048.29-.135.579-.274.867-.412.213-.101.437-.186.636-.31.347-.215.68-.455 1.018-.685.015-.01.026-.028.042-.046-.023-.019-.038-.037-.056-.044-.287-.111-.527-.3-.77-.482a5.319 5.319 0 01-.506-.42 1.757 1.757 0 01-.41-.653c-.019-.049-.045-.095-.075-.156zm-5.847.264c-.06.096-.097.194-.132.293a3.38 3.38 0 01-.555 1.01c-.2.25-.455.412-.762.493-.23.06-.464.076-.7.07-.048-.002-.097.002-.158.005.016.04.021.066.035.085.1.145.23.246.4.295.157.046.316.034.498.023.181-.037.343-.115.485-.234.238-.199.402-.454.536-.732.175-.363.264-.751.342-1.144.01-.053.008-.11.011-.164zm14.945-4.586c.008.029.016.057.027.107.024.155.051.31.072.464.03.219.067.437.078.657.017.344.027.689-.014 1.033-.037.315-.063.633-.116.946a6.153 6.153 0 01-.46 1.518c-.008.018-.01.039-.02.082.047-.03.077-.042.098-.064.085-.083.17-.167.248-.255.271-.305.458-.66.596-1.043.18-.498.228-1.011.145-1.531-.103-.65-.33-1.263-.597-1.881a9.055 9.055 0 00-.024-.055l-.033.022zM5.797 8.29a.26.26 0 00.018.153c.124.251.25.501.379.75.025.049.066.09.03.163-.284.06-.578.119-.88.255.059.038.097.06.132.087.042.032.112.058.09.12-.01.033-.075.048-.117.072.017.01.043.021.067.036.166.102.33.207.447.368.138.192.229.404.188.644-.079.469-.306.85-.69 1.132-.054.04-.106.083-.161.122a.243.243 0 00-.103.245.77.77 0 00.055.195c.083.196.22.35.375.492.083.076.159.164.222.257a.37.37 0 01.025.377c-.023.05-.05.099-.076.148-.03.06-.028.111.022.162.041.042.08.089.112.138.038.058.078.079.147.05a.486.486 0 01.333-.006c.16.046.302.126.444.21.13.077.264.149.4.219.067.035.14.05.219.026.071-.022.124.01.145.076.02.064-.003.108-.074.139-.07.03-.137.063-.209.088-.1.035-.201.073-.314.077-.013-.107.11-.088.127-.159-.206-.126-.643-.145-.801-.034.063.112.035.21-.096.313-.13-.1-.025-.202.002-.3a.209.209 0 00-.249.17c-.015.101.067.216.178.224.108.007.218-.005.326-.012.06-.005.12-.027.199 0-.103.123-.248.127-.357.19.002.05.07.086.019.131-.053.048-.095-.001-.132-.03-.08-.063-.16-.126-.231-.197a.474.474 0 01-.157-.311.52.52 0 00-.043-.172c-.032-.074-.032-.137.033-.19-.018-.03-.028-.053-.045-.072a1.222 1.222 0 01-.196-.369c-.053-.137-.046-.264.048-.381.024-.03.05-.06.064-.095a.664.664 0 00.047-.168c.017-.165-.064-.287-.182-.387-.186-.156-.36-.322-.46-.551-.005-.011-.024-.017-.037-.026-.011.017-.024.027-.025.038-.019.185-.045.37-.052.557-.014.377.058.743.162 1.104.118.41.289.798.488 1.173.267.502.537 1.002.812 1.5.055.098.13.189.208.27.198.202.452.272.724.273.202 0 .404-.006.605-.026.295-.03.59-.073.884-.113.183-.025.365-.057.548-.08.21-.026.38.073.522.21.16.156.305.327.447.5.22.265.397.56.554.867.05.098.07.1.147.03.13-.121.26-.242.394-.36.067-.059.088-.12.067-.213a3.535 3.535 0 01-.085-.796c.002-.157.006-.314.018-.471.015-.224.03-.45.06-.672a59.114 59.114 0 01.362-2.298c.087-.493.182-.984.268-1.477.06-.347.118-.694.162-1.043.034-.273.055-.55.063-.825.011-.332.003-.665.002-.998 0-.077.004-.155-.01-.23-.028-.142-.01-.155-.162-.19a5.826 5.826 0 00-.607-.107c-.146-.018-.207-.053-.221-.19-.006-.049-.025-.098-.041-.146-.009-.025-.024-.048-.046-.09l-.025.264c-.009.096-.029.116-.127.115-.055 0-.11-.008-.164-.008-.476 0-.952-.008-1.426.032-.095.008-.173-.015-.226-.103-.04-.066-.088-.126-.134-.186-.063-.084-.086-.093-.182-.06-.195.068-.388.138-.582.21a2.71 2.71 0 00-.675.394.986.986 0 01-.323.168c-.033.01-.07.008-.127.013.02-.066.024-.114.047-.15.064-.105.135-.205.205-.306.023-.033.049-.063.073-.095l-.015-.023-.201.037c-.146.04-.296.07-.437.122-.148.053-.266.023-.386-.072a3.623 3.623 0 01-.733-.786l-.093-.132zm8.592 8.963l-.147.09c-.22.134-.44.266-.659.402-.093.058-.184.12-.27.188-.085.07-.124.161-.072.272.047.1.093.2.147.294.047.08.124.138.213.147.11.01.228.012.336-.012.217-.05.372-.205.528-.357a.291.291 0 00.087-.308c-.046-.18-.079-.365-.118-.547-.011-.052-.027-.103-.045-.169zm-.257-2.409c-.12.291-.205.597-.325.91-.151.433-.294.87-.435 1.323.036-.01.054-.01.067-.018.261-.16.522-.324.785-.484.054-.033.071-.078.065-.138-.012-.13-.024-.262-.034-.393l-.068-.886c-.008-.103-.02-.206-.029-.31-.009 0-.017-.002-.026-.004zm3.081-8.13l.099.285c.08.231.159.463.24.714l.58 1.952c.187.63.372 1.262.558 1.893.114.382.235.762.343 1.146.072.257.126.519.186.799.044.206.087.413.127.64.034.106.023.226.077.325l.025-.006-.068-.362c-.038-.206-.077-.412-.113-.638-.015-.07-.029-.141-.046-.211-.095-.396-.177-.796-.29-1.187-.196-.685-.413-1.364-.618-2.046-.165-.549-.322-1.1-.488-1.648-.069-.227-.15-.45-.226-.695l-.117-.336c-.037-.107-.075-.216-.115-.322-.04-.106-.084-.21-.127-.314a7.558 7.558 0 01-.027.01zM6.225 14.304c-.063-.001-.115.014-.134.083a.35.35 0 00.41.012 4.533 4.533 0 00-.276-.095zM5.23 11.98c-.026-.027-.057-.048-.075.002-.012.032-.007.07-.01.113.082-.037.082-.037.085-.115zm.062-1.189a.135.135 0 00-.088.056.197.197 0 00-.025.11c.005.152.01.306.026.457a.751.751 0 00.066.218c.061.136.157.167.288.101.055-.027.06-.054.025-.11a4.52 4.52 0 01-.129-.211c-.015-.068-.066-.131-.033-.207.04-.09-.076-.116-.074-.19V10.874c-.003-.038-.006-.087-.056-.083zm-.017-.968a.867.867 0 00-.467.127c-.076.045-.084.07-.05.158.034.087.07.173.115.254.064.117.09.125.21.077a.657.657 0 01.336-.053c.202.022.357.136.504.264l.092.077c.007-.006.014-.013.022-.018-.019-.105-.035-.226-.149-.264-.157-.053-.324-.075-.508-.117l-.24-.005c.24-.169.452-.044.687.009-.063-.115-.153-.147-.23-.193-.082-.05-.17-.092-.25-.144-.06-.037-.12-.08-.072-.172zm10.233.325c-.23-.01-.427.08-.608.211-.034.026-.06.065-.105.117.087.026.15.046.232.065.044-.015.088-.03.13-.046.306-.114.61-.115.904.031.126.063.237.04.366-.005-.02-.031-.03-.054-.045-.071a.986.986 0 00-.448-.273c-.14-.044-.284-.024-.426-.03zM7.99 6.483a.308.308 0 00.002.133c.08.321.156.643.242.962.104.387.27.75.456 1.103.02.037.061.08.098.087a.404.404 0 00.253-.051l-.472-.84c-.23-.448-.405-.92-.579-1.394zM10.397.497c-.2-.008-.405.004-.603.034-.236.035-.47.087-.7.152-.287.08-.569.18-.852.273-.04.013-.074.038-.11.058.028.014.05.018.07.014.287-.068.58-.085.873-.09.134-.002.269.009.402.025.19.024.382.048.57.09.456.104.874.3 1.265.556.464.306.888.66 1.257 1.078.205.232.395.475.56.739.17.274.315.561.449.856.273.601.456 1.232.6 1.876.04.173.07.348.1.524.017.104.065.167.17.19.122.028.2.105.22.251-.003.102-.06.174-.129.24a1.065 1.065 0 00-.268.358.164.164 0 00.083-.039c.08-.086.162-.172.235-.265a.56.56 0 00.13-.333c.009-.05.022-.1.024-.15.007-.124-.017-.15-.143-.168-.025-.004-.049-.014-.073-.015-.082-.007-.125-.063-.137-.131-.033-.198-.004-.355.247-.408.086-.018.174-.03.26-.042.158-.023.315-.053.473-.067.14-.012.19.033.226.167.008.029.018.057.021.087.019.179-.008.225-.141.288-.027.013-.055.024-.078.042a.148.148 0 00-.051.067c-.039.144.073.382.206.445l.673.32c.023.011.05.015.075.023l.018-.026c-.015-.008-.032-.013-.044-.024a2.27 2.27 0 00-.544-.32 4.898 4.898 0 00-.173-.075.203.203 0 01-.126-.191c-.003-.085.045-.154.128-.187l.059-.025c.099-.044.118-.076.112-.187a.384.384 0 00-.008-.063c-.067-.294-.123-.59-.205-.88a9.478 9.478 0 00-.826-2.036 7.465 7.465 0 00-1.39-1.805 4.536 4.536 0 00-1.177-.824 3.656 3.656 0 00-1.016-.328 6.155 6.155 0 00-.712-.074zm6.719 5.955c.01.014.018.028.038.034l-.022-.044-.016.01zM4.103 3.917a.062.062 0 01-.03.012.455.455 0 01-.04.039c-.01.01-.02.02-.045.04l-.363.354c-.088.085-.17.178-.266.253-.284.22-.425.53-.544.855a.132.132 0 00-.007.071c.013.055.033.108.052.168l.074.026c-.017.056-.03.105-.047.152-.058.164-.118.327-.175.491-.005.015.008.036.019.077.08-.175.158-.33.225-.489.228-.544.484-1.074.819-1.561.09-.133.182-.266.283-.401.004-.006.007-.013.022-.03.001-.016.003-.032.015-.04l.008-.017zm12.976 2.408a.023.023 0 01.009.019.073.073 0 00-.006.01.188.188 0 00.007.02l.018.022c.002-.007.007-.016.005-.021-.003-.01-.012-.018-.02-.038a1.331 1.331 0 01-.013-.012zM4.199 4.48c-.003.004-.008.008-.027.014-.005.013-.011.025-.031.047a2.085 2.085 0 01-.124.167c-.048.07-.116.055-.181.041-.134-.028-.228.016-.287.143-.089.187-.187.37-.273.56-.049.108-.11.216-.118.36.081.003.154.007.228.008h.228a2.563 2.563 0 01-.079.264c-.01.052-.022.103-.033.155l.02.004c.018-.046.037-.092.067-.153.066-.142.13-.285.2-.426.02-.04.034-.1.116-.092 0 .043.004.084 0 .124-.005.045-.017.09-.028.143.141.043.086.174.115.269.102-.022.104-.195.248-.144v.205l.017.002.439-1.059c-.13 0-.246-.02-.358.033-.024.011-.058-.001-.108-.004.075-.15.139-.278.211-.417a.128.128 0 01.025-.036c0-.015-.001-.03.008-.038l.006-.02c-.005.006-.01.011-.028.017-.004.012-.009.024-.026.045a.085.085 0 01-.032.033c-.123.157-.09.164-.258.106-.079-.027-.078-.028-.047-.144.028-.046.056-.093.098-.15 0-.016-.001-.032.007-.042L4.2 4.48zm2.073-.67c-.003.006-.007.011-.027.016-.094.125-.194.246-.28.377-.155.238-.301.481-.451.723-.14.224-.345.368-.575.481-.017.008-.04.006-.079.011.012-.059.016-.109.033-.153a6.076 6.076 0 01.229-.518l-.007-.02a.138.138 0 01-.035.025c-.028.05-.055.1-.093.164-.26.424-.443.817-.442.95.024.004.048.011.073.013.177.013.188.007.26-.165.03-.07.077-.12.147-.15l.175-.07c.044-.018.085-.057.146-.032.003.05-.01.11.014.145.042.062.044.125.047.193.002.049.017.098.026.147.029-.034.039-.065.05-.097.142-.39.277-.782.428-1.17.1-.256.22-.504.33-.756.013-.03.013-.067.03-.092V3.81zm3.987-.34c0 .045.01.084.021.123.042.16.094.318.124.48.024.133.023.27.028.406 0 .033-.019.067-.032.11-.094-.058-.047-.158-.106-.215h-.125c-.015.072-.01.152-.046.2-.066.085-.155.154-.236.227-.043.038-.078.018-.103-.025l-.046-.087c-.065.035-.117.069-.172.093-.116.051-.235.095-.35.147-.085.038-.09.053-.07.147.014.075.034.148.047.223.013.072.05.109.123.124.233.05.462.115.657.265.058-.102.058-.102.168-.151.03-.014.06-.03.092-.042.08-.03.115-.017.15.06.023.048.041.098.066.158.06-.14-.042-.267.017-.416.157.18.24.39.375.567a.235.235 0 00.022-.098c.002-.124 0-.247.002-.371 0-.034.013-.067.02-.1l.032-.003c.11.155.13.354.226.52a3.036 3.036 0 00-.01-.392c-.004-.045 0-.074.05-.088.08.036.116.14.215.158-.03-.275-.423-1.137-.798-1.635-.114-.127-.2-.28-.34-.386zm-2.667.696c-.019.034-.03.05-.037.067-.061.185-.125.37-.18.556-.031.105-.087.169-.195.19-.09.019-.178.052-.268.073-.038.009-.089.015-.118-.003-.024-.016-.025-.069-.036-.106-.064.076-.082.087-.17.047-.133-.062-.262-.135-.393-.201-.048-.025-.093-.063-.17-.03-.043.12-.091.25-.137.382-.099.28-.087.242.095.453.046.048.102.03.154.023.054-.009.106-.03.16-.036.13-.013.26-.08.367-.015.204-.064.387-.122.571-.178.05-.015.089.005.114.054.022.042.034.093.082.121.038-.056-.013-.128.063-.178l.14.241-.042-1.46zm.278.358c-.096-.01-.107.01-.11.108-.002.038-.003.078.002.115.03.2.099.386.174.57.002.006.012.01.022.015l.078-.05c.052.036.081.088.153.088.205-.002.41.014.616.012.099-.001.158.042.205.12.018.03.024.077.088.066l-.08-.394c-.05-.195-.085-.395-.172-.589-.057.057-.114.068-.18.046a.72.72 0 00-.135-.028c-.22-.028-.44-.059-.66-.08zm10.254-1.727c.089.163.155.316.139.491-.016.168.026.342-.044.516-.047-.033-.088-.082-.112-.075-.117.035-.164-.057-.227-.115a4.772 4.772 0 01-.286-.29l-.104-.113a4.856 4.856 0 01-.023.019c.035.046.07.093.11.156.04.064.084.127.122.193.034.058.065.118.031.205-.082-.01-.164-.019-.246-.032-.06-.01-.101 0-.124.07-.031.098-.037.096-.15.09.02.042.036.08.057.116.041.074.03.138-.03.196-.06.06-.118.122-.178.181a.175.175 0 01-.185.046c-.222-.061-.447-.113-.67-.174-.032-.009-.063-.04-.086-.068-.03-.04-.052-.087-.08-.13-.044-.07-.09-.138-.136-.207a.18.18 0 00-.014.105c.012.127.03.253.035.38.005.1-.024.12-.121.104-.104-.017-.206-.04-.31-.058-.064-.012-.131-.028-.202.03l.081.208c.09 0 .166-.01.237.002a.819.819 0 01.458.251c.078.083.154.168.241.26l.018-.005c-.004-.006-.008-.013-.01-.04.014-.056-.062-.118.018-.178.031.03.064.057.088.09.058.078.111.159.169.257l.089.141.024-.013a2093.819 2093.819 0 01-.427-.934c.055.007.083.007.108.016.193.07.385.142.577.216.074.028.147.06.219.094.062.028.112.018.157-.033.05-.056.102-.112.154-.167.05-.051.095-.046.132.014.016.025.026.053.04.08.071.138.143.277.217.433l.159.308.025-.011c-.044-.106-.07-.218-.138-.334-.057-.182-.168-.346-.206-.545.136.034.362.326.567.732l.057.074.018-.011a1.563 1.563 0 01-.052-.127c-.046-.145-.097-.29-.136-.436-.022-.083-.036-.173.022-.26l.109.058-.026-.207.027-.016c.022.02.05.036.065.06.073.108.143.22.215.33.01.016.029.029.043.043-.036-.217-.2-.38-.229-.626l.155.112c.014-.166.012-.319.042-.465.032-.158-.023-.297-.063-.445.024.004.036.006.055.025.092.124.183.249.277.371.02.027.05.047.069.087l.04.063.019-.015a.293.293 0 01-.053-.082 27.922 27.922 0 01-.332-.49c-.221-.311-.363-.467-.485-.521zm-6.57.327c-.003.161.092.275.069.415l-.368.087c.09.139.032.237-.052.331-.05.057-.092.122-.143.178-.037.04-.046.078-.018.126l.16.275c.029.048.072.066.128.064.076-.003.152 0 .228-.001.116-.003.216.022.275.137.006.014.02.024.044.052.004-.059-.003-.098.01-.13.016-.04.04-.099.072-.108.084-.023.173-.024.26-.03.013-.001.027.018.04.029l.071.065c.019-.11-.082-.198-.024-.31l.126.04c-.026-.123-.07-.245-.071-.366 0-.123.051-.243.115-.36.107.062.16.156.234.253.183.265.36.533.494.834.165-.078.27.068.407.088-.003-.106-.133-.441-.197-.492a.142.142 0 00-.102-.028c-.06.011-.119.039-.191.063-.025-.039-.056-.078-.077-.122a3.936 3.936 0 00-.473-.783c-.076-.094-.16-.182-.228-.26l-.391.285c-.049.035-.094.03-.132-.017l-.169-.207c-.025-.03-.053-.059-.097-.108z"></path>`,ibm:`<path clip-rule="evenodd" d="M24 16.333V17h-3.158v-.667H24zm-7.579 0V17h-3.158v-.667h3.158zm2.464 0L18.63 17l-.25-.667h.504zm-7.075 0a2.528 2.528 0 01-1.717.667h-5.04v-.667h6.757zm-7.389 0V17H0v-.667h4.421zm12-1.333v.667h-3.158V15h3.158zm2.958 0l-.246.667h-1L17.885 15h1.494zm-6.937 0c-.057.237-.148.46-.265.667H5.053V15h7.39zm-8.02 0v.667H0V15h4.421zM24 15v.667h-3.158V15H24zm-1.263-1.333v.666h-1.895v-.666h1.895zm-6.316 0v.666h-1.895v-.666h1.895zm3.453 0l-.248.666h-1.989l-.25-.666h2.487zm-7.52 0c.056.212.088.435.088.666h-2.337v-.666h2.249zm-4.143 0v.666H6.316v-.666H8.21zm-5.053 0v.666H1.263v-.666h1.895zm19.579-1.334V13h-1.895v-.667h1.895zm-6.316 0V13h-1.895v-.667h1.895zm3.948 0l-.247.667h-2.987l-.245-.667h3.48zm-8.792 0c.218.188.405.414.55.667H6.315v-.667h5.26zm-8.42 0V13H1.264v-.667h1.895zM18.456 11l.177.539.176-.539h3.929v.667h-1.895v-.613l-.215.613H16.63l-.209-.613v.613h-1.895V11h3.929zM3.158 11v.667H1.263V11h1.895zm8.968 0a2.555 2.555 0 01-.55.667h-5.26V11h5.81zm10.61-1.333v.666h-3.709l.224-.666h3.486zm-4.722 0l.224.666h-3.712v-.666h3.488zm-5.572 0c0 .23-.032.454-.088.666h-2.249v-.666h2.337zm-4.231 0v.666H6.316v-.666H8.21zm-5.053 0v.666H1.263v-.666h1.895zm14.419-1.334l.22.667h-4.534v-.667h4.314zm6.423 0V9h-4.536l.229-.667H24zm-11.823 0c.117.206.208.43.265.667h-7.39v-.667h7.125zm-7.756 0V9H0v-.667h4.421zM17.133 7l.224.667h-4.094V7h3.87zM24 7v.667h-4.089L20.13 7H24zM10.093 7c.662 0 1.264.253 1.717.667H5.053V7h5.04zM4.42 7v.667H0V7h4.421z"></path>`,inception:`<path d="M14.767 1H7.884L1 7.883v6.884h6.884V7.883h6.883V1zM9.234 23h6.882L23 16.116V9.233h-6.884v6.883H9.234V23z"></path>`,kimi:`<path d="M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z"></path><path d="M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z"></path>`,kwaipilot:`<path clip-rule="evenodd" d="M11.765.03C5.327.03.108 5.25.108 11.686c0 3.514 1.556 6.665 4.015 8.804L9.89 8.665h6.451L9.31 23.083c.807.173 1.63.26 2.455.26 6.438 0 11.657-5.22 11.657-11.658S18.202.028 11.765.028V.03z"></path>`,longcat:`<path clip-rule="evenodd" d="M.507 19.883a.507.507 0 01-.489-.642L4.29 3.745a1.013 1.013 0 011.533-.578l5.622 3.687a1.013 1.013 0 001.11 0L18.2 3.165a1.013 1.013 0 011.532.58l4.25 15.497a.506.506 0 01-.49.64H18.07a6.297 6.297 0 001.53-4.115v-.177a6.09 6.09 0 00-1.513-4.017l-.697-3.495a.438.438 0 00-.694-.266L14.07 9.781a.748.748 0 01-.654.121 5.156 5.156 0 00-2.833 0 .746.746 0 01-.653-.121L7.302 7.81a.435.435 0 00-.688.269l-.675 3.652a5.36 5.36 0 00-1.539 3.76v.333c0 1.474.527 2.9 1.488 4.02l.032.038H.507z"></path><path d="M9.213 16.843h1.52v-3.546h-1.29l-.23 3.546zm5.573 0h-1.52v-3.546h1.29l.23 3.546z"></path>`,mcp:`<path d="M15.688 2.343a2.588 2.588 0 00-3.61 0l-9.626 9.44a.863.863 0 01-1.203 0 .823.823 0 010-1.18l9.626-9.44a4.313 4.313 0 016.016 0 4.116 4.116 0 011.204 3.54 4.3 4.3 0 013.609 1.18l.05.05a4.115 4.115 0 010 5.9l-8.706 8.537a.274.274 0 000 .393l1.788 1.754a.823.823 0 010 1.18.863.863 0 01-1.203 0l-1.788-1.753a1.92 1.92 0 010-2.754l8.706-8.538a2.47 2.47 0 000-3.54l-.05-.049a2.588 2.588 0 00-3.607-.003l-7.172 7.034-.002.002-.098.097a.863.863 0 01-1.204 0 .823.823 0 010-1.18l7.273-7.133a2.47 2.47 0 00-.003-3.537z"></path><path d="M14.485 4.703a.823.823 0 000-1.18.863.863 0 00-1.204 0l-7.119 6.982a4.115 4.115 0 000 5.9 4.314 4.314 0 006.016 0l7.12-6.982a.823.823 0 000-1.18.863.863 0 00-1.204 0l-7.119 6.982a2.588 2.588 0 01-3.61 0 2.47 2.47 0 010-3.54l7.12-6.982z"></path>`,meta:`<path d="M6.897 4c1.915 0 3.516.932 5.43 3.376l.282-.373c.19-.246.383-.484.58-.71l.313-.35C14.588 4.788 15.792 4 17.225 4c1.273 0 2.469.557 3.491 1.516l.218.213c1.73 1.765 2.917 4.71 3.053 8.026l.011.392.002.25c0 1.501-.28 2.759-.818 3.7l-.14.23-.108.153c-.301.42-.664.758-1.086 1.009l-.265.142-.087.04a3.493 3.493 0 01-.302.118 4.117 4.117 0 01-1.33.208c-.524 0-.996-.067-1.438-.215-.614-.204-1.163-.56-1.726-1.116l-.227-.235c-.753-.812-1.534-1.976-2.493-3.586l-1.43-2.41-.544-.895-1.766 3.13-.343.592C7.597 19.156 6.227 20 4.356 20c-1.21 0-2.205-.42-2.936-1.182l-.168-.184c-.484-.573-.837-1.311-1.043-2.189l-.067-.32a8.69 8.69 0 01-.136-1.288L0 14.468c.002-.745.06-1.49.174-2.23l.1-.573c.298-1.53.828-2.958 1.536-4.157l.209-.34c1.177-1.83 2.789-3.053 4.615-3.16L6.897 4zm-.033 2.615l-.201.01c-.83.083-1.606.673-2.252 1.577l-.138.199-.01.018c-.67 1.017-1.185 2.378-1.456 3.845l-.004.022a12.591 12.591 0 00-.207 2.254l.002.188c.004.18.017.36.04.54l.043.291c.092.503.257.908.486 1.208l.117.137c.303.323.698.492 1.17.492 1.1 0 1.796-.676 3.696-3.641l2.175-3.4.454-.701-.139-.198C9.11 7.3 8.084 6.616 6.864 6.616zm10.196-.552l-.176.007c-.635.048-1.223.359-1.82.933l-.196.198c-.439.462-.887 1.064-1.367 1.807l.266.398c.18.274.362.56.55.858l.293.475 1.396 2.335.695 1.114c.583.926 1.03 1.6 1.408 2.082l.213.262c.282.326.529.54.777.673l.102.05c.227.1.457.138.718.138.176.002.35-.023.518-.073.338-.104.61-.32.813-.637l.095-.163.077-.162c.194-.459.29-1.06.29-1.785l-.006-.449c-.08-2.871-.938-5.372-2.2-6.798l-.176-.189c-.67-.683-1.444-1.074-2.27-1.074z"></path>`,microsoft:`<path d="M11.49 2H2v9.492h9.492V2h-.002z"></path><path d="M22 2h-9.492v9.492H22V2z"></path><path d="M11.49 12.508H2V22h9.492v-9.492h-.002z"></path><path d="M22 12.508h-9.492V22H22v-9.492z"></path>`,minimax:`<path d="M16.278 2c1.156 0 2.093.927 2.093 2.07v12.501a.74.74 0 00.744.709.74.74 0 00.743-.709V9.099a2.06 2.06 0 012.071-2.049A2.06 2.06 0 0124 9.1v6.561a.649.649 0 01-.652.645.649.649 0 01-.653-.645V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v7.472a2.037 2.037 0 01-2.048 2.026 2.037 2.037 0 01-2.048-2.026v-12.5a.785.785 0 00-.788-.753.785.785 0 00-.789.752l-.001 15.904A2.037 2.037 0 0113.441 22a2.037 2.037 0 01-2.048-2.026V18.04c0-.356.292-.645.652-.645.36 0 .652.289.652.645v1.934c0 .263.142.506.372.638.23.131.514.131.744 0a.734.734 0 00.372-.638V4.07c0-1.143.937-2.07 2.093-2.07zm-5.674 0c1.156 0 2.093.927 2.093 2.07v11.523a.648.648 0 01-.652.645.648.648 0 01-.652-.645V4.07a.785.785 0 00-.789-.78.785.785 0 00-.789.78v14.013a2.06 2.06 0 01-2.07 2.048 2.06 2.06 0 01-2.071-2.048V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v3.8a2.06 2.06 0 01-2.071 2.049A2.06 2.06 0 010 12.9v-1.378c0-.357.292-.646.652-.646.36 0 .653.29.653.646V12.9c0 .418.343.757.766.757s.766-.339.766-.757V9.099a2.06 2.06 0 012.07-2.048 2.06 2.06 0 012.071 2.048v8.984c0 .419.343.758.767.758.423 0 .766-.339.766-.758V4.07c0-1.143.937-2.07 2.093-2.07z"></path>`,mistral:`<path clip-rule="evenodd" d="M3.428 3.4h3.429v3.428h3.429v3.429h-.002 3.431V6.828h3.427V3.4h3.43v13.714H24v3.429H13.714v-3.428h-3.428v-3.429h-3.43v3.428h3.43v3.429H0v-3.429h3.428V3.4zm10.286 13.715h3.428v-3.429h-3.427v3.429z"></path>`,moonshot:`<path d="M1.052 16.916l9.539 2.552a21.007 21.007 0 00.06 2.033l5.956 1.593a11.997 11.997 0 01-5.586.865l-.18-.016-.044-.004-.084-.009-.094-.01a11.605 11.605 0 01-.157-.02l-.107-.014-.11-.016a11.962 11.962 0 01-.32-.051l-.042-.008-.075-.013-.107-.02-.07-.015-.093-.019-.075-.016-.095-.02-.097-.023-.094-.022-.068-.017-.088-.022-.09-.024-.095-.025-.082-.023-.109-.03-.062-.02-.084-.025-.093-.028-.105-.034-.058-.019-.08-.026-.09-.031-.066-.024a6.293 6.293 0 01-.044-.015l-.068-.025-.101-.037-.057-.022-.08-.03-.087-.035-.088-.035-.079-.032-.095-.04-.063-.028-.063-.027a5.655 5.655 0 01-.041-.018l-.066-.03-.103-.047-.052-.024-.096-.046-.062-.03-.084-.04-.086-.044-.093-.047-.052-.027-.103-.055-.057-.03-.058-.032a6.49 6.49 0 01-.046-.026l-.094-.053-.06-.034-.051-.03-.072-.041-.082-.05-.093-.056-.052-.032-.084-.053-.061-.039-.079-.05-.07-.047-.053-.035a7.785 7.785 0 01-.054-.036l-.044-.03-.044-.03a6.066 6.066 0 01-.04-.028l-.057-.04-.076-.054-.069-.05-.074-.054-.056-.042-.076-.057-.076-.059-.086-.067-.045-.035-.064-.052-.074-.06-.089-.073-.046-.039-.046-.039a7.516 7.516 0 01-.043-.037l-.045-.04-.061-.053-.07-.062-.068-.06-.062-.058-.067-.062-.053-.05-.088-.084a13.28 13.28 0 01-.099-.097l-.029-.028-.041-.042-.069-.07-.05-.051-.05-.053a6.457 6.457 0 01-.168-.179l-.08-.088-.062-.07-.071-.08-.042-.049-.053-.062-.058-.068-.046-.056a7.175 7.175 0 01-.027-.033l-.045-.055-.066-.082-.041-.052-.05-.064-.02-.025a11.99 11.99 0 01-1.44-2.402zm-1.02-5.794l11.353 3.037a20.468 20.468 0 00-.469 2.011l10.817 2.894a12.076 12.076 0 01-1.845 2.005L.657 15.923l-.016-.046-.035-.104a11.965 11.965 0 01-.05-.153l-.007-.023a11.896 11.896 0 01-.207-.741l-.03-.126-.018-.08-.021-.097-.018-.081-.018-.09-.017-.084-.018-.094c-.026-.141-.05-.283-.071-.426l-.017-.118-.011-.083-.013-.102a12.01 12.01 0 01-.019-.161l-.005-.047a12.12 12.12 0 01-.034-2.145zm1.593-5.15l11.948 3.196c-.368.605-.705 1.231-1.01 1.875l11.295 3.022c-.142.82-.368 1.612-.668 2.365l-11.55-3.09L.124 10.26l.015-.1.008-.049.01-.067.015-.087.018-.098c.026-.148.056-.295.088-.442l.028-.124.02-.085.024-.097c.022-.09.045-.18.07-.268l.028-.102.023-.083.03-.1.025-.082.03-.096.026-.082.031-.095a11.896 11.896 0 011.01-2.232zm4.442-4.4L17.352 4.59a20.77 20.77 0 00-1.688 1.721l7.823 2.093c.267.852.442 1.744.513 2.665L2.106 5.213l.045-.065.027-.04.04-.055.046-.065.055-.076.054-.072.064-.086.05-.065.057-.073.055-.07.06-.074.055-.069.065-.077.054-.066.066-.077.053-.06.072-.082.053-.06.067-.074.054-.058.073-.078.058-.06.063-.067.168-.17.1-.098.059-.056.076-.071a12.084 12.084 0 012.272-1.677zM12.017 0h.097l.082.001.069.001.054.002.068.002.046.001.076.003.047.002.06.003.054.002.087.005.105.007.144.011.088.007.044.004.077.008.082.008.047.005.102.012.05.006.108.014.081.01.042.006.065.01.207.032.07.012.065.011.14.026.092.018.11.022.046.01.075.016.041.01L14.7.3l.042.01.065.015.049.012.071.017.096.024.112.03.113.03.113.032.05.015.07.02.078.024.073.023.05.016.05.016.076.025.099.033.102.036.048.017.064.023.093.034.11.041.116.045.1.04.047.02.06.024.041.018.063.026.04.018.057.025.11.048.1.046.074.035.075.036.06.028.092.046.091.045.102.052.053.028.049.026.046.024.06.033.041.022.052.029.088.05.106.06.087.051.057.034.053.032.096.059.088.055.098.062.036.024.064.041.084.056.04.027.062.042.062.043.023.017c.054.037.108.075.161.114l.083.06.065.048.056.043.086.065.082.064.04.03.05.041.086.069.079.065.085.071c.712.6 1.353 1.283 1.909 2.031L7.222.994l.062-.027.065-.028.081-.034.086-.035c.113-.045.227-.09.341-.131l.096-.035.093-.033.084-.03.096-.031c.087-.03.176-.058.264-.085l.091-.027.086-.025.102-.03.085-.023.1-.026L9.04.37l.09-.023.091-.022.095-.022.09-.02.098-.021.091-.02.095-.018.092-.018.1-.018.091-.016.098-.017.092-.014.097-.015.092-.013.102-.013.091-.012.105-.012.09-.01.105-.01c.093-.01.186-.018.28-.024l.106-.008.09-.005.11-.006.093-.004.1-.004.097-.002.099-.002.197-.002z"></path>`,morph:`<path d="M7.941 2c.23 0 .452.073.638.21.186.136.325.328.397.55l.593 1.814c.073.221.212.413.397.55.186.136.409.21.638.21h2.791c.23 0 .452-.074.638-.21a1.11 1.11 0 00.397-.55l.594-1.815a1.11 1.11 0 01.397-.55c.185-.136.408-.209.637-.209h1.7c.23 0 .453.073.639.21.185.136.324.328.397.55l.652 1.994c.118.361.41.635.77.728l2.957.752c.236.06.446.199.596.394.15.195.23.436.231.684v9.376c0 .248-.081.488-.231.684a1.09 1.09 0 01-.595.394l-2.957.752a1.086 1.086 0 00-.477.263 1.114 1.114 0 00-.293.465l-.653 1.994a1.11 1.11 0 01-.396.55c-.186.136-.41.21-.638.21h-1.702c-.229 0-.452-.073-.637-.21a1.11 1.11 0 01-.397-.55l-.364-1.11a1.131 1.131 0 01.15-1.002 1.074 1.074 0 01.885-.462h2.85c.29 0 .567-.116.772-.325.204-.208.32-.49.32-.785V6.444c0-.294-.116-.577-.32-.785a1.08 1.08 0 00-.771-.326h-3.273c-.29 0-.567.117-.772.326-.204.208-.32.49-.32.785v7.778c0 .295-.114.578-.319.786a1.08 1.08 0 01-.771.325h-2.182a1.08 1.08 0 01-.771-.325 1.122 1.122 0 01-.32-.786V6.444c0-.294-.115-.577-.32-.785a1.081 1.081 0 00-.77-.326H5.454c-.29 0-.567.117-.772.326-.204.208-.32.49-.32.785v11.112c0 .294.116.577.32.785.205.209.482.326.772.326h2.85a1.075 1.075 0 01.885.461 1.122 1.122 0 01.15 1.001l-.364 1.112a1.11 1.11 0 01-.397.55c-.185.136-.408.209-.637.209H6.24c-.229 0-.452-.073-.638-.21a1.11 1.11 0 01-.397-.55l-.652-1.994a1.114 1.114 0 00-.294-.465 1.086 1.086 0 00-.477-.263l-2.956-.752a1.09 1.09 0 01-.595-.394A1.124 1.124 0 010 16.688V7.312c0-.248.081-.489.231-.684.15-.195.36-.334.595-.394l2.957-.753c.178-.045.342-.136.477-.263.134-.127.235-.287.293-.464l.653-1.995a1.11 1.11 0 01.397-.55C5.788 2.075 6.01 2 6.24 2h1.701z"></path>`,nousresearch:`<path d="M5.938 12.835c.127-.039.285.02.373.143.028.038.036.092.046.14.003.014-.02.033-.04.05-.124-.098-.24-.194-.354-.291-.011-.01-.016-.027-.025-.042zM8.396 9.412c.195-.032.39-.06.588-.05a.54.54 0 01.148.026c.202.071.402.147.601.224.028.01.05.036.075.055l-.013.027a9.203 9.203 0 01-.26-.089c-.115-.038-.213-.077-.315-.098-.25-.05-.25-.046-.292-.014l.574.144c.275.139.55.276.823.417.042.022.09.057.107.098.026.06.063.076.117.072.066-.006.132-.017.213-.027l-.04.086c.051.08.142.02.216.064-.074.13-.247.09-.334.199l.061.074-.12.087c0 .106-.038.168-.306.243l.026.085-.196.042.07.124h-.25l-.007.137c-.081-.01-.161-.018-.244-.027l-.053.123c-.027-.008-.052-.011-.073-.023-.067-.038-.128-.056-.195.006-.019.017-.063.014-.093.008-.026-.006-.05-.029-.07-.042-.11.095-.11.095-.208.003-.057.046-.12.074-.186.011-.063.027-.123-.02-.178-.014-.07.007-.097-.035-.133-.07l-.13.033c-.013-.236-.194-.19-.34-.203.005-.072.05-.092.095-.094a.474.474 0 01.159.022c.164.05.32.12.496.138.203.021.405.029.601-.015.265-.059.52-.149.707-.365.049-.056.083-.127.117-.195.019-.038.02-.084-.02-.116a1.397 1.397 0 00-.382-.217c.024.12-.031.182-.115.221 0 .014-.004.025 0 .03.08.115.084.16-.007.267a1.39 1.39 0 01-.218.211.477.477 0 01-.641-.05 1.36 1.36 0 01-.133-.152c-.078-.107-.076-.108-.033-.236-.165-.08-.128-.226-.104-.364.008-.05.028-.096.049-.163-.04.014-.067.017-.087.032a.897.897 0 00-.316.357c-.007.016-.01.034-.02.047-.012.015-.034.038-.045.035-.02-.006-.037-.027-.05-.045-.008-.012-.007-.032-.012-.057h-.126l.053-.172a14.82 14.82 0 00-.039-.049l.11-.284c-.06.026-.091.044-.124.051-.03.007-.064 0-.095 0 0-.031-.01-.07.004-.092.149-.22.305-.428.593-.476z"></path><path d="M8.06 10.788c-.003-.038-.004-.075.037-.062.016.006.034.048.028.067-.01.04-.038.032-.064-.005z"></path><path clip-rule="evenodd" d="M11.981.009c.226-.012.453-.011.679 0 .247.01.495.024.74.062.401.064.798.157 1.19.273.463.138.92.299 1.356.511a7.31 7.31 0 012.948 2.642c.292.469.536.963.739 1.479.219.556.446 1.11.623 1.683.204.654.329 1.326.458 1.997.097.504.182 1.01.29 1.511.156.722.329 1.44.494 2.16.186.812.4 1.615.63 2.415.102.355.193.713.282 1.072.11.436.202.876.254 1.323.031.278.066.557.073.837a7.56 7.56 0 01-.017.88c-.037.413-.1.818-.226 1.212a5.017 5.017 0 01-.915 1.649l-.13.156.018.023c.043-.023.088-.041.127-.068.2-.138.373-.307.531-.49.4-.46.721-.973.975-1.529a3.59 3.59 0 00.325-1.72c-.024-.424-.097-.834-.3-1.213-.013-.027-.015-.06-.03-.121.05.035.082.048.101.072.107.13.22.258.315.398.33.494.46 1.052.486 1.64a3.75 3.75 0 01-.47 1.97c-.36.655-.887 1.14-1.526 1.506-.193.111-.394.21-.595.308-.157.078-.248.211-.318.365a.522.522 0 00-.033.406.359.359 0 01.013.139c-.005.077-.077.155-.14.162-.054.006-.125-.043-.15-.116a1.206 1.206 0 01-.06-.233c-.04-.314-.155-.6-.308-.87a3.906 3.906 0 00-.73-.91 2.129 2.129 0 00-.897-.524 4.093 4.093 0 00-.692-.131c-.075-.008-.15-.04-.22.01.18.06.363.11.538.18.434.173.82.43 1.18.728.308.255.58.543.794.884.098.155.186.315.227.496.027.123.042.25.067.375.013.062-.002.109-.053.144-.047.033-.122.034-.163-.01a.455.455 0 01-.08-.14c-.03-.073-.038-.159-.078-.225a7.314 7.314 0 00-1.423-1.664c-.16-.137-.329-.26-.537-.323-.376-.114-.753-.203-1.15-.154-.213.025-.427.032-.64.053a1.6 1.6 0 00-.736.278 5.14 5.14 0 00-.834.72c-.329.342-.642.699-.955 1.055-.136.155-.264.319-.314.531a5.227 5.227 0 00-.012.051.096.096 0 01-.09.076h-.31c-.046 0-.082-.048-.072-.094.023-.108.045-.216.07-.324.075-.325.19-.635.368-.917.024-.039.04-.088.104-.08l.01.049.027.077c.28-.435.571-.834.996-1.135.283-.204.584-.378.89-.55a.196.196 0 00-.098-.002c-.162.043-.325.084-.485.134-.402.124-.764.33-1.11.566-.147.1-.298.193-.414.333a7.314 7.314 0 00-1.07 1.767.845.845 0 00-.04.12.075.075 0 01-.072.056h-.494c-.04 0-.062-.051-.036-.082.123-.14.246-.282.377-.415.275-.281.58-.532.777-.884.027-.048.063-.09.095-.135.238-.333.54-.607.818-.902.082-.086.175-.16.26-.24.029-.027.053-.057.079-.085l-.018-.025-.135.041c-.034.017-.07.031-.102.05-.248.144-.494.292-.743.433-.408.23-.825.439-1.209.711-.281.2-.591.358-.889.533-.02.012-.044.015-.08.028-.015-.135.143-.201.108-.336-.033.014-.064.02-.085.038-.111.096-.227.19-.328.296-.148.157-.284.325-.425.488-.125.143-.25.286-.373.431A.153.153 0 019.89 24H8.762a.316.316 0 00.016-.042c.028-.09.085-.172.083-.28-.091-.018-.162.001-.212.077a4.45 4.45 0 00-.136.215c-.01.016-.024.03-.042.03h-.093c-.019 0-.029-.022-.017-.037.071-.088.14-.178.209-.268.001-.002-.006-.012-.012-.024-.014.004-.03.006-.045.013-.176.09-.352.181-.527.274a.363.363 0 01-.168.042H5.202c-.026 0-.039-.036-.019-.053.21-.178.402-.374.558-.605.335-.496.538-1.047.667-1.629.004-.02-.003-.043-.006-.091-.037.048-.059.072-.076.1a1.943 1.943 0 01-.334.415c-.28.258-.59.448-.983.464-.297.012-.588 0-.865-.127-.46-.21-.722-.57-.794-1.072-.025-.17-.017-.171-.182-.219A3.513 3.513 0 011.97 20.6a2.286 2.286 0 01-.808-1.13 3.569 3.569 0 01-.16-1.245c.002-.034.016-.067.024-.1.032.023.046.043.05.066.033.153.059.308.096.46.086.355.257.664.516.92.258.256.571.419.91.532.358.118.717.138 1.07-.016a1.89 1.89 0 00.621-.452c.328-.348.533-.76.648-1.223.009-.034.005-.071.007-.11-.015.006-.026.006-.03.011-.031.05-.064.1-.093.152-.284.502-.679.887-1.196 1.135-.351.17-.718.255-1.11.159a1.607 1.607 0 01-.971-.64 2.006 2.006 0 01-.368-.924 2.903 2.903 0 01.02-.886c.05-.439.466-1.17.742-1.271-.02.063-.035.112-.053.16-.043.116-.097.227-.13.345a1.901 1.901 0 00-.05.82c.033.212.09.416.204.6.147.236.346.407.62.465.11.023.225.014.338.018a.576.576 0 00.386-.131c.164-.128.282-.292.366-.481.168-.375.24-.777.309-1.179.05-.296.093-.594.133-.893.039-.281.071-.563.104-.845.026-.232.048-.464.074-.696.024-.228.052-.455.076-.683.024-.227.047-.455.069-.683.013-.14.022-.28.034-.42l.037-.417c.022-.25.041-.5.065-.748.008-.082-.02-.132-.09-.177a2.46 2.46 0 01-.492-.418c-.1-.109-.188-.228-.282-.342-.035-.042-.056-.097-.116-.118a2.084 2.084 0 00.275.597c.06.092.131.176.196.265.063.086.182.115.234.226-.028.003-.046.01-.06.006a4.74 4.74 0 01-.22-.057 2.71 2.71 0 01-1.287-.819c-.435-.487-.656-1.076-.71-1.723a5.206 5.206 0 01.014-1.06c.072-.602.22-1.186.45-1.745.155-.376.338-.741.526-1.102.205-.393.466-.75.765-1.076.512-.559 1.104-1.024 1.726-1.448.717-.49 1.478-.898 2.277-1.233C8.244.828 8.767.632 9.31.494c.655-.166 1.31-.33 1.982-.415.229-.03.458-.058.688-.07zm-1.847 22.82c-.07.06-.147.111-.207.18-.238.27-.464.549-.668.869l-.044.108a.177.177 0 00.093-.057c.174-.19.351-.378.519-.574.104-.122.195-.255.288-.386.024-.034.03-.08.046-.12l-.027-.02zm1.65-3.695a5.51 5.51 0 00-.653.593l-.37.386a.963.963 0 01-.377.25 1.372 1.372 0 01-.467.09c-.044 0-.087.006-.151.012.028.058.043.097.064.131.15.242.301.482.45.724.136.22.276.438.399.666.068.125.105.267.156.404.077.027.14-.018.202-.048.29-.135.579-.274.867-.412.213-.101.437-.186.636-.31.347-.215.68-.455 1.018-.685.015-.01.026-.028.042-.046-.023-.019-.038-.037-.056-.044-.287-.111-.527-.3-.77-.482a5.319 5.319 0 01-.506-.42 1.757 1.757 0 01-.41-.653c-.019-.049-.045-.095-.075-.156zm-5.847.264c-.06.096-.097.194-.132.293a3.38 3.38 0 01-.555 1.01c-.2.25-.455.412-.762.493-.23.06-.464.076-.7.07-.048-.002-.097.002-.158.005.016.04.021.066.035.085.1.145.23.246.4.295.157.046.316.034.498.023.181-.037.343-.115.485-.234.238-.199.402-.454.536-.732.175-.363.264-.751.342-1.144.01-.053.008-.11.011-.164zm14.945-4.586c.008.029.016.057.027.107.024.155.051.31.072.464.03.219.067.437.078.657.017.344.027.689-.014 1.033-.037.315-.063.633-.116.946a6.153 6.153 0 01-.46 1.518c-.008.018-.01.039-.02.082.047-.03.077-.042.098-.064.085-.083.17-.167.248-.255.271-.305.458-.66.596-1.043.18-.498.228-1.011.145-1.531-.103-.65-.33-1.263-.597-1.881a9.055 9.055 0 00-.024-.055l-.033.022zM5.797 8.29a.26.26 0 00.018.153c.124.251.25.501.379.75.025.049.066.09.03.163-.284.06-.578.119-.88.255.059.038.097.06.132.087.042.032.112.058.09.12-.01.033-.075.048-.117.072.017.01.043.021.067.036.166.102.33.207.447.368.138.192.229.404.188.644-.079.469-.306.85-.69 1.132-.054.04-.106.083-.161.122a.243.243 0 00-.103.245.77.77 0 00.055.195c.083.196.22.35.375.492.083.076.159.164.222.257a.37.37 0 01.025.377c-.023.05-.05.099-.076.148-.03.06-.028.111.022.162.041.042.08.089.112.138.038.058.078.079.147.05a.486.486 0 01.333-.006c.16.046.302.126.444.21.13.077.264.149.4.219.067.035.14.05.219.026.071-.022.124.01.145.076.02.064-.003.108-.074.139-.07.03-.137.063-.209.088-.1.035-.201.073-.314.077-.013-.107.11-.088.127-.159-.206-.126-.643-.145-.801-.034.063.112.035.21-.096.313-.13-.1-.025-.202.002-.3a.209.209 0 00-.249.17c-.015.101.067.216.178.224.108.007.218-.005.326-.012.06-.005.12-.027.199 0-.103.123-.248.127-.357.19.002.05.07.086.019.131-.053.048-.095-.001-.132-.03-.08-.063-.16-.126-.231-.197a.474.474 0 01-.157-.311.52.52 0 00-.043-.172c-.032-.074-.032-.137.033-.19-.018-.03-.028-.053-.045-.072a1.222 1.222 0 01-.196-.369c-.053-.137-.046-.264.048-.381.024-.03.05-.06.064-.095a.664.664 0 00.047-.168c.017-.165-.064-.287-.182-.387-.186-.156-.36-.322-.46-.551-.005-.011-.024-.017-.037-.026-.011.017-.024.027-.025.038-.019.185-.045.37-.052.557-.014.377.058.743.162 1.104.118.41.289.798.488 1.173.267.502.537 1.002.812 1.5.055.098.13.189.208.27.198.202.452.272.724.273.202 0 .404-.006.605-.026.295-.03.59-.073.884-.113.183-.025.365-.057.548-.08.21-.026.38.073.522.21.16.156.305.327.447.5.22.265.397.56.554.867.05.098.07.1.147.03.13-.121.26-.242.394-.36.067-.059.088-.12.067-.213a3.535 3.535 0 01-.085-.796c.002-.157.006-.314.018-.471.015-.224.03-.45.06-.672a59.114 59.114 0 01.362-2.298c.087-.493.182-.984.268-1.477.06-.347.118-.694.162-1.043.034-.273.055-.55.063-.825.011-.332.003-.665.002-.998 0-.077.004-.155-.01-.23-.028-.142-.01-.155-.162-.19a5.826 5.826 0 00-.607-.107c-.146-.018-.207-.053-.221-.19-.006-.049-.025-.098-.041-.146-.009-.025-.024-.048-.046-.09l-.025.264c-.009.096-.029.116-.127.115-.055 0-.11-.008-.164-.008-.476 0-.952-.008-1.426.032-.095.008-.173-.015-.226-.103-.04-.066-.088-.126-.134-.186-.063-.084-.086-.093-.182-.06-.195.068-.388.138-.582.21a2.71 2.71 0 00-.675.394.986.986 0 01-.323.168c-.033.01-.07.008-.127.013.02-.066.024-.114.047-.15.064-.105.135-.205.205-.306.023-.033.049-.063.073-.095l-.015-.023-.201.037c-.146.04-.296.07-.437.122-.148.053-.266.023-.386-.072a3.623 3.623 0 01-.733-.786l-.093-.132zm8.592 8.963l-.147.09c-.22.134-.44.266-.659.402-.093.058-.184.12-.27.188-.085.07-.124.161-.072.272.047.1.093.2.147.294.047.08.124.138.213.147.11.01.228.012.336-.012.217-.05.372-.205.528-.357a.291.291 0 00.087-.308c-.046-.18-.079-.365-.118-.547-.011-.052-.027-.103-.045-.169zm-.257-2.409c-.12.291-.205.597-.325.91-.151.433-.294.87-.435 1.323.036-.01.054-.01.067-.018.261-.16.522-.324.785-.484.054-.033.071-.078.065-.138-.012-.13-.024-.262-.034-.393l-.068-.886c-.008-.103-.02-.206-.029-.31-.009 0-.017-.002-.026-.004zm3.081-8.13l.099.285c.08.231.159.463.24.714l.58 1.952c.187.63.372 1.262.558 1.893.114.382.235.762.343 1.146.072.257.126.519.186.799.044.206.087.413.127.64.034.106.023.226.077.325l.025-.006-.068-.362c-.038-.206-.077-.412-.113-.638-.015-.07-.029-.141-.046-.211-.095-.396-.177-.796-.29-1.187-.196-.685-.413-1.364-.618-2.046-.165-.549-.322-1.1-.488-1.648-.069-.227-.15-.45-.226-.695l-.117-.336c-.037-.107-.075-.216-.115-.322-.04-.106-.084-.21-.127-.314a7.558 7.558 0 01-.027.01zM6.225 14.304c-.063-.001-.115.014-.134.083a.35.35 0 00.41.012 4.533 4.533 0 00-.276-.095zM5.23 11.98c-.026-.027-.057-.048-.075.002-.012.032-.007.07-.01.113.082-.037.082-.037.085-.115zm.062-1.189a.135.135 0 00-.088.056.197.197 0 00-.025.11c.005.152.01.306.026.457a.751.751 0 00.066.218c.061.136.157.167.288.101.055-.027.06-.054.025-.11a4.52 4.52 0 01-.129-.211c-.015-.068-.066-.131-.033-.207.04-.09-.076-.116-.074-.19V10.874c-.003-.038-.006-.087-.056-.083zm-.017-.968a.867.867 0 00-.467.127c-.076.045-.084.07-.05.158.034.087.07.173.115.254.064.117.09.125.21.077a.657.657 0 01.336-.053c.202.022.357.136.504.264l.092.077c.007-.006.014-.013.022-.018-.019-.105-.035-.226-.149-.264-.157-.053-.324-.075-.508-.117l-.24-.005c.24-.169.452-.044.687.009-.063-.115-.153-.147-.23-.193-.082-.05-.17-.092-.25-.144-.06-.037-.12-.08-.072-.172zm10.233.325c-.23-.01-.427.08-.608.211-.034.026-.06.065-.105.117.087.026.15.046.232.065.044-.015.088-.03.13-.046.306-.114.61-.115.904.031.126.063.237.04.366-.005-.02-.031-.03-.054-.045-.071a.986.986 0 00-.448-.273c-.14-.044-.284-.024-.426-.03zM7.99 6.483a.308.308 0 00.002.133c.08.321.156.643.242.962.104.387.27.75.456 1.103.02.037.061.08.098.087a.404.404 0 00.253-.051l-.472-.84c-.23-.448-.405-.92-.579-1.394zM10.397.497c-.2-.008-.405.004-.603.034-.236.035-.47.087-.7.152-.287.08-.569.18-.852.273-.04.013-.074.038-.11.058.028.014.05.018.07.014.287-.068.58-.085.873-.09.134-.002.269.009.402.025.19.024.382.048.57.09.456.104.874.3 1.265.556.464.306.888.66 1.257 1.078.205.232.395.475.56.739.17.274.315.561.449.856.273.601.456 1.232.6 1.876.04.173.07.348.1.524.017.104.065.167.17.19.122.028.2.105.22.251-.003.102-.06.174-.129.24a1.065 1.065 0 00-.268.358.164.164 0 00.083-.039c.08-.086.162-.172.235-.265a.56.56 0 00.13-.333c.009-.05.022-.1.024-.15.007-.124-.017-.15-.143-.168-.025-.004-.049-.014-.073-.015-.082-.007-.125-.063-.137-.131-.033-.198-.004-.355.247-.408.086-.018.174-.03.26-.042.158-.023.315-.053.473-.067.14-.012.19.033.226.167.008.029.018.057.021.087.019.179-.008.225-.141.288-.027.013-.055.024-.078.042a.148.148 0 00-.051.067c-.039.144.073.382.206.445l.673.32c.023.011.05.015.075.023l.018-.026c-.015-.008-.032-.013-.044-.024a2.27 2.27 0 00-.544-.32 4.898 4.898 0 00-.173-.075.203.203 0 01-.126-.191c-.003-.085.045-.154.128-.187l.059-.025c.099-.044.118-.076.112-.187a.384.384 0 00-.008-.063c-.067-.294-.123-.59-.205-.88a9.478 9.478 0 00-.826-2.036 7.465 7.465 0 00-1.39-1.805 4.536 4.536 0 00-1.177-.824 3.656 3.656 0 00-1.016-.328 6.155 6.155 0 00-.712-.074zm6.719 5.955c.01.014.018.028.038.034l-.022-.044-.016.01zM4.103 3.917a.062.062 0 01-.03.012.455.455 0 01-.04.039c-.01.01-.02.02-.045.04l-.363.354c-.088.085-.17.178-.266.253-.284.22-.425.53-.544.855a.132.132 0 00-.007.071c.013.055.033.108.052.168l.074.026c-.017.056-.03.105-.047.152-.058.164-.118.327-.175.491-.005.015.008.036.019.077.08-.175.158-.33.225-.489.228-.544.484-1.074.819-1.561.09-.133.182-.266.283-.401.004-.006.007-.013.022-.03.001-.016.003-.032.015-.04l.008-.017zm12.976 2.408a.023.023 0 01.009.019.073.073 0 00-.006.01.188.188 0 00.007.02l.018.022c.002-.007.007-.016.005-.021-.003-.01-.012-.018-.02-.038a1.331 1.331 0 01-.013-.012zM4.199 4.48c-.003.004-.008.008-.027.014-.005.013-.011.025-.031.047a2.085 2.085 0 01-.124.167c-.048.07-.116.055-.181.041-.134-.028-.228.016-.287.143-.089.187-.187.37-.273.56-.049.108-.11.216-.118.36.081.003.154.007.228.008h.228a2.563 2.563 0 01-.079.264c-.01.052-.022.103-.033.155l.02.004c.018-.046.037-.092.067-.153.066-.142.13-.285.2-.426.02-.04.034-.1.116-.092 0 .043.004.084 0 .124-.005.045-.017.09-.028.143.141.043.086.174.115.269.102-.022.104-.195.248-.144v.205l.017.002.439-1.059c-.13 0-.246-.02-.358.033-.024.011-.058-.001-.108-.004.075-.15.139-.278.211-.417a.128.128 0 01.025-.036c0-.015-.001-.03.008-.038l.006-.02c-.005.006-.01.011-.028.017-.004.012-.009.024-.026.045a.085.085 0 01-.032.033c-.123.157-.09.164-.258.106-.079-.027-.078-.028-.047-.144.028-.046.056-.093.098-.15 0-.016-.001-.032.007-.042L4.2 4.48zm2.073-.67c-.003.006-.007.011-.027.016-.094.125-.194.246-.28.377-.155.238-.301.481-.451.723-.14.224-.345.368-.575.481-.017.008-.04.006-.079.011.012-.059.016-.109.033-.153a6.076 6.076 0 01.229-.518l-.007-.02a.138.138 0 01-.035.025c-.028.05-.055.1-.093.164-.26.424-.443.817-.442.95.024.004.048.011.073.013.177.013.188.007.26-.165.03-.07.077-.12.147-.15l.175-.07c.044-.018.085-.057.146-.032.003.05-.01.11.014.145.042.062.044.125.047.193.002.049.017.098.026.147.029-.034.039-.065.05-.097.142-.39.277-.782.428-1.17.1-.256.22-.504.33-.756.013-.03.013-.067.03-.092V3.81zm3.987-.34c0 .045.01.084.021.123.042.16.094.318.124.48.024.133.023.27.028.406 0 .033-.019.067-.032.11-.094-.058-.047-.158-.106-.215h-.125c-.015.072-.01.152-.046.2-.066.085-.155.154-.236.227-.043.038-.078.018-.103-.025l-.046-.087c-.065.035-.117.069-.172.093-.116.051-.235.095-.35.147-.085.038-.09.053-.07.147.014.075.034.148.047.223.013.072.05.109.123.124.233.05.462.115.657.265.058-.102.058-.102.168-.151.03-.014.06-.03.092-.042.08-.03.115-.017.15.06.023.048.041.098.066.158.06-.14-.042-.267.017-.416.157.18.24.39.375.567a.235.235 0 00.022-.098c.002-.124 0-.247.002-.371 0-.034.013-.067.02-.1l.032-.003c.11.155.13.354.226.52a3.036 3.036 0 00-.01-.392c-.004-.045 0-.074.05-.088.08.036.116.14.215.158-.03-.275-.423-1.137-.798-1.635-.114-.127-.2-.28-.34-.386zm-2.667.696c-.019.034-.03.05-.037.067-.061.185-.125.37-.18.556-.031.105-.087.169-.195.19-.09.019-.178.052-.268.073-.038.009-.089.015-.118-.003-.024-.016-.025-.069-.036-.106-.064.076-.082.087-.17.047-.133-.062-.262-.135-.393-.201-.048-.025-.093-.063-.17-.03-.043.12-.091.25-.137.382-.099.28-.087.242.095.453.046.048.102.03.154.023.054-.009.106-.03.16-.036.13-.013.26-.08.367-.015.204-.064.387-.122.571-.178.05-.015.089.005.114.054.022.042.034.093.082.121.038-.056-.013-.128.063-.178l.14.241-.042-1.46zm.278.358c-.096-.01-.107.01-.11.108-.002.038-.003.078.002.115.03.2.099.386.174.57.002.006.012.01.022.015l.078-.05c.052.036.081.088.153.088.205-.002.41.014.616.012.099-.001.158.042.205.12.018.03.024.077.088.066l-.08-.394c-.05-.195-.085-.395-.172-.589-.057.057-.114.068-.18.046a.72.72 0 00-.135-.028c-.22-.028-.44-.059-.66-.08zm10.254-1.727c.089.163.155.316.139.491-.016.168.026.342-.044.516-.047-.033-.088-.082-.112-.075-.117.035-.164-.057-.227-.115a4.772 4.772 0 01-.286-.29l-.104-.113a4.856 4.856 0 01-.023.019c.035.046.07.093.11.156.04.064.084.127.122.193.034.058.065.118.031.205-.082-.01-.164-.019-.246-.032-.06-.01-.101 0-.124.07-.031.098-.037.096-.15.09.02.042.036.08.057.116.041.074.03.138-.03.196-.06.06-.118.122-.178.181a.175.175 0 01-.185.046c-.222-.061-.447-.113-.67-.174-.032-.009-.063-.04-.086-.068-.03-.04-.052-.087-.08-.13-.044-.07-.09-.138-.136-.207a.18.18 0 00-.014.105c.012.127.03.253.035.38.005.1-.024.12-.121.104-.104-.017-.206-.04-.31-.058-.064-.012-.131-.028-.202.03l.081.208c.09 0 .166-.01.237.002a.819.819 0 01.458.251c.078.083.154.168.241.26l.018-.005c-.004-.006-.008-.013-.01-.04.014-.056-.062-.118.018-.178.031.03.064.057.088.09.058.078.111.159.169.257l.089.141.024-.013a2093.819 2093.819 0 01-.427-.934c.055.007.083.007.108.016.193.07.385.142.577.216.074.028.147.06.219.094.062.028.112.018.157-.033.05-.056.102-.112.154-.167.05-.051.095-.046.132.014.016.025.026.053.04.08.071.138.143.277.217.433l.159.308.025-.011c-.044-.106-.07-.218-.138-.334-.057-.182-.168-.346-.206-.545.136.034.362.326.567.732l.057.074.018-.011a1.563 1.563 0 01-.052-.127c-.046-.145-.097-.29-.136-.436-.022-.083-.036-.173.022-.26l.109.058-.026-.207.027-.016c.022.02.05.036.065.06.073.108.143.22.215.33.01.016.029.029.043.043-.036-.217-.2-.38-.229-.626l.155.112c.014-.166.012-.319.042-.465.032-.158-.023-.297-.063-.445.024.004.036.006.055.025.092.124.183.249.277.371.02.027.05.047.069.087l.04.063.019-.015a.293.293 0 01-.053-.082 27.922 27.922 0 01-.332-.49c-.221-.311-.363-.467-.485-.521zm-6.57.327c-.003.161.092.275.069.415l-.368.087c.09.139.032.237-.052.331-.05.057-.092.122-.143.178-.037.04-.046.078-.018.126l.16.275c.029.048.072.066.128.064.076-.003.152 0 .228-.001.116-.003.216.022.275.137.006.014.02.024.044.052.004-.059-.003-.098.01-.13.016-.04.04-.099.072-.108.084-.023.173-.024.26-.03.013-.001.027.018.04.029l.071.065c.019-.11-.082-.198-.024-.31l.126.04c-.026-.123-.07-.245-.071-.366 0-.123.051-.243.115-.36.107.062.16.156.234.253.183.265.36.533.494.834.165-.078.27.068.407.088-.003-.106-.133-.441-.197-.492a.142.142 0 00-.102-.028c-.06.011-.119.039-.191.063-.025-.039-.056-.078-.077-.122a3.936 3.936 0 00-.473-.783c-.076-.094-.16-.182-.228-.26l-.391.285c-.049.035-.094.03-.132-.017l-.169-.207c-.025-.03-.053-.059-.097-.108z"></path>`,nvidia:`<path d="M10.212 8.976V7.62c.127-.01.256-.017.388-.021 3.596-.117 5.957 3.184 5.957 3.184s-2.548 3.647-5.282 3.647a3.227 3.227 0 01-1.063-.175v-4.109c1.4.174 1.681.812 2.523 2.258l1.873-1.627a4.905 4.905 0 00-3.67-1.846 6.594 6.594 0 00-.729.044m0-4.476v2.025c.13-.01.259-.019.388-.024 5.002-.174 8.261 4.226 8.261 4.226s-3.743 4.69-7.643 4.69c-.338 0-.675-.031-1.007-.092v1.25c.278.038.558.057.838.057 3.629 0 6.253-1.91 8.794-4.169.421.347 2.146 1.193 2.501 1.564-2.416 2.083-8.048 3.763-11.24 3.763-.308 0-.603-.02-.894-.048V19.5H24v-15H10.21zm0 9.756v1.068c-3.356-.616-4.287-4.21-4.287-4.21a7.173 7.173 0 014.287-2.138v1.172h-.005a3.182 3.182 0 00-2.502 1.178s.615 2.276 2.507 2.931m-5.961-3.3c1.436-1.935 3.604-3.148 5.961-3.336V6.523C5.81 6.887 2 10.723 2 10.723s2.158 6.427 8.21 7.015v-1.166C5.77 16 4.25 10.958 4.25 10.958h-.002z"></path>`,openai:`<path d="M9.205 8.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357 1.356-.523 2.117-.523 2.854 0 4.662 2.212 4.662 4.566 0 .167 0 .357-.024.547l-4.71-2.759a.797.797 0 00-.856 0l-5.97 3.473zm10.609 8.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473 1.95-1.118a.433.433 0 01.476 0l4.543 2.617c1.309.76 2.189 2.378 2.189 3.948 0 1.808-1.07 3.473-2.76 4.163zM7.802 12.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545 1.95-4.472 4.591-4.472 1 0 1.927.333 2.712.928L8.23 5.067c-.285.166-.428.404-.428.737v6.898zM12 15.128l-2.795-1.57v-3.33L12 8.658l2.795 1.57v3.33L12 15.128zm1.796 7.23c-1 0-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974 1.142c.167.095.238.238.238.428v5.233c0 2.545-1.974 4.472-4.614 4.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482 4.482 0 014.21 6.327v5.423c0 .333.143.571.428.738l5.947 3.449-1.95 1.118a.432.432 0 01-.476 0zm-.262 3.9c-2.688 0-4.662-2.021-4.662-4.519 0-.19.024-.38.047-.57l4.686 2.71c.286.167.571.167.856 0l5.97-3.448v2.26c0 .19-.07.333-.237.428l-4.543 2.616c-.619.357-1.356.523-2.117.523zm5.899 2.83a5.947 5.947 0 005.827-4.756C22.287 18.339 24 15.84 24 13.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498 0-3.401-2.759-5.947-5.946-5.947-.642 0-1.26.095-1.88.31A5.962 5.962 0 0010.205 0a5.947 5.947 0 00-5.827 4.757C1.713 5.447 0 7.945 0 10.49c0 1.666.713 3.283 1.998 4.448-.119.5-.19 1-.19 1.499 0 3.401 2.759 5.946 5.946 5.946.642 0 1.26-.095 1.88-.309a5.96 5.96 0 004.162 1.713z"></path>`,openclaw:`<g clip-path="url(#a)"><path d="M9.046 7.104a.527.527 0 110 1.055.527.527 0 010-1.055z"></path><path d="M15.376 7.104a.528.528 0 110 1.056.528.528 0 010-1.056z"></path><path clip-rule="evenodd" d="M16.877 1.912c.58-.27 1.14-.323 1.616-.037a.317.317 0 01-.326.542c-.227-.136-.547-.153-1.022.068-.352.165-.765.45-1.234.866 2.683 1.17 4.4 3.5 5.148 5.921a6.421 6.421 0 00-.704.184c-.578.016-1.174.204-1.502.735-.338.55-.268 1.276.072 2.069l.005.012.007.014c.523 1.045 1.318 1.91 2.2 2.284-.912 3.274-3.44 6.144-5.972 6.988v2.109h-2.11v-2.11c-1.043.417-2.086.01-2.11 0v2.11h-2.11v-2.11c-2.531-.843-5.061-3.713-5.973-6.987.882-.373 1.678-1.238 2.2-2.284l.007-.014.006-.012c.34-.793.41-1.518.071-2.069-.327-.531-.923-.719-1.503-.735a6.409 6.409 0 00-.704-.183c.749-2.421 2.466-4.751 5.149-5.922-.47-.416-.88-.701-1.234-.866-.474-.221-.794-.204-1.021-.068a.318.318 0 01-.435-.109.317.317 0 01.109-.433c.476-.286 1.036-.233 1.615.037.49.229 1.031.628 1.621 1.182A9.924 9.924 0 0112 2.568c1.199 0 2.284.19 3.256.526.59-.554 1.13-.953 1.62-1.182zM8.835 6.577a1.266 1.266 0 100 2.532 1.266 1.266 0 000-2.532zm6.33 0a1.267 1.267 0 100 2.533 1.267 1.267 0 000-2.533z"></path><path d="M.395 13.118c-.966-1.932-.163-3.863 2.41-3.365v-.001l.05.01c.084.018.17.038.26.06.033.009.067.017.1.027.084.022.168.048.255.076l.09.027c.528 0 .95.158 1.16.501.212.343.212.87-.105 1.61-.085.17-.178.333-.276.489l-.01.017a4.967 4.967 0 01-.62.791l-.019.02c-1.092 1.117-2.496 1.336-3.295-.262z"></path><path d="M21.193 9.753c2.574-.5 3.378 1.433 2.411 3.365-.58 1.159-1.476 1.361-2.342.96l-.011-.005a2.419 2.419 0 01-.114-.056l-.019-.01a2.751 2.751 0 01-.115-.067l-.023-.014c-.035-.022-.071-.044-.106-.068l-.05-.035c-.55-.388-1.062-1.007-1.44-1.76-.276-.647-.311-1.132-.174-1.472.176-.439.636-.639 1.23-.639.032-.011.066-.02.099-.03.08-.026.16-.05.238-.072l.117-.03a5.502 5.502 0 01.3-.067z"></path></g><defs><linearGradient gradientUnits="userSpaceOnUse" id="b" x1="-.659" x2="27.023" y1=".458" y2="22.855"><stop stop-color="#FF4D4D"></stop><stop offset="1" stop-color="#991B1B"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="c" x1="-.659" x2="27.023" y1=".458" y2="22.855"><stop stop-color="#FF4D4D"></stop><stop offset="1" stop-color="#991B1B"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="d" x1="-.659" x2="27.023" y1=".458" y2="22.855"><stop stop-color="#FF4D4D"></stop><stop offset="1" stop-color="#991B1B"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="e" x1="-.659" x2="27.023" y1=".458" y2="22.855"><stop stop-color="#FF4D4D"></stop><stop offset="1" stop-color="#991B1B"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="f" x1="-.659" x2="27.023" y1=".458" y2="22.855"><stop stop-color="#FF4D4D"></stop><stop offset="1" stop-color="#991B1B"></stop></linearGradient><clipPath id="a"><path d="M0 0h24v24H0z"></path></clipPath></defs>`,openrouter:`<path d="M18.654 3.87a5.087 5.087 0 110 10.174L23.7 19.09c.64.641.187 1.737-.72 1.737H8.48a8.479 8.479 0 010-16.958h10.175zM8.479 7.26a5.087 5.087 0 100 10.176 5.087 5.087 0 000-10.175z"></path>`,perplexity:`<path d="M19.785 0v7.272H22.5V17.62h-2.935V24l-7.037-6.194v6.145h-1.091v-6.152L4.392 24v-6.465H1.5V7.188h2.884V0l7.053 6.494V.19h1.09v6.49L19.786 0zm-7.257 9.044v7.319l5.946 5.234V14.44l-5.946-5.397zm-1.099-.08l-5.946 5.398v7.235l5.946-5.234V8.965zm8.136 7.58h1.844V8.349H13.46l6.105 5.54v2.655zm-8.982-8.28H2.59v8.195h1.8v-2.576l6.192-5.62zM5.475 2.476v4.71h5.115l-5.115-4.71zm13.219 0l-5.115 4.71h5.115v-4.71z"></path>`,poolside:`<g clip-path="url(#lobe-icons-poolside-0-_R_0_)"><mask height="24" id="lobe-icons-poolside-4-_R_0_" maskUnits="userSpaceOnUse" style="mask-type:alpha" width="24" x="0" y="0"><path d="M24 0H0v24h24V0z" fill="url(#lobe-icons-poolside-1-_R_0_)"></path><path d="M24 0H0v24h24V0z" fill="url(#lobe-icons-poolside-2-_R_0_)"></path><path d="M24 0H0v24h24V0z" fill="url(#lobe-icons-poolside-3-_R_0_)"></path></mask><g mask="url(#lobe-icons-poolside-4-_R_0_)"><path d="M6.742 22.786a11.93 11.93 0 01-5.232-4.963 11.98 11.98 0 01-1.463-6.886.975.975 0 011.943.173c-.178 2.005.246 4 1.226 5.769a9.968 9.968 0 003.526 3.685l4.586-9.405c-1.795-.598-3.29-.338-3.425-.312l-.058.012a.972.972 0 01-1.054-.576c-.24-.448-.96-1.544-1.834-1.97-.873-.426-2.218-.289-2.651-.195a.977.977 0 01-1.087-1.38C4.117.792 11.315-1.686 17.262 1.215c5.946 2.9 8.422 10.093 5.529 16.038l-.01.02c-2.903 5.94-10.095 8.414-16.039 5.514zm6.338-10.773l-4.586 9.405c4.629 1.73 9.896-.192 12.304-4.558-.338-.524-.932-1.275-1.62-1.61-.888-.434-2.19-.292-2.637-.198a.989.989 0 01-.616-.055.984.984 0 01-.49-.473c-.028-.058-.739-1.438-2.355-2.51zM5.81 6.56c.747.365 1.356.944 1.81 1.49 1.406-2.15 3.314-3.774 4.787-4.82a20.81 20.81 0 011.66-1.067A10.078 10.078 0 003.882 6.077c.617.042 1.297.174 1.929.482zm12.671-2.243c.09.624.152 1.294.182 1.965.083 1.801-.021 4.296-.844 6.722.686.018 1.484.14 2.214.495.652.318 1.198.8 1.628 1.28a10.082 10.082 0 00-3.18-10.462zm-5.394 5.46a9.522 9.522 0 012.984 2.287c1.075-3.493.606-7.402.215-8.85-1.381.584-4.75 2.62-6.84 5.618a9.515 9.515 0 013.64.944z"></path></g></g><defs><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-poolside-1-_R_0_" x1="6.75" x2="5.625" y1="20.55" y2="20.55"><stop stop-color="currentColor"></stop><stop offset="1" stop-color="currentColor" stop-opacity="0"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-poolside-2-_R_0_" x1="6.825" x2="7.2" y1="11.85" y2="11.137"><stop stop-color="currentColor" stop-opacity="0"></stop><stop offset="1" stop-color="currentColor"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-poolside-3-_R_0_" x1=".975" x2=".975" y1="20.512" y2="10.912"><stop stop-color="currentColor"></stop><stop offset=".105" stop-color="currentColor" stop-opacity=".9"></stop><stop offset=".904" stop-color="currentColor" stop-opacity=".04"></stop><stop offset="1" stop-color="currentColor" stop-opacity="0"></stop></linearGradient><clipPath id="lobe-icons-poolside-0-_R_0_"><path d="M0 0h24v24H0z" fill="currentColor"></path></clipPath></defs>`,qwen:`<path d="M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z"></path>`,relace:`<path d="M23 23H1V1h22v22zM2.962 15.232c1.969.3 5.028.42 7.78-.171.904-.195 1.743-.46 2.49-.803-1.395-3.4-1.675-5.766-1.264-7.378.466-1.823 1.799-2.59 2.998-2.602h.01c.688 0 2.117.177 3.081 1.35 1.003 1.22 1.216 3.152.26 5.991-.504 1.493-1.437 2.616-2.594 3.456 1.323 2.993 2.11 4.498 2.588 5.284.223.367.372.564.467.679h2.26V2.962H2.962v12.27zm11.05.827c-.912.413-1.887.711-2.857.92-2.91.626-6.059.527-8.193.234v3.825h13.471c-.527-.92-1.287-2.424-2.421-4.98zm.97-9.82c-.323.005-.87.181-1.112 1.127-.25.975-.161 2.776 1.055 5.84.705-.598 1.233-1.329 1.531-2.213.868-2.576.455-3.67.086-4.119-.406-.494-1.09-.633-1.56-.634z"></path>`,stability:`<path d="M7.223 21c4.252 0 7.018-2.22 7.018-5.56 0-2.59-1.682-4.236-4.69-4.918l-1.93-.571c-1.694-.375-2.683-.825-2.45-1.975.194-.957.773-1.497 2.122-1.497 4.285 0 5.873 1.497 5.873 1.497v-3.6S11.62 3 7.293 3C3.213 3 1 5.07 1 8.273c0 2.59 1.534 4.097 4.645 4.812l.334.083c.473.144 1.112.335 1.916.572 1.59.375 1.999.773 1.999 1.966 0 1.09-1.15 1.71-2.67 1.71C2.841 17.416 1 15.231 1 15.231v3.989S2.152 21 7.223 21z"></path><path d="M20.374 20.73c1.505 0 2.626-1.073 2.626-2.526 0-1.484-1.089-2.526-2.626-2.526-1.505 0-2.594 1.042-2.594 2.526 0 1.484 1.089 2.526 2.594 2.526z"></path>`,stepfun:`<path d="M12 0C5.372 0 0 5.372 0 12s5.372 12 12 12 12-5.372 12-12S18.628 0 12 0zM8.762 19.614H4.376v-4.386h4.386v4.386zm5.423 0H9.798v-4.386h4.387v4.386zm0-5.42H9.798V9.81h4.387v4.386zm0-5.418H9.798V4.39h4.387v4.386zm5.422-.004h-4.386V4.386h4.386v4.386z"></path>`,tencent:`<path d="M9.976 1L24 9.8l-10.587.015L10.723 23H5.489L8.18 9.8H3.244L1 5.4h8.077L9.976 1z"></path>`,upstage:`<path d="M19.763 0l-.373 1.297h2.594L22.354 0h-2.591z"></path><path d="M16.192 2.27l-.376 1.298h5.52l.37-1.298h-5.514z"></path><path d="M12.897 4.54l-.377 1.298h8.167l.37-1.297h-8.16z"></path><path d="M2.85 6.81l-.377 1.298h17.565l.37-1.297H2.85z"></path><path d="M3.884 9.081l-.376 1.297H19.39l.37-1.297H3.883z"></path><path d="M4.088 24l.376-1.297H1.866L1.5 24h2.588z"></path><path d="M7.662 21.73l.376-1.298H2.515L2.15 21.73h5.513z"></path><path d="M10.957 19.46l.377-1.298h-8.17l-.367 1.297h8.16z"></path><path d="M21.005 17.19l.376-1.298H3.812l-.366 1.297h17.559z"></path><path d="M19.967 14.919l.376-1.297H4.461l-.366 1.297h15.872z"></path><path d="M18.787 12.649l.376-1.298H4.26l-.366 1.298h14.893z"></path>`,xai:`<path d="M6.469 8.776L16.512 23h-4.464L2.005 8.776H6.47zm-.004 7.9l2.233 3.164L6.467 23H2l4.465-6.324zM22 2.582V23h-3.659V7.764L22 2.582zM22 1l-9.952 14.095-2.233-3.163L17.533 1H22z"></path>`,xiaomimimo:`<path d="M.958 15.936a.459.459 0 01.459.44v2.729a.46.46 0 01-.918 0v-2.729a.459.459 0 01.459-.44zm4.814-2.035a.46.46 0 01.553.45v4.754a.458.458 0 11-.918 0V15.48L3.74 17.202a.462.462 0 01-.655.016.462.462 0 01-.065-.082L.628 14.67a.459.459 0 01.658-.637l2.124 2.187 2.127-2.188a.46.46 0 01.235-.13zm2.068.004a.46.46 0 01.458.445v4.755a.46.46 0 01-.458.458.459.459 0 01-.458-.458V14.35a.459.459 0 01.458-.445zm1.973 2.014a.46.46 0 01.46.457v2.729a.46.46 0 01-.784.324.46.46 0 01-.134-.324v-2.729a.46.46 0 01.458-.458zm.002-2.045a.458.458 0 01.328.157l2.127 2.19 2.125-2.19a.459.459 0 01.784.318v4.756a.46.46 0 01-.455.458.46.46 0 01-.458-.458V15.48l-1.667 1.723a.46.46 0 01-.65.008l-.005-.005c0-.002-.002-.002-.004-.003l-2.455-2.534a.46.46 0 01-.008-.667.461.461 0 01.338-.128zm6.797 1.206a.46.46 0 01.53.651A1.966 1.966 0 0019.81 18.4a.462.462 0 01.623.18.46.46 0 01-.181.624 2.863 2.863 0 01-1.38.353l-.142-.004a2.88 2.88 0 01-2.393-4.263.461.461 0 01.274-.21zm.864-.931a2.884 2.884 0 013.915 3.914.46.46 0 01-.402.24l-.057-.004a.458.458 0 01-.164-.055.46.46 0 01-.182-.622 1.967 1.967 0 00-2.669-2.67.459.459 0 11-.441-.803zM9.59 6.368c1.481 0 1.696 1.202 1.696 1.654v2.648h-.917v-.432c-.26.346-.792.535-1.36.535-.133 0-1.289-.03-1.384-1.136-.082-.932.675-1.61 2.053-1.61h.691c0-.563-.367-.886-.983-.886-.44.013-.864.174-1.2.458l-.36-.664c.484-.379 1.012-.567 1.764-.567zm4.427.1c1.263 0 2.082.97 2.083 2.15 0 1.181-.824 2.154-2.083 2.154-1.26 0-2.084-.972-2.084-2.152 0-1.18.82-2.153 2.084-2.153zm6.801.015c.68 0 1.202.465 1.197 1.548v2.642H21.1V8.29c0-.312-.002-.98-.63-.98s-.628.667-.628.838v2.524h-.89V8.148c0-.17-.001-.838-.63-.838-.628 0-.628.668-.628.98v2.383h-.917v-4.03h.917V7a1.22 1.22 0 01.947-.516c.398 0 .76.193.982.686a1.321 1.321 0 011.195-.686zm-18.093.872l1.457-1.772H5.32L3.311 8.07l2.14 2.602H4.24L2.725 8.796 1.21 10.672H0L2.138 8.07.13 5.583h1.138l1.458 1.772zm4.149 3.317h-.916V6.644h.916v4.028zm16.99 0h-.916V6.644h.916v4.028zM9.925 8.71c-1.055 0-1.359.412-1.326.742.032.329.324.537.757.537a1.013 1.013 0 001.014-.968l.002-.31h-.447zM14.018 7.3c-.663 0-1.184.487-1.184 1.32 0 .832.52 1.32 1.184 1.32.662 0 1.182-.49 1.182-1.32 0-.832-.52-1.32-1.182-1.32zM6.417 5.001a.568.568 0 01.587.582.588.588 0 01-1.175 0A.57.57 0 016.417 5zm16.991 0a.57.57 0 01.592.582.588.588 0 01-1.174 0 .57.57 0 01.357-.542.572.572 0 01.225-.04z"></path>`,zai:`<path d="M12.105 2L9.927 4.953H.653L2.83 2h9.276zM23.254 19.048L21.078 22h-9.242l2.174-2.952h9.244zM24 2L9.264 22H0L14.736 2H24z"></path>`,zoo:`<defs><clipPath id="zoo-cut"><circle cx="12" cy="12" r="12"></circle></clipPath></defs><g clip-path="url(#zoo-cut)" fill="none" stroke="currentColor"><circle cx="12.203" cy="6.27" r="9.509" stroke-width="2.4" stroke="#00A652"></circle><circle cx="6.189" cy="15.454" r="9.509" stroke-width="2.4" stroke="#ED1C24"></circle><circle cx="17.486" cy="15.454" r="9.509" stroke-width="2.4" stroke="#2E3192"></circle><circle cx="12" cy="12" r="10.8" stroke-width="2.4"></circle></g>`,adroll:`<path d="${U4.path}"></path>`,chrome:`<path d="${e3.path}"></path>`,cloudflare:`<path d="${W4.path}"></path>`,discord:`<path d="${G4.path}"></path>`,facebook:`<path d="${q4.path}"></path>`,github:`<path d="${Y4.path}"></path>`,gitlab:`<path d="${X4.path}"></path>`,google_ads:`<path d="${Q4.path}"></path>`,instagram:`<path d="${i3.path}"></path>`,meta_ads:`<path d="${s3.path}"></path>`,pinterest:`<path d="${l3.path}"></path>`,reddit:`<path d="${d3.path}"></path>`,reddit_ads:`<path d="${d3.path}"></path>`,telegram:`<path d="${g3.path}"></path>`,threads:`<path d="${_3.path}"></path>`,tiktok:`<path d="${v3.path}"></path>`,tiktok_ads:`<path d="${v3.path}"></path>`,twitch:`<path d="${y3.path}"></path>`,warpcast:`<path d="${J4.path}"></path>`,whatsapp:`<path d="${b3.path}"></path>`,x:`<path d="${x3.path}"></path>`,youtube:`<path d="${S3.path}"></path>`},T3={"aion-labs":`aionlabs`,allenai:`ai2`,amazon:`aws`,"arcee-ai":`arcee`,bge:`baai`,"bytedance-seed":`bytedance`,e:`microsoft`,glm:`zai`,gpt:`openai`,gte:`alibaba`,"ibm-granite":`ibm`,llama:`meta`,meituan:`longcat`,"meta-llama":`meta`,mimo:`xiaomimimo`,mistralai:`mistral`,moonshotai:`moonshot`,nemotron:`nvidia`,o:`openai`,rerank:`baai`,stable:`stability`,trinity:`arcee`,wan:`alibaba`,"x-ai":`xai`,xiaomi:`xiaomimimo`,"z-ai":`zai`,zen:`zoo`},E3=/ stroke="#[0-9A-Fa-f]{6}"/g,D3=e=>e?w3[e]?e:w3[T3[e]??``]?T3[e]:void 0:void 0,O3={alibaba:`#FF6A00`,aws:`#FF9900`,baidu:`#2932E1`,claude:`#C37E4E`,deepseek:`#4D6BFE`,gemma:`#4285F4`,google:`#4285F4`,ibm:`#0F62FE`,meta:`#0064E0`,minimax:`#F23F5D`,mistral:`#FA520F`,nvidia:`#76B900`,perplexity:`#20808D`,qwen:`#615CED`,tencent:`#0052D9`,xiaomimimo:`#EF6200`,zai:`#3859FF`,adroll:`#`+U4.hex,chrome:`#`+e3.hex,cloudflare:`#`+W4.hex,discord:`#`+G4.hex,facebook:`#`+q4.hex,github:`#`+Y4.hex,gitlab:`#`+X4.hex,google_ads:`#`+Q4.hex,instagram:`#`+i3.hex,meta_ads:`#`+s3.hex,pinterest:`#`+l3.hex,reddit:`#`+d3.hex,reddit_ads:`#`+d3.hex,telegram:`#`+g3.hex,threads:`#`+_3.hex,tiktok:`#`+v3.hex,tiktok_ads:`#`+v3.hex,twitch:`#`+y3.hex,warpcast:`#`+J4.hex,whatsapp:`#`+b3.hex,x:`#`+x3.hex,youtube:`#`+S3.hex};function k3(e,t){return D3((t?L4(t).slug.toLowerCase().match(/^[a-z]+/)?.[0]:void 0)??``)??D3(e.replace(/^~/,``).toLowerCase())}function A3({org:e,provider:t,model:n,size:r=32,ink:i}){let a=k3(e||t||`enso`,n);return a?(0,H.jsx)(w,{render:`span`,children:(0,H.jsx)(`svg`,{"aria-hidden":!0,focusable:`false`,width:r,height:r,viewBox:`0 0 24 24`,fill:`currentColor`,fillRule:`evenodd`,color:i?void 0:O3[a],dangerouslySetInnerHTML:{__html:i?w3[a].replace(E3,``):w3[a]}})}):(0,H.jsx)(U,{"aria-hidden":!0,display:`flex`,shrink:0,items:`center`,justify:`center`,width:r,height:r,rounded:`var(--radius-lg)`,bg:`var(--secondary)`,fontSize:r*.44,fontWeight:`700`,textTransform:`uppercase`,color:`var(--muted-foreground)`,children:(z4(e)||`Hanzo`).replace(/^~/,``).charAt(0)})}function j3(e){let t=e?.body;if(t&&typeof t==`object`){let e=t;for(let t of[`detail`,`message`,`msg`,`error`,`title`]){let n=e[t];if(typeof n==`string`&&n.trim())return n.trim();if(t===`error`&&n&&typeof n==`object`){let e=n.message;if(typeof e==`string`&&e.trim())return e.trim()}}}}var M3=e=>{let t=e?.status;return typeof t==`number`&&Number.isFinite(t)?t:null},N3=e=>/no instance running|not running|service unavailable|503|econnrefused|failed to fetch|network/i.test(e),P3=e=>/401|403|forbidden|unauthori[sz]ed|not authori[sz]ed|authentication required|validated principal|permission|serve anonymous|anonymous completions/i.test(e);function F3(e,t,n=`read`,r=ne){let i=e instanceof Error?e.message:String(e??``),a=M3(e);return a===502||a===503||a===504||N3(i)?r(`Could not reach {subject}. Nothing has been lost — try again shortly.`,{subject:t}):a===401||a===403||P3(i)?r(n===`save`?`This account cannot change {subject}.`:`This account cannot open {subject}.`,{subject:t}):r(n===`save`?`Could not save {subject}.`:`Could not read {subject}.`,{subject:t})}function I3(e,t,n=ne){let r=e instanceof Error?e.message:String(e??``);return N3(r)||P3(r)?F3(e,t,`read`,n):j3(e)??r}function L3(e){let t=M3(e);return t!==402&&t!==429?null:v2(e?.body,t)}function R3(e){if(typeof e==`string`)try{let t=new URL(e),n=t.hostname;return t.protocol===`https:`&&(n===`hanzo.ai`||n.endsWith(`.hanzo.ai`))?t.toString():void 0}catch{return}}var z3=`signin.destination`,B3=new Set([`/login`,`/signup`,`/auth/callback`]);function V3(){try{let{pathname:e,search:t,hash:n}=window.location;window.sessionStorage.setItem(z3,e+t+n)}catch{}}var H3=`/login`,U3=()=>gW().signUp,W3=`hz_known`;function G3(){try{return window.localStorage.getItem(W3)===`1`?H3:U3()}catch{return U3()}}function K3(e=G3()){let{pathname:t,search:n,hash:r}=window.location,i=`${t}${n}${r}`;Y3(i)||(V3(),window.location.assign(J3(e,i)))}var q3=[`utm_source`,`utm_medium`,`utm_campaign`,`utm_term`,`utm_content`,`gclid`,`gbraid`,`wbraid`,`fbclid`,`li_fat_id`,`twclid`,`ttclid`];function J3(e,t){let[n,r=``]=e.split(`?`),i=new URLSearchParams(r),a=X3(t,``);a&&a!==`/`&&i.set(`next`,a);let o=new URLSearchParams(t.split(`#`)[0].split(`?`)[1]??``);for(let e of q3){let t=o.get(e)?.trim();t&&!i.has(e)&&i.set(e,t)}let s=i.toString();return s?`${n}?${s}`:n}function Y3(e){if(typeof window>`u`)return!1;let t=window.location.hostname,n=new URLSearchParams(e.split(`#`)[0].split(`?`)[1]??``).has(`client_id`);return!aG(t)&&(!rG(t)||n)?!1:(window.location.assign(iG+e),!0)}function X3(e,t=`/`){if(!e||!e.startsWith(`/`)||e.startsWith(`//`)||e.startsWith(`/\\`))return t;let n;try{n=new URL(e,Z3)}catch{return t}if(n.origin!==Z3)return t;let r=n.pathname.replace(/\/+$/,``)||`/`;return B3.has(r)?t:e}var Z3=`https://hanzo.invalid`,Q3=(e,t,n)=>{let r=QS();return e===void 0?t===void 0?n:r!==`a`&&$3(t)?(0,V.createElement)(r,{href:t}):`a`:e},$3=e=>e.startsWith(`/`)&&!e.startsWith(`//`)&&!/\.[a-z][a-z0-9]{1,4}$/i.test(e.split(/[?#]/)[0]),e6={display:`inline-flex`,items:`center`,whiteSpace:`inherit`,textDecorationLine:`none`},t6={fontSize:`$2`,lineHeight:`calc(1.25 / 0.875)`},n6=(e,t,n)=>{let r=t=>Object.fromEntries(Object.entries(t).filter(([t])=>!(t in e))),{hoverStyle:i,...a}=n;return{...e.hoverStyle===void 0?{hoverStyle:r(t)}:null,...e[`$theme-light`]===void 0?{"$theme-light":{...r(a),...i&&e.hoverStyle===void 0?{hoverStyle:r(i)}:null}}:null}},r6=({render:e,fill:t=!1,...n})=>{let r=Q3(e,n.href,`a`);return(0,H.jsx)(U,{...B(`action`),...t?{"data-fill":``}:null,render:r,...e6,...t6,justify:`center`,gap:`$2`,minH:44,px:`$5`,rounded:9999,fontWeight:`500`,backdropFilter:`var(--chrome-blur)`,...t?{borderWidth:0,bg:`var(--pure-white)`,color:`var(--pure-black)`,boxShadow:`0 4px 20px -2px var(--white-22), 0 2px 8px 0 color-mix(in srgb, var(--pure-black) 40%, transparent)`,...n6(n,{opacity:.92,bg:`var(--neutral-100)`,color:`var(--pure-black)`},{bg:`var(--foreground)`,color:`var(--background)`,boxShadow:`0 4px 16px -6px color-mix(in srgb, var(--pure-black) 40%, transparent)`,hoverStyle:{bg:`var(--foreground)`,color:`var(--background)`}})}:{borderWidth:1,borderStyle:`solid`,borderColor:`var(--white-14)`,bg:`color-mix(in srgb, var(--neutral-900) 65%, transparent)`,color:`var(--foreground)`,boxShadow:`inset 0 1px 0 0 var(--white-14), 0 4px 16px -2px color-mix(in srgb, var(--pure-black) 30%, transparent)`,...n6(n,{bg:`color-mix(in srgb, var(--neutral-800) 80%, transparent)`,borderColor:`var(--white-22)`,color:`var(--pure-white)`},{borderColor:`color-mix(in srgb, var(--pure-black) 14%, transparent)`,bg:`color-mix(in srgb, var(--pure-white) 72%, transparent)`,color:`var(--foreground)`,boxShadow:`0 2px 10px -4px color-mix(in srgb, var(--pure-black) 18%, transparent)`,hoverStyle:{borderColor:`color-mix(in srgb, var(--pure-black) 26%, transparent)`,bg:`var(--pure-white)`,color:`var(--foreground)`}})},...n})},i6=(e,t)=>`color-mix(in srgb, ${e} ${t}%, var(--foreground))`,a6=i6(`var(--state-success)`,55);i6(`var(--destructive)`,70),D(`Works with`),D(`Channels`);var o6=`/v1/provider`,s6=(e,t)=>e.connected?e.account||t(`Connected`):e.available?e.publisher:t(`Needs app credentials`),c6=[`tiktok`,`instagram`,`linkedin`,`slack`,`x`,`whatsapp`,`discord`,`telegram`,`facebook`,`teams`,`threads`,`youtube`],l6=null,u6=()=>l6??=Le(async()=>{let{INTEGRATIONS:e}=await import(`./integrations-DW-vmr60.js`);return{INTEGRATIONS:e}},[]).then(({INTEGRATIONS:e})=>e.map(e=>({id:e.slug,name:e.name,publisher:e.creator,description:e.description.split(`. `)[0]+`.`,kind:`native`}))).catch(()=>[]),d6=e=>e.charAt(0).toUpperCase()+e.slice(1);function f6(e){let t=e??{},n=e=>{let t=c6.indexOf(e);return t<0?c6.length:t};return(t.providers??[]).map(e=>{let t=e.connection??{},n=String(t.account??t.label??``);return{id:String(e.id),name:String(e.name??d6(String(e.id))),publisher:String(e.category??``),description:String(e.description??``),kind:`native`,connected:!!e.connected,available:!!e.available,account:n}}).sort((e,t)=>n(e.id)-n(t.id))}var p6=e=>Object.assign(Error(String(e.status)),{status:e.status});function m6({tab:e}){let{t}=R(),{isAuthenticated:n,accessToken:r}=lW(),[i,a]=(0,V.useState)(``),[o,s]=(0,V.useState)(null),[c,l]=(0,V.useState)(null),[u,d]=(0,V.useState)(0),f=t(e===`channels`?`Search channels`:`Search works with`),p=n&&!!r;(0,V.useEffect)(()=>{let t=!0;s(null),l(null);let n=p?TG():null;if(e===`apps`)return u6().then(e=>{t&&s(e)}),n&&Promise.all([u6(),fetch(`${uG()}/v1/connection`,{headers:n}).then(e=>e.ok?e.json():null)]).then(([e,n])=>{if(!t||!n?.connectors)return;let r=new Set(n.connectors.map(e=>String(e.provider)));s(e.map(e=>r.has(e.id)?{...e,connected:!0}:e))}).catch(()=>{}),()=>{t=!1};if(n)return fetch(`${uG()}${o6}`,{headers:n}).then(e=>{if(!e.ok)throw p6(e);return e.json()}).then(e=>t&&s(f6(e))).catch(e=>t&&l(e)),()=>{t=!1}},[e,p,u]),(0,V.useEffect)(()=>{if(e!==`channels`)return;let t=()=>{document.visibilityState===`visible`&&d(e=>e+1)};return document.addEventListener(`visibilitychange`,t),()=>document.removeEventListener(`visibilitychange`,t)},[e]);let m=(0,V.useMemo)(()=>{let e=i.trim().toLowerCase();return(o??[]).filter(t=>!e||t.name.toLowerCase().includes(e)||t.description.toLowerCase().includes(e))},[o,i]),h=(e,t)=>(0,H.jsxs)(z,{gap:`$3`,py:`$4`,items:`flex-start`,children:[(0,H.jsx)(U,{fontSize:`$3`,color:`$soft`,children:e}),t]});return(0,H.jsxs)(z,{gap:`$4`,children:[(0,H.jsxs)(y,{items:`center`,justify:`space-between`,gap:`$2`,flexWrap:`wrap`,children:[(0,H.jsxs)(y,{items:`center`,gap:`$2`,flex:1,minW:180,children:[(0,H.jsx)(cK,{size:14,"aria-hidden":!0}),(0,H.jsx)(k_,{value:i,onChangeText:a,placeholder:f,"aria-label":f,flex:1})]}),(0,H.jsx)(r6,{render:`button`,onPress:()=>window.open(`https://hanzo.market`,`_blank`,`noopener,noreferrer`),$touchable:{minH:36},children:(0,H.jsxs)(y,{items:`center`,gap:`$1.5`,children:[(0,H.jsx)(XG,{size:14,"aria-hidden":!0}),(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`500`,children:t(`Explore on hanzo.market`)}),(0,H.jsx)(KG,{size:13,"aria-hidden":!0})]})})]}),e===`channels`&&!p?h(t(`Sign in to see the channels your organization can connect.`),(0,H.jsx)(r6,{render:`button`,onPress:()=>K3(),$touchable:{minH:44,minW:44},children:t(`Sign in`)})):c?h(F3(c,t(`the channels`),`read`,t),(0,H.jsx)(r6,{render:`button`,onPress:()=>d(e=>e+1),$touchable:{minH:44,minW:44},children:t(`Try again`)})):o===null?h(t(e===`channels`?`Loading channels…`:`Loading works with…`)):m.length>0?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(U,{fontSize:`$3`,color:`$soft`,children:m.length===1?t(`1 result`):t(`{n} results`,{n:m.length})}),(0,H.jsx)(z,{maxH:380,overflowY:`auto`,overflowX:`hidden`,paddingInlineEnd:`$1`,width:`100%`,children:(0,H.jsx)(mC,{columns:e===`channels`?{min:168,max:4}:{min:240,max:2},gap:12,children:m.map(t=>e===`channels`?(0,H.jsx)(g6,{row:t,onChange:()=>d(e=>e+1)},t.id):(0,H.jsx)(h6,{row:t,tab:e},t.id))})})]}):h(i?t(`Nothing matches “{query}”.`,{query:i}):t(e===`channels`?`No channel can be connected here yet.`:`Nothing is listed yet.`))]})}function h6({row:e,tab:t}){let{t:n}=R(),r=vW(`/integrations/${e.id}`);return(0,H.jsxs)(z,{gap:`$2`,p:`$3`,borderWidth:1,borderColor:`$borderColor`,rounded:`$3`,height:`100%`,bg:`$raised`,children:[(0,H.jsxs)(y,{items:`center`,gap:`$2`,children:[(0,H.jsx)(A3,{org:e.id.replace(/-sdk$/,``),size:20}),(0,H.jsxs)(z,{flex:1,minW:0,children:[(0,H.jsx)(U,{fontSize:`$3`,fontWeight:`500`,color:`$ink`,numberOfLines:1,children:e.name}),(0,H.jsx)(U,{fontSize:`$2`,color:`$soft`,numberOfLines:1,children:e.publisher})]}),e.connected?(0,H.jsxs)(y,{items:`center`,gap:`$1`,px:`$2`,py:`$1`,rounded:`$2`,bg:`$hover`,children:[(0,H.jsx)(JG,{size:12,color:a6,"aria-hidden":!0}),(0,H.jsx)(U,{fontSize:`$1`,color:a6,fontWeight:`600`,children:n(`Connected`)})]}):(0,H.jsx)(XS,{render:(0,H.jsx)(`a`,{href:r,target:t===`apps`?void 0:`_blank`,rel:`noreferrer`,"aria-label":n(`Open {name}`,{name:e.name})}),...zq,children:(0,H.jsxs)(y,{items:`center`,gap:`$1`,px:`$2`,py:`$1`,rounded:`$2`,borderWidth:1,borderColor:`$borderColor`,bg:`var(--white-05)`,hoverStyle:{bg:`$hover`},children:[(0,H.jsx)(U,{fontSize:`$1`,color:`$color`,fontWeight:`600`,children:n(t===`apps`?`Docs`:`Install`)}),(0,H.jsx)(KG,{size:11,"aria-hidden":!0})]})})]}),(0,H.jsx)(U,{fontSize:`$2`,color:`$soft`,numberOfLines:2,flex:1,children:e.description}),(0,H.jsx)(y,{items:`center`,pt:`$1`,children:(0,H.jsx)(U,{fontFamily:`$mono`,fontVariant:[`tabular-nums`],fontSize:`$1`,color:`$soft`,children:e.kind===`MCP`?`MCP`:n(`native`)})})]})}function g6({row:e,onChange:t}){let{t:n}=R(),{isAuthenticated:r,accessToken:i}=lW(),[a,o]=(0,V.useState)(!1),[s,c]=(0,V.useState)(null),l=async n=>{if(!r||!i){K3();return}o(!0),c(null);try{let r=await fetch(`${uG()}/v1/provider/${encodeURIComponent(e.id)}/${n}`,{method:`POST`,headers:{...TG(),"Content-Type":`application/json`},body:`{}`});if(!r.ok)throw p6(r);let i=await r.json();i.authorizeUrl&&window.open(i.authorizeUrl,`_blank`,`noopener,noreferrer`),t()}catch(e){c(e)}finally{o(!1)}},u=(e,t,n,r)=>(0,H.jsxs)(XS,{render:`button`,onClick:()=>void l(n),"aria-label":t,"aria-disabled":a,px:`$3`,py:`$1.5`,rounded:`$3`,borderWidth:1,borderColor:`$borderColor`,hoverStyle:{bg:`$hover`},opacity:a?.5:1,display:`flex`,items:`center`,gap:`$1`,children:[r,(0,H.jsx)(U,{fontSize:`$2`,color:`$ink`,fontWeight:`500`,children:e})]});return(0,H.jsxs)(z,{items:`center`,gap:`$2`,p:`$4`,borderWidth:1,borderColor:`$borderColor`,rounded:`$4`,bg:`$raised`,children:[e.connected?(0,H.jsxs)(y,{self:`flex-start`,items:`center`,gap:`$1`,"aria-label":n(`Connected`),children:[(0,H.jsx)(XS,{width:6,height:6,rounded:3,bg:`$ink`}),(0,H.jsx)(U,{fontSize:`$1`,color:`$soft`,children:n(`Connected`)})]}):null,(0,H.jsxs)(z,{items:`center`,gap:`$2`,pt:e.connected?0:`$3`,children:[(0,H.jsx)(A3,{org:e.id,size:40}),(0,H.jsx)(U,{fontSize:`$3`,fontWeight:`500`,color:`$ink`,text:`center`,numberOfLines:1,children:e.name}),(0,H.jsx)(U,{fontSize:`$1`,color:`$soft`,text:`center`,numberOfLines:1,children:s6(e,n)})]}),(0,H.jsx)(y,{gap:`$1.5`,items:`center`,justify:`center`,flexWrap:`wrap`,children:e.connected?(0,H.jsxs)(H.Fragment,{children:[u(n(`Disconnect`),n(`Disconnect {name}`,{name:e.name}),`disconnect`),e.available?u(n(`Add`),n(`Add {name}`,{name:e.name}),`connect`,(0,H.jsx)(oK,{size:12,"aria-hidden":!0})):null]}):e.available?u(n(`Connect`),n(`Connect {name}`,{name:e.name}),`connect`):null}),s?(0,H.jsx)(U,{fontSize:`$1`,color:`$soft`,text:`center`,children:F3(s,e.name,`read`,n)}):null]})}var _6=`https://hanzo.ai/pay`,v6=`https://app-dev.hanzo.ai/pay`;function y6(){return typeof window<`u`&&sG(window.location.hostname)?v6:_6}function b6(e=`/`){return x6(e,{org:wG()})}function x6(e,t){let n=new URLSearchParams;for(let[e,r]of Object.entries(t))r&&n.set(e,r);let r=n.toString(),i=y6();return e===`/`&&!r?i:`${i}${e}${r?`?${r}`:``}`}var S6=e=>`$${e.toFixed(2)}`,C6=(e,t=`en-US`)=>t===`en-US`?Number.isInteger(e)?`$${e.toLocaleString(`en-US`)}`:S6(e):new Intl.NumberFormat(t,{style:`currency`,currency:`USD`,minimumFractionDigits:Number.isInteger(e)?0:2,maximumFractionDigits:Number.isInteger(e)?0:2}).format(e);function w6(e){return Array.isArray(e)?e:[]}function T6(e,t=`en-US`){let n=e?Date.parse(e):NaN;return Number.isNaN(n)?``:new Date(n).toLocaleDateString(t,{timeZone:`UTC`,year:`numeric`,month:`short`,day:`numeric`})}var E6=(e,t)=>Object.assign(Error(t),{status:e});async function D6(e,t){let n=await fetch(`${uG()}${e}`,{headers:TG(),signal:t});if(!n.ok){let e=``;try{e=(await n.json()).detail??``}catch{}throw E6(n.status,e||`Billing answered ${n.status}`)}return await n.json()}async function O6(e){if(!hG())throw E6(401,`Sign in to see your plan`);let[t,n]=await Promise.all([D6(`/v1/billing/tier`,e),D6(`/v1/billing/balance`,e)]);return t.balance={...t.balance,effectiveAvailable:n.available,account:n.account},t}var k6=new Set([`active`,`trialing`]);async function A6(e){return w6((await D6(`/v1/billing/subscriptions`,e))?.subscriptions).find(e=>k6.has(e?.status)&&typeof e?.plan?.price==`number`)??null}function j6(e,t=ne,n=`en-US`){let r=C6(e.plan.price*Math.max(1,e.quantity||1)/100,n),i=T6(e.currentPeriodEnd,n),a=e.plan.interval||`month`,o=a===`month`?t(`{price}/month`,{price:r}):a===`year`?t(`{price}/year`,{price:r}):`${r}/${a}`;return i?e.cancelAtPeriodEnd?t(`{price} subscription, ends {date}`,{price:o,date:i}):t(`{price} subscription, renews {date}`,{price:o,date:i}):t(`{price} subscription`,{price:o})}function M6(e=!0,t=null){let[n,r]=(0,V.useState)(null);return(0,V.useEffect)(()=>{if(!e)return;let t=new AbortController;return A6(t.signal).then(e=>{t.signal.aborted||r(e)}).catch(()=>{t.signal.aborted||r(null)}),()=>t.abort()},[e,t]),n}function N6(e){let t=e?.status;return typeof t!=`number`||t===408||t===429||t>=500}function P6(e,t,n){if(`tier`in n)return{tier:n.tier,wrong:null,last:{org:t,tier:n.tier}};let r=e&&e.org===t?e:null;return N6(n.wrong)&&r?{tier:r.tier,wrong:null,last:r}:{tier:null,wrong:n.wrong,last:N6(n.wrong)?e:null}}function F6(e,t){return e&&e.org===t?{tier:e.tier,wrong:e.wrong}:{tier:null,wrong:null}}function I6(e=!0,t=null){let[n,r]=(0,V.useState)(null),[i,a]=(0,V.useState)(0),o=(0,V.useRef)(null);return(0,V.useEffect)(()=>{if(!e)return;let n=new AbortController;r(e=>e&&e.org===t?{...e,wrong:null}:e);let i=e=>{if(n.signal.aborted)return;let i=P6(o.current,t,e);o.current=i.last,r({org:t,tier:i.tier,wrong:i.wrong})};return O6(n.signal).then(e=>i({tier:e}),e=>i({wrong:e})),()=>n.abort()},[e,i,t]),{...F6(n,t),reload:(0,V.useCallback)(()=>a(e=>e+1),[])}}async function L6(e){let t=await fetch(`${uG()}/v1/ai/limits`,{headers:TG(),signal:e});if(!t.ok)throw Object.assign(Error(`Limits answered ${t.status}`),{status:t.status});return t.json()}var R6=(e=!0,t=null,n)=>L2(e?L6:null,t,n),z6=({limits:e,answered:t})=>t&&!o2(e),B6={thread:null,session:null,channel:null,bucket:null,emptied:0,settings:null,agents:[],aside:null},V6=B6;if(typeof window<`u`)try{let e=new URLSearchParams(window.location.search),t=e.get(`thread`),n=e.get(`session`),r=e.get(`agent`),i=e.get(`aside`);(t||n||r||i)&&(V6={...B6,thread:t??B6.thread,session:n??B6.session,agents:r?r.split(`,`).map(e=>e.trim()).filter(Boolean):B6.agents,aside:i??B6.aside})}catch{}var H6=new Set;function U6(e){if(e.thread!==V6.thread||e.session!==V6.session||e.channel!==V6.channel||e.bucket!==V6.bucket||e.emptied!==V6.emptied||e.settings!==V6.settings||e.agents.join(`
|
|
177
177
|
`)!==V6.agents.join(`
|
|
@@ -189,6 +189,6 @@ ${SZ(`class="rim"`,`class="core"`)}
|
|
|
189
189
|
`).split(`
|
|
190
190
|
`).map(e=>e.trimEnd()).filter(e=>e!==``).map(e=>{let t=[],i=0;for(let a of e.matchAll(/(?<![\w.@-])@([\w.-]+)/g)){let o=n.get(a[1].replace(/[.-]+$/,``).toLowerCase());if(!o)continue;let s=a.index+1+a[1].replace(/[.-]+$/,``).length;a.index>i&&t.push({type:`text`,text:e.slice(i,a.index)}),t.push({type:`reference`,attrs:{id:`person-${o.id}`,objectclass:`contact:class:Person`,label:o.name}}),i=s,r=!0}return i<e.length&&t.push({type:`text`,text:e.slice(i)}),{type:`paragraph`,content:t}});return r?JSON.stringify({type:`doc`,content:i}):null},aie=e=>e.replace(/\r\n/g,`
|
|
191
191
|
`).split(`
|
|
192
|
-
`).map(e=>e.trimEnd()).filter(e=>e!==``).map(e=>`<p>${V8(e)}</p>`).join(``)||`<p></p>`,oie={"&":`&`,"<":`<`,">":`>`,""":`"`,"'":`'`,""":`"`," ":` `},sie=e=>e.replace(/&(?:amp|lt|gt|quot|nbsp|#39|#34);/g,e=>oie[e]??e),V8=e=>e.replace(/[&<>"']/g,e=>`&${{"&":`amp`,"<":`lt`,">":`gt`,'"':`quot`,"'":`#39`}[e]};`),cie=/(?<![\w.@-])(@[\w.-]+)|(https?:\/\/[^\s<>()]+)/g,lie=e=>{let t=[],n=0;for(let r of e.matchAll(cie)){let i=r.index;i>n&&t.push({kind:`text`,value:e.slice(n,i)}),t.push(r[1]?{kind:`mention`,value:r[1]}:{kind:`link`,value:r[2]}),n=i+r[0].length}return n<e.length&&t.push({kind:`text`,value:e.slice(n)}),t},H8={channel:P8.channel,direct:P8.direct,message:P8.message,reply:P8.reply,reaction:P8.reaction,person:P8.person},U8=F8.create,uie=F8.remove,W8=(e,t)=>e.name||e.members.map(e=>t.find(t=>t.id===e)?.name).filter(e=>!!e).join(`, `),G8=e=>typeof e==`string`?e:``,K8=e=>typeof e==`number`?e:0,die=async e=>{let[t,n]=await Promise.all([e.find(H8.channel),e.find(H8.direct)]);return[...t.map(e=>q8(e,`channel`)),...n.map(e=>q8(e,`direct`))].filter(e=>!e.archived)},fie=e=>{let t=new Set;if(Array.isArray(e.bindings))for(let n of e.bindings)typeof n==`string`&&n.startsWith(`connect:`)&&t.add(n.slice(8));let n=G8(e.topic)||G8(e.description);for(let e of n.matchAll(/connect:([a-z0-9_-]+)/gi))e[1]&&t.add(e[1].toLowerCase());let r=G8(e.name).match(/^[a-z0-9]+-x-([a-z0-9_-]+)$/i);return r?.[1]&&t.add(r[1].toLowerCase()),t.size>0?[...t]:void 0},q8=(e,t)=>({id:G8(e._id),kind:t,name:G8(e.name),topic:G8(e.topic)||void 0,private:e.private===!0,archived:e.archived===!0,members:Array.isArray(e.members)?e.members.filter(e=>typeof e==`string`):[],connectedOrgs:fie(e)}),pie=async(e,t)=>(await e.find(H8.message,{attachedTo:t})).map(e=>Y8(e,t)).sort(J8),J8=(e,t)=>e.at-t.at||(e.id<t.id?-1:1),Y8=(e,t)=>({id:G8(e._id),room:t,author:G8(e.createdBy)||G8(e.modifiedBy),lines:tie(G8(e.message)),at:K8(e.createdOn)||K8(e.modifiedOn),replies:K8(e.replies),pinned:e.isPinned===!0}),mie=async(e,t)=>(await e.find(H8.reply,{attachedTo:t})).map(e=>({...hie(e),room:t})).sort(J8),hie=e=>Y8(e,G8(e.attachedTo)),gie=async(e,t)=>t.length===0?[]:(await e.find(H8.reaction,{attachedTo:{$in:t}})).map(e=>({id:G8(e._id),message:G8(e.attachedTo),emoji:G8(e.emoji),by:G8(e.createBy)||G8(e.createdBy)})),_ie=e=>R8({name:e}).replace(/\s+/g,` `),vie=e=>{let t=e[`contact:mixin:Employee`];return G8(e.position)||(t&&typeof t==`object`?G8(t.position):``)},yie=e=>{let t=e[`contact:mixin:Employee`],n=t&&typeof t==`object`?t.active:e.active;return typeof n==`boolean`?n:void 0},bie=async e=>(await e.find(H8.person)).map(e=>({id:G8(e.personUuid)||G8(e._id),name:_ie(G8(e.name)),avatar:G8(e.avatar)||void 0,bot:vie(e)===`Agent`||void 0,gone:yie(e)===!1||void 0})),xie=(e,t,n,r=[])=>e.write(Q8($8(),H8.message,t.id,t.id,X8(t),`messages`,Z8(e),{message:B8(n,r)})),Sie=(e,t,n,r,i=[])=>e.write(Q8($8(),H8.reply,t.id,n.id,H8.message,`replies`,Z8(e),{message:B8(r,i),objectId:t.id,objectClass:X8(t)})),Cie=(e,t,n,r)=>e.write(Q8($8(),H8.reaction,t.id,n.id,H8.message,`reactions`,Z8(e),{emoji:r})),wie=(e,t,n)=>e.write({_class:uie,objectId:n.id,objectClass:H8.reaction,objectSpace:t.id,modifiedBy:Z8(e),modifiedOn:Date.now()}),Tie=async(e,t,n,r)=>{let i=t.trim().replace(/^#+/,``).toLowerCase().replace(/[^a-z0-9_-]+/g,`-`),a=n.map(e=>e.trim().toLowerCase().replace(/[^a-z0-9_-]+/g,``)).filter(Boolean),o=`connect-${i}-${$8().slice(0,8)}`,s=Date.now(),c=Z8(e),l=a.map(e=>`connect:${e}`),u=[r?.trim(),...l].filter(Boolean).join(` · `);return await e.write({_class:U8,objectId:o,objectClass:H8.channel,objectSpace:`core:space:Space`,modifiedBy:c,modifiedOn:s,createdBy:c,createdOn:s,attributes:{name:i,topic:u,description:u,private:!1,archived:!1,members:c?[c]:[],owners:c?[c]:[],life:`standing`,bindings:l}}),o},X8=e=>e.kind===`direct`?H8.direct:H8.channel,Z8=e=>e.account??``,Q8=(e,t,n,r,i,a,o,s)=>{let c=Date.now();return{_class:U8,objectId:e,objectClass:t,objectSpace:n,modifiedBy:o,modifiedOn:c,createdBy:o,createdOn:c,attributes:s,attachedTo:r,attachedToClass:i,collection:a}},$8=()=>[...crypto.getRandomValues(new Uint8Array(16))].map(e=>e.toString(16).padStart(2,`0`)).join(``),Eie=(e,t)=>e.some(e=>{let n=G8(e.objectClass);return n!==H8.message&&n!==H8.reaction&&n!==H8.reply?!1:G8(e.objectSpace)===t||G8(e.attachedTo)===t||n!==H8.message}),e5=()=>{let{plane:e,current:t}=eH();return oV(`chat:rooms:${t?.uuid??`-`}`,()=>e?die(e):Promise.resolve([]),{enabled:!!e})},Die=e=>{let{plane:t}=eH();return oV(`chat:messages:${e??`-`}`,()=>t&&e?pie(t,e):Promise.resolve([]),{enabled:!!(t&&e)})},Oie=e=>{let{plane:t}=eH();return oV(`chat:reactions:${e.join(`,`).slice(0,200)}:${e.length}`,()=>t?gie(t,e):Promise.resolve([]),{enabled:!!t&&e.length>0})},kie=e=>{let{plane:t}=eH();return oV(`chat:replies:${e??`-`}`,()=>t&&e?mie(t,e):Promise.resolve([]),{enabled:!!(t&&e)})},t5=()=>{let{plane:e,current:t}=eH();return oV(`chat:people:${t?.uuid??`-`}`,()=>e?bie(e):Promise.resolve([]),{enabled:!!e})},Aie=e=>{let{plane:t}=eH();(0,V.useEffect)(()=>{if(t&&e)return t.watch(t=>{Eie(t,e)&&(sV(`chat:messages:${e}`),sV(`chat:reactions:`),sV(`chat:replies:`))})},[t,e])},n5=(e,t)=>{let n=t.startsWith(`hanzo:`)?t.slice(6):t;return e.find(e=>e.id===n||e.id===t)?.name||jie(n)},jie=e=>(e.length>12?`${e.slice(0,8)}…`:e)||`Someone`,Mie=e=>e.split(/[\s._-]+/).filter(Boolean).slice(0,2).map(e=>e[0].toUpperCase()).join(``)||`?`;function r5(e,t){return e?.trim()?e.trim():(t?.split(`@`)[0])?.trim()||``}function Nie(e,t){let n=r5(e,t).replace(/,/g,` `).trim();if(!n)return`HZ`;let r=n.split(/\s+/).filter(Boolean);return r.length>=2?`${r[0][0]??``}${r[r.length-1][0]??``}`.toUpperCase():n.slice(0,2).toUpperCase()}var Pie=[{id:`chat`,label:`Chat — Channels & threads`,desc:`Workspace channels, threads & teammates`,path:`/chat`},{id:`issues`,label:`Tracker — All issues`,desc:`Kanban board, list & project issues`,path:`/issues`},{id:`projects`,label:`Projects`,desc:`Every project in this space`,path:`/projects`},{id:`crm`,label:`CRM`,desc:`Investors, contacts & pipeline`,path:`/crm/investors`}];function Fie({currentOrg:e,navSpan:t,navOpen:n=!1,onToggleNav:r,surfaceTitle:i,leftSlot:a,children:o,rightSlot:s,onNavigate:c}){let[l,u]=(0,V.useState)(!1),[d,f]=(0,V.useState)(``),[p,m]=(0,V.useState)(()=>typeof window>`u`?1200:window.innerWidth),h=p<680,g=e?.displayName?.trim()||e?.name||`Hanzo AI`;(0,V.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`&&(e.preventDefault(),u(e=>!e))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let _=t5().data??[],v=e5().data??[],b=(0,V.useMemo)(()=>{let e=d.trim().toLowerCase(),t=M8(_).map(e=>({id:`bot-${e.id}`,kind:`bot`,label:e.name,desc:`Agent`,path:A8(e)})),n=v.filter(e=>e.kind===`channel`).map(e=>({id:e.id,kind:`channel`,label:`#${e.name}`,desc:e.topic??``,path:`/chat/${e.id}`})),r=[...Pie.map(e=>({...e,kind:`surface`})),...n,...t];return e?r.filter(t=>t.label.toLowerCase().includes(e)||t.desc.toLowerCase().includes(e)).slice(0,14):r.slice(0,12)},[d,_,v]),x=e=>{u(!1),f(``),c?c(e):typeof window<`u`&&window.location.assign(e)};return(0,H.jsxs)(y,{render:`header`,height:36,items:`center`,borderBottomWidth:1,shrink:0,style:{backgroundColor:X.bar,borderBottomColor:X.barRule},onLayout:e=>m(e.nativeEvent.layout.width),"data-testid":`hanzo-business-header`,children:[(0,H.jsxs)(y,{height:`100%`,width:n&&t?48+t:void 0,minW:n&&t?48+t:void 0,pl:11,pr:8,gap:2,items:`center`,borderRightWidth:n&&t?1:0,shrink:0,style:{borderRightColor:X.barRule},children:[a,r?(0,H.jsx)(y,{role:`button`,tabIndex:0,cursor:`pointer`,width:26,height:26,rounded:6,items:`center`,justify:`center`,hoverStyle:{bg:`$color3`},"aria-label":n?`Collapse sidebar`:`Expand sidebar`,"data-testid":`toggle-team-sidebar`,onPress:r,children:(0,H.jsx)(fm,{size:15,color:`$color10`})}):null,h?null:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(y,{role:`button`,tabIndex:0,cursor:`pointer`,width:26,height:26,rounded:6,items:`center`,justify:`center`,hoverStyle:{bg:`$color3`},"aria-label":`Go back`,onPress:()=>{typeof window<`u`&&window.history.back()},children:(0,H.jsx)(mp,{size:14,color:`$color10`})}),(0,H.jsx)(y,{role:`button`,tabIndex:0,cursor:`pointer`,width:26,height:26,rounded:6,items:`center`,justify:`center`,hoverStyle:{bg:`$color3`},"aria-label":`Go forward`,onPress:()=>{typeof window<`u`&&window.history.forward()},children:(0,H.jsx)(hp,{size:14,color:`$color10`})})]})]}),(0,H.jsxs)(y,{flex:1,height:`100%`,pl:12,pr:12,gap:`$2`,items:`center`,justify:`space-between`,minW:0,children:[(0,H.jsxs)(y,{items:`center`,gap:6,minW:0,shrink:1,children:[(0,H.jsx)(U,{fontSize:12.5,fontWeight:`600`,color:`$color11`,numberOfLines:1,children:g}),i&&!h?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(U,{fontSize:12,color:`$color9`,children:`/`}),(0,H.jsx)(U,{fontSize:12.5,fontWeight:`500`,color:`$color10`,numberOfLines:1,children:i})]}):null]}),(0,H.jsxs)(y,{items:`center`,justify:`flex-end`,gap:`$1.5`,minW:0,shrink:0,children:[o??(0,H.jsxs)(pt,{open:l,onOpenChange:u,placement:`bottom-end`,allowFlip:!0,stayInFrame:!0,children:[(0,H.jsx)(pt.Trigger,{asChild:!0,children:(0,H.jsx)(y,{role:`button`,tabIndex:0,cursor:`pointer`,width:h?28:240,maxW:h?28:`38vw`,height:25,px:h?0:`$2`,rounded:7,borderWidth:1,items:`center`,justify:h?`center`:`space-between`,style:{backgroundColor:X.sidebar,borderColor:X.sidebarRule},hoverStyle:{bg:`$color3`},"aria-label":`Search ${g}`,"data-testid":`slack-top-search-trigger`,children:h?(0,H.jsx)(vm,{size:13,color:`$color10`}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(y,{items:`center`,gap:`$1.5`,minW:0,flex:1,children:[(0,H.jsx)(vm,{size:12,color:`$color10`}),(0,H.jsx)(U,{fontSize:12,color:`$color10`,numberOfLines:1,children:`Search ${g}…`})]}),(0,H.jsx)(U,{fontSize:10,fontWeight:`600`,color:`$color9`,px:`$1`,py:1,rounded:`$1`,children:`⌘K`})]})})}),(0,H.jsx)(pt.Content,{role:`dialog`,"aria-label":`Jump to channel, bot, or surface`,borderWidth:1,elevation:`$4`,p:`$2`,width:460,bg:`$background`,borderColor:`$borderColor`,rounded:`$4`,style:{zIndex:1e5},children:(0,H.jsxs)(z,{gap:`$2`,width:`100%`,children:[(0,H.jsxs)(y,{height:34,px:`$2.5`,items:`center`,gap:`$2`,rounded:`$3`,bg:`$color2`,borderWidth:1,borderColor:`$borderColor`,children:[(0,H.jsx)(vm,{size:14,color:`$color10`}),(0,H.jsx)(ht,{flex:1,height:30,fontSize:13,borderWidth:0,bg:`transparent`,placeholder:`Jump to a channel, bot or issue board…`,value:d,onChangeText:f,autoFocus:!0})]}),(0,H.jsx)(z,{gap:`$0.5`,maxH:340,style:{overflowY:`auto`},children:b.map(e=>(0,H.jsxs)(y,{role:`menuitem`,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2.5`,py:`$1.5`,rounded:`$3`,hoverStyle:{bg:`$color3`},onPress:()=>x(e.path),children:[(0,H.jsx)(z,{width:24,height:24,rounded:`$2`,bg:`$color3`,items:`center`,justify:`center`,shrink:0,children:e.kind===`bot`?(0,H.jsx)(vp,{size:13,color:`$color11`}):e.kind===`channel`?(0,H.jsx)(Yp,{size:13,color:`$color11`}):(0,H.jsx)(Tm,{size:13,color:`$color11`})}),(0,H.jsxs)(z,{flex:1,minW:0,children:[(0,H.jsx)(U,{fontSize:12,fontWeight:`600`,color:`$color12`,numberOfLines:1,children:e.label}),(0,H.jsx)(U,{fontSize:11,color:`$color10`,numberOfLines:1,children:e.desc})]})]},e.id))})]})})]}),s]})]})]})}function Iie({user:e,currentOrg:t,orgs:n=[],onSelectOrg:r,onCreateOrg:i,onConnectOrg:a,accounts:o=[],onSwitchAccount:s,onAddAccount:c,onSettings:l,onSignOut:u}){let[d,f]=(0,V.useState)(!1),p=t?.displayName?.trim()||t?.name||`Hanzo AI`,m=r5(e?.name,e?.email)||`Account`,h=e?.email||``,g=e?.sub||``,_=(()=>{let n=[],r=new Set;g&&(r.add(g),n.push({sub:g,owner:e?.owner||t?.name||`hanzo`,name:m,email:h||void 0,avatar:e?.avatar}));for(let e of o)e.sub&&!r.has(e.sub)&&(r.add(e.sub),n.push(e));return n})();return(0,H.jsxs)(pt,{open:d,onOpenChange:f,placement:`right-end`,allowFlip:!0,stayInFrame:!0,children:[(0,H.jsx)(pt.Trigger,{asChild:!0,children:(0,H.jsx)(z,{role:`button`,tabIndex:0,cursor:`pointer`,width:32,height:32,rounded:Q.pill,items:`center`,justify:`center`,position:`relative`,hoverStyle:{bg:`$color3`},"aria-label":`${m} · Account & settings`,"aria-haspopup":`menu`,"aria-expanded":d,"data-testid":`rail-account-menu-trigger`,onKeyDown:e=>{(e?.key===`Enter`||e?.key===` `)&&(e.preventDefault?.(),f(!d))},children:e?.avatar?(0,H.jsx)(kZ,{org:{name:m,logo:e.avatar},size:28}):(0,H.jsx)(z,{width:28,height:28,rounded:Q.pill,items:`center`,justify:`center`,style:{backgroundColor:X.avatar},children:(0,H.jsx)(U,{fontSize:11,fontWeight:`600`,style:{color:X.avatarInk},children:Nie(e?.name,e?.email)})})})}),(0,H.jsx)(pt.Content,{role:`menu`,"aria-label":`Account menu`,borderWidth:1,elevation:`$4`,p:`$2`,width:300,bg:`$background`,borderColor:`$borderColor`,rounded:`$4`,style:{zIndex:1e5},children:(0,H.jsxs)(z,{gap:`$1`,width:`100%`,children:[(0,H.jsxs)(y,{items:`center`,gap:`$2.5`,px:`$2`,py:`$2`,rounded:`$3`,bg:`$color2`,children:[(0,H.jsx)(kZ,{org:{name:m,logo:e?.avatar},size:36}),(0,H.jsxs)(z,{flex:1,minW:0,gap:1,children:[(0,H.jsx)(U,{fontSize:`$3`,fontWeight:`700`,color:`$color12`,numberOfLines:1,children:m}),h&&h!==m?(0,H.jsx)(U,{fontSize:`$1`,color:`$color10`,numberOfLines:1,children:h}):null,(0,H.jsxs)(y,{items:`center`,gap:`$1.5`,mt:2,children:[(0,H.jsx)(z,{width:6,height:6,rounded:Q.pill,style:{backgroundColor:bH.done}}),(0,H.jsxs)(U,{fontSize:11,fontWeight:`600`,color:`$color10`,children:[`Active · `,p]})]})]})]}),(0,H.jsx)(Lc,{borderColor:`$borderColor`,my:`$1`}),(0,H.jsxs)(z,{gap:`$0.5`,children:[(0,H.jsxs)(y,{px:`$2`,py:`$1`,items:`center`,justify:`space-between`,children:[(0,H.jsx)(U,{fontSize:`$1`,fontWeight:`700`,color:`$color10`,textTransform:`uppercase`,letterSpacing:.5,children:`Switch account`}),(0,H.jsx)(U,{fontSize:11,color:`$color9`,children:`Identities`})]}),_.map(e=>{let t=!!(g&&e.sub===g),n=e.name||e.email||e.sub;return(0,H.jsxs)(y,{role:`menuitem`,"aria-checked":t,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2`,py:`$1.5`,rounded:`$3`,bg:t?`$color3`:`transparent`,hoverStyle:{bg:`$color3`},onPress:()=>{f(!1),t||s?.(e)},children:[(0,H.jsx)(kZ,{org:{name:n,logo:e.avatar},size:24}),(0,H.jsxs)(z,{flex:1,minW:0,children:[(0,H.jsx)(U,{fontSize:`$2`,fontWeight:t?`600`:`500`,color:`$color12`,numberOfLines:1,children:n}),(0,H.jsx)(U,{fontSize:`$1`,color:`$color10`,numberOfLines:1,children:e.email&&e.email!==n?e.email:t?`Current account`:`Identity · ${e.owner}`})]}),t?(0,H.jsx)(Vt,{size:14,color:`$color12`}):null]},e.sub)}),c?(0,H.jsxs)(y,{role:`menuitem`,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2`,py:`$1.5`,rounded:`$3`,hoverStyle:{bg:`$color3`},onPress:()=>{f(!1),c()},children:[(0,H.jsx)(z,{width:24,height:24,rounded:Q.pill,bg:`$color3`,items:`center`,justify:`center`,children:(0,H.jsx)(Pm,{size:13,color:`$color11`})}),(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`500`,color:`$color12`,children:`Add another account`})]}):null]}),(0,H.jsx)(Lc,{borderColor:`$borderColor`,my:`$1`}),(0,H.jsxs)(z,{gap:`$0.5`,children:[(0,H.jsxs)(y,{px:`$2`,py:`$1`,items:`center`,justify:`space-between`,children:[(0,H.jsx)(U,{fontSize:`$1`,fontWeight:`700`,color:`$color10`,textTransform:`uppercase`,letterSpacing:.5,children:`Switch organization`}),(0,H.jsx)(U,{fontSize:11,color:`$color9`,children:p})]}),n.slice(0,5).map(e=>{let n=e.name===t?.name,i=e.displayName?.trim()||e.name;return(0,H.jsxs)(y,{role:`menuitem`,"aria-checked":n,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2`,py:`$1.5`,rounded:`$3`,bg:n?`$color3`:`transparent`,hoverStyle:{bg:`$color3`},onPress:()=>{f(!1),n||r?.(e.name)},children:[(0,H.jsx)(kZ,{org:{name:i,logo:e.logo},size:20}),(0,H.jsx)(U,{flex:1,fontSize:`$2`,fontWeight:n?`600`:`500`,color:`$color12`,numberOfLines:1,children:i}),n?(0,H.jsx)(Vt,{size:14,color:`$color12`}):null]},e.name)}),i?(0,H.jsxs)(y,{role:`menuitem`,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2`,py:`$1.5`,rounded:`$3`,hoverStyle:{bg:`$color3`},onPress:()=>{f(!1),i()},children:[(0,H.jsx)(z,{width:20,height:20,rounded:Q.field,bg:`$color3`,items:`center`,justify:`center`,children:(0,H.jsx)(hm,{size:12,color:`$color11`})}),(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`500`,color:`$color12`,children:`Create new organization…`})]}):null,a?(0,H.jsxs)(y,{role:`menuitem`,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2`,py:`$1.5`,rounded:`$3`,hoverStyle:{bg:`$color3`},onPress:()=>{f(!1),a()},children:[(0,H.jsx)(z,{width:20,height:20,rounded:Q.field,bg:`$color3`,items:`center`,justify:`center`,children:(0,H.jsx)(bm,{size:12,color:`$color11`})}),(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`500`,color:`$color12`,children:`Hanzo Connect (share channel)…`})]}):null]}),(0,H.jsx)(Lc,{borderColor:`$borderColor`,my:`$1`}),(0,H.jsxs)(z,{gap:`$0.5`,children:[(0,H.jsxs)(y,{items:`center`,justify:`space-between`,px:`$2`,py:`$1.5`,rounded:`$3`,children:[(0,H.jsx)(U,{fontSize:`$2`,color:`$color12`,children:`Theme`}),(0,H.jsx)(IZ,{})]}),l?(0,H.jsxs)(y,{role:`menuitem`,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2`,py:`$1.5`,rounded:`$3`,hoverStyle:{bg:`$color3`},onPress:()=>{f(!1),l()},children:[(0,H.jsx)(ym,{size:15,color:`$color10`}),(0,H.jsx)(U,{flex:1,fontSize:`$2`,color:`$color12`,children:`Settings & Preferences`}),(0,H.jsx)(U,{fontSize:11,color:`$color9`,children:`⌘,`})]}):null]}),u?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Lc,{borderColor:`$borderColor`,my:`$1`}),(0,H.jsxs)(y,{role:`menuitem`,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2`,py:`$1.5`,rounded:`$3`,hoverStyle:{bg:`$color3`},onPress:()=>{f(!1),u()},children:[(0,H.jsx)(rm,{size:15,color:X.alert}),(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`500`,style:{color:X.alert},children:`Sign out`})]})]}):null]})})]})}var i5=(e,t)=>({role:`button`,tabIndex:0,cursor:`pointer`,...t?{"aria-label":t}:{},onPress:e,onKeyDown:t=>{(t.nativeEvent.key===`Enter`||t.nativeEvent.key===` `)&&(t.preventDefault(),e())}}),a5=new Set,o5=null,s5=(e=`connect`)=>{o5=e;for(let e of a5)e(o5)},c5=()=>{o5=null;for(let e of a5)e(null)};function Lie(){let[e,t]=(0,V.useState)(o5),n=xi(),{all:r,current:i,plane:o}=eH(),[s,c]=(0,V.useState)(`lux`),[l,u]=(0,V.useState)(``),[d,f]=(0,V.useState)(`hanzo-x-lux`),[p,m]=(0,V.useState)(`Cross-organization engineering, shared agents & delivery`),[h,g]=(0,V.useState)(!1);(0,V.useEffect)(()=>{let e=e=>t(e);return a5.add(e),()=>{a5.delete(e)}},[]);let _=i?.url??`hanzo`,v=i?.name??`Hanzo AI`,b=r.filter(e=>e.url!==_),x=(l.trim()||s||`partner`).toLowerCase().replace(/[^a-z0-9-]+/g,`-`).replace(/^-|-$/g,``);if((0,V.useEffect)(()=>{x&&f(`${_}-x-${x}`)},[_,x]),!e)return null;let S=async()=>{if(!o||h)return;let e=x||`partner`,t=d.trim().toLowerCase().replace(/^#+/,``).replace(/[^a-z0-9-]+/g,`-`).replace(/^-|-$/g,``)||`${_}-x-${e}`;g(!0);try{let r=await Tie(o,t,[e],p);sV(`chat:rooms:`),c5(),n(`/chat/${r}`)}finally{g(!1)}};return(0,H.jsx)(z,{position:`fixed`,t:0,l:0,r:0,b:0,z:1e5,items:`center`,justify:`center`,p:16,style:{backgroundColor:`var(--team-backdrop, rgba(0, 0, 0, 0.65))`,backdropFilter:`blur(4px)`},onPress:()=>c5(),children:(0,H.jsxs)(z,{width:`100%`,maxW:520,rounded:Q.card,bg:`$panel`,borderWidth:1,borderColor:`$edge`,p:20,gap:16,onPress:e=>e.stopPropagation?.(),"data-testid":`hanzo-connect-modal`,children:[(0,H.jsxs)(y,{items:`center`,justify:`space-between`,gap:12,children:[(0,H.jsxs)(y,{items:`center`,gap:10,children:[(0,H.jsx)(z,{width:32,height:32,rounded:Q.field,bg:`$background`,borderWidth:1,borderColor:`$edge`,items:`center`,justify:`center`,children:(0,H.jsx)(bm,{size:16,color:`$ink`})}),(0,H.jsxs)(z,{children:[(0,H.jsx)(a,{fontSize:Z.row,fontWeight:`700`,color:`$ink`,children:`Hanzo Connect`}),(0,H.jsx)(a,{fontSize:Z.chip,color:`$soft`,children:`Multi-org shared channels & isolated organization workspaces`})]})]}),(0,H.jsx)(y,{...i5(()=>c5(),`Close Hanzo Connect modal`),px:8,py:4,rounded:Q.field,hoverStyle:{background:`$hover`},children:(0,H.jsx)(a,{fontSize:Z.body,color:`$soft`,children:`✕`})})]}),(0,H.jsx)(y,{bg:`$background`,p:3,rounded:Q.field,borderWidth:1,borderColor:`$edge`,gap:4,children:(0,H.jsxs)(y,{flex:1,...i5(()=>t(`connect`),`Connect organizations tab`),py:7,px:10,rounded:Q.field,items:`center`,justify:`center`,gap:6,bg:e===`connect`?`$panel`:`transparent`,children:[(0,H.jsx)(bm,{size:14,color:e===`connect`?`$ink`:`$soft`}),(0,H.jsx)(a,{fontSize:Z.body,fontWeight:e===`connect`?`600`:`500`,color:e===`connect`?`$ink`:`$soft`,children:`Connect Orgs (Shared Channel)`})]})}),(0,H.jsx)(H.Fragment,{children:(0,H.jsxs)(z,{gap:14,children:[(0,H.jsxs)(y,{p:12,rounded:Q.field,bg:`$background`,borderWidth:1,borderColor:`$edge`,items:`center`,justify:`space-between`,gap:8,children:[(0,H.jsxs)(z,{gap:2,children:[(0,H.jsx)(a,{fontSize:Z.chip,color:`$faint`,children:`HOST ORGANIZATION`}),(0,H.jsxs)(a,{fontSize:Z.body,fontWeight:`700`,color:`$ink`,children:[v,` (`,_,`)`]})]}),(0,H.jsxs)(y,{px:8,py:3,rounded:Q.pill,bg:`$panel`,borderWidth:1,borderColor:`$edge`,items:`center`,gap:5,children:[(0,H.jsx)(qp,{size:12,color:`$ink`}),(0,H.jsxs)(a,{fontSize:Z.chip,fontWeight:`600`,color:`$ink`,children:[`connect:`,x||`org`]})]}),(0,H.jsxs)(z,{gap:2,items:`flex-end`,children:[(0,H.jsx)(a,{fontSize:Z.chip,color:`$faint`,children:`PARTNER ORGANIZATION`}),(0,H.jsx)(a,{fontSize:Z.body,fontWeight:`700`,color:`$ink`,children:x||`partner`})]})]}),(0,H.jsxs)(z,{gap:6,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`600`,color:`$quiet`,children:`Select or enter partner organization slug`}),(0,H.jsx)(y,{gap:6,flexWrap:`wrap`,children:b.map(e=>{let t=!l.trim()&&s===e.url;return(0,H.jsxs)(y,{...i5(()=>{u(``),c(e.url)},`Select ${e.name}`),px:10,py:5,rounded:Q.pill,bg:t?`$ink`:`$background`,borderWidth:1,borderColor:t?`$ink`:`$edge`,items:`center`,gap:5,children:[t?(0,H.jsx)(Vt,{size:12,color:`$background`}):null,(0,H.jsxs)(a,{fontSize:Z.chip,fontWeight:`600`,color:t?`$background`:`$ink`,children:[e.name,` (`,e.url,`)`]})]},e.url)})}),(0,H.jsx)(y,{px:10,py:6,rounded:Q.field,bg:`$background`,borderWidth:1,borderColor:`$edge`,children:(0,H.jsx)(`input`,{value:l,onChange:e=>u(e.target.value),placeholder:`Or enter external organization slug (e.g. acme, skully, partner)...`,style:{width:`100%`,border:`none`,background:`transparent`,color:`inherit`,fontSize:13,outline:`none`}})})]}),(0,H.jsxs)(z,{gap:6,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`600`,color:`$quiet`,children:`Shared channel name`}),(0,H.jsxs)(y,{items:`center`,gap:6,px:10,py:6,rounded:Q.field,bg:`$background`,borderWidth:1,borderColor:`$edge`,children:[(0,H.jsx)(Yp,{size:14,color:`$soft`}),(0,H.jsx)(`input`,{value:d,onChange:e=>f(e.target.value),placeholder:`hanzo-x-partner`,style:{flex:1,border:`none`,background:`transparent`,color:`inherit`,fontSize:13,outline:`none`}})]})]}),(0,H.jsxs)(z,{gap:6,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`600`,color:`$quiet`,children:`Channel purpose & agent scope`}),(0,H.jsx)(y,{px:10,py:6,rounded:Q.field,bg:`$background`,borderWidth:1,borderColor:`$edge`,children:(0,H.jsx)(`input`,{value:p,onChange:e=>m(e.target.value),placeholder:`Cross-org engineering, shared agents & delivery`,style:{width:`100%`,border:`none`,background:`transparent`,color:`inherit`,fontSize:13,outline:`none`}})})]}),(0,H.jsxs)(a,{fontSize:Z.chip,color:`$soft`,children:[`Both organizations keep strict tenant isolation (separate IAM, KMS secrets, private repos, and billing) while humans and AI agents (@vi, @dev, @mark) collaborate in real time inside #`,d||`${_}-x-${x}`,`.`]}),(0,H.jsxs)(y,{justify:`flex-end`,gap:8,pt:4,children:[(0,H.jsx)(y,{...i5(()=>c5(),`Cancel`),px:12,py:8,rounded:Q.field,borderWidth:1,borderColor:`$edge`,children:(0,H.jsx)(a,{fontSize:Z.body,color:`$quiet`,children:`Cancel`})}),(0,H.jsxs)(y,{...i5(()=>void S(),`Connect and create shared channel`),px:14,py:8,rounded:Q.field,bg:`$ink`,items:`center`,gap:6,children:[(0,H.jsx)(bm,{size:14,color:`$background`}),(0,H.jsx)(a,{fontSize:Z.body,fontWeight:`600`,color:`$background`,children:h?`Connecting…`:`Connect & Share Channel`})]})]})]})})]})})}var l5=e=>{let t=e,n=new Set;return{set:e=>{if(e!==t){t=e;for(let e of n)e()}},use:()=>(0,V.useSyncExternalStore)(e=>(n.add(e),()=>n.delete(e)),()=>t,()=>e)}},u5=l5(0),d5=l5(null),Rie=u5.set,f5=u5.use,zie=d5.set;d5.use;var p5=[{id:`chat`,label:`Chat`,icon:lm,path:`/chat`},{id:`bots`,label:`Bots`,icon:vp,path:`/bots`},{id:`tracker`,label:`Tracker`,icon:Tm,path:`/issues`},{id:`crm`,label:`CRM`,icon:bp,path:`/crm`}],m5=e=>p5.find(t=>e===t.path||e.startsWith(`${t.path}/`)||t.id===`tracker`&&(e===`/mine`||e.startsWith(`/mine/`)||e===`/projects`||e===`/projects/`||e.startsWith(`/projects/`))),h5={outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},g5={backgroundColor:X.railActive},Bie={background:X.alert},Vie=({notices:e,onNotices:t,onSurface:n,account:r})=>{let{pathname:i}=yi(),o=f5(),s=r?.orgs&&r.orgs.length>0?r.orgs:r?.currentOrg?.name||r?.currentOrg?.displayName?[r.currentOrg]:[];return(0,H.jsxs)(z,{width:48,shrink:0,height:`100%`,items:`center`,justify:`space-between`,pt:6,pb:8,borderRightWidth:1,style:{backgroundColor:X.rail,borderRightColor:X.railRule},"data-parity-key":`shell.rail`,children:[(0,H.jsx)(U_,{flex:1,minH:0,width:`100%`,children:(0,H.jsxs)(z,{items:`center`,width:`100%`,gap:4,children:[s.length>0?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(z,{items:`center`,width:`100%`,gap:5,"data-parity-key":`shell.orgs`,children:[s.slice(0,5).map(e=>{let t=e.name===r?.currentOrg?.name||s.length===1,n=e.displayName?.trim()||e.name||`Workspace`;return(0,H.jsxs)(Ym,{children:[(0,H.jsx)(Xm,{children:(0,H.jsxs)(z,{...i5(()=>r?.onSelectOrg?.(e.name),`${n} organization`),width:32,height:32,rounded:9,items:`center`,justify:`center`,position:`relative`,style:t?g5:void 0,hoverStyle:t?void 0:{background:`$hover`},focusVisibleStyle:h5,children:[t?(0,H.jsx)(z,{position:`absolute`,l:-6,width:3,height:16,rounded:Q.pill,style:{backgroundColor:X.railFgActive}}):null,(0,H.jsx)(kZ,{org:{name:n,logo:e.logo},size:22})]})}),(0,H.jsx)(Qm,{children:n})]},e.name||n)}),r?.onConnectOrg?(0,H.jsxs)(Ym,{children:[(0,H.jsx)(Xm,{children:(0,H.jsx)(z,{...i5(r.onConnectOrg,`Connect or switch organization`),width:28,height:28,rounded:8,items:`center`,justify:`center`,hoverStyle:{background:`$hover`},focusVisibleStyle:h5,children:(0,H.jsx)(hm,{size:15,color:X.railFg})})}),(0,H.jsx)(Qm,{children:`Connect organization`})]}):null]}),(0,H.jsx)(_5,{})]}):null,(0,H.jsxs)(v5,{label:o>0?`${e?`Hide`:`Show`} Activity (${o} unread)`:e?`Hide Activity`:`Show Activity`,pressed:e,onPress:t,children:[(0,H.jsx)(_p,{size:18,color:e?X.railFgActive:X.railFg}),o>0?(0,H.jsx)(z,{position:`absolute`,t:2,r:2,minW:14,height:14,px:3,rounded:Q.pill,items:`center`,justify:`center`,style:Bie,children:(0,H.jsx)(a,{fontSize:9,lineHeight:11,fontWeight:`700`,style:{color:X.panel},children:o})}):null]}),(0,H.jsx)(_5,{}),p5.map(e=>{let t=m5(i)?.id===e.id;return(0,H.jsx)(v5,{label:e.label,here:t,onPress:()=>n(e.path),children:(0,H.jsx)(e.icon,{size:18,color:t?X.railFgActive:X.railFg})},e.id)})]})}),(0,H.jsxs)(z,{items:`center`,width:`100%`,gap:6,pt:6,children:[r?.onSettings?(0,H.jsx)(v5,{label:`Preferences (⌘,)`,onPress:r.onSettings,children:(0,H.jsx)(Sm,{size:16,color:X.railFg})}):null,(0,H.jsx)(Iie,{...r})]})]})},_5=()=>(0,H.jsx)(Lc,{width:28,my:4,borderColor:`$edge`}),v5=({label:e,here:t=!1,pressed:n,onPress:r,children:i})=>{let a=!!(t||n);return(0,H.jsxs)(Ym,{children:[(0,H.jsx)(Xm,{children:(0,H.jsx)(z,{...i5(r,e),"aria-current":t?`page`:void 0,"aria-pressed":n,width:32,height:32,items:`center`,justify:`center`,position:`relative`,rounded:8,style:a?g5:void 0,hoverStyle:a?void 0:{background:`$hover`},focusVisibleStyle:h5,children:i})}),(0,H.jsx)(Qm,{children:e})]})},y5=({nav:e,children:t,aside:n})=>{let{pathname:r}=yi(),i=xi(),{who:a,leave:o,depart:s}=dV(),{all:c,current:l,choose:u}=eH(),[d,f]=(0,V.useState)(()=>typeof window>`u`?vH:window.innerWidth),[p,m]=(0,V.useState)(220),[h,g]=(0,V.useState)(!1),[_,v]=(0,V.useState)(!1),[b,x]=(0,V.useState)(!1),S=gH(),C=_H(),w=d>=vH,T=d>=800,E=!!(T&&e&&!h),D=t=>{if(!T&&e&&(r===t||r.startsWith(`${t}/`)))return v(!0);if(T&&e&&h&&(r===t||r.startsWith(`${t}/`))){g(!1);return}i(t)},O=c,k=l??O[0],A=a?{sub:a.id,name:a.label||a.name,email:a.email,avatar:a.avatar,owner:k?.org??``}:{sub:``,name:``,email:``,owner:``},j={name:k?.url??``,displayName:k?.name??``},ee=O.map(e=>({name:e.url,displayName:e.name}));return(0,H.jsxs)(ev,{bg:`$background`,children:[(0,H.jsx)(Fie,{currentOrg:j,onNavigate:D,navSpan:p+1,navOpen:E,onToggleNav:e?()=>{T?g(e=>!e):v(e=>!e)}:void 0,surfaceTitle:m5(r)?.label}),(0,H.jsxs)(y,{flex:1,minH:0,onLayout:e=>f(e.nativeEvent.layout.width),children:[(0,H.jsx)(Vie,{notices:!!n&&(w?S&&C===`inbox`:b),onNotices:()=>{w?mH(`inbox`):(pH(`inbox`),x(!b))},onSurface:D,account:{user:A,currentOrg:j,orgs:ee,onSelectOrg:e=>u(e),onConnectOrg:()=>s5(`connect`),onAddAccount:()=>void s(`another`),onSettings:()=>O8(`general`),onSignOut:()=>o()}}),E?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(z,{width:p,shrink:0,minH:0,style:{backgroundColor:X.sidebar},"data-parity-key":`shell.nav`,children:e}),(0,H.jsx)(Hie,{value:p,onChange:m})]}):null,(0,H.jsxs)(y,{flex:1,minW:0,minH:0,pt:0,pb:0,pr:0,gap:0,children:[(0,H.jsx)(b5,{parity:`shell.main`,children:t}),n&&S&&w?(0,H.jsx)(z,{width:284,shrink:0,borderLeftWidth:1,style:{borderLeftColor:X.sidebarRule},children:(0,H.jsx)(b5,{parity:`shell.aside`,children:n})}):null]})]}),(0,H.jsx)($S,{open:!!n&&!w&&b,onOpenChange:x,children:(0,H.jsx)(nC,{side:`right`,width:284,p:0,bg:`$panel`,children:n})}),(0,H.jsx)($S,{open:!!e&&_&&!T,onOpenChange:v,children:(0,H.jsx)(nC,{side:`left`,width:220,p:0,style:{backgroundColor:X.sidebar},children:e})}),(0,H.jsx)(Lie,{}),(0,H.jsx)(Qre,{user:A,orgName:j.displayName})]})},b5=({parity:e,children:t})=>(0,H.jsx)(z,{flex:1,minW:0,minH:0,rounded:0,overflow:`hidden`,style:{backgroundColor:X.panel},"data-parity-key":e,children:t}),Hie=({value:e,onChange:t})=>{let n=(0,V.useRef)(0),r=(0,V.useRef)(e),i=(0,V.useRef)(!1),a=e=>Math.min(340,Math.max(188,e));return(0,H.jsx)(z,{role:`separator`,"aria-orientation":`vertical`,"aria-label":`Resize the navigator`,"aria-valuenow":e,"aria-valuemin":188,"aria-valuemax":340,tabIndex:0,width:1,shrink:0,position:`relative`,cursor:`col-resize`,style:{backgroundColor:X.sidebarRule},hoverStyle:{bg:`$soft`},focusVisibleStyle:{bg:`$outlineColor`},onPointerDown:t=>{i.current=!0,n.current=t.clientX,r.current=e,t.currentTarget.setPointerCapture?.(t.pointerId)},onPointerMove:e=>{i.current&&t(a(r.current+e.clientX-n.current))},onPointerUp:e=>{i.current=!1,e.currentTarget.releasePointerCapture?.(e.pointerId)},onPointerCancel:()=>{i.current=!1},onKeyDown:n=>{let r=n.shiftKey?1:8;n.key===`ArrowLeft`&&t(a(e-r)),n.key===`ArrowRight`&&t(a(e+r))},children:(0,H.jsx)(z,{position:`absolute`,t:0,b:0,l:-8,r:-8})})},x5={outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},S5={flexDirection:`row`},C5=({title:e,children:t})=>(0,H.jsxs)(z,{flex:1,minH:0,pt:6,pb:8,children:[(0,H.jsx)(y,{height:36,px:10,pb:4,items:`center`,justify:`space-between`,children:(0,H.jsxs)(y,{items:`center`,gap:4,minW:0,children:[(0,H.jsx)(a,{fontSize:Z.row,fontWeight:`600`,color:`$ink`,numberOfLines:1,children:e}),(0,H.jsx)(wp,{size:13,color:`$soft`})]})}),t]}),w5=({value:e,onChange:t})=>(0,H.jsxs)(y,{mx:10,height:30,items:`center`,gap:8,px:12,rounded:Q.field,borderWidth:1,borderColor:`$edge`,bg:`$panel`,focusWithinStyle:x5,children:[(0,H.jsx)(vm,{size:16,color:`$soft`}),(0,H.jsx)(k_,{flex:1,unstyled:!0,height:28,borderWidth:0,bg:`transparent`,fontSize:Z.body,color:`$ink`,placeholderTextColor:`$faint`,placeholder:`Search…`,value:e,onChangeText:t})]}),T5=()=>(0,H.jsx)(Lc,{my:6,mx:10,borderColor:`$edge`}),E5=({children:e,count:t,open:n=!0,onToggle:r})=>(0,H.jsxs)(y,{...r?i5(r):{},height:26,items:`center`,justify:`space-between`,px:10,gap:5,children:[(0,H.jsxs)(y,{items:`center`,gap:4,minW:0,flex:1,children:[r?(0,H.jsx)(Uie,{open:n}):null,(0,H.jsx)(a,{fontSize:12,fontWeight:`500`,color:`$soft`,numberOfLines:1,children:e})]}),t===void 0?null:(0,H.jsx)(a,{fontSize:Z.chip,color:`$faint`,children:t})]}),Uie=({open:e=!0})=>(0,H.jsx)(z,{width:18,height:18,items:`center`,justify:`center`,rotate:e?`0deg`:`-90deg`,children:(0,H.jsx)(z,{width:7,height:7,borderBottomWidth:1.5,borderRightWidth:1.5,borderColor:`$soft`,rotate:`45deg`,mt:-3})}),D5=({to:e,icon:t,children:n,indent:r})=>{let{pathname:i}=yi(),o=i===e||i.startsWith(`${e}/`);return(0,H.jsx)(y,{asChild:!0,style:o?{...S5,backgroundColor:X.rowActive}:S5,height:r?27:29,items:`center`,gap:8,pl:r?32:8,pr:8,mx:6,rounded:8,hoverStyle:o?void 0:{bg:`$hover`},focusVisibleStyle:x5,children:(0,H.jsxs)(ja,{to:e,"aria-current":o?`page`:void 0,children:[t?(0,H.jsx)(z,{width:18,height:18,items:`center`,justify:`center`,children:t}):null,(0,H.jsx)(a,{fontSize:Z.small,fontWeight:o?`500`:`400`,color:o?`$ink`:`$quiet`,numberOfLines:1,children:n})]})})},Wie=({icon:e,children:t,open:n,onPress:r})=>(0,H.jsxs)(y,{...i5(r),"aria-expanded":n,height:29,items:`center`,gap:8,px:10,mx:4,rounded:Q.field,hoverStyle:{bg:`$hover`},focusVisibleStyle:x5,children:[e?(0,H.jsx)(z,{width:18,height:18,items:`center`,justify:`center`,children:e}):null,(0,H.jsx)(a,{fontSize:Z.row,color:`$quiet`,numberOfLines:1,children:t})]}),Gie=({children:e})=>(0,H.jsxs)(z,{position:`relative`,children:[(0,H.jsx)(z,{position:`absolute`,l:23,t:0,b:0,width:1,bg:`$edge`}),e]}),O5=({children:e})=>(0,H.jsx)(U_,{flex:1,minH:0,children:(0,H.jsx)(z,{pb:10,children:e})}),Kie=36,k5=21,A5=9,j5=18,qie=e=>e.split(/\s+/).slice(0,2).map(e=>e[0]??``).join(``).toUpperCase(),M5=({spans:e,clamp:t,parity:n})=>(0,H.jsx)(a,{"data-parity-key":n,size:Z.body,lineHeight:k5,color:X.mute,numberOfLines:t,children:e.map((e,t)=>(0,H.jsx)(a,{size:Z.body,lineHeight:k5,fontWeight:e.strong?`600`:`400`,color:e.mention?X.alert:e.strong?X.ink:X.mute,children:e.text},t))}),Jie=({note:e,onSee:t})=>(0,H.jsxs)(y,{"data-parity-key":`inbox.row`,"data-seen":e.seen?`yes`:`no`,...i5(()=>t(e.id),e.line.map(e=>e.text).join(``)),px:10,py:DH.inset,gap:DH.tight,bg:e.seen?`transparent`:X.card,borderBottomWidth:1,borderColor:X.rule,hoverStyle:{background:X.card},focusVisibleStyle:kH,children:[(0,H.jsxs)(Bh,{"data-parity-key":`inbox.face`,size:Kie,children:[e.actor.face?(0,H.jsx)(Vh,{src:e.actor.face,alt:``}):null,(0,H.jsx)(Hh,{bg:CH(e.actor.name).background,children:(0,H.jsx)(a,{size:Z.small,fontWeight:`600`,color:CH(e.actor.name).color,children:qie(e.actor.name)})})]}),(0,H.jsxs)(z,{flex:1,minW:0,gap:DH.tight,children:[(0,H.jsxs)(z,{children:[(0,H.jsx)(M5,{spans:e.line,parity:`inbox.line`}),e.quote?(0,H.jsx)(M5,{spans:e.quote,clamp:1,parity:`inbox.quote`}):null]}),(0,H.jsxs)(y,{"data-parity-key":`inbox.meta`,items:`center`,gap:DH.tight,overflow:`hidden`,children:[(0,H.jsx)(a,{size:Z.small,lineHeight:j5,color:X.dim,children:(0,H.jsx)(YL,{date:new Date(e.at),format:`short`,style:{fontSize:`inherit`,lineHeight:`inherit`,color:`inherit`,whiteSpace:`nowrap`}})}),e.place?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(a,{size:Z.small,lineHeight:j5,color:X.dim,children:`•`}),(0,H.jsx)(a,{size:Z.small,lineHeight:j5,color:X.dim,numberOfLines:1,children:e.place})]}):null]})]}),(0,H.jsx)(z,{"data-parity-key":`inbox.lane`,width:A5,shrink:0,pt:6,children:e.seen?null:(0,H.jsx)(z,{"data-parity-key":`inbox.dot`,role:`img`,"aria-label":`unread`,width:A5,height:A5,rounded:Q.pill,bg:X.alert})})]}),Yie=12,Xie=12,Zie=36,Qie=6,$ie=17,N5=16,P5=24,eae={all:tm,task:Pp,chat:sm},tae={all:`All`,task:`Tasks`,chat:`Chat`},F5=e=>e.line.some(e=>e.mention||e.text.includes(`mentioned`))||(e.quote?.some(e=>e.mention)??!1),I5=({children:e})=>(0,H.jsx)(z,{flex:1,items:`center`,justify:`center`,p:10,gap:DH.inset,children:e}),nae=({tab:e,filter:t})=>{let n=LH();if(n.phase===`loading`)return(0,H.jsx)(I5,{children:(0,H.jsx)(tv,{})});if(n.phase===`failure`)return(0,H.jsxs)(I5,{children:[(0,H.jsx)(a,{size:Z.body,color:X.mute,children:`The inbox is not answering.`}),(0,H.jsx)(a,{size:Z.body,color:X.ink,textDecorationLine:`underline`,...i5(n.reload),focusVisibleStyle:kH,children:`Try again`})]});let r=jH(n.data??[],e).filter(e=>t===`unread`?!e.seen:t!==`mentions`||F5(e));return r.length===0?(0,H.jsx)(I5,{children:(0,H.jsx)(a,{size:Z.body,color:X.dim,children:t===`unread`?`All caught up — no unread notifications.`:t===`mentions`?`No mentions in this view.`:`Nothing here.`})}):(0,H.jsx)(U_,{"data-parity-key":`inbox.list`,flex:1,pt:Qie,children:(0,H.jsx)(z,{role:`list`,children:r.map(e=>(0,H.jsx)(Jie,{note:e,onSee:zH},e.id))})})},L5=()=>{let[e,t]=(0,V.useState)(`all`),[n,r]=(0,V.useState)(`all`),i=LH().data??[],o=RH(),s=i.filter(F5).length;return(0,H.jsxs)(z,{"data-parity-key":`inbox.panel`,flex:1,minH:0,children:[(0,H.jsxs)(y,{px:10,pt:Yie,items:`center`,justify:`space-between`,children:[(0,H.jsxs)(y,{items:`center`,gap:8,children:[(0,H.jsx)(a,{"data-parity-key":`inbox.title`,size:Z.row,fontWeight:`600`,color:X.ink,children:`Inbox`}),o>0?(0,H.jsx)(y,{px:7,py:2,rounded:Q.pill,items:`center`,justify:`center`,bg:X.alert,children:(0,H.jsx)(a,{size:Z.chip,fontWeight:`700`,color:X.panel,children:`${o} unread`})}):null]}),(0,H.jsxs)(y,{items:`center`,gap:6,children:[o>0?(0,H.jsx)(y,{...i5(BH,`Mark all notifications as read`),px:7,py:3,rounded:Q.field,hoverStyle:{background:X.card},focusVisibleStyle:kH,children:(0,H.jsx)(a,{size:Z.chip,fontWeight:`500`,color:X.mute,children:`Mark all read`})}):null,(0,H.jsx)(y,{"data-parity-key":`inbox.close`,...i5(hH,`Close the inbox`),width:P5,height:P5,items:`center`,justify:`center`,rounded:Q.field,hoverStyle:{background:X.card},focusVisibleStyle:kH,children:(0,H.jsx)(Rn,{size:14,color:X.dim})})]})]}),(0,H.jsxs)(sv,{value:e,onValueChange:e=>t(e),orientation:`horizontal`,flex:1,minH:0,gap:0,mt:Xie,children:[(0,H.jsx)(z,{"data-parity-key":`inbox.rail`,borderBottomWidth:1,borderColor:X.rule,children:(0,H.jsx)(cv,{height:Zie,self:`stretch`,justify:`flex-start`,items:`stretch`,p:0,pl:DH.tight,gap:DH.tight,bg:`transparent`,rounded:0,children:AH.map(t=>{let n=t===e,r=eae[t],o=t===`all`?0:MH(i,t);return(0,H.jsxs)(uv,{"data-parity-key":`inbox.tab.${t}`,value:t,height:`100%`,flexDirection:`row`,px:DH.tight,gap:`$1.5`,items:`center`,justify:`center`,rounded:0,bg:`transparent`,borderBottomWidth:2,borderColor:n?X.accent:`transparent`,activeStyle:{background:`transparent`},hoverStyle:{background:`transparent`},focusStyle:{background:`transparent`},focusVisibleStyle:kH,children:[(0,H.jsx)(r,{size:$ie,color:n?X.ink:X.dim}),(0,H.jsx)(a,{size:Z.small,fontWeight:n?`600`:`500`,color:n?X.ink:X.dim,children:tae[t]}),o>0?(0,H.jsx)(z,{"data-parity-key":`inbox.badge`,minW:N5,height:N5,px:4,rounded:Q.pill,items:`center`,justify:`center`,bg:X.alert,children:(0,H.jsx)(a,{size:Z.chip,fontWeight:`600`,color:X.panel,children:o})}):null]},t)})})}),(0,H.jsx)(y,{px:10,py:8,gap:6,items:`center`,borderBottomWidth:1,borderColor:X.rule,children:[[`all`,`All (${i.length})`],[`unread`,`Unread (${o})`],[`mentions`,`Mentions (${s})`]].map(([e,t])=>{let i=n===e;return(0,H.jsx)(y,{...i5(()=>r(e),`Filter ${t}`),px:8,py:3,rounded:Q.pill,bg:i?X.card:`transparent`,borderWidth:1,borderColor:i?X.ink:X.rule,hoverStyle:{background:X.card},focusVisibleStyle:kH,children:(0,H.jsx)(a,{size:Z.chip,fontWeight:i?`600`:`500`,color:i?X.ink:X.mute,children:t})},e)})}),AH.map(t=>(0,H.jsx)(dv,{value:t,flex:1,minH:0,children:t===e?(0,H.jsx)(nae,{tab:t,filter:n}):null},t))]})]})},rae=()=>{let{id:e}=Ci(),t=t5().data??[],n=e5().data??[],r=j8(e);if(r)return t.find(e=>e.id===r&&e.bot);let i=n.find(t=>t.id===e);return i?N8(i,t):void 0},R5=({person:e,size:t})=>(0,H.jsx)(z,{width:t,height:t,rounded:Q.pill,overflow:`hidden`,bg:`$panel`,borderWidth:1,borderColor:`$edge`,items:`center`,justify:`center`,shrink:0,children:e.avatar?(0,H.jsx)(`img`,{src:e.avatar,alt:e.name,width:t,height:t,style:{width:t,height:t,objectFit:`cover`,display:`block`}}):(0,H.jsx)(a,{fontSize:Math.max(10,t*.42),fontWeight:`600`,color:`$quiet`,children:e.name.slice(0,1).toUpperCase()})});function iae(){let e=_H(),t=rae();return!t||e===`inbox`?(0,H.jsx)(L5,{}):(0,H.jsxs)(z,{flex:1,minH:0,px:10,pt:12,pb:10,gap:14,children:[(0,H.jsxs)(y,{items:`center`,justify:`space-between`,children:[(0,H.jsx)(a,{fontSize:Z.small,fontWeight:`600`,color:`$quiet`,children:`${t.name} · Agent`}),(0,H.jsx)(y,{...i5(hH,`Close inspector`),width:24,height:24,items:`center`,justify:`center`,rounded:Q.field,hoverStyle:{background:X.card},focusVisibleStyle:kH,children:(0,H.jsx)(Rn,{size:14,color:X.dim})})]}),(0,H.jsxs)(z,{items:`center`,gap:6,children:[(0,H.jsx)(R5,{person:t,size:52}),(0,H.jsx)(a,{fontSize:Z.body,fontWeight:`600`,color:`$ink`,children:t.name})]})]})}var aae=async(e,t)=>{let n=await EV(LB.dms,{space:e,members:[t.id]});return{id:n.channel.id,kind:`direct`,name:t.name,private:!0,archived:n.channel.archived===!0,members:n.channel.members??[]}},z5=`hanzo.appearance`,B5=`hanzo.chat.preferences`,oae=new Set([`system`,`light`,`dark`]),V5=new Set([`compact`,`default`,`spacious`]),H5=new Set([`compact`,`default`,`large`]),U5=new Set([`ink`,`iris`,`jade`,`amber`,`coral`,`plum`]),sae=new Set([`low`,`medium`,`high`]),cae=new Set([`auto`,`manual`]),W5={theme:`dark`,density:`default`,font:`default`},G5={effort:`medium`,approvalMode:`auto`,allowThirdPartyModels:!0,spokenLanguage:`auto`},K5=new Set,q5=()=>{for(let e of K5)e()};function J5(e){if(!e||typeof e!=`object`)return{...W5};let t=e,n=oae.has(t.theme)?t.theme:W5.theme,r=V5.has(t.density)?t.density:W5.density,i=H5.has(t.font)?t.font:W5.font,a=U5.has(t.accent)?t.accent:void 0;return a?{theme:n,density:r,font:i,accent:a}:{theme:n,density:r,font:i}}function Y5(e){if(!e||typeof e!=`object`)return{...G5};let t=e;return{effort:sae.has(t.effort)?t.effort:G5.effort,approvalMode:cae.has(t.approvalMode)?t.approvalMode:G5.approvalMode,allowThirdPartyModels:typeof t.allowThirdPartyModels==`boolean`?t.allowThirdPartyModels:G5.allowThirdPartyModels,spokenLanguage:typeof t.spokenLanguage==`string`&&t.spokenLanguage.trim()?t.spokenLanguage.trim():G5.spokenLanguage}}function X5(){if(typeof window>`u`)return{...W5};try{let e=window.localStorage.getItem(z5);return e?J5(JSON.parse(e)):{...W5}}catch{return{...W5}}}function Z5(){if(typeof window>`u`)return{...G5};try{let e=window.localStorage.getItem(B5);return e?Y5(JSON.parse(e)):{...G5}}catch{return{...G5}}}function Q5(e){return e===`light`||e===`dark`?e:typeof window<`u`&&typeof window.matchMedia==`function`?window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:`dark`}function lae(e){return e===`compact`?`0.92`:e===`large`?`1.08`:`1`}function $5(e){let t=Q5(e.theme);if(typeof document>`u`)return t;let n=document.documentElement;n.dataset.theme=t,n.dataset.density=e.density,n.classList.toggle(`dark`,t===`dark`),n.classList.toggle(`light`,t===`light`),n.style.setProperty(`--hanzo-font-scale`,lae(e.font)),e.accent&&(n.dataset.accent=e.accent);let r=window.getComputedStyle(n).getPropertyValue(`--background`).trim(),i=document.querySelector(`meta[name="theme-color"]`);return i&&r&&i.setAttribute(`content`,r),t}function e7(e){let t=J5({...X5(),...e});if(typeof window<`u`)try{window.localStorage.setItem(z5,JSON.stringify(t))}catch{}return $5(t),q5(),t}function uae(e){let t=Y5({...Z5(),...e});if(typeof window<`u`)try{window.localStorage.setItem(B5,JSON.stringify(t))}catch{}return q5(),t}async function dae(e){if(e&&typeof fetch==`function`)try{let t=await fetch(`https://api.hanzo.ai/v1/account/appearance`,{method:`GET`,headers:{Authorization:`Bearer ${e}`,Accept:`application/json`}});if(!t.ok)return;let n=await t.json();if(!n||typeof n!=`object`)return;let r=n,i={};H5.has(r.font)&&(i.font=r.font),V5.has(r.density)&&(i.density=r.density),U5.has(r.accent)&&(i.accent=r.accent),Object.keys(i).length>0&&e7(i)}catch{}}function t7(){let[,e]=(0,V.useState)(0);(0,V.useEffect)(()=>{let t=()=>e(e=>e+1);K5.add(t);let n=e=>{(e.key===`hanzo.appearance`||e.key===`hanzo.chat.preferences`)&&($5(X5()),t())};return window.addEventListener(`storage`,n),()=>{K5.delete(t),window.removeEventListener(`storage`,n)}},[]);let t=X5();return{appearance:t,chat:Z5(),effectiveTheme:Q5(t.theme),setAppearance:e7,setChat:uae}}var n7=22,fae=44,r7=198;function i7({placeholder:e,disabled:t,onSend:n}){let[r,i]=(0,V.useState)(``),[o,s]=(0,V.useState)(!1),[c,l]=(0,V.useState)(null),{chat:u,setChat:d}=t7(),f=u.approvalMode===`auto`,p=r.trim()!==``&&!o&&!t,m=async()=>{if(!p)return;let e=r;s(!0),l(null);try{await n(e),i(``)}catch(e){l(e instanceof Error?e.message:String(e))}finally{s(!1)}},h=Math.min(8,r.split(`
|
|
193
|
-
`).length),g=Math.max(fae,Math.min(r7,h*n7+22));return(0,H.jsxs)(z,{px:16,pb:12,pt:6,gap:6,children:[c?(0,H.jsx)(a,{fontSize:`$1`,style:{color:X.alert},children:c}):null,(0,H.jsxs)(z,{gap:4,px:12,pt:8,pb:8,rounded:18,borderWidth:1,opacity:t?.6:1,style:{backgroundColor:X.composer,borderTopColor:X.composerRule,borderRightColor:X.composerRule,borderBottomColor:X.composerRule,borderLeftColor:X.composerRule},focusWithinStyle:{borderColor:`$bound`},"data-testid":`team-composer`,children:[(0,H.jsx)(hv,{flex:1,unstyled:!0,rows:1,height:g-12,minH:g-12,maxH:r7,py:4,px:2,borderWidth:0,bg:`transparent`,fontSize:`$3`,lineHeight:n7,color:`$ink`,placeholderTextColor:`$placeholderColor`,placeholder:t??e,value:r,disabled:!!t,"aria-label":e,onChangeText:i,onKeyDown:e=>{e.nativeEvent.key!==`Enter`||e.shiftKey||(e.preventDefault?.(),m())}}),(0,H.jsxs)(y,{items:`center`,justify:`space-between`,pt:2,children:[(0,H.jsxs)(y,{items:`center`,gap:6,children:[(0,H.jsx)(z,{width:26,height:26,rounded:13,items:`center`,justify:`center`,hoverStyle:{bg:`$hover`},children:(0,H.jsx)(hm,{size:15,color:`$soft`})}),(0,H.jsxs)(y,{...i5(()=>d({approvalMode:f?`manual`:`auto`}),f?`Switch to manual approval`:`Switch to full access`),height:24,px:7,gap:5,rounded:7,items:`center`,hoverStyle:{bg:`$hover`},"data-testid":`composer-approval-toggle`,children:[f?(0,H.jsx)(sp,{size:13,color:X.composerWarn}):(0,H.jsx)(xm,{size:13,color:`$soft`}),(0,H.jsx)(a,{fontSize:12,fontWeight:`500`,style:{color:f?X.composerWarn:void 0},color:f?void 0:`$soft`,children:f?`Full access`:`Manual approval`})]})]}),(0,H.jsx)(z,{"aria-disabled":!p,...i5(()=>void m(),`Send`),cursor:p?`pointer`:`default`,width:30,height:30,items:`center`,justify:`center`,rounded:15,style:{backgroundColor:X.composerAccent},opacity:p?1:.92,focusVisibleStyle:{outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},children:(0,H.jsx)(gp,{size:16,color:X.composerAccentInk})})]})]})]})}var pae=3e5,mae=e=>{let t=[],n=null,r=``;for(let i of e){let e=gae(i.at);if(e!==r&&(r=e,n=null,t.push({kind:`day`,id:`day:${e}`,at:i.at})),n&&n.author===i.author&&i.at-hae(n).at<=pae){n.messages.push(i);continue}n={id:i.id,author:i.author,at:i.at,messages:[i]},t.push({kind:`run`,...n})}return t},hae=e=>e.messages[e.messages.length-1],gae=e=>{let t=new Date(e);return`${t.getFullYear()}-${t.getMonth()+1}-${t.getDate()}`},_ae=(e,t=Date.now())=>{let n=a7(t)-a7(e);if(n===0)return`Today`;if(n===1)return`Yesterday`;let r=new Date(e),i=r.getFullYear()===new Date(t).getFullYear()?void 0:`numeric`;return r.toLocaleDateString(void 0,{month:`long`,day:`numeric`,year:i})},a7=e=>{let t=new Date(e);return Math.floor((e-t.getTimezoneOffset()*6e4)/864e5)},vae=e=>new Date(e).toLocaleTimeString(void 0,{hour:`numeric`,minute:`2-digit`});function o7({author:e,at:t,messages:n,people:r,reactions:i,me:o,onReact:s,onOpen:c,open:l}){let u=n5(r,e),d=r.find(e=>e.name===u);return(0,H.jsxs)(y,{px:16,pt:10,gap:10,items:`flex-start`,children:[(0,H.jsxs)(Bh,{circular:!0,size:36,children:[d?.avatar?(0,H.jsx)(Vh,{src:d.avatar,alt:``}):null,(0,H.jsx)(Hh,{bg:`$raised`,children:(0,H.jsx)(a,{fontSize:`$2`,color:`$quiet`,children:Mie(u)})})]}),(0,H.jsxs)(z,{flex:1,minW:0,gap:2,children:[(0,H.jsxs)(y,{gap:8,items:`baseline`,children:[(0,H.jsx)(a,{fontSize:`$3`,fontWeight:`600`,color:`$ink`,children:u}),(0,H.jsx)(a,{fontSize:`$1`,color:`$dim`,children:vae(t)})]}),n.map(e=>(0,H.jsx)(yae,{message:e,reactions:i.filter(t=>t.message===e.id),me:o,onReact:s,onOpen:c,open:l===e.id},e.id))]})]})}function yae({message:e,reactions:t,me:n,onReact:r,onOpen:i,open:o}){let s=c7(t),c=!!n&&e.author===n;return(0,H.jsxs)(z,{group:!0,position:`relative`,pr:72,py:2,rounded:`$1`,bg:o?`$hover`:`transparent`,hoverStyle:{background:`$hover`},children:[(0,H.jsx)(z,{self:c?`flex-start`:void 0,px:c?12:0,py:c?6:0,rounded:c?12:0,style:c?{backgroundColor:X.chatUser}:void 0,children:e.lines.map((e,t)=>(0,H.jsx)(a,{fontSize:`$3`,lineHeight:22,color:c?void 0:`$ink`,style:c?{color:X.chatUserInk}:void 0,children:lie(e).map((e,t)=>e.kind===`text`?(0,H.jsx)(a,{fontSize:`$3`,lineHeight:22,color:c?void 0:`$ink`,style:c?{color:X.chatUserInk}:void 0,children:e.value},t):(0,H.jsx)(a,{fontSize:`$3`,lineHeight:22,style:{color:e.kind===`mention`?X.alert:X.accent},fontWeight:e.kind===`mention`?`500`:`400`,...e.kind===`link`?{tag:`a`,href:e.value,target:`_blank`,rel:`noreferrer`}:{},children:e.value},t))},t))}),s.length>0?(0,H.jsx)(y,{gap:4,pt:4,flexWrap:`wrap`,children:s.map(t=>(0,H.jsx)(bae,{emoji:t.emoji,count:t.by.length,mine:t.by.includes(n),onPress:()=>r(e,t.emoji)},t.emoji))}):null,e.replies>0?(0,H.jsxs)(y,{items:`center`,gap:5,pt:4,...i5(()=>i(e)),children:[(0,H.jsx)(cm,{size:13,color:X.accent}),(0,H.jsx)(a,{fontSize:`$1`,style:{color:X.accent},children:e.replies===1?`1 reply`:`${e.replies} replies`})]}):null,(0,H.jsxs)(y,{position:`absolute`,t:0,r:8,gap:2,opacity:0,"$group-hover":{opacity:1},focusWithinStyle:{opacity:1},children:[(0,H.jsx)(s7,{label:`React`,onPress:()=>r(e,`👍`),children:(0,H.jsx)(Cm,{size:15,color:`$soft`})}),(0,H.jsx)(s7,{label:`Reply in thread`,onPress:()=>i(e),children:(0,H.jsx)(cm,{size:15,color:`$soft`})})]})]})}var s7=({label:e,onPress:t,children:n})=>(0,H.jsx)(z,{width:26,height:26,items:`center`,justify:`center`,rounded:`$1`,bg:`$panel`,borderWidth:1,borderColor:`$edge`,...i5(t,e),hoverStyle:{background:`$hover`},focusVisibleStyle:{outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},children:n}),bae=({emoji:e,count:t,mine:n,onPress:r})=>(0,H.jsxs)(y,{"aria-pressed":n,height:22,items:`center`,gap:4,px:7,rounded:11,borderWidth:1,borderColor:n?`$bound`:`$edge`,bg:n?`$hover`:`$raised`,...i5(r),hoverStyle:{borderColor:`$bound`},focusVisibleStyle:{outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},children:[(0,H.jsx)(a,{fontSize:12,lineHeight:14,children:e}),(0,H.jsx)(a,{fontSize:`$1`,color:n?`$ink`:`$quiet`,children:t})]}),c7=e=>{let t=[];for(let n of e){let e=t.find(e=>e.emoji===n.emoji);e?e.by.push(n.by):t.push({emoji:n.emoji,by:[n.by]})}return t};function l7({room:e,phase:t,error:n,messages:r,people:i,reactions:a,me:o,onRetry:s,onReact:c,onOpen:l,open:u}){return t===`loading`?(0,H.jsx)(d7,{}):t===`failure`?(0,H.jsx)(f7,{error:n,onRetry:s}):r.length===0?(0,H.jsx)(Cae,{room:e}):(0,H.jsx)(xae,{messages:r,people:i,reactions:a,me:o,onReact:c,onOpen:l,open:u})}function xae({messages:e,people:t,reactions:n,me:r,onReact:i,onOpen:a,open:o}){let s=(0,V.useRef)(null),c=e[e.length-1]?.id;return(0,V.useEffect)(()=>{s.current?.scrollIntoView({block:`end`})},[c]),(0,H.jsx)(z,{flex:1,minH:0,style:{overflowY:`auto`},children:(0,H.jsxs)(z,{pt:4,pb:12,children:[mae(e).map(e=>e.kind===`day`?(0,H.jsx)(Sae,{at:e.at},e.id):(0,H.jsx)(o7,{author:e.author,at:e.at,messages:e.messages,people:t,reactions:n,me:r,onReact:i,onOpen:a,open:o},e.id)),(0,H.jsx)(`div`,{ref:e=>void(s.current=e)})]})})}var Sae=({at:e})=>(0,H.jsx)(z,{px:16,pt:14,pb:4,children:(0,H.jsx)(z,{height:1,bg:`$edge`,position:`relative`,justify:`center`,children:(0,H.jsx)(a,{position:`absolute`,self:`center`,px:10,style:{backgroundColor:X.panel},fontSize:`$1`,color:`$dim`,children:_ae(e)})})}),u7=({children:e})=>(0,H.jsx)(z,{flex:1,minH:0,items:`center`,justify:`center`,p:24,children:e}),d7=()=>(0,H.jsx)(u7,{children:(0,H.jsx)(tv,{size:16})}),f7=({error:e,onRetry:t})=>(0,H.jsx)(u7,{children:(0,H.jsx)(HZ,{state:zZ(e),onRetry:t})}),Cae=({room:e})=>(0,H.jsx)(u7,{children:(0,H.jsxs)(z,{gap:6,maxW:340,items:`center`,children:[(0,H.jsx)(a,{fontSize:`$4`,fontWeight:`500`,color:`$ink`,children:e.kind===`direct`?e.name:`#${e.name}`}),(0,H.jsx)(a,{fontSize:`$2`,color:`$dim`,text:`center`,children:e.topic?e.topic:e.kind===`direct`?`The beginning of your conversation.`:`This is the beginning of the channel. Say something.`})]})}),p7=({people:e,size:t=28,show:n=3,ground:r=X.ground})=>{if(e.length===0)return null;let i=e.slice(0,n),o=e.length-i.length,s=Math.round(t*.575);return(0,H.jsxs)(y,{items:`center`,"aria-label":`${e.length} assigned`,children:[i.map((e,n)=>(0,H.jsx)(z,{ml:n===0?0:s-t,rounded:9999,borderWidth:2,style:{backgroundColor:r,borderColor:r},children:(0,H.jsxs)(Bh,{size:t,"aria-label":e.name,children:[e.face?(0,H.jsx)(Vh,{src:e.face,alt:``}):null,(0,H.jsx)(Hh,{children:wae(e.name)})]})},e.id)),o>0?(0,H.jsxs)(a,{fontSize:`$2`,color:`$quiet`,ml:6,children:[`+`,o]}):null]})},wae=e=>(e[0]??``).toUpperCase();function Tae({members:e,people:t}){return e.length===0?null:(0,H.jsx)(p7,{people:e.map(e=>({id:e,name:n5(t,e),face:Eae(t,e)})),size:28,show:4,ground:`$panel`})}var Eae=(e,t)=>{let n=t.startsWith(`hanzo:`)?t.slice(6):t;return e.find(e=>e.id===n||e.id===t)?.avatar};function Dae({room:e,parent:t,replies:n,phase:r,error:i,people:o,reactions:s,me:c,onClose:l,onRetry:u,onReact:d,onSend:f}){return(0,H.jsxs)(z,{width:360,shrink:0,minH:0,borderLeftWidth:1,borderLeftColor:`$edge`,children:[(0,H.jsxs)(y,{height:56,items:`center`,px:20,gap:8,children:[(0,H.jsx)(a,{flex:1,fontSize:`$4`,fontWeight:`500`,color:`$ink`,children:`Thread`}),(0,H.jsx)(z,{width:28,height:28,items:`center`,justify:`center`,rounded:`$1`,...i5(l,`Close the thread`),hoverStyle:{background:`$hover`},focusVisibleStyle:{outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},children:(0,H.jsx)(Rn,{size:16,color:`$soft`})})]}),(0,H.jsx)(z,{pb:8,borderBottomWidth:1,borderBottomColor:`$edge`,children:(0,H.jsx)(o7,{author:t.author,at:t.at,messages:[t],people:o,reactions:s,me:c,onReact:d,onOpen:()=>{}})}),(0,H.jsx)(l7,{room:e,phase:r,error:i,messages:n,people:o,reactions:s,me:c,onRetry:u,onReact:d,onOpen:()=>{}}),(0,H.jsx)(i7,{placeholder:`Reply…`,onSend:f})]})}var Oae={"dm-algo":`dm-sci`,"dm-cal":`dm-mana`,"dm-core":`dm-opera`,"dm-db":`dm-data`,"dm-sec":`dm-cyber`};function m7(){let{id:e}=Ci(),t=e&&(Oae[e]??e),{plane:n,current:r}=eH(),i=e5(),a=t5(),o=j8(t),s=(0,V.useMemo)(()=>o?(a.data??[]).find(e=>e.id===o):void 0,[o,a.data]),c=r?.uuid??``,l=oV(`chat:dm:${c}:${s?.id??`-`}`,()=>aae(c,s),{enabled:!!(n&&s&&c)}),u=(0,V.useMemo)(()=>(i.data??[]).find(e=>e.id===t)??null,[i.data,t]),d=o?l.data??null:u,f=d?N8(d,a.data??[]):void 0,p=Die(d?.id??null),m=p.data??[],h=Oie((0,V.useMemo)(()=>m.map(e=>e.id),[m]));Aie(d?.id??null);let[g,_]=(0,V.useState)(null),v=m.find(e=>e.id===g)??null,b=kie(v?.id??null),x=n?.account??``,S=a.data??[],C=h.data??[],w=(0,V.useCallback)((e,t)=>{if(!n||!d)return;let r=c7(C.filter(t=>t.message===e.id)).find(e=>e.emoji===t),i=C.find(n=>n.message===e.id&&n.emoji===t&&n.by===x);(r&&i?wie(n,d,i):Cie(n,d,e,t)).then(()=>sV(`chat:reactions:`))},[n,d,C,x]);if(!t){if(i.phase===`failure`)return(0,H.jsx)(f7,{error:i.error,onRetry:i.reload});if(i.phase===`loading`||!n)return(0,H.jsx)(d7,{});let e=(i.data??[]).find(e=>e.kind===`channel`)??(i.data??[])[0];return e?(0,H.jsx)(Gi,{to:`/chat/${e.id}`,replace:!0}):(0,H.jsx)(Aae,{})}if(o){if(a.phase===`failure`)return(0,H.jsx)(f7,{error:a.error,onRetry:a.reload});if(a.phase===`loading`||!n)return(0,H.jsx)(d7,{});if(!s)return(0,H.jsx)(h7,{});if(l.phase===`failure`)return(0,H.jsx)(f7,{error:l.error,onRetry:l.reload});if(!d)return(0,H.jsx)(d7,{})}else if(i.phase===`failure`)return(0,H.jsx)(f7,{error:i.error,onRetry:i.reload});else if(i.phase===`loading`||!n)return(0,H.jsx)(d7,{});return d?(0,H.jsxs)(y,{flex:1,minH:0,children:[(0,H.jsxs)(z,{flex:1,minW:0,minH:0,children:[(0,H.jsx)(kae,{room:d,people:S,agent:f}),(0,H.jsx)(l7,{room:d,phase:p.phase,error:p.error,messages:m,people:S,reactions:C,me:x,onRetry:p.reload,onReact:w,onOpen:e=>_(e.id),open:g??void 0}),(0,H.jsx)(i7,{placeholder:d.kind===`direct`?`Message ${W8(d,S)}`:`Message #${d.name}`,onSend:e=>xie(n,d,e,S)})]}),v?(0,H.jsx)(Dae,{room:d,parent:v,replies:b.data??[],phase:b.phase,error:b.error,people:S,reactions:C,me:x,onClose:()=>_(null),onRetry:b.reload,onReact:w,onSend:e=>Sie(n,d,v,e,S)}):null]}):(0,H.jsx)(h7,{})}function kae({room:e,people:t,agent:n}){let r=f5(),i=gH(),o=_H();return(0,H.jsx)(z,{borderBottomWidth:1,borderBottomColor:`$edge`,bg:`$panel`,children:(0,H.jsxs)(y,{px:16,py:8,items:`center`,justify:`space-between`,gap:10,children:[n?(0,H.jsxs)(y,{flex:1,minW:0,items:`center`,gap:12,children:[(0,H.jsx)(R5,{person:n,size:34}),(0,H.jsxs)(y,{items:`center`,gap:8,flexWrap:`wrap`,children:[(0,H.jsx)(a,{fontSize:Z.row,fontWeight:`600`,color:`$ink`,children:n.name}),(0,H.jsx)(y,{px:7,py:2,rounded:Q.field,bg:`$raised`,borderWidth:1,borderColor:`$edge`,children:(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`500`,color:`$quiet`,children:`Agent`})})]})]}):(0,H.jsxs)(y,{flex:1,minW:0,items:`center`,gap:10,children:[(0,H.jsxs)(y,{items:`center`,gap:6,shrink:0,children:[e.kind===`direct`?null:e.private?(0,H.jsx)(nm,{size:16,color:`$quiet`}):(0,H.jsx)(Yp,{size:17,color:`$quiet`}),(0,H.jsx)(a,{fontSize:Z.row,fontWeight:`600`,color:`$ink`,numberOfLines:1,children:W8(e,t??[])})]}),e.topic?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(z,{width:1,height:14,bg:`$edge`,shrink:0}),(0,H.jsx)(a,{fontSize:Z.small,color:`$dim`,numberOfLines:1,flex:1,children:e.topic})]}):null]}),(0,H.jsxs)(y,{items:`center`,gap:8,shrink:0,children:[n?null:(0,H.jsx)(Tae,{members:e.members,people:t??[]}),(0,H.jsxs)(y,{...i5(()=>mH(`inbox`),`Toggle Inbox drawer`),"aria-pressed":i&&o===`inbox`,px:9,py:5,rounded:Q.field,bg:i&&o===`inbox`?`$hover`:`$raised`,borderWidth:1,borderColor:i&&o===`inbox`?`$bound`:`$edge`,items:`center`,gap:6,hoverStyle:{background:`$hover`},focusVisibleStyle:kH,children:[(0,H.jsx)(_p,{size:13,color:i&&o===`inbox`?`$ink`:`$quiet`}),(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`500`,color:i&&o===`inbox`?`$ink`:`$quiet`,children:`Inbox`}),r>0?(0,H.jsx)(z,{minW:16,height:16,px:4,rounded:Q.pill,items:`center`,justify:`center`,style:{background:X.alert},children:(0,H.jsx)(a,{fontSize:10,lineHeight:12,fontWeight:`700`,style:{color:X.panel},children:r})}):null]})]})]})})}var Aae=()=>(0,H.jsx)(u7,{children:(0,H.jsx)(KZ,{icon:lm,title:`Chat`,description:`Choose a channel or a conversation to read it.`})}),h7=()=>(0,H.jsx)(u7,{children:(0,H.jsx)(KZ,{icon:lm,title:`No such room`,description:`It may have been archived, or it may belong to another space.`})});function jae(){let{pathname:e}=yi(),t=xi(),[n,r]=(0,V.useState)(``),[i,o]=(0,V.useState)(!0),[s,c]=(0,V.useState)(!0),[l,u]=(0,V.useState)(!0),d=e5(),f=t5().data??[],p=d.data??[],m=n.trim().toLowerCase(),h=m?p.filter(e=>e.name.toLowerCase().includes(m)):p,g=h.filter(e=>e.kind===`channel`),_=g.filter(e=>!e.connectedOrgs||e.connectedOrgs.length===0),v=g.filter(e=>e.connectedOrgs&&e.connectedOrgs.length>0),b=h.filter(e=>e.kind===`direct`),x=M8(f).filter(e=>!m||e.name.toLowerCase().includes(m));return(0,H.jsxs)(C5,{title:m5(e)?.label??`Chat`,children:[(0,H.jsx)(w5,{value:n,onChange:r}),(0,H.jsx)(z,{height:8}),(0,H.jsx)(T5,{}),(0,H.jsxs)(O5,{children:[d.phase===`loading`?(0,H.jsx)(z,{px:10,py:12,children:(0,H.jsx)(tv,{size:16})}):null,d.phase===`failure`?(0,H.jsx)(_7,{children:`Your rooms could not be read.`}):null,d.phase===`ready`&&p.length===0&&x.length===0?(0,H.jsx)(_7,{children:`No rooms yet.`}):null,d.phase===`ready`&&p.length>0&&h.length===0&&x.length===0?(0,H.jsx)(_7,{children:`Nothing matches “${n.trim()}”.`}):null,_.length>0?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(E5,{count:_.length,open:i,onToggle:()=>o(e=>!e),children:`Channels`}),i?_.map(e=>(0,H.jsx)(g7,{room:e,roster:f},e.id)):null]}):null,d.phase===`ready`&&(!m||v.length>0)?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(T5,{}),(0,H.jsx)(E5,{count:v.length,open:s,onToggle:()=>c(e=>!e),children:`Hanzo Connect`}),s?(0,H.jsxs)(H.Fragment,{children:[v.map(e=>(0,H.jsx)(g7,{room:e,roster:f},e.id)),(0,H.jsxs)(y,{...i5(()=>s5(`connect`),`Connect external organization channel`),px:10,py:6,mx:4,gap:8,items:`center`,rounded:Q.field,hoverStyle:{background:`$hover`},"data-testid":`hanzo-connect-add-trigger`,children:[(0,H.jsx)(hm,{size:14,color:`$soft`}),(0,H.jsx)(a,{fontSize:Z.body,color:`$quiet`,fontWeight:`500`,children:`Connect organization…`})]})]}):null]}):null,x.length>0?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(T5,{}),(0,H.jsx)(E5,{count:x.length,open:l,onToggle:()=>u(e=>!e),children:`Bots`}),l?x.map(e=>{let n=A8(e);return(0,H.jsxs)(y,{...i5(()=>t(n),e.name),px:8,py:6,mx:6,gap:10,items:`center`,rounded:8,bg:`transparent`,hoverStyle:{background:`$hover`},children:[(0,H.jsx)(R5,{person:e,size:26}),(0,H.jsx)(a,{fontSize:Z.body,fontWeight:`600`,color:`$ink`,numberOfLines:1,flex:1,children:e.name})]},e.id)}):null]}):null,b.length>0?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(T5,{}),(0,H.jsx)(E5,{count:b.length,children:`Direct`}),b.map(e=>(0,H.jsx)(g7,{room:e,roster:f},e.id))]}):null]})]})}var g7=({room:e,roster:t})=>{let n=e.connectedOrgs&&e.connectedOrgs.length>0?`${e.name} · ${e.connectedOrgs.join(`, `)}`:W8(e,t);return(0,H.jsx)(D5,{to:`/chat/${e.id}`,icon:(0,H.jsx)(Mae,{room:e}),children:n})},Mae=({room:e})=>e.kind===`direct`?null:e.connectedOrgs&&e.connectedOrgs.length>0?(0,H.jsx)(bm,{size:14,color:`$soft`}):e.private?(0,H.jsx)(nm,{size:14,color:`$soft`}):(0,H.jsx)(Yp,{size:16,color:`$soft`}),_7=({children:e})=>(0,H.jsx)(a,{px:10,py:8,fontSize:`$2`,color:`$faint`,children:e});U$();var Nae=`https://api.hanzo.ai`,v7=e=>TV(`${Nae}${e}`),Pae=[`investors`,`funds`,`customers`,`leads`,`feedback`,`errors`,`lists`],y7=[{value:`NEW`,label:`New`,color:`pink`},{value:`SCREENING`,label:`Screening`,color:`cyan`},{value:`MEETING`,label:`Meeting`,color:`blue`},{value:`PROPOSAL`,label:`Proposal`,color:`amber`},{value:`CUSTOMER`,label:`Customer`,color:`green`}],Fae=[{name:`name`,label:`Investor`,type:`text`,metadata:{avatar:`circle`}},{name:`company`,label:`Firm / Fund`,type:`relation`,metadata:{labelField:`name`,shape:`square`}},{name:`category`,label:`Category`,type:`select`,metadata:{options:[{value:`vc`,label:`Institutional VC`,color:`blue`},{value:`crypto_vc`,label:`Crypto / Web3 VC`,color:`cyan`},{value:`accredited`,label:`Accredited High-Check`,color:`green`},{value:`angel`,label:`Angel Investor`,color:`amber`},{value:`family_office`,label:`Family Office`,color:`cyan`},{value:`crowdfunding_republic`,label:`Republic / Reg CF`,color:`orange`}]}},{name:`stage`,label:`Stage`,type:`select`,metadata:{options:y7}},{name:`email`,label:`Email`,type:`email`},{name:`title`,label:`Title`,type:`text`},{name:`checkSize`,label:`Check Size`,type:`text`},{name:`location`,label:`Location`,type:`text`}],Iae=[{name:`name`,label:`Fund / Firm`,type:`text`,metadata:{avatar:`square`}},{name:`stage`,label:`Stage`,type:`select`,metadata:{options:y7}},{name:`aum`,label:`AUM`,type:`text`},{name:`checkSize`,label:`Check Size`,type:`text`},{name:`primaryEmail`,label:`Primary Email`,type:`email`},{name:`website`,label:`Url`,type:`url`},{name:`location`,label:`Location`,type:`text`}],Lae=[{name:`name`,label:`Customer`,type:`text`,metadata:{avatar:`circle`}},{name:`email`,label:`Email`,type:`email`},{name:`product`,label:`Product`,type:`text`},{name:`totalSpent`,label:`Total Spent`,type:`currency`,metadata:{currencyCode:`USD`,decimals:0}},{name:`stage`,label:`Stage`,type:`select`,metadata:{options:y7}},{name:`location`,label:`Location`,type:`text`}],Rae=[{name:`name`,label:`Developer`,type:`text`,metadata:{avatar:`circle`}},{name:`handle`,label:`GitHub`,type:`text`},{name:`email`,label:`Email`,type:`email`},{name:`company`,label:`Company`,type:`relation`,metadata:{labelField:`name`,shape:`square`}},{name:`stars`,label:`Stars`,type:`number`},{name:`followers`,label:`Followers`,type:`number`},{name:`location`,label:`Location`,type:`text`}],zae=[{name:`name`,label:`Audience / Segment`,type:`text`,metadata:{avatar:`square`}},{name:`purpose`,label:`Engine`,type:`text`},{name:`totalCount`,label:`Total Contacts`,type:`number`},{name:`eligibleCount`,label:`Deliverable`,type:`number`},{name:`description`,label:`Description`,type:`text`}],Bae=[{name:`name`,label:`Subject / Summary`,type:`text`,metadata:{avatar:`square`}},{name:`program`,label:`Kind`,type:`text`},{name:`email`,label:`Submitter`,type:`email`},{name:`company`,label:`Organization`,type:`text`},{name:`source`,label:`Source`,type:`text`},{name:`recordCode`,label:`Ref / Report ID`,type:`text`,readOnly:!0},{name:`closeDate`,label:`Submitted At`,type:`date`}],Vae=[{name:`name`,label:`Exception / Fault`,type:`text`,metadata:{avatar:`square`}},{name:`program`,label:`Class / Type`,type:`text`},{name:`company`,label:`Service / App`,type:`text`},{name:`location`,label:`Origin / File`,type:`text`},{name:`source`,label:`Env & Release`,type:`text`},{name:`recordCode`,label:`Event / Issue ID`,type:`text`,readOnly:!0},{name:`closeDate`,label:`Occurred At`,type:`date`}],Hae={name:(0,H.jsx)(xp,{size:14,color:`$color10`}),domainName:(0,H.jsx)($p,{size:14,color:`$color10`}),website:(0,H.jsx)($p,{size:14,color:`$color10`}),createdBy:(0,H.jsx)(Fm,{size:14,color:`$color10`}),city:(0,H.jsx)(am,{size:14,color:`$color10`}),location:(0,H.jsx)(am,{size:14,color:`$color10`}),country:(0,H.jsx)(qp,{size:14,color:`$color10`}),employees:(0,H.jsx)(Im,{size:14,color:`$color10`}),arr:(0,H.jsx)(Lp,{size:14,color:`$color10`}),amount:(0,H.jsx)(Lp,{size:14,color:`$color10`}),totalSpent:(0,H.jsx)(Lp,{size:14,color:`$color10`}),company:(0,H.jsx)(xp,{size:14,color:`$color10`}),pointOfContact:(0,H.jsx)(Fm,{size:14,color:`$color10`}),rating:(0,H.jsx)(Em,{size:14,color:`$color10`}),closeDate:(0,H.jsx)(Cp,{size:14,color:`$color10`}),recordCode:(0,H.jsx)(Yp,{size:14,color:`$color10`}),email:(0,H.jsx)(im,{size:14,color:`$color10`}),primaryEmail:(0,H.jsx)(im,{size:14,color:`$color10`}),jobTitle:(0,H.jsx)(bp,{size:14,color:`$color10`}),title:(0,H.jsx)(bp,{size:14,color:`$color10`})};function Uae(){let[e,t]=(0,V.useState)(``),n=e.trim().toLowerCase(),r=[{to:`investors`,label:`Investors`,icon:(0,H.jsx)(Am,{size:15,color:wH(`investors`)}),group:`Audiences`},{to:`funds`,label:`Funds`,icon:(0,H.jsx)(bp,{size:15,color:wH(`funds`)}),group:`Audiences`},{to:`customers`,label:`Customers`,icon:(0,H.jsx)(Im,{size:15,color:wH(`customers`)}),group:`Audiences`},{to:`leads`,label:`Developer Leads`,icon:(0,H.jsx)(Bm,{size:15,color:wH(`leads`)}),group:`Audiences`},{to:`feedback`,label:`Feedback, Bugs & Forms`,icon:(0,H.jsx)(Up,{size:15,color:wH(`feedback`)}),group:`Inbound`},{to:`errors`,label:`Runtime & CLI Errors`,icon:(0,H.jsx)(lp,{size:15,color:wH(`errors`)}),group:`Inbound`},{to:`lists`,label:`Lists & Segments`,icon:(0,H.jsx)(Zp,{size:15,color:`$soft`}),group:`Engagement`}].filter(e=>!n||e.label.toLowerCase().includes(n)),i=[...new Set(r.map(e=>e.group))];return(0,H.jsxs)(C5,{title:`CRM`,children:[(0,H.jsx)(w5,{value:e,onChange:t}),(0,H.jsx)(z,{height:12}),(0,H.jsx)(O5,{children:i.map((e,t)=>(0,H.jsxs)(z,{children:[t>0?(0,H.jsx)(T5,{}):null,(0,H.jsx)(E5,{children:e}),r.filter(t=>t.group===e).map(e=>(0,H.jsx)(D5,{to:`/crm/${e.to}`,icon:e.icon,children:e.label},e.to))]},e))})]})}var b7=e=>[e.city,e.state,e.country].filter(Boolean).join(`, `)||String(e.location??``),x7=e=>typeof e==`string`?e.slice(0,10):``,Wae=async(e,t,n)=>{switch(e){case`investors`:{let e=await v7(`/v1/crm/investors?limit=250&category=${n===`all`?`vc`:n}`),t=(e.items??[]).filter(e=>e.name||e.email).map(e=>({id:String(e.id),name:String(e.name??e.email),company:String(e.company??e.fund_name??``),category:String(e.category??``),stage:String(e.stage??``).toUpperCase(),email:String(e.email??``),title:String(e.title??``),checkSize:String(e.check_size??``),location:b7(e)}));return{rows:t,total:e.total??t.length}}case`funds`:{let e=await v7(`/v1/crm/funds?limit=250`),t=(e.items??[]).map(e=>({id:String(e.id),name:String(e.name??``),stage:String(e.stage??``).toUpperCase(),aum:String(e.aum??``),checkSize:String(e.check_size??``),primaryEmail:String(e.primary_email??``),website:String(e.website??``),location:String(e.location??e.country??``)}));return{rows:t,total:e.total??t.length}}case`customers`:{let e=await v7(`/v1/crm/customers?limit=250`),t=(e.items??[]).map(e=>({id:String(e.id),name:String(e.name??e.email??``),email:String(e.email??``),product:String(e.products??e.product??``),totalSpent:Number(e.total_spent??e.amount??0),stage:`CUSTOMER`,location:b7(e)}));return{rows:t,total:e.total??t.length}}case`leads`:{let e=new URLSearchParams({limit:`200`}),[n,r]=t===`all`?[]:t.endsWith(`+`)?[t.slice(0,-1)]:t.split(`-`);n&&e.set(`min_stars`,n===`0`?`1`:n),r&&e.set(`max_stars`,r);let i=await v7(`/v1/crm/leads?${e}`),a=(i.leads??[]).map((e,t)=>({id:String(e.id??e.github_login??t),name:String(e.name??e.github_login??e.email??``),handle:e.github_login?`@${e.github_login}`:``,email:String(e.email??``),company:String(e.company??``),stars:Number(e.total_stars??e.stars??0),followers:Number(e.followers??0),location:String(e.location??e.country??``)}));return{rows:a,total:i.total??a.length}}case`feedback`:{let[e,t]=await Promise.all([v7(`/v1/base/collections/activities/records?perPage=150&sort=-at,-created`),v7(`/v1/base/collections/people/records?perPage=250`)]),n=new Map((t.items??[]).map(e=>[String(e.id),e])),r=(e.items??[]).filter(e=>e.kind===`form`||e.data?.program).map((e,t)=>{let r=e.data??{},i=n.get(String(e.person_id??``))??{};return{id:String(e.id??t),name:String(e.subject??r.need??r.description??``),program:String(r.program??r.kind??`feedback`),email:String(i.email??r.email??``),company:String(i.company??i.name??r.company??``),source:String(r.source??e.channel??``),recordCode:String(r.public_ref??e.source_id??e.id??``),closeDate:x7(e.at??e.created)}});return{rows:r,total:e.totalItems??r.length}}case`errors`:{let e=await v7(`/v1/event/errors?limit=100`),t=(Array.isArray(e)?e:e.items??e.errors??[]).map((e,t)=>{let n=String(e.environment??e.env??``),r=String(e.release??``);return{id:String(e.id??e.event_id??t),name:String(e.value??e.message??e.title??``),program:String(e.type??e.class??e.name??``),company:String(e.app??e.service??e.product??``),location:String(e.culprit??e.origin??e.path??``),source:[n,r].filter(Boolean).join(` · `),recordCode:String(e.issue??e.id??e.event_id??``),closeDate:x7(e.timestamp??e.time??e.created_at)}});return{rows:t,total:t.length}}case`lists`:{let e=await v7(`/v1/crm/lists`),t=(e.items??[]).map(e=>({id:String(e.id),name:String(e.name??``),purpose:String(e.purpose??e.kind??``),totalCount:Number(e.total_count??e.eligible_count??0),eligibleCount:Number(e.eligible_count??e.total_count??0),description:String(e.description??``)}));return{rows:t,total:e.total??t.length}}}},Gae={investors:Fae,funds:Iae,customers:Lae,leads:Rae,feedback:Bae,errors:Vae,lists:zae},Kae={investors:{title:`Investors`,icon:(0,H.jsx)(Am,{size:14})},funds:{title:`Funds`,icon:(0,H.jsx)(bp,{size:14})},customers:{title:`Customers`,icon:(0,H.jsx)(Im,{size:14})},leads:{title:`Developer Leads`,icon:(0,H.jsx)(Bm,{size:14})},feedback:{title:`Feedback, Bugs & Forms`,icon:(0,H.jsx)(Up,{size:14})},errors:{title:`Runtime & CLI Errors`,icon:(0,H.jsx)(lp,{size:14})},lists:{title:`Lists & Segments`,icon:(0,H.jsx)(Zp,{size:14})}},qae=[{id:`all`,label:`Institutional VCs`},{id:`crypto_vc`,label:`Crypto / Web3 VCs`},{id:`accredited`,label:`Accredited High-Check`},{id:`family_office`,label:`Family Offices`},{id:`crowdfunding_republic`,label:`Republic / Reg CF`}],Jae=[`all`,`0-100`,`100-500`,`500-1000`,`1000-5000`,`5000-15000`,`15000+`];function Yae(){let{section:e}=Ci(),t=Pae.includes(e)?e:`investors`,[n,r]=(0,V.useState)(`all`),[i,o]=(0,V.useState)(`all`),[s,c]=(0,V.useState)(null),[l,u]=(0,V.useState)(null),[d,f]=(0,V.useState)(!1),[p,m]=(0,V.useState)(null),h=(0,V.useCallback)(async()=>{f(!0),m(null),u(null);try{c(await Wae(t,n,i))}catch(e){c(null),u(e instanceof Error?e.message:`The read failed.`)}finally{f(!1)}},[t,n,i]);(0,V.useEffect)(()=>{h()},[h]);let g=Gae[t],_=(0,V.useMemo)(()=>CH(t),[t]),{title:v,icon:b}=Kae[t],x=(e,t,n)=>(0,H.jsx)(y,{height:36,px:`$3`,items:`center`,gap:`$1.5`,borderBottomWidth:1,borderColor:`$borderColor`,bg:`$background`,children:e.map(e=>(0,H.jsx)(W,{size:`xs`,height:24,px:`$2`,rounded:`$2`,chromeless:t!==e.id,bg:t===e.id?`$color3`:`transparent`,onPress:()=>n(e.id),children:(0,H.jsx)(a,{fontSize:11,fontWeight:t===e.id?`600`:`400`,color:t===e.id?`$color12`:`$color10`,children:e.label})},e.id))});return(0,H.jsx)(Lt,{value:`compact`,children:(0,H.jsxs)(z,{flex:1,minH:0,bg:`$background`,children:[(0,H.jsxs)(y,{height:44,px:`$3`,items:`center`,justify:`space-between`,borderBottomWidth:1,borderColor:`$borderColor`,gap:`$2`,children:[(0,H.jsxs)(y,{items:`center`,gap:`$2`,children:[(0,H.jsx)(y,{width:22,height:22,rounded:`$2`,items:`center`,justify:`center`,style:{backgroundColor:_.background,color:_.color},children:b}),(0,H.jsx)(a,{fontSize:14,fontWeight:`600`,color:`$color12`,children:v}),s?(0,H.jsx)(a,{fontSize:12,color:`$color10`,children:`${s.total.toLocaleString()} total`}):null]}),(0,H.jsx)(W,{size:`xs`,height:24,px:`$2`,chromeless:!0,startIcon:(0,H.jsx)(gm,{size:12}),onPress:()=>void h(),children:(0,H.jsx)(a,{fontSize:12,color:`$color10`,children:`Refresh`})})]}),t===`leads`?x(Jae.map(e=>({id:e,label:e===`all`?`All`:`★ ${e}`})),n,r):null,t===`investors`?x(qae,i,o):null,l?(0,H.jsxs)(z,{p:`$4`,gap:`$2`,children:[(0,H.jsx)(a,{fontSize:13,fontWeight:`600`,color:`$color12`,children:`This list could not be read.`}),(0,H.jsx)(a,{fontSize:12,color:`$color10`,children:l})]}):(0,H.jsxs)(y,{flex:1,minW:0,minH:0,children:[(0,H.jsx)(U_,{flex:1,minW:0,minH:0,children:(0,H.jsx)(K0,{fields:g,records:s?.rows??[],loading:d,editable:!1,selectable:!1,defaultKind:`table`,boardDisabled:!0,fieldIcons:Hae,onOpen:e=>m(e),empty:`No records.`},t)}),p?(0,H.jsxs)(z,{width:380,shrink:0,borderLeftWidth:1,borderColor:`$borderColor`,bg:`$background`,children:[(0,H.jsxs)(y,{height:44,px:`$3`,items:`center`,justify:`space-between`,borderBottomWidth:1,borderColor:`$borderColor`,children:[(0,H.jsx)(a,{fontSize:13,fontWeight:`600`,color:`$color12`,numberOfLines:1,children:String(p.name||p.email||`Record`)}),(0,H.jsx)(W,{size:`xs`,width:26,height:26,p:`$0`,chromeless:!0,onPress:()=>m(null),children:(0,H.jsx)(Rn,{size:14,color:`$color10`})})]}),(0,H.jsx)(U_,{flex:1,minH:0,children:(0,H.jsx)(z,{p:`$3`,children:(0,H.jsx)(t0,{fields:g,record:p})})})]}):null]})]})})}var S7=()=>{let e=Math.floor(Date.now()/1e3),t=crypto.getRandomValues(new Uint8Array(8));return e.toString(16).padStart(8,`0`)+Array.from(t,e=>e.toString(16).padStart(2,`0`)).join(``)},C7=(e,t)=>({_id:S7(),space:`core:space:Tx`,objectSpace:e,modifiedBy:t,modifiedOn:Date.now()}),w7=(e,t,n,r,i=S7())=>({...C7(e,t),_class:F8.create,objectId:i,objectClass:n,attributes:r}),T7=(e,t,n)=>({...C7(e.space,t),_class:F8.update,objectId:e._id,objectClass:e._class,operations:n}),E7=(e,t)=>({...C7(e.space,t),_class:F8.remove,objectId:e._id,objectClass:e._class}),D7=`0123456789abcdefghijklmnopqrstuvwxyz`,O7=0,Xae=35,k7=D7[18],A7=(e,t)=>D7.indexOf(e[t]),j7=(e,t)=>{let n=e??``,r=t??``,i=0;for(;i<n.length&&i<r.length&&n[i]===r[i];)i++;return n.slice(0,i)+Zae(n.slice(i),r.slice(i))},Zae=(e,t)=>{if(t===``)return M7(e);if(e===``)return N7(t);let n=A7(e,0),r=A7(t,0);return r-n>1?D7[Math.floor((n+r)/2)]:e[0]+M7(e.slice(1))},M7=e=>{for(let t=e.length-1;t>=0;t--)if(A7(e,t)<Xae)return e.slice(0,t)+D7[A7(e,t)+1];return e+k7},N7=e=>{let t=A7(e,0);return t>1?D7[Math.floor(t/2)]:t===1?D7[O7]+k7:D7[O7]+N7(e.slice(1))},P7=[I8.backlog,I8.todo,I8.doing,I8.done],F7=e=>e.find(P8.project),I7=(e,t)=>e.one(P8.project,{_id:t}),L7=async(e,t)=>{let n=await e.find(P8.status,t?{space:t}:{}),r=new Map(P7.map((e,t)=>[e,t]));return n.sort((e,t)=>(r.get(e.category)??P7.length)-(r.get(t.category)??P7.length)||(e.rank??``).localeCompare(t.rank??``))},R7=async(e,t)=>(await e.find(P8.issue,t?{space:t}:{})).sort((e,t)=>(e.rank??``).localeCompare(t.rank??``)||e.number-t.number),z7=e=>e.find(P8.person),B7=e=>e.find(P8.tag),Qae=e=>e.find(P8.component),V7={projects:()=>z8(P8.project),statuses:e=>z8(P8.status,e),issues:e=>z8(P8.issue,e),people:()=>z8(P8.person),tags:()=>z8(P8.tag),components:()=>z8(P8.component)},$ae=(e,t,n,r,i={})=>e.write(T7(n,t,{status:r,rank:j7(i.before?.rank,i.after?.rank)})),H7=(e,t,n,r)=>e.write(T7(n,t,r)),eoe=(e,t,n,r)=>e.write(w7(n,t,P8.issue,{title:r.title,status:r.status,priority:r.priority,number:r.number,rank:j7(void 0,r.after?.rank),assignee:null,subIssues:0,comments:0,attachments:0,estimation:0,reportedTime:0,remainingTime:0})),toe=[`issues`,`components`,`milestones`,`templates`],noe=e=>e[0].toUpperCase()+e.slice(1),roe=()=>{let[e,t]=(0,V.useState)(``),{pathname:n}=yi(),{plane:r}=eH(),i=oV(V7.projects(),()=>F7(r),{enabled:!!r}),a=(i.data??[]).filter(t=>t.name.toLowerCase().includes(e.trim().toLowerCase()));return(0,H.jsxs)(C5,{title:m5(n)?.label??`Tracker`,children:[(0,H.jsx)(w5,{value:e,onChange:t}),(0,H.jsx)(z,{height:24}),(0,H.jsx)(D5,{to:`/mine`,icon:(0,H.jsx)(Gp,{size:16,color:`$soft`}),children:`My issues`}),(0,H.jsx)(D5,{to:`/issues`,icon:(0,H.jsx)(Tm,{size:16,color:`$soft`}),children:`All issues`}),(0,H.jsx)(T5,{}),(0,H.jsx)(D5,{to:`/projects`,icon:(0,H.jsx)(dp,{size:16,color:`$soft`}),children:`All projects`}),(0,H.jsx)(T5,{}),(0,H.jsxs)(O5,{children:[(0,H.jsx)(E5,{children:`Your projects`}),i.phase===`loading`?(0,H.jsx)(z,{px:10,py:12,children:(0,H.jsx)(tv,{size:16})}):null,i.phase===`failure`?(0,H.jsx)(W7,{children:`Your projects could not be read.`}):null,i.phase===`ready`&&a.length===0?(0,H.jsx)(W7,{children:e.trim()?`No project by that name.`:`No projects yet.`}):null,a.map(e=>(0,H.jsx)(ioe,{project:e},e._id))]})]})},ioe=({project:e})=>{let t=Ci().id===e._id,[n,r]=(0,V.useState)(t);return(0,H.jsxs)(z,{children:[(0,H.jsx)(Wie,{open:n,onPress:()=>r(!n),icon:(0,H.jsx)(aoe,{id:e._id}),children:e.name}),n?(0,H.jsx)(Gie,{children:toe.map(t=>(0,H.jsx)(D5,{to:`/projects/${e._id}/${t}`,indent:!0,children:noe(t)},t))}):null]})},U7=[`M8 1.5 14.5 8 8 14.5 1.5 8Z`,`M8 1.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13Z`,`M8 1.5 15 14.5H1Z`,`M2 2h12v12H2Z`],aoe=({id:e})=>(0,H.jsx)(`svg`,{width:16,height:16,viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":!0,children:(0,H.jsx)(`path`,{d:U7[SH(e)%U7.length],stroke:wH(e),strokeWidth:1.5,strokeLinejoin:`round`})}),W7=({children:e})=>(0,H.jsx)(a,{px:10,py:8,fontSize:Z.small,color:`$faint`,children:e}),G7=async(e,t)=>{let n=await e.find(P8.notice,{space:t});return(n.length>0?n:await e.find(P8.notice)).sort((e,t)=>t.modifiedOn-e.modifiedOn)},ooe=async(e,t)=>{let[n,r,i]=await Promise.all([e.find(P8.channel,{space:t}),e.find(P8.issue),e.find(P8.project)]),a=n.length>0?n:await e.find(P8.channel),o=new Map;for(let e of i)o.set(e._id,e.name);for(let e of a)o.set(e._id,`#${e.name}`);for(let e of r){let t=o.get(e.space);t&&o.set(e._id,t)}return o},soe=(e,t,n)=>e.write(T7(n,t,{isViewed:!0})),K7={[I8.backlog]:`backlog`,[I8.todo]:`todo`,[I8.doing]:`progress`,[I8.done]:`done`,[I8.cancelled]:`done`},coe=[void 0,`urgent`,`high`,`medium`,`low`],q7={urgent:L8.urgent,high:L8.high,medium:L8.medium,low:L8.low},loe=e=>{let t=e.estimation??0;return t<=0?0:Math.max(0,Math.min(1,(e.reportedTime??0)/t))},J7=e=>({id:e._id,name:R8(e),face:e.avatar??void 0}),uoe=(e,t)=>{let n=[e.assignee,...e.collaborators??[]].filter(e=>!!e),r=new Set,i=[];for(let e of n){if(r.has(e))continue;r.add(e);let n=t.get(e);n&&i.push(J7(n))}return i},doe=(e,t)=>({id:e._id,key:eie(t.project??t.projects.get(e.space),e),title:e.title,description:e.description,projectId:e.space,status:t.columns.get(e.status)??`backlog`,priority:coe[e.priority]??void 0,labels:t.words.get(e._id)??[],done:loe(e),people:uoe(e,t.crowd),origin:e.component?foe(t.parts.get(e.component)):void 0,files:e.attachments??0,replies:e.comments??0}),foe=e=>e?{name:e}:void 0,Y7=e=>new Map(e.map(e=>[e._id,K7[e.category]??`backlog`])),poe=(e,t)=>async(n,r,i)=>{let a=t??`proj-crm`,[o,s,c]=await Promise.all([R7(e,a),L7(e,a),I7(e,a)]),l=s.find(e=>(K7[e.category]??`backlog`)===n)??s[0];if(!l)throw Error(`this project has no ${n} column`);let u=Math.max(c?.sequence??0,...o.map(e=>e.number))+1,d=i?.priority?q7[i.priority]:0;if(await eoe(e,e.account??``,a,{title:r,status:l._id,priority:d,number:u,after:o.find(e=>e.status===l._id)}),i&&(i.description||i.assigneeId||i.labels&&i.labels.length>0)){let t=(await R7(e,a)).find(e=>e.number===u&&e.title===r);if(t&&(await H7(e,e.account??``,t,{...i.description===void 0?{}:{description:i.description},...i.assigneeId===void 0?{}:{assignee:i.assigneeId,collaborators:i.assigneeId?[i.assigneeId]:[]}}),i.labels&&i.labels.length>0))for(let n of i.labels)await e.write(w7(a,e.account??``,P8.tag,{attachedTo:t._id,attachedToClass:P8.issue,collection:`labels`,tag:`tag-${n.toLowerCase()}`,title:n}))}},moe=(e,t)=>({watch(n,r){let i=!0,a=()=>{Promise.all([L7(e,t),R7(e,t),z7(e),B7(e),Qae(e),F7(e)]).then(async([r,a,o,s,c,l])=>{if(!i)return;let u=t&&a.length?await I7(e,t):void 0;if(!i)return;let d=new Map;for(let e of s){let t=d.get(e.attachedTo);t?t.push(e.title):d.set(e.attachedTo,[e.title])}let f={columns:Y7(r),crowd:new Map(o.map(e=>[e._id,e])),words:d,parts:new Map(c.map(e=>[e._id,e.label])),project:u,projects:new Map(l.map(e=>[e._id,e]))};n(a.map(e=>doe(e,f)))}).catch(e=>i&&r(e instanceof Error?e:Error(String(e))))};a();let o=e.watch(a);return()=>{i=!1,o()}},add:poe(e,t),async move(n,r,i){let a=await R7(e,t),o=a.find(e=>e._id===n);if(!o)throw Error(`no issue to move`);let s=(await L7(e,o.space)).find(e=>(K7[e.category]??`backlog`)===r);if(!s)throw Error(`no column to move into`);let c=a.filter(e=>e.status===s._id&&e._id!==n),l=i?c.findIndex(e=>e._id===i):c.length,u=l<0?c.length:l;await $ae(e,e.account??``,o,s._id,{before:c[u-1],after:c[u]})},async update(n,r){let i=(await R7(e,t)).find(e=>e._id===n);if(!i)return;let a={};if(r.title!==void 0&&(a.title=r.title),r.description!==void 0&&(a.description=r.description),r.priority!==void 0&&(a.priority=r.priority?q7[r.priority]:0),r.done!==void 0){let e=i.estimation&&i.estimation>0?i.estimation:100;a.estimation=e,a.reportedTime=Math.round(Math.max(0,Math.min(1,r.done))*e)}if(r.assigneeId!==void 0){a.assignee=r.assigneeId;let e=(i.collaborators??[]).filter(e=>e!==r.assigneeId);a.collaborators=r.assigneeId?[r.assigneeId,...e]:e}if(r.replies!==void 0&&(a.comments=r.replies),r.status!==void 0){let t=(await L7(e,i.space)).find(e=>(K7[e.category]??`backlog`)===r.status);t&&(a.status=t._id)}if(Object.keys(a).length>0&&await H7(e,e.account??``,i,a),r.labels!==void 0){let t=(await B7(e)).filter(e=>e.attachedTo===n);for(let n of t)await e.write(E7(n,e.account??``));for(let t of r.labels)await e.write(w7(i.space,e.account??``,P8.tag,{attachedTo:n,attachedToClass:P8.issue,collection:`labels`,tag:`tag-${t.toLowerCase()}`,title:t}))}},async remove(n){let r=(await R7(e,t)).find(e=>e._id===n);r&&await e.write(E7(r,e.account??``))}}),X7=e=>{let{plane:t,current:n}=eH();return(0,V.useMemo)(()=>t&&n?moe(t,e):null,[t,n,e])},Z7=e=>{let{plane:t}=eH(),n=oV(V7.people(),()=>z7(t),{enabled:!!t}),r=oV(V7.projects(),()=>F7(t),{enabled:!!t}),i=e?(r.data??[]).find(t=>t._id===e)?.members:void 0,a=new Map((n.data??[]).map(e=>[e._id,e]));return(i?i.map(e=>a.get(e)):n.data??[]).filter(e=>!!e).map(J7)},Q7=e=>e===`refused`?`refused`:e===`homeless`?`nowhere`:`opening`,$7=()=>{let{plane:e}=eH();return oV(V7.projects(),()=>F7(e),{enabled:!!e})},hoe=e=>{let t=$7();return e?(t.data??[]).find(t=>t._id===e):void 0},goe=/(@[\w.-]+)/g,e9=(e,t)=>e?[{text:e,[t]:!0}]:[],_oe=(e,t,n)=>{let r=[{text:e,strong:!0}];return(n?t.split(n):[t]).forEach((e,t)=>{t>0&&r.push(...e9(n,`strong`));for(let t of e.split(goe))t&&(t.startsWith(`@`)?r.push(...e9(t,`mention`)):r.push({text:t}))}),r.map((e,t)=>t===1&&e.text?{...e,text:` ${e.text}`}:e)},voe=(e,t,n)=>{let r=t.get(String(e.modifiedBy??``)),i=r?R8(r):`Somebody`,a=n.get(String(e.attachedTo??``));return{id:e._id,kind:e.attachedToClass===P8.channel||e.attachedToClass===P8.direct||e.attachedToClass===P8.message?`chat`:`task`,actor:{name:i,face:r?.avatar??void 0},line:_oe(i,e.body??e.title??``,a),at:e.modifiedOn,place:a,seen:e.isViewed}},yoe=()=>{let{plane:e,current:t,standing:n}=eH();return(0,V.useEffect)(()=>{if(!e||!t){let e=Q7(n);IH({list:e===`refused`?()=>Promise.reject(Error(`Your workspace is not answering.`)):e===`nowhere`?()=>Promise.resolve([]):()=>new Promise(()=>{}),see:()=>Promise.resolve()});return}let r=t.uuid;IH({async list(){let[t,n,i]=await Promise.all([G7(e,r),z7(e),ooe(e,r)]),a=new Map(n.map(e=>[e._id,e]));return t.map(e=>voe(e,a,i))},async see(t){let n=(await G7(e,r)).find(e=>e._id===t);n&&!n.isViewed&&await soe(e,e.account??``,n)}})},[e,t,n]),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(boe,{}),(0,H.jsx)(xoe,{})]})},boe=()=>{let e=RH();return(0,V.useEffect)(()=>Rie(e),[e]),null},xoe=()=>{let{plane:e}=eH(),t=oV(V7.statuses(),()=>L7(e),{enabled:!!e}),n=oV(V7.issues(),()=>R7(e),{enabled:!!e}),r=Y7(t.data??[]),i=n.data??[],a=i.filter(e=>r.get(e.status)!==`done`).length,o=i.length?Math.round(a/i.length*100):null;return(0,V.useEffect)(()=>zie(o),[o]),null},t9=({glyph:e,n:t,label:n})=>t>0?(0,H.jsxs)(y,{items:`center`,gap:4,"aria-label":`${t} ${n}`,children:[e,(0,H.jsx)(a,{fontSize:`$3`,color:`$dim`,children:t})]}):null,n9=[`backlog`,`todo`,`progress`,`done`],r9=[`low`,`medium`,`high`,`urgent`],i9={backlog:`Backlog`,todo:`To do`,progress:`In progress`,done:`Done`},Soe={urgent:1,high:2,medium:3,low:4},a9=(e,t)=>t&&e.toLowerCase()===t?EH(Soe[t]):CH(e),o9={backlog:bH.backlog,todo:bH.todo,progress:bH.doing,done:bH.done},s9={arc:X.accent,track:X.rule},c9=({done:e,size:t=16,width:n=2})=>{let r=Math.min(1,Math.max(0,e)),i=(t-n)/2,a=2*Math.PI*i;return(0,H.jsxs)(`svg`,{width:t,height:t,viewBox:`0 0 ${t} ${t}`,role:`img`,"aria-label":`${Math.round(r*100)}% done`,children:[(0,H.jsx)(`circle`,{cx:t/2,cy:t/2,r:i,fill:`none`,stroke:s9.track,strokeWidth:n}),r>0?(0,H.jsx)(`circle`,{cx:t/2,cy:t/2,r:i,fill:`none`,stroke:s9.arc,strokeWidth:n,strokeLinecap:`round`,strokeDasharray:`${a*r} ${a}`,transform:`rotate(-90 ${t/2} ${t/2})`}):null]})},l9=12,Coe=48,woe=({issue:e,dragging:t,onOpen:n,...r})=>{let i=e.priority?[Eoe(e.priority),...e.labels]:e.labels;return(0,H.jsxs)(z,{"data-slot":`issue`,"data-issue":e.id,bg:`$raised`,rounded:Q.card,overflow:`hidden`,opacity:t?.4:1,cursor:n?`pointer`:`grab`,hoverStyle:{background:`$hover`},role:`article`,tabIndex:0,"aria-label":`${e.key} ${e.title}`,onPress:()=>n?.(e),...Doe(r),children:[(0,H.jsxs)(z,{p:l9,gap:DH.tight,children:[e.cover?(0,H.jsx)(lo,{src:e.cover,alt:``,width:`100%`,aspectRatio:1.44,rounded:`$1`,mb:4}):null,(0,H.jsx)(y,{items:`center`,justify:`space-between`,gap:6,children:(0,H.jsx)(a,{fontSize:Z.small,fontWeight:`600`,color:`$dim`,children:e.key})}),(0,H.jsx)(a,{fontSize:Z.body,lineHeight:20,color:`$ink`,style:koe,children:e.title}),i.length>0?(0,H.jsx)(y,{gap:DH.tight,flexWrap:`wrap`,children:i.map(t=>{let{background:n,color:r}=a9(t,e.priority);return(0,H.jsx)(Yh,{variant:`default`,style:{...Toe,backgroundColor:n},children:(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`600`,style:{color:r},children:t})},t)})}):null,e.done!==void 0||e.origin?(0,H.jsxs)(y,{items:`center`,gap:`$4`,mt:`$2`,children:[e.done===void 0?null:(0,H.jsxs)(y,{items:`center`,gap:4,children:[(0,H.jsx)(c9,{done:e.done}),(0,H.jsxs)(a,{fontSize:Z.body,color:`$soft`,children:[Math.round(e.done*100),`%`]})]}),e.origin?(0,H.jsx)(Ooe,{name:e.origin.name,mark:e.origin.mark}):null]}):null]}),(0,H.jsx)(Lc,{}),(0,H.jsxs)(y,{height:Coe,px:l9,items:`center`,justify:`space-between`,children:[(0,H.jsx)(p7,{people:e.people}),(0,H.jsxs)(y,{items:`center`,gap:`$3`,children:[(0,H.jsx)(t9,{glyph:(0,H.jsx)(pm,{size:12,color:`$dim`}),n:e.files,label:`attachments`}),(0,H.jsx)(t9,{glyph:(0,H.jsx)(cm,{size:12,color:`$dim`}),n:e.replies,label:`replies`})]})]})]})},Toe={minHeight:18,height:18,paddingHorizontal:8,borderRadius:9999},Eoe=e=>e[0].toUpperCase()+e.slice(1),Doe=e=>({draggable:!0,...e}),Ooe=({name:e,mark:t})=>(0,H.jsxs)(y,{items:`center`,gap:6,children:[t?(0,H.jsx)(lo,{src:t,alt:``,width:20,height:20,rounded:9999}):(0,H.jsx)(y,{width:20,height:20,rounded:9999,bg:`$edge`,items:`center`,justify:`center`,children:(0,H.jsx)(a,{fontSize:`$1`,color:`$quiet`,children:e[0]?.toUpperCase()})}),(0,H.jsx)(a,{fontSize:`$2`,color:`$quiet`,children:e})]}),koe={display:`-webkit-box`,WebkitBoxOrient:`vertical`,WebkitLineClamp:3,overflow:`hidden`},Aoe=({column:e,drag:t,over:n,onOver:r,onDrop:i,onAdd:o,onOpen:s,onLift:c,onLand:l})=>{let u=t=>n=>{n.preventDefault(),n.stopPropagation(),i(e.status,t)},d=t=>n=>{n.preventDefault(),r(e.status,t)};return(0,H.jsxs)(z,{"data-slot":`column`,"data-status":e.status,flex:1,minW:240,shrink:0,gap:DH.tight,role:`list`,"aria-label":e.name,onDragOver:d(`end`),onDrop:u(),children:[(0,H.jsxs)(y,{items:`center`,gap:DH.tight,height:24,children:[(0,H.jsx)(z,{width:8,height:8,rounded:9999,shrink:0,style:{backgroundColor:o9[e.status]}}),(0,H.jsx)(a,{fontSize:Z.small,fontWeight:`700`,color:`$ink`,...OH,children:e.name}),(0,H.jsxs)(a,{fontSize:Z.small,color:`$dim`,children:[`– `,e.issues.length]}),(0,H.jsx)(y,{flex:1}),o?(0,H.jsxs)(Rg,{children:[(0,H.jsx)(Bg,{asChild:!0,children:(0,H.jsx)(W,{variant:`ghost`,size:`icon-sm`,"aria-label":`${e.name} actions`,children:(0,H.jsx)(cp,{size:14})})}),(0,H.jsx)(Wg,{align:`end`,children:(0,H.jsx)(Jg,{onSelect:()=>o(e.status),children:`Add issue`})})]}):null]}),o?(0,H.jsx)(W,{variant:`ghost`,height:36,width:`100%`,borderWidth:1,borderStyle:`dashed`,borderColor:`$edge`,rounded:Q.card,"aria-label":`Add issue to ${e.name}`,onPress:()=>o(e.status),children:(0,H.jsx)(hm,{size:16})}):null,e.issues.map(e=>(0,H.jsxs)(z,{role:`listitem`,gap:DH.tight,onDragOver:d(e.id),onDrop:u(e.id),children:[t&&n===e.id?(0,H.jsx)(u9,{height:t.cover?260:176}):null,(0,H.jsx)(woe,{issue:e,dragging:t?.id===e.id,onOpen:s,onDragStart:()=>c(e),onDragEnd:l})]},e.id)),t&&n===`end`?(0,H.jsx)(u9,{height:t.cover?260:176}):null,(0,H.jsx)(z,{flex:1,minH:24})]})},u9=({height:e})=>(0,H.jsx)(z,{height:e,rounded:Q.card,borderWidth:1,borderStyle:`dashed`,borderColor:`$edge`}),d9=e=>n9.map(t=>({status:t,name:i9[t],issues:e.filter(e=>e.status===t)})),f9=(e,t,n,r)=>{let i=e.find(e=>e.id===t);if(!i||i.status===n&&r===void 0&&joe(e,n)?.id===t||t===r)return e;let a=e.filter(e=>e.id!==t),o={...i,status:n},s=r?a.findIndex(e=>e.id===r):-1;if(s<0){let e=a.map(e=>e.status===n).lastIndexOf(!0);return p9(a,e<0?a.length:e+1,o)}return p9(a,s,o)},p9=(e,t,n)=>[...e.slice(0,t),n,...e.slice(t)],joe=(e,t)=>e.filter(e=>e.status===t).at(-1),m9=10,h9=14,Moe=({source:e,only:t,onOpen:n,onCreateIn:r})=>{let[i,a]=(0,V.useState)(null),[o,s]=(0,V.useState)(null),[c,l]=(0,V.useState)(null),[u,d]=(0,V.useState)(null),[f,p]=(0,V.useState)(0);(0,V.useEffect)(()=>(a(null),s(null),e.watch(e=>{a(e),s(null)},s)),[e,f]);let m=(0,V.useCallback)((t,n)=>{d(null);let r=c;l(null),r&&i&&(a(f9(i,r.id,t,n)),e.move(r.id,t,n).catch(s))},[c,i,e]),h=e.add?.bind(e),g=r??(h?e=>{h(e,`New issue`).catch(s)}:void 0);if(o)return(0,H.jsx)(Foe,{why:o.message,onRetry:()=>p(e=>e+1)});if(!i)return(0,H.jsx)(Noe,{});if(i.length===0)return(0,H.jsx)(Poe,{onAdd:g&&(()=>g(`backlog`))});let _=t?.length?i.filter(e=>e.priority&&t.includes(e.priority)):i;return(0,H.jsx)(Mt,{horizontal:!0,contentContainerStyle:{p:h9,gap:m9,shrink:0,grow:1,minW:`100%`},children:d9(_).map(e=>(0,H.jsx)(Aoe,{column:e,drag:c,over:u?.status===e.status?u.before:null,onOver:(e,t)=>d({status:e,before:t}),onDrop:m,onAdd:g,onOpen:n,onLift:l,onLand:()=>{l(null),d(null)}},e.status))})},Noe=()=>(0,H.jsx)(y,{p:h9,gap:m9,"aria-busy":!0,"aria-label":`Loading issues`,children:[0,1,2,3].map(e=>(0,H.jsxs)(z,{width:240,gap:`$2`,children:[(0,H.jsx)(oC,{height:12,width:96}),(0,H.jsx)(oC,{height:36}),[0,1,2].map(e=>(0,H.jsx)(oC,{height:176},e))]},e))}),Poe=({onAdd:e})=>(0,H.jsx)(z,{p:h9,items:`flex-start`,children:(0,H.jsx)(KZ,{icon:Qp,title:`No issues yet`,description:`Issues you open appear here, one column per status.`,primary:e?{label:`New issue`,onPress:e}:void 0})}),Foe=({why:e,onRetry:t})=>(0,H.jsxs)(z,{p:h9,gap:`$3`,items:`flex-start`,role:`alert`,children:[(0,H.jsx)(a,{fontSize:`$4`,color:`$ink`,children:e}),(0,H.jsx)(W,{variant:`outline`,size:`sm`,onPress:t,children:`Try again`})]}),Ioe=()=>new Promise(()=>{}),g9=e=>({watch(t,n){return e===`refused`&&n(Error(`Your workspace is not answering.`)),e===`nowhere`&&t([]),()=>{}},move:Ioe}),_9=16,Loe=12,Roe=20,zoe=4,Boe=28,Voe=10,Hoe=34,v9=[{id:`kanban`,label:`Kanban`,icon:eee},{id:`list`,label:`List`,icon:tm},{id:`timeline`,label:`Timeline`,icon:Sp}],Uoe=({trail:e,title:t,base:n,here:r,people:i,only:o,onOnly:s,onAdd:c})=>(0,H.jsxs)(z,{"data-parity-key":`board.head`,pt:Loe,children:[(0,H.jsxs)(y,{px:_9,height:Roe,items:`center`,gap:8,children:[(0,H.jsx)(Woe,{steps:e}),(0,H.jsx)(y,{flex:1,minW:0}),i.length>0?(0,H.jsx)(y,{rounded:Q.pill,bg:`$hover`,px:6,py:2,items:`center`,children:(0,H.jsx)(p7,{people:i,size:24,show:4,ground:X.card})}):null,c?(0,H.jsx)(Joe,{onAdd:c}):null]}),(0,H.jsx)(z,{height:zoe}),(0,H.jsx)(y,{px:_9,height:Boe,items:`center`,children:(0,H.jsx)(a,{fontSize:Z.title,fontWeight:`500`,color:`$ink`,children:t})}),(0,H.jsx)(z,{height:Voe}),(0,H.jsxs)(y,{px:10,height:Hoe,items:`flex-end`,gap:4,children:[v9.map(e=>(0,H.jsxs)(Koe,{to:e.id===`kanban`?n:`${n}/${e.id}`,here:e.id===r,children:[(0,H.jsx)(e.icon,{size:16,color:e.id===r?`$ink`:`$soft`}),(0,H.jsx)(a,{fontSize:Z.row,color:e.id===r?`$ink`:`$soft`,children:e.label})]},e.id)),(0,H.jsx)(y,{flex:1,minW:0}),(0,H.jsx)(qoe,{only:o,onOnly:s}),c?(0,H.jsxs)(y,{role:`button`,tabIndex:0,cursor:`pointer`,height:26,mb:3,px:10,items:`center`,gap:6,rounded:Q.field,style:{backgroundColor:X.accent},focusVisibleStyle:kH,"aria-label":`New issue`,onPress:c,children:[(0,H.jsx)(hm,{size:14,color:X.ground}),(0,H.jsx)(a,{fontSize:Z.small,fontWeight:`600`,style:{color:X.ground},children:`New issue`})]}):null]}),(0,H.jsx)(Lc,{borderColor:`$edge`})]}),Woe=({steps:e})=>(0,H.jsx)(y,{items:`center`,gap:8,minW:0,children:e.map((e,t)=>(0,H.jsxs)(y,{items:`center`,gap:8,minW:0,children:[t>0?(0,H.jsx)(a,{fontSize:Z.small,color:`$faint`,children:`/`}):null,e.to?(0,H.jsx)(y,{asChild:!0,style:Goe,rounded:Q.field,focusVisibleStyle:kH,children:(0,H.jsx)(ja,{to:e.to,children:(0,H.jsx)(a,{fontSize:Z.small,color:`$soft`,numberOfLines:1,hoverStyle:{color:`$ink`},children:e.label})})}):(0,H.jsx)(a,{fontSize:Z.small,numberOfLines:1,"aria-current":`page`,style:{color:X.accent},children:e.label})]},`${e.label}-${t}`))}),Goe={flexDirection:`row`,alignItems:`center`},Koe=({to:e,here:t,children:n})=>(0,H.jsx)(z,{asChild:!0,style:{alignItems:`center`},rounded:Q.field,focusVisibleStyle:kH,children:(0,H.jsxs)(ja,{to:e,"aria-current":t?`page`:void 0,children:[(0,H.jsx)(y,{height:30,px:6,items:`center`,gap:8,children:n}),(0,H.jsx)(z,{height:2,width:`100%`,rounded:Q.pill,style:{backgroundColor:t?X.accent:`transparent`}})]})}),qoe=({only:e,onOnly:t})=>{let n=new Set(e),r=r=>t(n.has(r)?e.filter(e=>e!==r):[...e,r]);return(0,H.jsxs)(Rg,{children:[(0,H.jsx)(Bg,{asChild:!0,children:(0,H.jsxs)(y,{role:`button`,tabIndex:0,cursor:`pointer`,height:30,px:8,items:`center`,gap:8,rounded:Q.field,hoverStyle:{background:`$hover`},focusVisibleStyle:kH,"aria-label":`Filter issues`,children:[(0,H.jsx)(Sm,{size:16,color:e.length?`$ink`:`$soft`}),(0,H.jsx)(a,{fontSize:Z.row,color:e.length?`$ink`:`$soft`,children:e.length?`Filter · ${e.length}`:`Filter`})]})}),(0,H.jsxs)(Wg,{align:`end`,children:[(0,H.jsx)(u_,{children:`Priority`}),r9.map(e=>(0,H.jsx)(Yg,{checked:n.has(e),onCheckedChange:()=>r(e),children:(0,H.jsx)(a,{...OH,fontSize:Z.small,children:e})},e)),e.length?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(d_,{}),(0,H.jsx)(Jg,{onSelect:()=>t([]),children:`Show every priority`})]}):null]})]})},Joe=({onAdd:e})=>(0,H.jsxs)(Rg,{children:[(0,H.jsx)(Bg,{asChild:!0,children:(0,H.jsx)(y,{role:`button`,tabIndex:0,cursor:`pointer`,width:24,height:24,items:`center`,justify:`center`,rounded:Q.field,hoverStyle:{background:`$hover`},focusVisibleStyle:kH,"aria-label":`Board actions`,children:(0,H.jsx)(zp,{size:16,color:`$soft`})})}),(0,H.jsx)(Wg,{align:`end`,children:(0,H.jsx)(Jg,{onSelect:e,children:`New issue`})})]}),y9=[`Backend`,`Frontend`,`Devops`,`Feature`,`Design`,`Sales`,`Marketing`,`QA`,`Research`],Yoe=[0,.25,.5,.75,1],b9=e=>e[0].toUpperCase()+e.slice(1);function Xoe({issue:e,source:t,people:n,onClose:r}){let[i,o]=(0,V.useState)(e.title),[s,c]=(0,V.useState)(e.description??``),[l,u]=(0,V.useState)(``),[d,f]=(0,V.useState)(!1);(0,V.useEffect)(()=>{o(e.title),c(e.description??``)},[e.id,e.title,e.description]);let p=n=>{t.update?t.update(e.id,n):n.status&&t.move(e.id,n.status),f(!0),setTimeout(()=>f(!1),1200)},m=()=>{let t=i.trim()||e.title;p({title:t,description:s.trim()})},h=t=>{let n=e.labels.includes(t)?e.labels.filter(e=>e!==t):[...e.labels,t];p({labels:n})},g=()=>{let t=l.trim();t&&(e.labels.includes(t)||p({labels:[...e.labels,t]}),u(``))},_=e.people[0]?.id??null;return(0,H.jsxs)(z,{"data-slot":`issue-drawer`,width:420,shrink:0,borderLeftWidth:1,borderColor:`$edge`,bg:`$panel`,height:`100%`,children:[(0,H.jsxs)(y,{height:48,px:16,items:`center`,justify:`space-between`,borderBottomWidth:1,borderColor:`$edge`,gap:8,children:[(0,H.jsxs)(y,{items:`center`,gap:8,children:[(0,H.jsx)(z,{width:8,height:8,rounded:9999,style:{backgroundColor:o9[e.status]}}),(0,H.jsx)(a,{fontSize:Z.body,fontWeight:`700`,color:`$ink`,children:e.key}),e.origin?(0,H.jsx)(y,{px:8,height:20,rounded:9999,bg:`$raised`,borderWidth:1,borderColor:`$edge`,items:`center`,children:(0,H.jsx)(a,{fontSize:Z.chip,color:`$soft`,children:e.origin.name})}):null,d?(0,H.jsxs)(y,{items:`center`,gap:4,px:6,py:2,rounded:Q.pill,bg:`$hover`,children:[(0,H.jsx)(Vt,{size:11,color:`$ink`}),(0,H.jsx)(a,{fontSize:Z.chip,color:`$ink`,children:`Saved`})]}):null]}),(0,H.jsxs)(y,{items:`center`,gap:4,children:[t.remove?(0,H.jsx)(W,{variant:`ghost`,size:`icon-sm`,"aria-label":`Delete issue`,onPress:()=>{t.remove?.(e.id),r()},children:(0,H.jsx)(km,{size:14,color:`$soft`})}):null,(0,H.jsx)(W,{variant:`ghost`,size:`icon-sm`,"aria-label":`Close issue drawer`,onPress:r,children:(0,H.jsx)(Rn,{size:15,color:`$soft`})})]})]}),(0,H.jsx)(U_,{flex:1,minH:0,children:(0,H.jsxs)(z,{p:16,gap:16,children:[(0,H.jsxs)(z,{gap:8,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...OH,children:`Title`}),(0,H.jsx)(k_,{height:32,value:i,onChangeText:o,onBlur:m,fontSize:13,fontWeight:`600`,bg:`$raised`,borderColor:`$edge`})]}),(0,H.jsxs)(z,{gap:8,children:[(0,H.jsxs)(y,{items:`center`,justify:`space-between`,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...OH,children:`Specification & Notes`}),(0,H.jsx)(W,{size:`xs`,height:22,px:8,rounded:Q.field,style:{backgroundColor:X.accent},onPress:m,children:(0,H.jsx)(a,{fontSize:11,fontWeight:`600`,style:{color:X.ground},children:`Save`})})]}),(0,H.jsx)(k_,{height:32,value:s,onChangeText:c,onBlur:m,placeholder:`Add acceptance criteria, PR links, or technical context...`,fontSize:12,bg:`$raised`,borderColor:`$edge`})]}),(0,H.jsx)(Lc,{borderColor:`$edge`}),(0,H.jsxs)(z,{gap:8,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...OH,children:`Workflow Status`}),(0,H.jsx)(y,{gap:6,flexWrap:`wrap`,children:n9.map(t=>{let n=e.status===t;return(0,H.jsxs)(y,{role:`button`,tabIndex:0,cursor:`pointer`,px:10,height:28,rounded:Q.field,items:`center`,gap:6,bg:n?`$hover`:`$raised`,borderWidth:1,borderColor:n?`$ink`:`$edge`,focusVisibleStyle:kH,onPress:()=>p({status:t}),children:[(0,H.jsx)(z,{width:7,height:7,rounded:9999,style:{backgroundColor:o9[t]}}),(0,H.jsx)(a,{fontSize:Z.small,fontWeight:n?`700`:`500`,color:n?`$ink`:`$soft`,children:i9[t]})]},t)})})]}),(0,H.jsxs)(z,{gap:8,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...OH,children:`Priority`}),(0,H.jsx)(y,{gap:6,flexWrap:`wrap`,children:r9.map(t=>{let n=e.priority===t,{background:r,color:i}=a9(b9(t),t);return(0,H.jsx)(y,{role:`button`,tabIndex:0,cursor:`pointer`,px:10,height:26,rounded:Q.pill,items:`center`,borderWidth:1,borderColor:n?`$ink`:`transparent`,style:{backgroundColor:r},onPress:()=>p({priority:n?null:t}),children:(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,style:{color:i},children:b9(t)})},t)})})]}),(0,H.jsxs)(z,{gap:8,children:[(0,H.jsxs)(y,{items:`center`,justify:`space-between`,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...OH,children:`Completion Progress`}),(0,H.jsxs)(y,{items:`center`,gap:6,children:[(0,H.jsx)(c9,{done:e.done??0}),(0,H.jsxs)(a,{fontSize:Z.small,fontWeight:`600`,color:`$ink`,children:[Math.round((e.done??0)*100),`%`]})]})]}),(0,H.jsx)(y,{gap:6,children:Yoe.map(t=>{let n=Math.round(t*100),r=Math.round((e.done??0)*100)===n;return(0,H.jsx)(y,{role:`button`,tabIndex:0,cursor:`pointer`,flex:1,height:26,rounded:Q.field,items:`center`,justify:`center`,bg:r?`$hover`:`$raised`,borderWidth:1,borderColor:r?`$ink`:`$edge`,onPress:()=>p({done:t}),children:(0,H.jsxs)(a,{fontSize:Z.chip,fontWeight:r?`700`:`500`,color:r?`$ink`:`$soft`,children:[n,`%`]})},n)})})]}),(0,H.jsxs)(z,{gap:8,children:[(0,H.jsxs)(y,{items:`center`,gap:6,children:[(0,H.jsx)(Fm,{size:12,color:`$dim`}),(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...OH,children:`Assignee`})]}),(0,H.jsx)(y,{gap:6,flexWrap:`wrap`,children:n.slice(0,10).map(e=>{let t=_===e.id;return(0,H.jsxs)(y,{role:`button`,tabIndex:0,cursor:`pointer`,px:8,height:28,rounded:Q.pill,items:`center`,gap:6,bg:t?`$hover`:`$raised`,borderWidth:1,borderColor:t?`$ink`:`$edge`,onPress:()=>p({assigneeId:e.id}),children:[(0,H.jsx)(p7,{people:[e],size:18,show:1}),(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:t?`700`:`500`,color:t?`$ink`:`$soft`,children:e.name.split(` `)[0]})]},e.id)})})]}),(0,H.jsxs)(z,{gap:8,children:[(0,H.jsxs)(y,{items:`center`,gap:6,children:[(0,H.jsx)(Om,{size:12,color:`$dim`}),(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...OH,children:`Labels`})]}),(0,H.jsx)(y,{gap:6,flexWrap:`wrap`,children:y9.map(t=>{let n=e.labels.includes(t),{background:r,color:i}=a9(t);return(0,H.jsx)(Yh,{variant:`default`,style:{minHeight:22,height:22,paddingLeft:9,paddingRight:9,borderRadius:9999,cursor:`pointer`,backgroundColor:n?r:`transparent`,borderWidth:1,borderStyle:`solid`,borderColor:n?i:X.rule,opacity:n?1:.7},onClick:()=>h(t),children:(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`600`,style:{color:n?i:X.mute},children:n?`✓ ${t}`:t})},t)})}),(0,H.jsxs)(y,{gap:6,children:[(0,H.jsx)(k_,{flex:1,height:26,fontSize:11,placeholder:`Add custom label...`,value:l,onChangeText:u,bg:`$raised`,borderColor:`$edge`}),(0,H.jsx)(W,{size:`xs`,height:26,px:10,variant:`outline`,onPress:g,children:(0,H.jsx)(hm,{size:12})})]})]})]})})]})}function Zoe({initialStatus:e=`backlog`,people:t,onCreate:n,onClose:r}){let[i,o]=(0,V.useState)(``),[s,c]=(0,V.useState)(``),[l,u]=(0,V.useState)(e),[d,f]=(0,V.useState)(`medium`),[p,m]=(0,V.useState)(t[0]?.id??null),[h,g]=(0,V.useState)([`Feature`]),[_,v]=(0,V.useState)(!1),b=e=>{g(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},x=async()=>{let e=i.trim();if(e&&!_){v(!0);try{await n(l,e,{description:s.trim()||void 0,priority:d,assigneeId:p,labels:h}),r()}finally{v(!1)}}};return(0,H.jsx)(z,{position:`fixed`,t:0,l:0,r:0,b:0,z:1e3,bg:X.ground,items:`center`,justify:`center`,p:16,children:(0,H.jsxs)(z,{width:`100%`,maxW:520,rounded:Q.card,borderWidth:1,borderColor:`$edge`,bg:`$panel`,overflow:`hidden`,children:[(0,H.jsxs)(y,{height:46,px:16,items:`center`,justify:`space-between`,borderBottomWidth:1,borderColor:`$edge`,children:[(0,H.jsxs)(y,{items:`center`,gap:8,children:[(0,H.jsx)(vp,{size:15,color:`$ink`}),(0,H.jsx)(a,{fontSize:Z.body,fontWeight:`700`,color:`$ink`,children:`Create New Issue`})]}),(0,H.jsx)(W,{variant:`ghost`,size:`icon-sm`,"aria-label":`Close modal`,onPress:r,children:(0,H.jsx)(Rn,{size:15,color:`$soft`})})]}),(0,H.jsxs)(z,{p:16,gap:14,children:[(0,H.jsxs)(z,{gap:6,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...OH,children:`Issue Title`}),(0,H.jsx)(k_,{autoFocus:!0,placeholder:`e.g. Wire real-time webhook retry metrics in hanzo/cloud`,value:i,onChangeText:o,fontSize:13,bg:`$raised`,borderColor:`$edge`})]}),(0,H.jsxs)(z,{gap:6,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...OH,children:`Description & Acceptance Criteria`}),(0,H.jsx)(k_,{placeholder:`Context, repository, and target milestone...`,value:s,onChangeText:c,fontSize:12,bg:`$raised`,borderColor:`$edge`})]}),(0,H.jsxs)(z,{gap:6,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...OH,children:`Status`}),(0,H.jsx)(y,{gap:6,flexWrap:`wrap`,children:n9.map(e=>{let t=l===e;return(0,H.jsxs)(y,{role:`button`,tabIndex:0,cursor:`pointer`,px:10,height:26,rounded:Q.field,items:`center`,gap:6,bg:t?`$hover`:`$raised`,borderWidth:1,borderColor:t?`$ink`:`$edge`,onPress:()=>u(e),children:[(0,H.jsx)(z,{width:7,height:7,rounded:9999,style:{backgroundColor:o9[e]}}),(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:t?`700`:`500`,color:t?`$ink`:`$soft`,children:i9[e]})]},e)})})]}),(0,H.jsxs)(z,{gap:6,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...OH,children:`Priority`}),(0,H.jsx)(y,{gap:6,flexWrap:`wrap`,children:r9.map(e=>{let t=d===e,{background:n,color:r}=a9(b9(e),e);return(0,H.jsx)(y,{role:`button`,tabIndex:0,cursor:`pointer`,px:10,height:24,rounded:Q.pill,items:`center`,borderWidth:1,borderColor:t?`$ink`:`transparent`,style:{backgroundColor:n},onPress:()=>f(e),children:(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,style:{color:r},children:b9(e)})},e)})})]}),(0,H.jsxs)(z,{gap:6,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...OH,children:`Assign to a team member`}),(0,H.jsx)(y,{gap:6,flexWrap:`wrap`,children:t.slice(0,8).map(e=>{let t=p===e.id;return(0,H.jsxs)(y,{role:`button`,tabIndex:0,cursor:`pointer`,px:8,height:26,rounded:Q.pill,items:`center`,gap:6,bg:t?`$hover`:`$raised`,borderWidth:1,borderColor:t?`$ink`:`$edge`,onPress:()=>m(e.id),children:[(0,H.jsx)(p7,{people:[e],size:16,show:1}),(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:t?`700`:`500`,color:t?`$ink`:`$soft`,children:e.name.split(` `)[0]})]},e.id)})})]}),(0,H.jsxs)(z,{gap:6,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...OH,children:`Labels`}),(0,H.jsx)(y,{gap:6,flexWrap:`wrap`,children:y9.slice(0,6).map(e=>{let t=h.includes(e),{background:n,color:r}=a9(e);return(0,H.jsx)(Yh,{variant:`default`,style:{minHeight:20,height:20,paddingLeft:8,paddingRight:8,borderRadius:9999,cursor:`pointer`,backgroundColor:t?n:`transparent`,borderWidth:1,borderStyle:`solid`,borderColor:t?r:X.rule},onClick:()=>b(e),children:(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`600`,style:{color:t?r:X.mute},children:e})},e)})})]})]}),(0,H.jsxs)(y,{px:16,py:12,items:`center`,justify:`flex-end`,gap:8,borderTopWidth:1,borderColor:`$edge`,bg:`$raised`,children:[(0,H.jsx)(W,{size:`sm`,variant:`ghost`,onPress:r,children:`Cancel`}),(0,H.jsx)(W,{size:`sm`,style:{backgroundColor:X.accent},disabled:!i.trim()||_,onPress:()=>void x(),children:(0,H.jsx)(a,{fontSize:12,fontWeight:`600`,style:{color:X.ground},children:_?`Creating…`:`Create issue`})})]})]})})}var Qoe={minHeight:18,height:18,paddingHorizontal:8,borderRadius:9999},$oe=e=>e[0].toUpperCase()+e.slice(1),x9=e=>n9[(n9.indexOf(e)+1)%n9.length]??`backlog`,ese=({source:e,only:t,mine:n,onOpen:r,onCreateIn:i})=>{let[o,s]=(0,V.useState)(null),[c,l]=(0,V.useState)(null),[u,d]=(0,V.useState)(0);(0,V.useEffect)(()=>(s(null),l(null),e.watch(e=>{s(e),l(null)},l)),[e,u]);let f=e.add?.bind(e),p=i??(f?e=>void f(e,`New issue`).catch(l):void 0),m=t=>{if(!o)return;let n=x9(t.status);s(f9(o,t.id,n)),e.move(t.id,n).catch(l)};if(c)return(0,H.jsxs)(z,{p:24,gap:`$3`,items:`flex-start`,role:`alert`,children:[(0,H.jsx)(a,{fontSize:`$4`,color:`$ink`,children:c.message}),(0,H.jsx)(W,{variant:`outline`,size:`sm`,onPress:()=>d(e=>e+1),children:`Try again`})]});if(!o)return(0,H.jsx)(z,{p:24,gap:`$3`,"aria-busy":!0,"aria-label":`Loading issue list`,children:[0,1,2,3,4,5].map(e=>(0,H.jsx)(oC,{height:44},e))});let h=t?.length?o.filter(e=>e.priority&&t.includes(e.priority)):o,g=n?h.filter((e,t)=>t%2==0||h.length<=6):h;return g.length===0?(0,H.jsx)(z,{p:24,items:`flex-start`,children:(0,H.jsx)(KZ,{icon:tm,title:`No matching issues`,description:`Issues appear here grouped by workflow status.`,primary:p?{label:`New issue`,onPress:()=>p(`backlog`)}:void 0})}):(0,H.jsx)(U_,{flex:1,minH:0,children:(0,H.jsx)(z,{p:24,gap:20,children:d9(g).map(e=>(0,H.jsxs)(z,{rounded:Q.card,borderWidth:1,borderColor:`$edge`,bg:`$background`,overflow:`hidden`,children:[(0,H.jsxs)(y,{px:16,height:40,items:`center`,gap:DH.tight,bg:`$panel`,borderBottomWidth:+(e.issues.length>0),borderColor:`$edge`,children:[(0,H.jsx)(z,{width:8,height:8,rounded:9999,shrink:0,style:{backgroundColor:o9[e.status]}}),(0,H.jsx)(a,{fontSize:Z.small,fontWeight:`700`,color:`$ink`,...OH,children:e.name}),(0,H.jsx)(a,{fontSize:Z.small,color:`$dim`,children:e.issues.length}),(0,H.jsx)(y,{flex:1}),p?(0,H.jsx)(W,{variant:`ghost`,size:`icon-sm`,"aria-label":`Add issue to ${e.name}`,onPress:()=>p(e.status),children:(0,H.jsx)(hm,{size:14})}):null]}),e.issues.map((e,t)=>{let n=e.priority?[$oe(e.priority),...e.labels]:e.labels;return(0,H.jsxs)(z,{children:[t>0?(0,H.jsx)(Lc,{borderColor:`$edge`}):null,(0,H.jsxs)(y,{px:16,py:10,items:`center`,gap:12,cursor:r?`pointer`:`default`,hoverStyle:{background:`$hover`},onPress:()=>r?.(e),children:[(0,H.jsx)(y,{...i5(t=>{t?.stopPropagation?.(),m(e)},`Advance ${e.key} status`),width:20,height:20,rounded:9999,items:`center`,justify:`center`,borderWidth:1,borderColor:`$edge`,bg:`$panel`,children:(0,H.jsx)(z,{width:8,height:8,rounded:9999,style:{backgroundColor:o9[e.status]}})}),(0,H.jsx)(a,{fontSize:Z.small,fontWeight:`600`,color:`$soft`,width:68,shrink:0,children:e.key}),(0,H.jsx)(a,{fontSize:Z.body,color:`$ink`,flex:1,minW:160,numberOfLines:1,children:e.title}),(0,H.jsxs)(y,{gap:DH.tight,items:`center`,flexWrap:`wrap`,children:[n.map(t=>{let{background:n,color:r}=a9(t,e.priority);return(0,H.jsx)(Yh,{variant:`default`,style:{...Qoe,backgroundColor:n},children:(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`600`,style:{color:r},children:t})},t)}),e.origin?(0,H.jsx)(y,{px:8,height:18,rounded:9999,bg:`$panel`,borderWidth:1,borderColor:`$edge`,items:`center`,children:(0,H.jsx)(a,{fontSize:Z.chip,color:`$quiet`,children:e.origin.name})}):null]}),(0,H.jsx)(y,{width:64,items:`center`,justify:`flex-end`,gap:4,shrink:0,children:e.done===void 0?null:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(c9,{done:e.done}),(0,H.jsxs)(a,{fontSize:Z.small,color:`$soft`,children:[Math.round(e.done*100),`%`]})]})}),(0,H.jsxs)(y,{width:64,items:`center`,justify:`flex-end`,gap:`$2`,shrink:0,children:[(0,H.jsx)(t9,{glyph:(0,H.jsx)(pm,{size:12,color:`$dim`}),n:e.files,label:`attachments`}),(0,H.jsx)(t9,{glyph:(0,H.jsx)(cm,{size:12,color:`$dim`}),n:e.replies,label:`replies`})]}),(0,H.jsx)(y,{width:76,justify:`flex-end`,shrink:0,children:(0,H.jsx)(p7,{people:e.people,size:24,show:3})})]})]},e.id)})]},e.status))})})},S9=[{id:`w1`,label:`W1 · Oct 20`,sub:`Sprint 14`},{id:`w2`,label:`W2 · Oct 27`,sub:`Sprint 14`},{id:`w3`,label:`W3 · Nov 03`,sub:`Current · Active`,now:!0},{id:`w4`,label:`W4 · Nov 10`,sub:`Sprint 15`},{id:`w5`,label:`W5 · Nov 17`,sub:`Sprint 15`},{id:`w6`,label:`W6 · Nov 24`,sub:`Release Cut`}],tse=(e,t)=>{switch(e){case`done`:return{start:t%2==0?0:1,span:2};case`progress`:return{start:1+t%2,span:2};case`todo`:return{start:2+t%2,span:2};default:return{start:3+t%2,span:2}}},nse=({source:e,only:t,mine:n,onOpen:r})=>{let[i,o]=(0,V.useState)(null),[s,c]=(0,V.useState)(null);(0,V.useEffect)(()=>(o(null),c(null),e.watch(e=>{o(e),c(null)},c)),[e]);let l=t=>{if(!i)return;let n=x9(t.status);o(f9(i,t.id,n)),e.move(t.id,n).catch(c)};if(s)return(0,H.jsx)(z,{p:24,children:(0,H.jsx)(a,{fontSize:`$4`,color:`$ink`,children:s.message})});if(!i)return(0,H.jsx)(z,{p:24,gap:`$3`,"aria-busy":!0,"aria-label":`Loading timeline`,children:[0,1,2,3,4].map(e=>(0,H.jsx)(oC,{height:48},e))});let u=t?.length?i.filter(e=>e.priority&&t.includes(e.priority)):i,d=n?u.filter((e,t)=>t%2==0||u.length<=6):u;return d.length===0?(0,H.jsx)(z,{p:24,items:`flex-start`,children:(0,H.jsx)(KZ,{icon:Sp,title:`No issues on timeline`,description:`Scheduled issues and sprint milestones appear here across weeks.`})}):(0,H.jsx)(U_,{flex:1,minH:0,children:(0,H.jsx)(z,{p:24,gap:16,children:(0,H.jsxs)(z,{rounded:Q.card,borderWidth:1,borderColor:`$edge`,bg:`$background`,overflow:`hidden`,children:[(0,H.jsxs)(y,{bg:`$panel`,borderBottomWidth:1,borderColor:`$edge`,height:48,items:`center`,children:[(0,H.jsxs)(y,{width:280,shrink:0,px:16,items:`center`,justify:`space-between`,borderRightWidth:1,borderColor:`$edge`,height:`100%`,children:[(0,H.jsx)(a,{fontSize:Z.small,fontWeight:`700`,color:`$ink`,...OH,children:`Issue / Assignee`}),(0,H.jsxs)(a,{fontSize:Z.chip,color:`$soft`,children:[d.length,` tracked`]})]}),(0,H.jsx)(y,{flex:1,height:`100%`,children:S9.map(e=>(0,H.jsxs)(z,{flex:1,px:10,justify:`center`,borderRightWidth:1,borderColor:`$edge`,bg:`now`in e&&e.now?`$hover`:`transparent`,children:[(0,H.jsxs)(y,{items:`center`,gap:6,children:[`now`in e&&e.now?(0,H.jsx)(z,{width:6,height:6,rounded:9999,style:{backgroundColor:X.accent}}):null,(0,H.jsx)(a,{fontSize:Z.small,fontWeight:`600`,color:`now`in e&&e.now?`$ink`:`$soft`,children:e.label})]}),(0,H.jsx)(a,{fontSize:Z.chip,color:`$quiet`,children:e.sub})]},e.id))})]}),d.map((e,t)=>{let{start:n,span:i}=tse(e.status,t),o=n/S9.length*100,s=i/S9.length*100,c=Math.round((e.done??(e.status===`done`?1:.25))*100);return(0,H.jsxs)(z,{children:[t>0?(0,H.jsx)(Lc,{borderColor:`$edge`}):null,(0,H.jsxs)(y,{height:46,items:`center`,hoverStyle:{background:`$hover`},children:[(0,H.jsxs)(y,{width:280,shrink:0,px:16,gap:8,items:`center`,borderRightWidth:1,borderColor:`$edge`,height:`100%`,cursor:r?`pointer`:`default`,onPress:()=>r?.(e),children:[(0,H.jsx)(z,{width:8,height:8,rounded:9999,shrink:0,style:{backgroundColor:o9[e.status]}}),(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`600`,color:`$soft`,width:54,shrink:0,children:e.key}),(0,H.jsx)(a,{fontSize:Z.small,color:`$ink`,flex:1,numberOfLines:1,children:e.title}),(0,H.jsx)(p7,{people:e.people,size:20,show:1})]}),(0,H.jsxs)(y,{flex:1,height:`100%`,position:`relative`,items:`center`,children:[S9.map(e=>(0,H.jsx)(z,{flex:1,height:`100%`,borderRightWidth:1,borderColor:`$edge`,bg:`now`in e&&e.now?`$panel`:`transparent`},e.id)),(0,H.jsxs)(y,{...i5(()=>l(e),`${e.key} (${c}% done) — click to advance status`),position:`absolute`,style:{left:`${o+1}%`,width:`${s-2}%`},height:26,rounded:Q.field,bg:`$panel`,borderWidth:1,borderColor:`$edge`,overflow:`hidden`,items:`center`,px:8,justify:`space-between`,children:[(0,H.jsx)(z,{position:`absolute`,l:0,t:0,b:0,width:`${c}%`,opacity:.22,pointerEvents:`none`,style:{backgroundColor:o9[e.status]}}),(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`600`,color:`$ink`,numberOfLines:1,z:1,children:e.title}),(0,H.jsxs)(a,{fontSize:Z.chip,color:`$soft`,shrink:0,ml:6,z:1,children:[c,`%`]})]})]})]})]},e.id)})]})})})},rse=e=>v9.find(t=>t.id===e)?.id??`kanban`,C9=({mine:e=!1})=>{let{id:t,view:n}=Ci(),r=hoe(t),{standing:i}=eH(),a=X7(t)??g9(Q7(i)),o=a.add?.bind(a),s=Z7(t),[c,l]=(0,V.useState)([]),[u,d]=(0,V.useState)(null),[f,p]=(0,V.useState)([]),[m,h]=(0,V.useState)(null),g=rse(n);(0,V.useEffect)(()=>a.watch(e=>p(e),()=>{}),[a]);let _=u?f.find(e=>e.id===u)??null:null,v=e?`/mine`:t?`/projects/${t}/issues`:`/issues`,b=[{label:`Your projects`,to:`/projects`},...t?[{label:r?.name??`…`,to:v}]:[],{label:e?`My issues`:t?`Issues`:`All issues`}];return(0,H.jsxs)(z,{flex:1,minH:0,children:[(0,H.jsx)(Uoe,{trail:b,title:e?`My issues`:t?`Issues`:`All issues`,base:v,here:g,people:s,only:c,onOnly:l,onAdd:o?()=>h(`backlog`):void 0}),(0,H.jsxs)(y,{flex:1,minH:0,minW:0,children:[(0,H.jsx)(z,{flex:1,minH:0,minW:0,children:g===`kanban`?(0,H.jsx)(Moe,{source:a,only:c,onOpen:e=>d(e.id),onCreateIn:o?e=>h(e):void 0}):g===`list`?(0,H.jsx)(ese,{source:a,only:c,mine:e,onOpen:e=>d(e.id),onCreateIn:o?e=>h(e):void 0}):(0,H.jsx)(nse,{source:a,only:c,mine:e,onOpen:e=>d(e.id)})}),_?(0,H.jsx)(Xoe,{issue:_,source:a,people:s,onClose:()=>d(null)}):null]}),m&&o?(0,H.jsx)(Zoe,{initialStatus:m,people:s,onCreate:async(e,t,n)=>{await o(e,t,n)},onClose:()=>h(null)}):null]})};function ise(){let e=xi(),{current:t,standing:n}=eH(),r=$7(),i=X7()??g9(Q7(n)),o=Z7(),[s,c]=(0,V.useState)([]);(0,V.useEffect)(()=>i.watch(e=>c(e),()=>{}),[i]);let l=r.data??[];return(0,H.jsx)(U_,{flex:1,minH:0,children:(0,H.jsxs)(z,{p:24,gap:20,children:[(0,H.jsxs)(y,{items:`center`,justify:`space-between`,flexWrap:`wrap`,gap:12,children:[(0,H.jsxs)(z,{gap:4,children:[(0,H.jsxs)(a,{...OH,fontSize:Z.chip,fontWeight:`600`,color:`$soft`,children:[t?.name??`Hanzo AI`,` · Portfolio & Tracker`]}),(0,H.jsxs)(a,{fontSize:Z.title,fontWeight:`600`,color:`$ink`,children:[`All projects (`,l.length,`)`]}),(0,H.jsx)(a,{fontSize:Z.body,color:`$quiet`,children:`The projects in this space and the issues on their boards.`})]}),(0,H.jsxs)(y,{gap:8,items:`center`,children:[(0,H.jsx)(p7,{people:o,size:26,show:5}),(0,H.jsxs)(W,{onPress:()=>e(`/issues`),children:[`All Issues (`,s.length,`)`]})]})]}),(0,H.jsx)(y,{flexWrap:`wrap`,gap:16,children:l.map(t=>{let n=t.identifier.toUpperCase(),r=s.filter(e=>e.key.startsWith(`${n}-`)),i=r.length||t.sequence,o=r.filter(e=>e.status===`done`).length,c=r.filter(e=>e.status===`progress`).length,l=r.filter(e=>e.status===`todo`).length,u=r.filter(e=>e.status===`backlog`).length,d=r.length>0?o/r.length:0;return(0,H.jsxs)(z,{width:380,grow:1,p:20,rounded:Q.card,bg:`$background`,borderWidth:1,borderColor:`$edge`,gap:14,children:[(0,H.jsxs)(y,{items:`center`,justify:`space-between`,gap:10,children:[(0,H.jsxs)(y,{items:`center`,gap:10,children:[(0,H.jsx)(z,{width:36,height:36,rounded:Q.field,items:`center`,justify:`center`,bg:`$panel`,borderWidth:1,borderColor:`$edge`,children:(0,H.jsx)(Wp,{size:18,color:`$ink`})}),(0,H.jsxs)(z,{children:[(0,H.jsxs)(y,{items:`center`,gap:8,children:[(0,H.jsx)(a,{fontSize:Z.row,fontWeight:`600`,color:`$ink`,children:t.name}),(0,H.jsx)(y,{px:8,py:2,rounded:Q.pill,style:CH(t.identifier),children:(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,style:{color:CH(t.identifier).color},children:t.identifier})})]}),(0,H.jsxs)(a,{fontSize:Z.small,color:`$soft`,children:[r.length,` active issues · `,(t.members??[]).length,` members`]})]})]}),(0,H.jsxs)(y,{items:`center`,gap:6,children:[(0,H.jsx)(c9,{done:d,size:20,width:2.5}),(0,H.jsxs)(a,{fontSize:Z.small,fontWeight:`600`,color:`$ink`,children:[Math.round(d*100),`%`]})]})]}),(0,H.jsxs)(z,{gap:6,children:[(0,H.jsxs)(y,{height:6,rounded:Q.pill,bg:`$panel`,overflow:`hidden`,gap:2,children:[(0,H.jsx)(z,{flex:Math.max(1,o),style:{backgroundColor:bH.done}}),(0,H.jsx)(z,{flex:Math.max(1,c),style:{backgroundColor:bH.doing}}),(0,H.jsx)(z,{flex:Math.max(1,l),style:{backgroundColor:bH.todo}}),(0,H.jsx)(z,{flex:Math.max(1,u),style:{backgroundColor:bH.backlog}})]}),(0,H.jsxs)(y,{justify:`space-between`,flexWrap:`wrap`,gap:8,children:[(0,H.jsxs)(a,{fontSize:Z.chip,color:`$quiet`,children:[`Backlog: `,u]}),(0,H.jsxs)(a,{fontSize:Z.chip,color:`$quiet`,children:[`To do: `,l]}),(0,H.jsxs)(a,{fontSize:Z.chip,color:`$quiet`,children:[`In progress: `,c]}),(0,H.jsxs)(a,{fontSize:Z.chip,color:`$quiet`,children:[`Done: `,o,` / `,i]})]})]}),(0,H.jsxs)(y,{items:`center`,justify:`space-between`,flexWrap:`wrap`,gap:8,children:[(0,H.jsx)(y,{gap:6,flexWrap:`wrap`,children:[[`issues`,`Board`],[`issues/list`,`List`],[`issues/timeline`,`Timeline`]].map(([n,r])=>(0,H.jsx)(y,{...i5(()=>e(`/projects/${t._id}/${n}`),`${t.name} ${r}`),px:10,py:5,rounded:Q.field,bg:`$panel`,borderWidth:1,borderColor:`$edge`,hoverStyle:{background:`$hover`},children:(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`600`,color:`$soft`,children:r})},n))}),(0,H.jsx)(W,{size:`sm`,onPress:()=>e(`/projects/${t._id}/issues`),children:`Open Board →`})]})]},t._id)})})]})})}var ase=(0,V.lazy)(()=>Le(()=>import(`./Bots-ut9jYpti.js`).then(e=>({default:e.Bots})),__vite__mapDeps([6,1,2,7,3,4]))),w9=()=>{let{id:e}=Ci();return(0,H.jsx)(Gi,{to:e?`/projects/${e}/issues`:`/projects`,replace:!0})},T9=()=>(0,H.jsx)(Gi,{to:`/chat`,replace:!0}),E9=e=>(0,H.jsx)(y5,{nav:(0,H.jsx)(roe,{}),aside:(0,H.jsx)(L5,{}),children:e}),D9=e=>(0,H.jsx)(y5,{nav:(0,H.jsx)(jae,{}),aside:(0,H.jsx)(iae,{}),children:e}),ose=[{path:`/`,element:(0,H.jsx)(T9,{})},{path:`/login`,element:(0,H.jsx)(T9,{})},{path:`/auth`,element:(0,H.jsx)(T9,{})},{path:`/auth/callback`,element:(0,H.jsx)(T9,{})},{path:`/issues`,element:E9((0,H.jsx)(C9,{}))},{path:`/issues/:view`,element:E9((0,H.jsx)(C9,{}))},{path:`/mine`,element:E9((0,H.jsx)(C9,{mine:!0}))},{path:`/mine/:view`,element:E9((0,H.jsx)(C9,{mine:!0}))},{path:`/projects`,element:E9((0,H.jsx)(ise,{}))},{path:`/projects/:id`,element:(0,H.jsx)(w9,{})},{path:`/projects/:id/issues`,element:E9((0,H.jsx)(C9,{}))},{path:`/projects/:id/issues/:view`,element:E9((0,H.jsx)(C9,{}))},{path:`/projects/:id/:page`,element:(0,H.jsx)(w9,{})},{path:`/chat`,element:D9((0,H.jsx)(m7,{}))},{path:`/chat/:id`,element:D9((0,H.jsx)(m7,{}))},{path:`/bots`,element:(0,H.jsx)(y5,{nav:null,children:(0,H.jsx)(V.Suspense,{fallback:null,children:(0,H.jsx)(ase,{})})})},{path:`/crm`,element:(0,H.jsx)(Gi,{to:`/crm/investors`,replace:!0})},{path:`/crm/:section`,element:(e=>(0,H.jsx)(y5,{nav:(0,H.jsx)(Uae,{}),children:e}))((0,H.jsx)(Yae,{}))},{path:`/overview`,element:(0,H.jsx)(Gi,{to:`/chat`,replace:!0})},{path:`/agents`,element:(0,H.jsx)(Gi,{to:`/chat`,replace:!0})},{path:`/agents/:id`,element:(0,H.jsx)(Gi,{to:`/chat`,replace:!0})},{path:`/apps`,element:(0,H.jsx)(Gi,{to:`/chat`,replace:!0})},{path:`/apps/:appId`,element:(0,H.jsx)(Gi,{to:`/chat`,replace:!0})},{path:`/calendar`,element:(0,H.jsx)(Gi,{to:`/chat`,replace:!0})},{path:`/cal`,element:(0,H.jsx)(Gi,{to:`/chat`,replace:!0})},{path:`/time`,element:(0,H.jsx)(Gi,{to:`/chat`,replace:!0})},{path:`/meet`,element:(0,H.jsx)(Gi,{to:`/chat`,replace:!0})},{path:`/inbox`,element:(0,H.jsx)(Gi,{to:`/chat`,replace:!0})},{path:`/docs`,element:(0,H.jsx)(Gi,{to:`/chat`,replace:!0})},{path:`/files`,element:(0,H.jsx)(Gi,{to:`/chat`,replace:!0})},{path:`/mail`,element:(0,H.jsx)(Gi,{to:`/chat`,replace:!0})},{path:`/admin`,element:(0,H.jsx)(Gi,{to:`/chat`,replace:!0})},{path:`/settings`,element:(0,H.jsx)(Gi,{to:`/chat`,replace:!0})},{path:`/people`,element:(0,H.jsx)(Gi,{to:`/crm/investors`,replace:!0})},{path:`*`,element:(0,H.jsx)(Gi,{to:`/chat`,replace:!0})}],sse=()=>{let{land:e,depart:t}=dV(),[n,r]=(0,V.useState)(null),i=`Hanzo ${PB.title}`;return(0,V.useEffect)(()=>{document.title=`${n?`Sign in`:`Signing you in`} — ${i}`},[n,i]),(0,V.useEffect)(()=>{e().then(e=>window.location.replace(e)).catch(e=>r(e instanceof Error?e.message:String(e)))},[e]),(0,H.jsxs)(z,{flex:1,minH:`100vh`,bg:X.ground,children:[(0,H.jsxs)(y,{width:`100%`,minH:68,px:DH.wide,py:DH.tight,items:`center`,justify:`space-between`,borderBottomWidth:1,borderColor:X.rule,bg:X.ground,children:[(0,H.jsx)(y,{items:`center`,gap:DH.tight,cursor:`pointer`,shrink:0,onPress:()=>window.location.replace(`/`),children:(0,H.jsx)(a,{size:Z.row,color:X.ink,fontWeight:`600`,children:i})}),(0,H.jsx)(W,{size:`sm`,variant:`outline`,rounded:Q.pill,onPress:()=>window.location.replace(`/`),children:(0,H.jsx)(a,{size:Z.small,color:X.ink,fontWeight:`500`,children:`← Back to ${i}`})})]}),(0,H.jsx)(z,{flex:1,items:`center`,justify:`center`,gap:DH.inset,px:DH.wide,children:n?(0,H.jsxs)(z,{maxW:440,items:`center`,gap:DH.inset,children:[(0,H.jsx)(a,{size:Z.title,color:X.ink,fontWeight:`600`,style:{textAlign:`center`},children:`Couldn’t finish signing in`}),(0,H.jsx)(a,{size:Z.body,color:X.mute,style:{textAlign:`center`},children:n}),(0,H.jsxs)(y,{items:`center`,justify:`center`,gap:DH.tight,flexWrap:`wrap`,pt:DH.tight,children:[(0,H.jsx)(W,{rounded:Q.pill,bg:X.ink,onPress:()=>{t(`login`)},children:(0,H.jsx)(a,{size:Z.small,color:X.ground,fontWeight:`600`,children:`Try again`})}),(0,H.jsx)(W,{variant:`outline`,rounded:Q.pill,onPress:()=>window.location.replace(`/`),children:(0,H.jsx)(a,{size:Z.small,color:X.ink,fontWeight:`500`,children:`Back to ${i}`})})]})]}):(0,H.jsxs)(z,{items:`center`,gap:DH.tight,children:[(0,H.jsx)(tv,{}),(0,H.jsx)(a,{size:Z.body,color:X.ink,fontWeight:`500`,children:`Signing you in to ${i}…`})]})})]})},O9=[{id:`chat`,label:`Chat`,scene:0},{id:`projects`,label:`Projects`,scene:1},{id:`tasks`,label:`Tasks`,scene:1},{id:`crm`,label:`CRM`,scene:2},{id:`docs`,label:`Docs`,scene:2}],cse=[`bugfix`,`engineering`,`launch`,`security`,`ops`],k9=`PR #418`,lse=[{name:`Dev`,role:k9,hue:`var(--pv-blue)`},{name:`Sci`,role:`42/42 E2E`,hue:`var(--pv-green)`},{name:`Mark`,role:`v2.4.1`,hue:`var(--pv-amber)`},{name:`Opera`,role:`us-west`,hue:`var(--pv-violet)`}],A9=[{name:`Dev`,domain:`Engineering`,sandbox:`sbx-eng-01`,task:`Merged ${k9} · release PaySheet lock`,badge:`+14 −3`,hue:`var(--pv-blue)`},{name:`Sci`,domain:`QA & Eval`,sandbox:`sbx-webkit-02`,task:`iOS 18.2 Safari checkout suite green`,badge:`42/42 PASS`,hue:`var(--pv-green)`},{name:`Cyber`,domain:`Security`,sandbox:`sbx-sec-03`,task:`Diff & webhook signature audit clean`,badge:`0 CVEs`,hue:`var(--pv-rose)`},{name:`Mark`,domain:`Growth`,sandbox:`sbx-mkt-04`,task:`Drafted release note for #launch`,badge:`READY`,hue:`var(--pv-amber)`},{name:`Opera`,domain:`Infra & SRE`,sandbox:`sbx-sre-05`,task:`Canary rollout 100% healthy · 18ms p95`,badge:`LIVE`,hue:`var(--pv-violet)`},{name:`Fin`,domain:`Revenue Ops`,sandbox:`sbx-fin-06`,task:`Apple Pay settlement ledger reconciled`,badge:`$0 DRIFT`,hue:`var(--pv-green)`}],use=[{id:0,label:`Chat · #engineering`,short:`Chat`},{id:1,label:`Projects · Board`,short:`Projects`},{id:2,label:`Agents · Live Ops`,short:`Live Ops`}];function j9({pct:e,color:t}){let n=2*Math.PI*6,r=n*(1-Math.max(0,Math.min(100,e))/100);return(0,H.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,style:{flexShrink:0,transform:`rotate(-90deg)`},children:[(0,H.jsx)(`circle`,{cx:`8`,cy:`8`,r:6,fill:`none`,stroke:`var(--pv-rule-strong)`,strokeWidth:`2`}),(0,H.jsx)(`circle`,{cx:`8`,cy:`8`,r:6,fill:`none`,stroke:t,strokeWidth:`2`,strokeDasharray:n,strokeDashoffset:r,strokeLinecap:`round`,style:{transition:`stroke-dashoffset 0.55s ease`}})]})}function dse({x:e,y:t,label:n}){return(0,H.jsxs)(`div`,{className:`hz-pv-cursor`,style:{transform:`translate3d(${e}px, ${t}px, 0)`},children:[(0,H.jsx)(`svg`,{width:`13`,height:`15`,viewBox:`0 0 14 16`,fill:`none`,children:(0,H.jsx)(`path`,{d:`M1.5 1.2L12.4 7.1L7.3 8.6L4.9 13.7L1.5 1.2Z`,fill:`var(--pv-ink)`,stroke:`var(--pv-bar)`,strokeWidth:`1.2`,strokeLinejoin:`round`})}),(0,H.jsx)(`span`,{className:`hz-pv-cursor-tag`,children:n})]})}var fse=()=>{let e=(0,V.useRef)(null),[t,n]=(0,V.useState)(680),[r,i]=(0,V.useState)(0),[a,o]=(0,V.useState)(2),[s,c]=(0,V.useState)(`engineering`),[l,u]=(0,V.useState)(!1);(0,V.useEffect)(()=>{let t=e.current;if(!t)return;let r=()=>{let e=t.getBoundingClientRect().width;e>0&&n(e)};r();let i=new ResizeObserver(r);return i.observe(t),()=>i.disconnect()},[]),(0,V.useEffect)(()=>{if(l)return;let e=window.setInterval(()=>{o(e=>e<3?e+1:(i(e=>(e+1)%3),0))},1650);return()=>window.clearInterval(e)},[l]);let d=e=>{i(e),o(2)},f=t>=540,p=f?640:500,m=f?400:336,h=f?540:412,g=f?338:284,_=f?184:156,v=f?348:292,y=Math.max(.45,Math.min(1.16,t/p)),b=Math.round(m*y),x=r===0?a===0?{x:f?248:124,y:108,label:`◆ Dev`}:a===1?{x:f?316:186,y:184,label:`◆ Dev`}:a===2?{x:f?298:174,y:238,label:`◆ Sci`}:{x:f?344:196,y:g-28,label:`◆ Zoe`}:r===1?a<=1?{x:f?336:188,y:158,label:`◆ Dev`}:{x:f?378:218,y:132,label:`◆ Dev`}:{x:(f?204:84)+a%3*(f?82:68),y:a<2?126:212,label:a%2==0?`◆ Opera`:`◆ Sci`},S=r===1&&a>=2,C=r===1?a===0?76:a===1?84:a===2?94:100:94;return(0,H.jsxs)(`div`,{style:{width:`100%`,maxWidth:740},onPointerEnter:()=>u(!0),onPointerLeave:()=>u(!1),children:[(0,H.jsx)(`div`,{ref:e,className:`hz-pv-host`,style:{height:b},children:(0,H.jsxs)(`div`,{className:`hz-pv-stage`,style:{width:p,height:m,transform:`scale(${y})`},children:[(0,H.jsxs)(`div`,{className:`hz-pv-desk`,style:{width:h,height:g},children:[(0,H.jsxs)(`div`,{className:`hz-pv-topbar`,children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:7},children:[(0,H.jsxs)(`div`,{className:`hz-pv-traffic`,children:[(0,H.jsx)(`span`,{className:`hz-pv-dot`,style:{background:`var(--pv-dot-red)`}}),(0,H.jsx)(`span`,{className:`hz-pv-dot`,style:{background:`var(--pv-dot-yellow)`}}),(0,H.jsx)(`span`,{className:`hz-pv-dot`,style:{background:`var(--pv-dot-green)`}})]}),(0,H.jsx)(`span`,{style:{color:`var(--pv-mute)`,display:`inline-flex`},children:(0,H.jsx)(fm,{size:12,color:`var(--pv-mute)`})}),(0,H.jsxs)(`span`,{className:`hz-pv-pill`,children:[(0,H.jsx)(`span`,{className:`hz-pv-live-dot`}),(0,H.jsx)(`span`,{children:`hanzo.team`})]})]}),(0,H.jsx)(`div`,{className:`hz-pv-tabs`,role:`tablist`,"aria-label":`Hanzo Team preview surfaces`,children:(f?O9:O9.slice(0,4)).map(e=>{let t=e.id===`chat`&&r===0||e.id===`projects`&&r===1||e.id===`crm`&&r===2;return(0,H.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":t,className:`hz-pv-tab`,"data-active":t?`true`:`false`,onClick:()=>d(e.scene),children:e.label},e.id)})})]}),(0,H.jsxs)(`div`,{className:`hz-pv-body`,children:[(0,H.jsxs)(`div`,{className:`hz-pv-rail`,children:[(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:4},children:[(0,H.jsx)(`button`,{type:`button`,"aria-label":`Hanzo AI organization`,onClick:()=>d(0),style:{width:22,height:22,borderRadius:6,border:0,background:`var(--pv-ink)`,color:`var(--pv-bar)`,fontSize:10,fontWeight:800,cursor:`pointer`,marginBottom:2},children:`H`}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`Chat channels`,className:`hz-pv-rail-btn`,"data-active":r===0?`true`:`false`,onClick:()=>d(0),children:(0,H.jsx)(cm,{size:13,color:r===0?`var(--pv-ink)`:`var(--pv-mute)`})}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`Project boards`,className:`hz-pv-rail-btn`,"data-active":r===1?`true`:`false`,onClick:()=>d(1),children:(0,H.jsx)(Tm,{size:13,color:r===1?`var(--pv-ink)`:`var(--pv-mute)`})}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`Activity inbox`,className:`hz-pv-rail-btn`,"data-active":`false`,onClick:()=>d(0),children:(0,H.jsx)(_p,{size:13,color:`var(--pv-mute)`})}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`Workspace docs`,className:`hz-pv-rail-btn`,"data-active":`false`,onClick:()=>d(1),children:(0,H.jsx)(Up,{size:13,color:`var(--pv-mute)`})}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`AI Teammates`,className:`hz-pv-rail-btn`,"data-active":r===2?`true`:`false`,onClick:()=>d(2),children:(0,H.jsx)(vp,{size:13,color:r===2?`var(--pv-ink)`:`var(--pv-mute)`})})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:5},children:[(0,H.jsx)(`span`,{className:`hz-pv-rail-btn`,"aria-hidden":`true`,children:(0,H.jsx)(ym,{size:12,color:`var(--pv-mute)`})}),(0,H.jsxs)(`div`,{style:{position:`relative`,width:20,height:20,borderRadius:999,background:`var(--pv-send)`,color:`var(--pv-ink)`,fontSize:8,fontWeight:700,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[`ZK`,(0,H.jsx)(`span`,{style:{position:`absolute`,right:-1,bottom:-1,width:6,height:6,borderRadius:999,background:`var(--pv-green)`,border:`1.5px solid var(--pv-rail)`}})]})]})]}),f?(0,H.jsxs)(`div`,{className:`hz-pv-sidebar`,children:[(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:[(0,H.jsx)(`div`,{className:`hz-pv-sec-head`,children:`Channels`}),cse.map(e=>{let t=r===0&&s===e;return(0,H.jsxs)(`button`,{type:`button`,className:`hz-pv-nav-row`,"data-active":t?`true`:`false`,onClick:()=>{c(e),d(0)},children:[(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:4,minWidth:0},children:[(0,H.jsx)(Yp,{size:10,color:t?`var(--pv-ink)`:`var(--pv-mute)`}),(0,H.jsx)(`span`,{style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e})]}),e===`engineering`?(0,H.jsx)(`span`,{style:{fontSize:7.5,fontWeight:700,padding:`1px 4px`,borderRadius:999,background:`var(--pv-send)`,color:`var(--pv-ink)`},children:`3`}):null]},e)})]}),(0,H.jsx)(`div`,{style:{height:1,background:`var(--pv-rule)`}}),(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:[(0,H.jsx)(`div`,{className:`hz-pv-sec-head`,children:`Teammates`}),lse.map(e=>(0,H.jsxs)(`button`,{type:`button`,className:`hz-pv-nav-row`,"data-active":r===2&&e.name===`Dev`?`true`:`false`,onClick:()=>d(2),children:[(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:5},children:[(0,H.jsx)(`span`,{className:`hz-pv-live-dot`}),(0,H.jsx)(`span`,{children:e.name})]}),(0,H.jsx)(`span`,{style:{fontSize:7.5,color:`var(--pv-dim)`},children:e.role})]},e.name))]})]}):null,(0,H.jsxs)(`div`,{className:`hz-pv-main`,children:[r===0?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`hz-pv-pane-head`,children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,minWidth:0},children:[(0,H.jsx)(Yp,{size:12,color:`var(--pv-mute)`}),(0,H.jsx)(`span`,{style:{fontSize:10.5,fontWeight:600},children:s}),(0,H.jsx)(`span`,{style:{fontSize:8.5,color:`var(--pv-dim)`,whiteSpace:`nowrap`},children:`· Checkout & Apple Pay`})]}),(0,H.jsx)(`span`,{style:{marginRight:f?78:98,fontSize:8,fontWeight:600,padding:`2px 6px`,borderRadius:999,background:`var(--pv-green-bg)`,border:`1px solid var(--pv-green-edge)`,color:`var(--pv-green)`,flexShrink:0},children:`Agents active`})]}),(0,H.jsxs)(`div`,{style:{flex:1,padding:`8px 11px 6px`,paddingRight:f?96:122,display:`flex`,flexDirection:`column`,gap:7,overflow:`hidden`},children:[(0,H.jsxs)(`div`,{className:`hz-pv-rise`,style:{display:`flex`,gap:7,alignItems:`flex-start`},children:[(0,H.jsx)(`div`,{style:{width:20,height:20,borderRadius:999,background:`var(--pv-amber)`,color:`var(--pv-bar)`,fontSize:9,fontWeight:800,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0},children:`Z`}),(0,H.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:5,marginBottom:2},children:[(0,H.jsx)(`span`,{style:{fontSize:9.5,fontWeight:600},children:`Zoe`}),(0,H.jsx)(`span`,{style:{fontSize:7.5,color:`var(--pv-dim)`},children:`9:40 AM`})]}),(0,H.jsxs)(`div`,{style:{display:`inline-block`,padding:`5px 9px`,borderRadius:9,background:`var(--pv-bubble)`,color:`var(--pv-bubble-ink)`,fontSize:9.2,lineHeight:1.35,maxWidth:f?`92%`:`88%`},children:[(0,H.jsx)(`span`,{style:{color:`var(--pv-amber)`,fontWeight:600},children:`@Dev`}),` Checkout fails on mobile Safari when Apple Pay closes early.`]})]})]}),a>=1?(0,H.jsxs)(`div`,{className:`hz-pv-rise`,style:{display:`flex`,gap:7,alignItems:`flex-start`},children:[(0,H.jsx)(`div`,{style:{width:20,height:20,borderRadius:999,background:`var(--pv-blue)`,color:`var(--pv-bar)`,fontSize:9,fontWeight:800,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0},children:`D`}),(0,H.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:5,marginBottom:2},children:[(0,H.jsx)(`span`,{style:{fontSize:9.5,fontWeight:600},children:`Dev`}),(0,H.jsx)(`span`,{style:{fontSize:7.5,padding:`0.5px 4px`,borderRadius:4,background:`var(--pv-card)`,border:`1px solid var(--pv-rule-strong)`,color:`var(--pv-mute)`},children:`Agent`})]}),(0,H.jsxs)(`div`,{style:{fontSize:9,color:`var(--pv-mute)`,lineHeight:1.32},children:[`PaySheet mutex stayed locked on cancel. Opened PR and linked`,` `,(0,H.jsx)(`span`,{style:{color:`var(--pv-ink)`,fontWeight:600},children:`TEAM-142`}),`:`]}),(0,H.jsxs)(`div`,{style:{marginTop:4,padding:`4.5px 7px`,borderRadius:7,background:`var(--pv-card)`,border:`1px solid var(--pv-rule-strong)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:6,maxWidth:f?`86%`:`76%`},children:[(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:5,fontSize:8.5,fontWeight:600,minWidth:0},children:[(0,H.jsx)(Kp,{size:11,color:`var(--pv-green)`}),(0,H.jsx)(`span`,{style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:`${k9} · fix(checkout): release PaySheet lock`})]}),(0,H.jsx)(`span`,{style:{fontSize:8,color:`var(--pv-green)`,fontWeight:700,flexShrink:0},children:`+14 −3`})]})]})]}):(0,H.jsxs)(`div`,{className:`hz-pv-rise`,style:{display:`flex`,alignItems:`center`,gap:6,paddingLeft:27,paddingTop:4},children:[(0,H.jsx)(`span`,{className:`hz-pv-live-dot`}),(0,H.jsx)(`span`,{style:{fontSize:8.8,color:`var(--pv-mute)`},children:`Dev is inspecting checkout/pay-sheet.ts…`})]}),a>=2?(0,H.jsxs)(`div`,{className:`hz-pv-rise`,style:{display:`flex`,gap:7,alignItems:`flex-start`},children:[(0,H.jsx)(`div`,{style:{width:20,height:20,borderRadius:999,background:`var(--pv-green)`,color:`var(--pv-bar)`,fontSize:9,fontWeight:800,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0},children:`S`}),(0,H.jsxs)(`div`,{style:{flex:1,minWidth:0,display:`flex`,alignItems:`center`,gap:6,flexWrap:`wrap`},children:[(0,H.jsx)(`span`,{style:{fontSize:9.2,fontWeight:600},children:`Sci`}),(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:3,fontSize:8,fontWeight:700,padding:`2px 6px`,borderRadius:5,background:`var(--pv-green-bg)`,border:`1px solid var(--pv-green-edge)`,color:`var(--pv-green)`},children:[(0,H.jsx)(Vt,{size:9,color:`var(--pv-green)`}),`42/42 E2E GREEN`]}),(0,H.jsx)(`span`,{style:{fontSize:8.5,color:`var(--pv-mute)`},children:`WebKit iOS 18.2 verified`})]})]}):null]}),(0,H.jsxs)(`div`,{className:`hz-pv-composer`,style:{marginRight:f?92:118},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,minWidth:0},children:[(0,H.jsx)(hm,{size:11,color:`var(--pv-mute)`}),(0,H.jsx)(`span`,{style:{fontSize:8.8,color:a===3?`var(--pv-ink)`:`var(--pv-mute)`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:a===3?(0,H.jsxs)(H.Fragment,{children:[`@Opera deploy v2.4.1 to prod`,(0,H.jsx)(`span`,{className:`hz-pv-caret`})]}):`Message #${s}`})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,flexShrink:0},children:[(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:3,fontSize:7.8,fontWeight:600,color:`var(--pv-warn)`},children:[(0,H.jsx)(sp,{size:9,color:`var(--pv-warn)`}),`Full access`]}),(0,H.jsx)(`span`,{className:`hz-pv-send`,children:(0,H.jsx)(gp,{size:11,color:`var(--pv-ink)`})})]})]})]}):null,r===1?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`hz-pv-pane-head`,children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,H.jsx)(Tm,{size:12,color:`var(--pv-blue)`}),(0,H.jsx)(`span`,{style:{fontSize:10.5,fontWeight:600},children:`Projects · Cycle 18`}),(0,H.jsx)(`span`,{style:{fontSize:8.5,color:`var(--pv-dim)`},children:`4 columns`})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:5,paddingRight:f?78:96},children:[(0,H.jsx)(j9,{pct:C,color:`var(--pv-green)`}),(0,H.jsxs)(`span`,{style:{fontSize:8.5,fontWeight:700,color:`var(--pv-ink)`},children:[C,`%`]})]})]}),(0,H.jsxs)(`div`,{style:{flex:1,padding:`8px 9px`,paddingRight:f?92:118,display:`grid`,gridTemplateColumns:`repeat(4, minmax(0, 1fr))`,gap:6,overflow:`hidden`},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:5},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,H.jsx)(`span`,{className:`hz-pv-dot`,style:{width:6,height:6,background:`var(--pv-amber)`}}),(0,H.jsx)(`span`,{style:{fontSize:8,fontWeight:700,color:`var(--pv-mute)`},children:`Backlog`})]}),(0,H.jsx)(M9,{code:`TEAM-151`,title:`Webhook retry jitter`,agent:`O`,hue:`var(--pv-violet)`,pct:25})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:5},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,H.jsx)(`span`,{className:`hz-pv-dot`,style:{width:6,height:6,background:`var(--pv-mute)`}}),(0,H.jsx)(`span`,{style:{fontSize:8,fontWeight:700,color:`var(--pv-mute)`},children:`To Do`})]}),(0,H.jsx)(M9,{code:`TEAM-148`,title:`Apple Pay telemetry`,agent:`M`,hue:`var(--pv-amber)`,pct:40})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:5},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,H.jsx)(`span`,{className:`hz-pv-dot`,style:{width:6,height:6,background:`var(--pv-blue)`}}),(0,H.jsx)(`span`,{style:{fontSize:8,fontWeight:700,color:`var(--pv-ink)`},children:`In Progress`})]}),(0,H.jsx)(M9,{code:`TEAM-145`,title:`Stripe 3DS fallback`,agent:`S`,hue:`var(--pv-green)`,pct:a>=1?82:64}),S?null:(0,H.jsx)(M9,{code:`TEAM-142`,title:`Release PaySheet lock`,agent:`D`,hue:`var(--pv-blue)`,pct:a===0?68:92,highlight:!0})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:5},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,H.jsx)(`span`,{className:`hz-pv-dot`,style:{width:6,height:6,background:`var(--pv-green)`}}),(0,H.jsx)(`span`,{style:{fontSize:8,fontWeight:700,color:`var(--pv-green)`},children:`Done`})]}),S?(0,H.jsx)(M9,{code:`TEAM-142`,title:`Release PaySheet lock`,agent:`D`,hue:`var(--pv-green)`,pct:100,done:!0,highlight:!0}):null,(0,H.jsx)(M9,{code:`TEAM-139`,title:`Unified SSO cookie`,agent:`C`,hue:`var(--pv-rose)`,pct:100,done:!0})]})]})]}):null,r===2?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`hz-pv-pane-head`,children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,H.jsx)(wm,{size:12,color:`var(--pv-amber)`}),(0,H.jsx)(`span`,{style:{fontSize:10.5,fontWeight:600},children:`Agents · Live Ops`}),(0,H.jsx)(`span`,{style:{fontSize:8.5,color:`var(--pv-dim)`},children:`6 teammates online`})]}),(0,H.jsx)(`span`,{style:{marginRight:f?78:96,fontSize:7.8,fontWeight:700,color:`var(--pv-green)`},children:`Sandboxes healthy`})]}),(0,H.jsx)(`div`,{style:{flex:1,padding:`8px 10px 6px`,paddingRight:f?92:118,display:`grid`,gridTemplateColumns:`repeat(3, minmax(0, 1fr))`,gap:6,alignContent:`start`},children:A9.map((e,t)=>{let n=t===a||a===3&&t===4;return(0,H.jsxs)(`div`,{className:`hz-pv-rise`,style:{padding:`6px 7px`,borderRadius:8,background:n?`var(--pv-card-hi)`:`var(--pv-card)`,border:n?`1px solid var(--pv-blue)`:`1px solid var(--pv-rule-strong)`,display:`flex`,flexDirection:`column`,gap:3.5,transition:`border-color 0.2s ease, background-color 0.2s ease`},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:4},children:[(0,H.jsx)(`span`,{style:{width:14,height:14,borderRadius:999,background:e.hue,color:`var(--pv-bar)`,fontSize:7.5,fontWeight:800,display:`inline-flex`,alignItems:`center`,justifyContent:`center`},children:e.name[0]}),(0,H.jsx)(`span`,{style:{fontSize:8.8,fontWeight:700},children:e.name})]}),(0,H.jsx)(`span`,{className:`hz-pv-live-dot`})]}),(0,H.jsx)(`div`,{style:{fontSize:7.6,color:`var(--pv-mute)`,lineHeight:1.28,display:`-webkit-box`,WebkitLineClamp:2,WebkitBoxOrient:`vertical`,overflow:`hidden`},children:e.task}),(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginTop:`auto`,paddingTop:1},children:[(0,H.jsx)(`span`,{style:{fontSize:7,color:`var(--pv-dim)`},children:e.sandbox}),(0,H.jsx)(`span`,{style:{fontSize:7,fontWeight:700,color:e.hue},children:e.badge})]})]},e.name)})}),(0,H.jsxs)(`div`,{style:{margin:`0 10px 8px`,marginRight:f?92:118,padding:`4.5px 8px`,borderRadius:7,background:`var(--pv-bar)`,border:`1px solid var(--pv-rule)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,fontSize:8,color:`var(--pv-mute)`},children:[(0,H.jsx)(`span`,{children:`Handoff: #engineering → @Dev → @Sci → @Opera`}),(0,H.jsx)(`span`,{style:{color:`var(--pv-green)`,fontWeight:700},children:`v2.4.1 live · 48s`})]})]}):null]})]}),(0,H.jsx)(dse,{x:x.x,y:x.y,label:x.label})]}),(0,H.jsx)(`div`,{className:`hz-pv-phone`,style:{width:_,height:v},children:(0,H.jsxs)(`div`,{className:`hz-pv-phone-screen`,children:[(0,H.jsxs)(`div`,{className:`hz-pv-phone-status`,children:[(0,H.jsx)(`span`,{children:`9:41`}),(0,H.jsx)(`div`,{className:`hz-pv-island`,children:(0,H.jsx)(`span`,{className:`hz-pv-island-lens`})}),(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:3},children:[(0,H.jsx)(Rm,{size:8.5,color:`var(--pv-ink)`}),(0,H.jsx)(`span`,{style:{width:12,height:6.5,borderRadius:2,border:`1px solid var(--pv-mute)`,padding:1,display:`inline-flex`},children:(0,H.jsx)(`span`,{style:{flex:1,background:`var(--pv-green)`,borderRadius:.5}})})]})]}),(0,H.jsxs)(`div`,{style:{height:25,padding:`0 9px`,borderBottom:`1px solid var(--pv-rule)`,background:`var(--pv-bar)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,flexShrink:0},children:[(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:4,fontSize:8.5,fontWeight:700},children:[(0,H.jsx)(`span`,{style:{width:13,height:13,borderRadius:4,background:`var(--pv-ink)`,color:`var(--pv-bar)`,fontSize:7.5,fontWeight:800,display:`inline-flex`,alignItems:`center`,justifyContent:`center`},children:`H`}),(0,H.jsx)(`span`,{children:r===0?`#${s}`:r===1?`Projects`:`Live Ops`})]}),(0,H.jsx)(`span`,{className:`hz-pv-live-dot`})]}),(0,H.jsxs)(`div`,{style:{flex:1,minHeight:0,background:`var(--pv-canvas)`,padding:`7px 8px`,display:`flex`,flexDirection:`column`,gap:6,overflow:`hidden`},children:[r===0?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{style:{alignSelf:`flex-end`,padding:`5px 7px`,borderRadius:`9px 9px 3px 9px`,background:`var(--pv-bubble)`,color:`var(--pv-bubble-ink)`,fontSize:7.8,lineHeight:1.32,maxWidth:`92%`},children:`@Dev Safari Apple Pay closes early on checkout`}),a>=1?(0,H.jsxs)(`div`,{className:`hz-pv-rise`,style:{padding:`5px 7px`,borderRadius:8,background:`var(--pv-card)`,border:`1px solid var(--pv-rule-strong)`,display:`flex`,flexDirection:`column`,gap:3},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{style:{fontSize:7.8,fontWeight:700,color:`var(--pv-blue)`},children:`◆ Dev`}),(0,H.jsx)(`span`,{style:{fontSize:7,color:`var(--pv-green)`,fontWeight:700},children:`+14 −3`})]}),(0,H.jsx)(`div`,{style:{fontSize:7.5,color:`var(--pv-ink)`},children:`${k9} · Release PaySheet lock`})]}):(0,H.jsx)(`div`,{style:{fontSize:7.5,color:`var(--pv-mute)`},children:`◆ Dev is fixing PaySheet…`}),a>=2?(0,H.jsxs)(`div`,{className:`hz-pv-rise`,style:{padding:`4px 7px`,borderRadius:7,background:`var(--pv-green-bg)`,border:`1px solid var(--pv-green-edge)`,color:`var(--pv-green)`,fontSize:7.5,fontWeight:700,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{children:`◆ Sci · 42/42 E2E`}),(0,H.jsx)(`span`,{children:`GREEN`})]}):null]}):null,r===1?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{style:{fontSize:7.5,color:`var(--pv-mute)`,fontWeight:600},children:`Cycle 18 Sprint`}),(0,H.jsxs)(`span`,{style:{fontSize:7.8,color:`var(--pv-green)`,fontWeight:700},children:[C,`%`]})]}),(0,H.jsxs)(`div`,{style:{padding:`5.5px 7px`,borderRadius:8,background:`var(--pv-card-hi)`,border:S?`1px solid var(--pv-green)`:`1px solid var(--pv-blue)`,display:`flex`,flexDirection:`column`,gap:3},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{style:{fontSize:7.2,color:`var(--pv-dim)`,fontWeight:700},children:`TEAM-142`}),(0,H.jsx)(`span`,{style:{fontSize:6.8,fontWeight:700,color:S?`var(--pv-green)`:`var(--pv-blue)`},children:S?`✓ Done`:`In Progress`})]}),(0,H.jsx)(`div`,{style:{fontSize:7.8,fontWeight:600},children:`Release PaySheet lock`})]}),(0,H.jsxs)(`div`,{style:{padding:`5px 7px`,borderRadius:8,background:`var(--pv-card)`,border:`1px solid var(--pv-rule)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{style:{fontSize:7.5},children:`TEAM-145 · 3DS`}),(0,H.jsx)(`span`,{style:{fontSize:7,color:`var(--pv-mute)`},children:`82%`})]}),(0,H.jsxs)(`div`,{style:{padding:`5px 7px`,borderRadius:8,background:`var(--pv-card)`,border:`1px solid var(--pv-rule)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{style:{fontSize:7.5},children:`TEAM-139 · SSO`}),(0,H.jsx)(`span`,{style:{fontSize:7,color:`var(--pv-green)`,fontWeight:700},children:`Done`})]})]}):null,r===2?(0,H.jsx)(H.Fragment,{children:A9.slice(0,4).map(e=>(0,H.jsxs)(`div`,{style:{padding:`4.5px 6.5px`,borderRadius:7,background:`var(--pv-card)`,border:`1px solid var(--pv-rule)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:4},children:[(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:4,minWidth:0},children:[(0,H.jsx)(`span`,{className:`hz-pv-live-dot`}),(0,H.jsx)(`span`,{style:{fontSize:7.8,fontWeight:700},children:e.name})]}),(0,H.jsx)(`span`,{style:{fontSize:6.8,fontWeight:700,color:e.hue},children:e.badge})]},e.name))}):null]}),(0,H.jsxs)(`div`,{style:{padding:`4px 7px 5px`,background:`var(--pv-canvas)`},children:[(0,H.jsxs)(`div`,{style:{height:22,padding:`0 4px 0 8px`,borderRadius:999,background:`var(--pv-composer)`,border:`1px solid var(--pv-composer-rule)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{style:{fontSize:7.4,color:`var(--pv-mute)`},children:`Message team…`}),(0,H.jsx)(`span`,{style:{width:15,height:15,borderRadius:999,background:`var(--pv-send)`,color:`var(--pv-ink)`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`},children:(0,H.jsx)(gp,{size:9,color:`var(--pv-ink)`})})]}),(0,H.jsx)(`div`,{style:{width:48,height:3,borderRadius:999,background:`var(--pv-rule-strong)`,margin:`5px auto 0`}})]})]})})]})}),(0,H.jsx)(`div`,{className:`hz-pv-scene-pills`,role:`tablist`,"aria-label":`Preview scenes`,children:use.map(e=>{let t=r===e.id;return(0,H.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":t,className:`hz-pv-scene-pill`,"data-active":t?`true`:`false`,onClick:()=>d(e.id),children:[t?(0,H.jsx)(`span`,{className:`hz-pv-live-dot`}):(0,H.jsx)(xm,{size:11,color:`var(--muted-foreground)`}),(0,H.jsx)(`span`,{children:f?e.label:e.short})]},e.id)})})]})};function M9({code:e,title:t,agent:n,hue:r,pct:i,done:a=!1,highlight:o=!1}){return(0,H.jsxs)(`div`,{className:`hz-pv-rise`,style:{padding:`6px 6.5px`,borderRadius:7,background:o?`var(--pv-card-hi)`:`var(--pv-card)`,border:o?a?`1px solid var(--pv-green)`:`1px solid var(--pv-blue)`:`1px solid var(--pv-rule-strong)`,display:`flex`,flexDirection:`column`,gap:4},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{style:{fontSize:7.2,fontWeight:700,color:`var(--pv-dim)`},children:e}),(0,H.jsx)(j9,{pct:i,color:a?`var(--pv-green)`:r})]}),(0,H.jsx)(`div`,{style:{fontSize:8,fontWeight:600,lineHeight:1.25,color:`var(--pv-ink)`},children:t}),(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{style:{width:13,height:13,borderRadius:999,background:r,color:`var(--pv-bar)`,fontSize:7,fontWeight:800,display:`inline-flex`,alignItems:`center`,justifyContent:`center`},children:n}),(0,H.jsx)(`span`,{style:{fontSize:7,fontWeight:700,color:a?`var(--pv-green)`:`var(--pv-mute)`},children:a?`Merged`:`${i}%`})]})]})}var pse=[[`Channels`,`Your people and your agents, in one conversation.`],[`Agents`,`Hand an agent the work; it reports back when it is done.`],[`Issue boards`,`Every task from backlog to done, on one board.`]],mse=()=>(0,H.jsx)(y,{width:`100%`,maxW:740,gap:DH.wide,flexWrap:`wrap`,children:pse.map(([e,t])=>(0,H.jsxs)(z,{flex:1,minW:180,gap:4,children:[(0,H.jsx)(a,{size:Z.body,color:X.ink,fontWeight:`600`,children:e}),(0,H.jsx)(a,{size:Z.small,color:X.mute,children:t})]},e))}),N9=`PR #418`,P9=`PR #421`,hse=`#E5E7EB`,gse=`#EC4899`,F9=`#1A1A1A`,I9=`#F472B6`,L9=`Read https://hanzo.ai/skill.md and use Hanzo Team in my project.`,_se={vi:`V`,opera:`O`,mana:`M`,dev:`D`,des:`D`,doc:`D`,su:`S`,sal:`S`,sci:`S`,cyber:`C`,mark:`M`,fin:`F`,law:`L`,data:`D`,rev:`R`};function R9({id:e,size:t=26}){let n={width:t,height:t,"--img":`url(https://hanzo.ai/agents/${e}.png)`};return(0,H.jsx)(`span`,{className:`hz-ts-face`,style:n,"aria-hidden":`true`,children:_se[e]??e.slice(0,1).toUpperCase()})}function z9({pct:e,size:t=13}){let n=t/2-1.5,r=2*Math.PI*n,i=Math.max(0,Math.min(100,e));return(0,H.jsxs)(`svg`,{width:t,height:t,viewBox:`0 0 ${t} ${t}`,"aria-hidden":`true`,style:{flexShrink:0},children:[(0,H.jsx)(`circle`,{cx:t/2,cy:t/2,r:n,fill:`none`,stroke:`var(--ts-rule-strong)`,strokeWidth:`1.6`}),(0,H.jsx)(`circle`,{cx:t/2,cy:t/2,r:n,fill:`none`,stroke:`var(--ts-green)`,strokeWidth:`1.6`,strokeDasharray:r,strokeDashoffset:r*(1-i/100),transform:`rotate(-90 ${t/2} ${t/2})`,style:{transition:`stroke-dashoffset 0.45s ease`}})]})}var B9=[{head:`BACKLOG – 7`,tone:`var(--ts-amber)`,cards:[{id:`CRM-1`,tag:`Devops`,title:`Set up cluster monitoring & telemetry`,pct:12,owner:`opera`,col:0},{id:`CRM-2`,tag:`Research`,title:`Analyze and cluster search queries`,pct:35,owner:`sci`,col:0}]},{head:`TO DO – 6`,tone:`var(--ts-mute)`,cards:[{id:`CRM-8`,tag:`Sales`,title:`Sales planning & enterprise deal desk`,pct:20,owner:`rev`,col:1},{id:`CRM-11`,tag:`Backend`,title:`Deduplicate contacts on CRM import`,pct:40,owner:`dev`,col:1}]},{head:`IN PROGRESS – 3`,tone:`var(--ts-blue)`,cards:[{id:`CRM-15`,tag:`QA`,title:`Conduct custdev interview w/ client`,pct:90,owner:`sal`,col:2},{id:`CRM-16`,tag:`Feature`,title:`Add view-resource for MVP Deal Screen`,pct:65,owner:`des`,col:2}]},{head:`DONE – 3`,tone:`var(--ts-green)`,cards:[{id:`CRM-17`,tag:`Backend`,title:`Ship seat-count billing reconciliation`,pct:100,owner:`rev`,col:3},{id:`CRM-19`,tag:`Feature`,title:`Cut first release of the deal screen`,pct:100,owner:`dev`,col:3}]}],V9=B9.flatMap(e=>e.cards),H9=[{num:`01`,title:`Channels for every part of the work`,body:`A channel for each team and project, direct messages, and threads that keep a decision next to the question that started it.`},{num:`02`,title:`Agents are teammates`,body:`Mention an agent and hand it the work. It answers in the channel with the work done: a pull request, a drafted reply, an updated deck.`},{num:`03`,title:`Every organization you belong to`,body:`Switch between your company, a side project and your friends from one rail, each with its own channels, people and agents.`}],U9=[[`dev`,`Dev`,`Repos, PRs, CI`],[`sci`,`Sci`,`E2E specs, WebKit`],[`cyber`,`Cyber`,`Security, audits`],[`des`,`Des`,`UI, tokens, specs`],[`mark`,`Mark`,`Launch, growth`],[`su`,`Su`,`Triage, replies`],[`opera`,`Opera`,`Deploys, infra`]],W9=[{title:`Coding`,body:`A bug report becomes a pull request; a person reviews it, the checks pass, and it ships, all in the channel.`,pair:[`vi`,`dev`]},{title:`Support`,body:`An agent drafts the reply, a person makes it warmer, and it goes out.`,pair:[`su`,`vi`]},{title:`Email`,body:`The inbox is sorted and the replies are drafted in your voice. You approve them as a batch.`,pair:[`su`,`vi`]},{title:`Fundraising`,body:`The deck and the model are built, the intros are drafted, and the meeting lands on the calendar.`,pair:[`fin`,`vi`]},{title:`Docs & Specs`,body:`Shared specifications stay linked to issues, pull requests, and channel decisions without drifting out of date.`,pair:[`doc`,`dev`]},{title:`Science & R&D Ops`,body:`Run LillyMol MedChem screens, targets + crew Slurm DAGs, pytest-wdl proteomics, and admiral/brms.mmrm clinical tables right from #research.`,pair:[`vi`,`sci`]}],G9=[{channel:`bugfix`,category:`Engineering & QA`,no:`01`,title:`E2E Bug Reproduction, Patch & Verification`,summary:`A human drops a one-line bug report in #bugfix. @Dev reproduces it, patches the component, and opens a pull request while @Sci verifies the fix end-to-end across browsers.`,faces:[`dev`,`sci`],humanInitials:`ZM`,humanName:`Zoe Maxwell`,humanTime:`10:14 AM`,humanAsk:`Checkout button is unresponsive on mobile Safari when Apple Pay sheet closes — @Dev can we patch this before noon?`,leadAgent:`dev`,leadName:`Dev`,leadReply:`Reproduced in WebKit simulator: oncancel left the sheet lock active in PaySheet.tsx:84. Cleared lock in finally block and opened ${N9}.`,artifact:`${N9} · fix(checkout): release PaySheet lock on cancel (+14 -3)`,verifyAgent:`sci`,verifyName:`Sci`,badge:`42/42 E2E GREEN`,verifyLine:`Verified e2e across iOS 18 Safari & Chromium — 42/42 checkout specs green. Ready to merge.`,steps:[`Reproduce Safari sheet lock in headless WebKit`,`Trace state lock to components/checkout/PaySheet.tsx:84`,`Patch finally handler & push branch fix/apple-pay-lock`,`Run 42 Playwright e2e checkout specs across iOS & desktop`],tools:[`GitHub`,`Playwright`,`Safari WebKit`,`CI Runner`]},{channel:`security`,category:`Security & SecOps`,no:`02`,title:`Continuous Zero-Trust Audit & Secret Rotation`,summary:`Every new endpoint or auth change is audited in #security. @Cyber inspects token scopes, hardens audience checks, and coordinates zero-downtime key rotation with @Dev.`,faces:[`cyber`,`dev`],humanInitials:`AR`,humanName:`Alex Rivera`,humanTime:`11:02 AM`,humanAsk:`New OAuth callback & WIMSE token exchange landed on staging — @Cyber can you run a full audit before we cut the release?`,leadAgent:`cyber`,leadName:`Cyber`,leadReply:`Audited 14 endpoints & SBOM: 0 critical CVEs. Tightened JWT audience validation on /v1/oauth/token and opened ${P9}.`,artifact:`${P9} · sec(oauth): enforce strict WIMSE audience & nonce (+28 -6)`,verifyAgent:`dev`,verifyName:`Dev`,badge:`0 CRITICAL CVEs`,verifyLine:`Merged ${P9} and rotated staging signing keys in KMS with zero dropped sessions.`,steps:[`Scan 14 OAuth & WIMSE endpoints for token scope drift`,`Verify dependency SBOM against CVE advisories`,`Enforce strict aud + nonce claim validation in ${P9}`,`Rotate KMS signing keys and verify zero session drops`],tools:[`Hanzo KMS`,`WIMSE IAM`,`Trivy SBOM`,`GitHub`]},{channel:`launch`,category:`Marketing & Design`,no:`03`,title:`Coordinated Product Launch & Creative Assets`,summary:`From a single brief in #launch, @Mark drafts the announcement post, changelog, and social thread while @Des renders responsive OpenGraph cards and video cuts.`,faces:[`mark`,`des`],humanInitials:`AW`,humanName:`Antje Worring`,humanTime:`9:20 AM`,humanAsk:`We ship Team v2 at noon PT — @Mark @Des prepare the launch post, changelog, and social cards.`,leadAgent:`mark`,leadName:`Mark`,leadReply:`Drafted launch post, customer email segment, and 6-part X/LinkedIn thread synced with live release notes.`,artifact:`Canvas · Team v2 Launch Kit + 28-channel Post queue`,verifyAgent:`des`,verifyName:`Des`,badge:`LAUNCH READY`,verifyLine:`Rendered 1080p hero loop + dark-mode OG cards across hanzo.ai/team and hanzo.team.`,steps:[`Synthesize merged PR changelog into product narrative`,`Render 16:9 + 9:16 launch cards on canonical brand tokens`,`Stage scheduled posts in Hanzo Post queue`,`Verify UTM attribution and OG previews`],tools:[`Hanzo Post`,`Canvas`,`Hanzo Insights`,`CDN`]},{channel:`support`,category:`Customer Support`,no:`04`,title:`Instant Ticket Triage, Reproduction & Warm Reply`,summary:`@Su correlates inbound customer threads with telemetry traces, reproduces config issues, and drafts an accurate reply linked to docs.`,faces:[`su`,`doc`],humanInitials:`HB`,humanName:`Harry Boone`,humanTime:`1:08 PM`,humanAsk:`@Su Enterprise tenant acme-corp is seeing 403 on custom MCP webhook — can we diagnose and draft the reply?`,leadAgent:`su`,leadName:`Su`,leadReply:`Traced request req_98a2f: webhook secret header used legacy prefix. Drafted step-by-step reply for Acme eng.`,artifact:`Ticket SUP-884 · Root cause + verified cURL snippet attached`,verifyAgent:`doc`,verifyName:`Doc`,badge:`SLA 3 MIN`,verifyLine:`Updated MCP webhook header guide in docs.hanzo.ai so future setups copy the v2 header.`,steps:[`Correlate tenant org slug with gateway request logs`,`Pinpoint header mismatch without exposing tenant secrets`,`Draft warm customer reply with copy-paste fix`,`Patch docs quickstart example`],tools:[`Hanzo O11y`,`Zendesk / Slack`,`Docs MCP`,`Gateway`]},{channel:`ops`,category:`Infra & SRE`,no:`05`,title:`Zero-Downtime Canary Rollouts & Latency Guard`,summary:`@Opera advances multi-region Kubernetes rollouts while watching p95 latency, error budgets, and KMS health checks.`,faces:[`opera`,`cyber`],humanInitials:`ZK`,humanName:`Zach Kelling`,humanTime:`2:40 PM`,humanAsk:`@Opera roll team-gateway v0.1.17 across us-west and eu-central with 10% canary hold.`,leadAgent:`opera`,leadName:`Opera`,leadReply:`Canary held 5m at 10% traffic: 17.8ms p95, 0.00% 5xx. Promoted 100% across all regions.`,artifact:`deploy/team-gateway · sha256:9f4c…81e2 · 6/6 pods healthy`,verifyAgent:`cyber`,verifyName:`Cyber`,badge:`17.8ms P95`,verifyLine:`Verified mTLS mesh certificates and egress policy across all 6 replicas.`,steps:[`Verify container signature & image digest`,`Shift 10% canary traffic and sample 10k spans`,`Promote rollout across us-west & eu-central`,`Confirm mTLS & health probes green`],tools:[`Kubernetes`,`Prometheus`,`Hanzo O11y`,`Hanzo KMS`]},{channel:`research`,category:`Science & BioOps`,no:`06`,title:`Reproducible Compute DAGs, Benchmarks & Tables`,summary:`@Sci runs distributed evaluation suites, MedChem screens, and statistical tables directly from #research with pinned artifacts.`,faces:[`sci`,`data`],humanInitials:`ZM`,humanName:`Zoe Maxwell`,humanTime:`3:15 PM`,humanAsk:`@Sci run the Zen-4 tool-use eval matrix against the new router checkpoint and post throughput + pass@1.`,leadAgent:`sci`,leadName:`Sci`,leadReply:`Completed 1,200-task tool-use benchmark on 8xH200 cluster: +3.4% pass@1 at 148 tok/s.`,artifact:`eval/zen4-router-r18.parquet · 1,200 trajectories archived`,verifyAgent:`data`,verifyName:`Data`,badge:`REPRODUCIBLE`,verifyLine:`Published interactive comparison table to Datastore and pinned seed manifest.`,steps:[`Provision ephemeral GPU batch on Hanzo Machines`,`Execute deterministic eval harness with pinned seeds`,`Aggregate latency, token cost & pass@1 deltas`,`Archive artifacts to S3 & Datastore`],tools:[`Hanzo Machines`,`Datastore`,`S3 Storage`,`Zen Eval`]},{channel:`deals`,category:`Sales & RevOps`,no:`07`,title:`Inbound Enrichment, Deal Desk & Custom Terms`,summary:`@Sal enriches enterprise leads, prepares tailored architecture decks, and syncs stage updates into Hanzo CRM.`,faces:[`sal`,`des`],humanInitials:`AW`,humanName:`Antje Worring`,humanTime:`4:05 PM`,humanAsk:`@Sal prep the sovereign cloud proposal and security questionnaire for Meridian Health before tomorrow’s call.`,leadAgent:`sal`,leadName:`Sal`,leadReply:`Completed 94-item HIPAA/SOC2 security matrix, sized 64-GPU reserved tier, and updated CRM deal stage.`,artifact:`CRM Deal · Meridian Health ($240k ARR) · Proposal v1`,verifyAgent:`des`,verifyName:`Des`,badge:`CRM SYNCED`,verifyLine:`Formatted custom architecture deck with Meridian VPC topology diagram.`,steps:[`Enrich account footprint & compliance requirements`,`Auto-complete security questionnaire from Trust KB`,`Model reserved compute pricing & margins`,`Sync proposal + calendar invite to Hanzo CRM`],tools:[`Hanzo CRM`,`Data Room`,`Hanzo Sign`,`Calendar`]},{channel:`finance`,category:`Finance & Billing`,no:`08`,title:`Multi-Cloud Cost Reconciliation & Ledger Close`,summary:`@Fin reconciles Stripe settlements, usage-metered API credits, and cloud GPU invoices with zero spreadsheet drift.`,faces:[`fin`,`data`],humanInitials:`ZK`,humanName:`Zach Kelling`,humanTime:`4:45 PM`,humanAsk:`@Fin reconcile October metered token usage against Stripe payouts and flag any margin anomalies.`,leadAgent:`fin`,leadName:`Fin`,leadReply:`Reconciled 48,912 usage invoices against Stripe & Commerce ledger: $0.00 variance, gross margin +2.1% MoM.`,artifact:`Ledger Close · 2026-10 · 100% matched`,verifyAgent:`data`,verifyName:`Data`,badge:`$0 DRIFT`,verifyLine:`Verified ClickHouse usage rollups match billing snapshots across all orgs.`,steps:[`Ingest Stripe payouts & Hanzo Billing credit ledgers`,`Cross-check per-org token & compute metering`,`Flag outlier unit-cost SKUs`,`Lock monthly close report in Drive`],tools:[`Hanzo Billing`,`Stripe`,`QuickBooks`,`Datastore`]},{channel:`legal`,category:`Legal & Compliance`,no:`09`,title:`DPA Redlines, OSS License Gate & E-Sign`,summary:`@Law reviews vendor DPAs against standard playbook fallback clauses and routes clean agreements to Hanzo Sign.`,faces:[`law`,`cyber`],humanInitials:`AR`,humanName:`Alex Rivera`,humanTime:`5:12 PM`,humanAsk:`@Law check redlines on the enterprise MSA + DPA from Northstar Bank against our standard liability cap.`,leadAgent:`law`,leadName:`Law`,leadReply:`Reviewed 19 clauses: 17 standard, 2 redlines on subprocessor notice window. Applied approved 30-day fallback.`,artifact:`Northstar_MSA_DPA_clean.pdf · Ready for Hanzo Sign`,verifyAgent:`cyber`,verifyName:`Cyber`,badge:`PLAYBOOK PASS`,verifyLine:`Confirmed subprocessor list and data-residency annex match EU-Central deployment.`,steps:[`Parse incoming DOCX redlines against clause playbook`,`Verify GDPR / SOC2 data-residency commitments`,`Generate clean comparison + redline summary`,`Stage envelope in Hanzo Sign`],tools:[`Hanzo Sign`,`Data Room`,`Trust KB`,`Drive`]},{channel:`growth`,category:`Growth & Analytics`,no:`10`,title:`Funnel Diagnostics, Cohort Retention & Experiments`,summary:`@Mark and @Sci monitor signup-to-activation funnels in Hanzo Insights and ship copy/UX improvements in hours.`,faces:[`mark`,`sci`],humanInitials:`HB`,humanName:`Harry Boone`,humanTime:`5:50 PM`,humanAsk:`@Mark check 7-day activation on team invite links after yesterday’s onboarding update.`,leadAgent:`mark`,leadName:`Mark`,leadReply:`Workspace invite completion jumped from 64.2% → 81.9% (+17.7pp) after removing the manual setup gate.`,artifact:`Insights Funnel · 7d Invite Activation (+17.7pp)`,verifyAgent:`sci`,verifyName:`Sci`,badge:`P < 0.001`,verifyLine:`Confirmed statistical significance across 4,180 sessions on desktop and mobile Safari.`,steps:[`Query 7-day cohort funnel in Hanzo Insights`,`Segment conversion by browser & auth provider`,`Run two-proportion significance check`,`Post weekly growth digest to #growth`],tools:[`Hanzo Insights`,`Datastore`,`GitHub`,`Hanzo Post`]}],vse=[`1. Code trace`,`2. Loop in design`,`3. Decision`,`4. Canvas summary`,`5. E2E verify`,`6. Session complete`],yse=[[`12`,`12`,``,`.cta-button {`],[`13`,`13`,``,` display: inline-flex;`],[`14`,`14`,``,` align-items: center;`],[`15`,``,`del`,`- color: ${hse.toLowerCase()};`],[`16`,``,`del`,`- background: ${gse.toLowerCase()};`],[``,`15`,`add`,`+ color: ${F9.toLowerCase()};`],[``,`16`,`add`,`+ background: ${I9.toLowerCase()};`],[``,`17`,`add`,`+ font-weight: 600;`],[`17`,`18`,``,` border-radius: 8px;`],[`18`,`19`,``,`}`]];function K9({onOpen:e,working:t}){let[n,r]=(0,V.useState)(4),[i,o]=(0,V.useState)(!0),[s,c]=(0,V.useState)(0),[l,u]=(0,V.useState)(0),[d,f]=(0,V.useState)(0),[p,m]=(0,V.useState)(!1),[h,g]=(0,V.useState)(6),[_,v]=(0,V.useState)(`Code`),[b,x]=(0,V.useState)(!1);(0,V.useEffect)(()=>{if(!i)return;let e=window.setInterval(()=>{r(e=>(e+1)%V9.length)},2200);return()=>window.clearInterval(e)},[i]),(0,V.useEffect)(()=>{if(p)return;let e=window.setInterval(()=>{f(e=>(e+1)%G9.length)},3400);return()=>window.clearInterval(e)},[p]);let S=V9[n]??V9[0],C=G9[d]??G9[0],w=W9[l]??W9[0];return(0,H.jsxs)(`div`,{className:`hz-ts-wrap`,children:[(0,H.jsxs)(`section`,{className:`hz-ts-sec`,"aria-label":`Live Tracker Board and Mobile Sync`,children:[(0,H.jsxs)(`div`,{className:`hz-ts-head`,children:[(0,H.jsx)(`span`,{className:`hz-ts-kicker`,children:`Web + Mobile Synced`}),(0,H.jsx)(`h2`,{className:`hz-ts-h2`,children:`The playground for humans + AI`}),(0,H.jsx)(`p`,{className:`hz-ts-sub`,children:`Your people and your AI agents plan, build, and ship together — click any card to watch its specialist teammate pick it up and sync live to mobile.`})]}),(0,H.jsxs)(`div`,{className:`hz-ts-board-win`,children:[(0,H.jsxs)(`div`,{className:`hz-ts-win-bar`,children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,H.jsx)(`strong`,{style:{fontWeight:600},children:`hanzo.team`}),(0,H.jsx)(`span`,{style:{color:`var(--ts-dim)`},children:`·`}),(0,H.jsx)(`span`,{style:{color:`var(--ts-ink)`,fontWeight:500},children:`Tracker Board`}),(0,H.jsx)(`span`,{style:{color:`var(--ts-mute)`},children:`23 AI Teammates`}),(0,H.jsx)(`span`,{style:{color:`var(--ts-mute)`},children:`Virtual Office`})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:6,fontSize:12,color:`var(--ts-mute)`},children:[(0,H.jsx)(z9,{pct:83,size:14}),`83% Sprint complete`]}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>o(e=>!e),"aria-label":i?`Pause board`:`Replay board`,style:{appearance:`none`,border:`1px solid var(--ts-rule-strong)`,background:`var(--ts-card)`,color:`var(--ts-ink)`,borderRadius:6,width:26,height:26,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`},children:i?(0,H.jsx)(mm,{size:12}):(0,H.jsx)(_m,{size:12})})]})]}),(0,H.jsxs)(`div`,{className:`hz-ts-board-body`,children:[(0,H.jsx)(`div`,{className:`hz-ts-cols`,children:B9.map(e=>(0,H.jsxs)(`div`,{className:`hz-ts-col`,children:[(0,H.jsxs)(`div`,{className:`hz-ts-col-h`,children:[(0,H.jsx)(`span`,{style:{width:7,height:7,borderRadius:999,background:e.tone}}),(0,H.jsx)(`span`,{children:e.head})]}),e.cards.map(e=>{let t=V9.findIndex(t=>t.id===e.id),i=t===n;return(0,H.jsxs)(`button`,{type:`button`,className:`hz-ts-card`,"data-active":i?`true`:`false`,onClick:()=>{o(!1),r(t)},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,fontSize:11,color:`var(--ts-mute)`},children:[(0,H.jsx)(`span`,{style:{fontFamily:`var(--font-mono, monospace)`},children:e.id}),(0,H.jsx)(`span`,{style:{padding:`1px 6px`,borderRadius:999,background:`var(--ts-panel)`,border:`1px solid var(--ts-rule)`},children:e.tag})]}),(0,H.jsx)(`div`,{style:{fontSize:13,fontWeight:500,lineHeight:1.38},children:e.title}),(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,fontSize:11.5,color:`var(--ts-mute)`},children:[(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:5},children:[(0,H.jsx)(z9,{pct:e.pct}),e.pct,`%`]}),(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:5,color:i?`var(--ts-ink)`:`var(--ts-mute)`,fontWeight:600},children:[(0,H.jsx)(R9,{id:e.owner,size:18}),`@`,e.owner]})]})]},e.id)})]},e.head))}),(0,H.jsx)(`div`,{className:`hz-ts-phone`,"aria-label":`Synced iPhone workspace`,children:(0,H.jsxs)(`div`,{className:`hz-ts-phone-in`,children:[(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,fontSize:11},children:[(0,H.jsx)(`strong`,{children:`9:41`}),(0,H.jsx)(`span`,{style:{color:`var(--ts-green)`,fontSize:10.5,fontWeight:600},children:`● Synced`})]}),(0,H.jsxs)(`div`,{style:{padding:10,borderRadius:10,background:`var(--ts-card)`,border:`1px solid var(--ts-rule)`,display:`flex`,flexDirection:`column`,gap:6},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,fontSize:10.5,color:`var(--ts-mute)`},children:[(0,H.jsx)(`span`,{children:S.id}),(0,H.jsx)(`span`,{children:S.tag})]}),(0,H.jsx)(`div`,{style:{fontSize:12,fontWeight:600,lineHeight:1.35},children:S.title}),(0,H.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,fontSize:11,color:`var(--ts-mute)`},children:[(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:5},children:[(0,H.jsx)(z9,{pct:S.pct,size:12}),S.pct,`%`]}),(0,H.jsxs)(`span`,{children:[`@`,S.owner]})]})]}),(0,H.jsxs)(`div`,{style:{padding:9,borderRadius:10,background:`var(--ts-panel)`,border:`1px solid var(--ts-rule)`,display:`flex`,gap:8,alignItems:`center`},children:[(0,H.jsx)(R9,{id:`mark`,size:24}),(0,H.jsxs)(`div`,{style:{minWidth:0},children:[(0,H.jsx)(`div`,{style:{fontSize:11,fontWeight:600},children:`#hanzo-mark · Mark`}),(0,H.jsx)(`div`,{style:{fontSize:10.5,color:`var(--ts-mute)`},children:`28-day GA4 checkout funnel synced`})]})]})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,paddingTop:6,borderTop:`1px solid var(--ts-rule)`,fontSize:10.5,color:`var(--ts-mute)`},children:[(0,H.jsx)(`div`,{style:{display:`flex`,gap:4},children:[`dev`,`cyber`,`mark`,`sci`].map(e=>(0,H.jsx)(R9,{id:e,size:18},e))}),(0,H.jsx)(`span`,{children:`Web + iOS`})]})]})})]})]})]}),(0,H.jsx)(`div`,{className:`hz-ts-drift`,"aria-hidden":`true`,children:(0,H.jsx)(`div`,{className:`hz-ts-drift-track`,children:[0,1].flatMap(e=>G9.map(t=>(0,H.jsxs)(`span`,{children:[`# `,t.channel]},`${e}-${t.channel}`)))})}),(0,H.jsxs)(`section`,{className:`hz-ts-sec`,"aria-label":`What it is`,children:[(0,H.jsxs)(`div`,{className:`hz-ts-head`,children:[(0,H.jsx)(`span`,{className:`hz-ts-kicker`,children:`What it is`}),(0,H.jsx)(`h2`,{className:`hz-ts-h2`,children:`One workspace. Everything connected.`}),(0,H.jsx)(`p`,{className:`hz-ts-sub`,children:`Stop jumping between tools just to get work done.`})]}),(0,H.jsxs)(`div`,{className:`hz-ts-split`,children:[(0,H.jsx)(`div`,{role:`tablist`,"aria-label":`Workspace chapters`,style:{display:`flex`,flexDirection:`column`,gap:10},children:H9.map((e,t)=>(0,H.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":s===t,className:`hz-ts-tab-btn`,onClick:()=>c(t),children:[(0,H.jsx)(`span`,{style:{fontFamily:`var(--font-mono, monospace)`,fontSize:11,color:`var(--ts-dim)`},children:e.num}),(0,H.jsx)(`span`,{style:{fontSize:15.5,fontWeight:600,color:s===t?`var(--ts-ink)`:`var(--foreground)`},children:e.title}),(0,H.jsx)(`span`,{style:{fontSize:13.5,lineHeight:1.5,color:`var(--ts-mute)`},children:e.body})]},e.num))}),(0,H.jsxs)(`div`,{className:`hz-ts-stage-card`,children:[s===0?(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,paddingBottom:10,borderBottom:`1px solid var(--ts-rule)`},children:[(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:6,fontWeight:600},children:[(0,H.jsx)(Yp,{size:15}),` bugfix`]}),(0,H.jsx)(`span`,{style:{fontSize:11.5,color:`var(--ts-green)`,fontWeight:600},children:`42/42 E2E GREEN`})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,gap:10,alignItems:`flex-start`},children:[(0,H.jsx)(`span`,{className:`hz-ts-face`,style:{width:28,height:28},children:`ZM`}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontSize:12.5,fontWeight:600},children:`Zoe Maxwell · 10:14 AM`}),(0,H.jsx)(`div`,{style:{fontSize:13.5,color:`var(--ts-mute)`,marginTop:2},children:`Checkout button is unresponsive on mobile Safari when Apple Pay sheet closes.`})]})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,gap:10,alignItems:`flex-start`,paddingLeft:18,borderLeft:`2px solid var(--ts-rule-strong)`},children:[(0,H.jsx)(R9,{id:`dev`,size:28}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontSize:12.5,fontWeight:600},children:`Dev · Agent`}),(0,H.jsx)(`div`,{style:{fontSize:13.5,color:`var(--ts-mute)`,marginTop:2},children:`Cleared lock in finally block and opened ${N9}.`})]})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,gap:10,alignItems:`flex-start`,paddingLeft:18,borderLeft:`2px solid var(--ts-rule-strong)`},children:[(0,H.jsx)(R9,{id:`sci`,size:28}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontSize:12.5,fontWeight:600},children:`Sci · Agent`}),(0,H.jsx)(`div`,{style:{fontSize:13,color:`var(--ts-green)`,fontWeight:600,marginTop:2},children:`Verified across iOS 18 Safari & Chromium — 42/42 checkout specs green.`})]})]})]}):s===1?(0,H.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(180px, 1fr))`,gap:10},children:U9.map(([e,t,n])=>(0,H.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`var(--ts-card)`,border:`1px solid var(--ts-rule)`,display:`flex`,alignItems:`center`,gap:10},children:[(0,H.jsx)(R9,{id:e,size:36}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontSize:13.5,fontWeight:600},children:t}),(0,H.jsx)(`div`,{style:{fontSize:11.5,color:`var(--ts-mute)`},children:n})]})]},e))}):(0,H.jsxs)(`div`,{style:{display:`flex`,gap:14,alignItems:`stretch`},children:[(0,H.jsxs)(`div`,{style:{width:46,borderRadius:10,background:`var(--ts-panel)`,border:`1px solid var(--ts-rule)`,padding:`10px 0`,display:`flex`,flexDirection:`column`,alignItems:`center`,gap:8},children:[(0,H.jsx)(`span`,{style:{width:30,height:30,borderRadius:8,background:`var(--ts-ink)`,color:`var(--ts-bg)`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,fontWeight:800,fontSize:12},children:`HA`}),(0,H.jsx)(`span`,{style:{width:30,height:30,borderRadius:8,background:`var(--ts-card-hi)`,color:`var(--ts-ink)`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,fontWeight:700,fontSize:12},children:`LN`}),(0,H.jsx)(`span`,{style:{width:30,height:30,borderRadius:8,background:`var(--ts-card)`,color:`var(--ts-mute)`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,fontWeight:700,fontSize:12},children:`ZL`}),(0,H.jsx)(`span`,{style:{width:30,height:30,borderRadius:8,border:`1px dashed var(--ts-rule-strong)`,color:`var(--ts-mute)`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,fontSize:14},children:`+`})]}),(0,H.jsxs)(`div`,{style:{flex:1,display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(200px, 1fr))`,gap:12},children:[(0,H.jsxs)(`div`,{style:{padding:14,borderRadius:10,background:`var(--ts-card)`,border:`1px solid var(--ts-ink)`},children:[(0,H.jsx)(`div`,{style:{fontSize:13.5,fontWeight:600},children:`Hanzo AI · hanzo.ai`}),(0,H.jsxs)(`div`,{style:{fontSize:12,color:`var(--ts-mute)`,marginTop:8,display:`flex`,flexDirection:`column`,gap:4},children:[(0,H.jsx)(`span`,{children:`# bugfix`}),(0,H.jsx)(`span`,{children:`# launch`}),(0,H.jsx)(`span`,{children:`# ops`})]})]}),(0,H.jsxs)(`div`,{style:{padding:14,borderRadius:10,background:`var(--ts-panel)`,border:`1px solid var(--ts-rule)`},children:[(0,H.jsx)(`div`,{style:{fontSize:13.5,fontWeight:600},children:`Lux Network · lux.network`}),(0,H.jsxs)(`div`,{style:{fontSize:12,color:`var(--ts-mute)`,marginTop:8,display:`flex`,flexDirection:`column`,gap:4},children:[(0,H.jsx)(`span`,{children:`# consensus`}),(0,H.jsx)(`span`,{children:`# validator-ops`}),(0,H.jsx)(`span`,{children:`# bridge-audit`})]})]})]})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,paddingTop:10,borderTop:`1px solid var(--ts-rule)`,fontSize:12,color:`var(--ts-dim)`},children:[(0,H.jsxs)(`span`,{children:[`Chapter `,H9[s].num,` / 03`]}),(0,H.jsx)(`span`,{children:`Slack-style org rail · Threads · Native AI teammates`})]})]})]})]}),(0,H.jsxs)(`section`,{className:`hz-ts-sec`,"aria-label":`Humans and agents on the same work`,children:[(0,H.jsxs)(`div`,{className:`hz-ts-head`,children:[(0,H.jsx)(`span`,{className:`hz-ts-kicker`,children:`Together`}),(0,H.jsx)(`h2`,{className:`hz-ts-h2`,children:`Humans and agents, on the same work`})]}),(0,H.jsxs)(`div`,{className:`hz-ts-split`,children:[(0,H.jsxs)(`div`,{className:`hz-ts-stage-card`,style:{justifyContent:`center`,alignItems:`flex-start`},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14},children:[(0,H.jsx)(R9,{id:w.pair[0],size:52}),(0,H.jsx)(`span`,{style:{width:36,height:2,background:`var(--ts-ink)`,display:`inline-block`}}),(0,H.jsx)(R9,{id:w.pair[1],size:52})]}),(0,H.jsxs)(`div`,{style:{fontFamily:`var(--font-mono, monospace)`,fontSize:12,color:`var(--ts-dim)`},children:[`HANDOFF `,String(l+1).padStart(2,`0`),` / 06`]}),(0,H.jsx)(`div`,{style:{fontSize:22,fontWeight:600},children:w.title}),(0,H.jsx)(`p`,{style:{margin:0,fontSize:14.5,lineHeight:1.55,color:`var(--ts-mute)`},children:w.body})]}),(0,H.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(240px, 1fr))`,gap:10},children:W9.map((e,t)=>(0,H.jsxs)(`button`,{type:`button`,className:`hz-ts-tab-btn`,"aria-selected":l===t,onMouseEnter:()=>u(t),onClick:()=>u(t),children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,H.jsx)(R9,{id:e.pair[0],size:24}),(0,H.jsx)(`span`,{style:{color:`var(--ts-dim)`,fontSize:11},children:`→`}),(0,H.jsx)(R9,{id:e.pair[1],size:24}),(0,H.jsx)(`span`,{style:{fontSize:14.5,fontWeight:600,color:`var(--foreground)`},children:e.title})]}),(0,H.jsx)(`span`,{style:{fontSize:12.5,lineHeight:1.48,color:`var(--ts-mute)`},children:e.body})]},e.title))})]})]}),(0,H.jsxs)(`section`,{className:`hz-ts-sec`,"aria-label":`Everything the team works in`,children:[(0,H.jsxs)(`div`,{className:`hz-ts-head`,children:[(0,H.jsx)(`span`,{className:`hz-ts-kicker`,children:`The rooms`}),(0,H.jsx)(`h2`,{className:`hz-ts-h2`,children:`Everything the team works in`})]}),(0,H.jsxs)(`div`,{className:`hz-ts-bento`,children:[(0,H.jsxs)(`article`,{className:`hz-ts-tile`,children:[(0,H.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(3, 1fr)`,gap:6,fontSize:10.5},children:[`Backlog`,`Doing`,`Done`].map((e,t)=>(0,H.jsxs)(`div`,{style:{padding:7,borderRadius:7,background:`var(--ts-bg)`,border:`1px solid var(--ts-rule)`},children:[(0,H.jsx)(`div`,{style:{color:`var(--ts-dim)`,marginBottom:5},children:e}),(0,H.jsx)(`div`,{style:{padding:`5px 6px`,borderRadius:5,background:t===2?`var(--ts-green-bg)`:`var(--ts-card)`,border:`1px solid var(--ts-rule)`,fontWeight:500},children:t===0?`Email`:t===1?`R&D Ops`:`Specs ✓`})]},e))}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontSize:15.5,fontWeight:600},children:`Board`}),(0,H.jsx)(`div`,{style:{fontSize:13,color:`var(--ts-mute)`,marginTop:4},children:`Cards in Backlog, Doing and Done, each with its owner, person or agent.`})]})]}),(0,H.jsxs)(`article`,{className:`hz-ts-tile`,children:[(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:5,padding:10,borderRadius:8,background:`var(--ts-bg)`,border:`1px solid var(--ts-rule)`,fontSize:11.5,fontFamily:`var(--font-mono, monospace)`},children:[(0,H.jsx)(`span`,{style:{color:`var(--ts-ink)`,fontWeight:600},children:`▾ Docs & Specs/`}),(0,H.jsx)(`span`,{style:{color:`var(--ts-mute)`,paddingLeft:12},children:`PaySheet.tsx`}),(0,H.jsx)(`span`,{style:{color:`var(--ts-mute)`,paddingLeft:12},children:`BuyNowButton.tsx`}),(0,H.jsx)(`span`,{style:{color:`var(--ts-mute)`,paddingLeft:12},children:`styles.css`})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontSize:15.5,fontWeight:600},children:`Drive`}),(0,H.jsx)(`div`,{style:{fontSize:13,color:`var(--ts-mute)`,marginTop:4},children:`The team's documents and files, in folders.`})]})]}),(0,H.jsxs)(`article`,{className:`hz-ts-tile`,children:[(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6,padding:10,borderRadius:8,background:`var(--ts-bg)`,border:`1px solid var(--ts-rule)`,fontSize:11.5},children:[(0,H.jsxs)(`div`,{style:{padding:`5px 8px`,borderRadius:6,background:`var(--ts-card-hi)`,display:`flex`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{children:`09:30 · Design Crit`}),(0,H.jsx)(`span`,{style:{color:`var(--ts-mute)`},children:`@Des`})]}),(0,H.jsxs)(`div`,{style:{padding:`5px 8px`,borderRadius:6,background:`var(--ts-green-bg)`,border:`1px solid var(--ts-green-edge)`,display:`flex`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{children:`12:00 · Canary Rollout`}),(0,H.jsx)(`span`,{style:{color:`var(--ts-green)`},children:`@Opera`})]})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontSize:15.5,fontWeight:600},children:`Calendar`}),(0,H.jsx)(`div`,{style:{fontSize:13,color:`var(--ts-mute)`,marginTop:4},children:`The week's meetings and agent routines on one schedule.`})]})]}),(0,H.jsxs)(`article`,{className:`hz-ts-tile`,children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:10,borderRadius:8,background:`var(--ts-bg)`,border:`1px solid var(--ts-rule)`},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,H.jsx)(R9,{id:`vi`,size:32}),(0,H.jsx)(R9,{id:`dev`,size:32})]}),(0,H.jsxs)(`div`,{style:{fontSize:11,textAlign:`right`},children:[(0,H.jsx)(`div`,{style:{fontWeight:600},children:`Fix: Button Dark Mode`}),(0,H.jsx)(`div`,{style:{color:`var(--ts-mute)`},children:`Canvas · Live notes`})]})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontSize:15.5,fontWeight:600},children:`Meet`}),(0,H.jsx)(`div`,{style:{fontSize:13,color:`var(--ts-mute)`,marginTop:4},children:`Calls with notes taken for you, in the same workspace as the work.`})]})]}),(0,H.jsxs)(`article`,{className:`hz-ts-tile`,children:[(0,H.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:5,padding:10,borderRadius:8,background:`var(--ts-bg)`,border:`1px solid var(--ts-rule)`,fontSize:11.5},children:[[`vi`,`Zoe Maxwell`,`@Dev`],[`dev`,`Harry Boone`,`@Zoe`],[`sci`,`Dev`,`@Sci`]].map(([e,t,n])=>(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:6},children:[(0,H.jsx)(R9,{id:e,size:18}),(0,H.jsx)(`span`,{children:t})]}),(0,H.jsx)(`span`,{style:{color:`var(--ts-blue)`,fontWeight:600},children:n})]},t+n))}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontSize:15.5,fontWeight:600},children:`Inbox`}),(0,H.jsx)(`div`,{style:{fontSize:13,color:`var(--ts-mute)`,marginTop:4},children:`Every mention, thread reply, and review request in one triage queue.`})]})]}),(0,H.jsxs)(`article`,{className:`hz-ts-tile`,children:[(0,H.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:6,padding:10,borderRadius:8,background:`var(--ts-bg)`,border:`1px solid var(--ts-rule)`},children:U9.map(([e,t])=>(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:5,padding:`3px 8px 3px 4px`,borderRadius:999,background:`var(--ts-card)`,border:`1px solid var(--ts-rule)`,fontSize:11},children:[(0,H.jsx)(R9,{id:e,size:18}),t]},e))}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontSize:15.5,fontWeight:600},children:`Agents`}),(0,H.jsx)(`div`,{style:{fontSize:13,color:`var(--ts-mute)`,marginTop:4},children:`Dedicated AI teammates configured with your repos, docs, and permissions.`})]})]})]})]}),(0,H.jsxs)(`section`,{className:`hz-ts-sec`,"aria-label":`Ten everyday workflows`,children:[(0,H.jsxs)(`div`,{className:`hz-ts-head`,children:[(0,H.jsx)(`span`,{className:`hz-ts-kicker`,children:`10 Everyday Workflows`}),(0,H.jsx)(`h2`,{className:`hz-ts-h2`,children:`Ten everyday workflows your team hands off in a single mention.`}),(0,H.jsx)(`p`,{className:`hz-ts-sub`,children:`Open a channel, mention the right specialist teammate, and get finished work back — verified end-to-end by a second agent before you merge or send.`})]}),(0,H.jsxs)(`div`,{className:`hz-ts-flows`,children:[(0,H.jsxs)(`div`,{className:`hz-ts-flow-nav`,role:`tablist`,"aria-label":`Workflow channels`,children:[(0,H.jsx)(`div`,{style:{padding:`4px 10px 8px`,fontSize:11,fontFamily:`var(--font-mono, monospace)`,color:`var(--ts-dim)`},children:`HANZO · 10 CHANNELS`}),G9.map((e,t)=>(0,H.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":d===t,className:`hz-ts-flow-btn`,onClick:()=>{m(!0),f(t)},children:[(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:7},children:[(0,H.jsx)(`span`,{style:{fontFamily:`var(--font-mono, monospace)`,fontSize:11,color:`var(--ts-dim)`},children:e.no}),(0,H.jsxs)(`span`,{children:[`#`,e.channel]})]}),(0,H.jsxs)(`span`,{style:{display:`inline-flex`,gap:3},children:[(0,H.jsx)(R9,{id:e.faces[0],size:20}),(0,H.jsx)(R9,{id:e.faces[1],size:20})]})]},e.channel))]}),(0,H.jsxs)(`div`,{style:{padding:24,display:`flex`,flexDirection:`column`,gap:18},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,alignItems:`center`,justifyContent:`space-between`,gap:8},children:[(0,H.jsxs)(`span`,{style:{fontFamily:`var(--font-mono, monospace)`,fontSize:11.5,color:`var(--ts-mute)`},children:[`ACTIVE CREW · #`,C.channel,` · `,C.category]}),(0,H.jsx)(`span`,{style:{padding:`3px 9px`,borderRadius:999,background:`var(--ts-green-bg)`,border:`1px solid var(--ts-green-edge)`,color:`var(--ts-green)`,fontSize:11,fontWeight:700,fontFamily:`var(--font-mono, monospace)`},children:C.badge})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h3`,{style:{margin:0,fontSize:20,fontWeight:600},children:C.title}),(0,H.jsx)(`p`,{style:{margin:`6px 0 0`,fontSize:13.5,lineHeight:1.5,color:`var(--ts-mute)`},children:C.summary})]}),(0,H.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(280px, 1fr))`,gap:16},children:[(0,H.jsxs)(`div`,{style:{padding:14,borderRadius:12,background:`var(--ts-panel)`,border:`1px solid var(--ts-rule)`,display:`flex`,flexDirection:`column`,gap:12},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,gap:9,alignItems:`flex-start`},children:[(0,H.jsx)(`span`,{className:`hz-ts-face`,style:{width:28,height:28},children:C.humanInitials}),(0,H.jsxs)(`div`,{style:{fontSize:12.5},children:[(0,H.jsxs)(`div`,{style:{fontWeight:600},children:[C.humanName,` `,(0,H.jsx)(`span`,{style:{color:`var(--ts-dim)`,fontWeight:400},children:C.humanTime})]}),(0,H.jsx)(`div`,{style:{color:`var(--ts-mute)`,marginTop:2,lineHeight:1.45},children:C.humanAsk})]})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,gap:9,alignItems:`flex-start`},children:[(0,H.jsx)(R9,{id:C.leadAgent,size:28}),(0,H.jsxs)(`div`,{style:{fontSize:12.5,flex:1},children:[(0,H.jsxs)(`div`,{style:{fontWeight:600},children:[C.leadName,` · Agent`]}),(0,H.jsx)(`div`,{style:{color:`var(--ts-mute)`,marginTop:2,lineHeight:1.45},children:C.leadReply}),(0,H.jsxs)(`div`,{style:{marginTop:6,padding:`6px 9px`,borderRadius:7,background:`var(--ts-card)`,border:`1px solid var(--ts-rule-strong)`,fontFamily:`var(--font-mono, monospace)`,fontSize:11,display:`flex`,alignItems:`center`,gap:6},children:[(0,H.jsx)(Kp,{size:12,color:`var(--ts-green)`}),(0,H.jsx)(`span`,{children:C.artifact})]})]})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,gap:9,alignItems:`flex-start`},children:[(0,H.jsx)(R9,{id:C.verifyAgent,size:28}),(0,H.jsxs)(`div`,{style:{fontSize:12.5},children:[(0,H.jsxs)(`div`,{style:{fontWeight:600},children:[C.verifyName,` · Agent`]}),(0,H.jsx)(`div`,{style:{color:`var(--ts-mute)`,marginTop:2,lineHeight:1.45},children:C.verifyLine})]})]})]}),(0,H.jsxs)(`div`,{style:{padding:14,borderRadius:12,background:`var(--ts-panel)`,border:`1px solid var(--ts-rule)`,display:`flex`,flexDirection:`column`,justifyContent:`space-between`,gap:12},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:9},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,fontSize:11,fontFamily:`var(--font-mono, monospace)`,color:`var(--ts-mute)`},children:[(0,H.jsx)(`strong`,{children:`AUTOMATED WORKFLOW`}),(0,H.jsx)(`span`,{children:`4 / 4 complete`})]}),C.steps.map(e=>(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`flex-start`,gap:8,fontSize:12.5,color:`var(--ts-ink)`},children:[(0,H.jsx)(Vt,{size:14,color:`var(--ts-green)`,style:{marginTop:2,flexShrink:0}}),(0,H.jsx)(`span`,{children:e})]},e))]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontSize:10.5,fontFamily:`var(--font-mono, monospace)`,color:`var(--ts-dim)`,marginBottom:6},children:`TOOLS & SANDBOXES USED`}),(0,H.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:6},children:C.tools.map(e=>(0,H.jsx)(`span`,{style:{padding:`3px 8px`,borderRadius:6,background:`var(--ts-card)`,border:`1px solid var(--ts-rule)`,fontSize:11.5,color:`var(--ts-mute)`},children:e},e))})]})]})]})]})]})]}),(0,H.jsxs)(`section`,{className:`hz-ts-sec`,"aria-label":`Code channels and artifacts`,children:[(0,H.jsxs)(`div`,{className:`hz-ts-head`,children:[(0,H.jsx)(`span`,{className:`hz-ts-kicker`,children:`Code Channels & Artifacts`}),(0,H.jsx)(`h2`,{className:`hz-ts-h2`,children:`Code channels where engineers, designers, and agents ship together.`}),(0,H.jsx)(`p`,{className:`hz-ts-sub`,children:`Every code channel pairs the conversation with a live Artifacts pane — Canvas root-cause writeups, unified branch diffs, and interactive previews.`})]}),(0,H.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:8},role:`tablist`,"aria-label":`Code session steps`,children:vse.map((e,t)=>{let n=t+1,r=h===n;return(0,H.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":r,onClick:()=>g(n),style:{appearance:`none`,padding:`6px 12px`,borderRadius:999,border:`1px solid ${r?`var(--ts-ink)`:`var(--ts-rule-strong)`}`,background:r?`var(--ts-card-hi)`:`var(--ts-panel)`,color:r?`var(--ts-ink)`:`var(--ts-mute)`,fontSize:12,fontWeight:r?600:500,cursor:`pointer`},children:e},e)})}),(0,H.jsxs)(`div`,{className:`hz-ts-board-win`,children:[(0,H.jsxs)(`div`,{className:`hz-ts-win-bar`,children:[(0,H.jsx)(`span`,{style:{fontFamily:`var(--font-mono, monospace)`,fontSize:12},children:`hanzo.team — Hanzo AI (hanzo.ai) · #bug-button-darkmode`}),(0,H.jsx)(`span`,{style:{fontSize:11.5,color:`var(--ts-green)`,fontWeight:600},children:`Working · Session channel`})]}),(0,H.jsxs)(`div`,{className:`hz-ts-code-grid`,children:[(0,H.jsxs)(`aside`,{style:{padding:14,borderRight:`1px solid var(--ts-rule)`,background:`var(--ts-panel)`,display:`flex`,flexDirection:`column`,gap:10,fontSize:12.5},children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontWeight:600},children:`Hanzo AI`}),(0,H.jsx)(`div`,{style:{fontSize:11,color:`var(--ts-dim)`},children:`hanzo.ai`})]}),(0,H.jsx)(`div`,{style:{fontSize:10.5,fontFamily:`var(--font-mono, monospace)`,color:`var(--ts-dim)`,marginTop:4},children:`CODE CHANNELS`}),(0,H.jsx)(`div`,{style:{padding:`6px 8px`,borderRadius:7,background:`var(--ts-card-hi)`,fontWeight:600},children:`# bug-button-darkmode`}),(0,H.jsx)(`div`,{style:{padding:`4px 8px`,color:`var(--ts-mute)`},children:`# feat-wimse-tokens`}),(0,H.jsxs)(`div`,{style:{marginTop:`auto`,padding:8,borderRadius:8,background:`var(--ts-bg)`,border:`1px solid var(--ts-rule)`,fontFamily:`var(--font-mono, monospace)`,fontSize:10.5,color:`var(--ts-mute)`},children:[(0,H.jsx)(`div`,{children:`hanzoai/app`}),(0,H.jsx)(`div`,{style:{color:`var(--ts-ink)`},children:`main → update-cta-color`})]})]}),(0,H.jsxs)(`div`,{style:{padding:16,borderRight:`1px solid var(--ts-rule)`,display:`flex`,flexDirection:`column`,gap:12,fontSize:13},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,gap:9},children:[(0,H.jsx)(R9,{id:`dev`,size:26}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontWeight:600},children:`Dev · 9:31 AM`}),(0,H.jsxs)(`div`,{style:{color:`var(--ts-mute)`,marginTop:2},children:[`Searched `,(0,H.jsx)(`code`,{children:`components/ui/`}),` and `,(0,H.jsx)(`code`,{children:`styles/cta-button.css`}),`: button foreground is too light on dark backgrounds. What contrast target should we use?`]})]})]}),h>=2?(0,H.jsxs)(`div`,{style:{display:`flex`,gap:9},children:[(0,H.jsx)(`span`,{className:`hz-ts-face`,style:{width:26,height:26},children:`HB`}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontWeight:600},children:`Harry Boone · 9:32 AM`}),(0,H.jsx)(`div`,{style:{color:`var(--ts-mute)`,marginTop:2},children:`@Zoe Maxwell what token should we pair with the accent fill?`})]})]}):null,h>=3?(0,H.jsxs)(`div`,{style:{display:`flex`,gap:9},children:[(0,H.jsx)(`span`,{className:`hz-ts-face`,style:{width:26,height:26},children:`ZM`}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontWeight:600},children:`Zoe Maxwell · 9:34 AM`}),(0,H.jsxs)(`div`,{style:{color:`var(--ts-mute)`,marginTop:2},children:[`Keep the pink pill and switch the label ink to `,(0,H.jsx)(`code`,{children:F9}),` for AAA contrast.`]})]})]}):null,h>=4?(0,H.jsxs)(`div`,{style:{display:`flex`,gap:9},children:[(0,H.jsx)(R9,{id:`dev`,size:26}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontWeight:600},children:`Dev · 9:36 AM`}),(0,H.jsxs)(`div`,{style:{color:`var(--ts-mute)`,marginTop:2},children:[`Updated `,(0,H.jsx)(`code`,{children:`styles/cta-button.css`}),` and wrote the root-cause summary in Canvas. @Sci running E2E checks now.`]})]})]}):null,h>=5?(0,H.jsxs)(`div`,{style:{display:`flex`,gap:9},children:[(0,H.jsx)(R9,{id:`sci`,size:26}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontWeight:600},children:`Sci · 9:41 AM`}),(0,H.jsx)(`div`,{style:{color:`var(--ts-green)`,fontWeight:600,marginTop:2},children:`Verified across Chromium & Safari — WCAG AAA contrast (8.9:1) and 28/28 checkout specs green.`})]})]}):null,h>=6?(0,H.jsxs)(`div`,{style:{marginTop:`auto`,padding:`8px 12px`,borderRadius:8,background:`var(--ts-green-bg)`,border:`1px solid var(--ts-green-edge)`,color:`var(--ts-green)`,fontWeight:600,fontSize:12.5,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{children:`✓ ${N9} merged · E2E green`}),(0,H.jsx)(`span`,{style:{color:`var(--ts-mute)`,fontWeight:500},children:`Session complete`})]}):null]}),(0,H.jsxs)(`div`,{style:{background:`var(--ts-panel)`,display:`flex`,flexDirection:`column`},children:[(0,H.jsxs)(`div`,{style:{padding:`10px 12px`,borderBottom:`1px solid var(--ts-rule)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsx)(`strong`,{style:{fontSize:12.5},children:`Artifacts`}),(0,H.jsx)(`div`,{style:{display:`flex`,gap:4},children:[`Code`,`View`,`Canvas`].map(e=>(0,H.jsx)(`button`,{type:`button`,onClick:()=>v(e),style:{appearance:`none`,border:`1px solid var(--ts-rule)`,background:_===e?`var(--ts-card-hi)`:`transparent`,color:_===e?`var(--ts-ink)`:`var(--ts-mute)`,borderRadius:6,padding:`3px 8px`,fontSize:11.5,fontWeight:600,cursor:`pointer`},children:e},e))})]}),_===`Code`?(0,H.jsxs)(`div`,{style:{padding:`10px 0`,display:`flex`,flexDirection:`column`,gap:2},children:[(0,H.jsx)(`div`,{style:{padding:`0 12px 8px`,fontSize:11,fontFamily:`var(--font-mono, monospace)`,color:`var(--ts-mute)`},children:`styles/cta-button.css · +3 -2`}),yse.map(([e,t,n,r],i)=>(0,H.jsxs)(`div`,{className:`hz-ts-diff-row`,"data-kind":n||void 0,children:[(0,H.jsx)(`span`,{style:{color:`var(--ts-dim)`},children:e}),(0,H.jsx)(`span`,{style:{color:`var(--ts-dim)`},children:t}),(0,H.jsx)(`span`,{children:r})]},i))]}):_===`View`?(0,H.jsxs)(`div`,{style:{padding:16,display:`flex`,flexDirection:`column`,gap:12},children:[(0,H.jsx)(`div`,{style:{fontSize:11,fontFamily:`var(--font-mono, monospace)`,color:`var(--ts-mute)`},children:`BEFORE (LOW CONTRAST · 1.9:1)`}),(0,H.jsx)(`div`,{style:{padding:`9px 14px`,borderRadius:8,background:`var(--ts-pink-low)`,color:`var(--ts-pink-ink-bad)`,fontWeight:500,textAlign:`center`,fontSize:13},children:`Buy Now — $49`}),(0,H.jsx)(`div`,{style:{fontSize:11,fontFamily:`var(--font-mono, monospace)`,color:`var(--ts-green)`},children:`AFTER FIX (${F9} ON ${I9} · 8.9:1 AAA)`}),(0,H.jsx)(`div`,{style:{padding:`9px 14px`,borderRadius:8,background:`var(--ts-pink-fill)`,color:`var(--ts-pink-ink-good)`,fontWeight:700,textAlign:`center`,fontSize:13},children:`Buy Now — $49`})]}):(0,H.jsxs)(`div`,{style:{padding:16,display:`flex`,flexDirection:`column`,gap:10,fontSize:12.5},children:[(0,H.jsx)(`div`,{style:{fontWeight:600},children:`Fix: Button Dark Mode`}),(0,H.jsxs)(`div`,{style:{color:`var(--ts-mute)`,lineHeight:1.5},children:[`Global dark theme inherited light foreground text onto `,(0,H.jsx)(`code`,{children:`.cta-button`}),` without scoping contrast to the accent surface token.`]}),(0,H.jsx)(`div`,{style:{color:`var(--ts-green)`,fontWeight:600},children:`✓ WCAG AAA contrast ratio (8.9:1) verified`})]})]})]})]})]}),(0,H.jsxs)(`section`,{className:`hz-ts-sec`,"aria-label":`Get Hanzo Team`,children:[(0,H.jsxs)(`div`,{className:`hz-ts-split`,style:{alignItems:`center`},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:10},children:[(0,H.jsx)(`span`,{className:`hz-ts-kicker`,children:`Paste and ship`}),(0,H.jsx)(`h2`,{className:`hz-ts-h2`,children:`Get Team`}),(0,H.jsx)(`p`,{className:`hz-ts-sub`,children:`Paste this prompt into any agent. It reads the skill manifest and connects your project to Hanzo Team.`})]}),(0,H.jsxs)(`div`,{className:`hz-ts-stage-card`,style:{gap:12},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,fontSize:12,color:`var(--ts-mute)`},children:[(0,H.jsx)(`span`,{style:{fontFamily:`var(--font-mono, monospace)`},children:`Agent prompt · MIT Open Source`}),(0,H.jsxs)(`button`,{type:`button`,onClick:()=>{navigator.clipboard?.writeText(L9),x(!0),window.setTimeout(()=>x(!1),1800)},style:{appearance:`none`,border:`1px solid var(--ts-rule-strong)`,background:`var(--ts-card)`,color:`var(--ts-ink)`,borderRadius:7,padding:`4px 10px`,fontSize:11.5,fontWeight:600,display:`inline-flex`,alignItems:`center`,gap:6,cursor:`pointer`},children:[b?(0,H.jsx)(Vt,{size:12,color:`var(--ts-green)`}):(0,H.jsx)(Fp,{size:12}),(0,H.jsx)(`span`,{children:b?`Copied`:`Copy`})]})]}),(0,H.jsx)(`div`,{style:{padding:`12px 14px`,borderRadius:10,background:`var(--ts-panel)`,border:`1px solid var(--ts-rule)`,fontFamily:`var(--font-mono, monospace)`,fontSize:12.5,color:`var(--ts-ink)`,wordBreak:`break-word`},children:L9})]})]}),(0,H.jsxs)(z,{width:`100%`,p:DH.edge,rounded:Q.card,borderWidth:1,borderColor:X.rule,bg:X.panel,items:`center`,gap:DH.inset,style:{textAlign:`center`,marginTop:12},children:[(0,H.jsx)(a,{size:Z.title,color:X.ink,fontWeight:`700`,children:`One workspace for how your team actually works.`}),(0,H.jsx)(a,{size:Z.body,color:X.mute,style:{maxWidth:560},children:`Bring your projects, tasks, conversations, docs, meetings, and AI teammates together.`}),(0,H.jsxs)(y,{gap:DH.tight,flexWrap:`wrap`,justify:`center`,pt:DH.tight,children:[(0,H.jsx)(W,{size:`lg`,rounded:Q.pill,bg:X.ink,disabled:t,onPress:e,children:(0,H.jsx)(a,{size:Z.small,color:X.ground,fontWeight:`600`,children:t?`One moment…`:`Open Team`})}),(0,H.jsx)(W,{size:`lg`,variant:`outline`,rounded:Q.pill,onPress:()=>window.location.assign(`https://hanzo.ai/contact-sales`),children:(0,H.jsx)(a,{size:Z.small,color:X.ink,fontWeight:`500`,children:`Contact sales`})})]})]})]})]})}var bse=`https://pay.hanzo.ai/cart`,xse=(e,t)=>{let n=new URL(bse);return new URLSearchParams(e).forEach((e,t)=>n.searchParams.set(t,e)),n.searchParams.get(`plan`)||n.searchParams.set(`plan`,`team`),n.searchParams.set(`returnUrl`,`${t}/`),n.toString()},Sse=`/auth/callback`,$=`https://hanzo.ai`,q9=`https://docs.hanzo.ai`,Cse=`https://github.com/hanzoai`,wse=`https://status.hanzo.ai`,Tse=`https://hanzo.agency`,Ese=`https://hanzo.university`,J9=[{label:`Features`,href:`https://hanzo.ai/team`},{label:`Docs`,href:`https://docs.hanzo.ai`},{label:`Hanzo Bot`,href:`https://hanzo.bot`},{label:`Hanzo App`,href:`https://hanzo.app`},{label:`API Platform`,href:`https://platform.hanzo.ai`},{label:`Hanzo AI`,href:`https://hanzo.ai`}],Dse=[{id:`damon`,name:`Damon Motorcycles`,logo:`/logos/customers/damon-motorcycles.svg`,href:`${$}/customers/damon-motorcycles`},{id:`kanoa`,name:`KANOA`,logo:`/logos/customers/kanoa.png`,href:`${$}/customers/kanoa`},{id:`skully`,name:`SKULLY`,logo:`/logos/customers/skully.png`,href:`${$}/customers#skully`},{id:`bellabeat`,name:`Bellabeat`,logo:`/logos/customers/bellabeat.svg`,href:`${$}/customers#bellabeat`},{id:`stoned`,name:`STONED Audio`,logo:`/logos/customers/stoned.svg`,href:`${$}/customers#stoned`},{id:`unikrn`,name:`Unikrn`,logo:`/logos/customers/unikoin-gold.svg`,href:`${$}/customers#unikoin-gold`},{id:`arca`,name:`Arca`,logo:`/logos/customers/arca.png`,href:`${$}/customers#arca`},{id:`casper`,name:`Casper Labs`,logo:`/logos/customers/casper-blockchain.svg`,href:`${$}/customers#casper-blockchain`},{id:`triller`,name:`Triller`,logo:`/logos/customers/trillerfest.png`,href:`${$}/customers#trillerfest`},{id:`cover`,name:`Cover Build`,logo:`/logos/customers/cover-build.svg`,href:`${$}/customers#cover-build`},{id:`myle`,name:`Myle Tap`,logo:`/logos/customers/myle-tap.png`,href:`${$}/customers#myle-tap`},{id:`keek`,name:`Personas Social`,logo:`/logos/customers/keek-social.svg`,href:`${$}/customers#keek-social`}],Ose=[[{title:`Products`,href:`${$}/products`,links:[{label:`Hanzo App`,href:`https://hanzo.app`},{label:`Hanzo Dev`,href:`${$}/dev`},{label:`Hanzo Bot`,href:`https://hanzo.bot`},{label:`Hanzo Team`,href:`https://hanzo.team`},{label:`Hanzo Science`,href:`${$}/science`},{label:`Hanzo Security`,href:`${$}/security`},{label:`Download app`,href:`${$}/download`},{label:`Pricing`,href:`${$}/pricing`}]},{title:`Capabilities`,links:[{label:`Hanzo Design`,href:`${$}/design`},{label:`MCP`,href:`${$}/mcp`},{label:`Skills`,href:`${$}/skills`},{label:`Integrations`,href:`${$}/integrations`},{label:`Hanzo CLI`,href:`${$}/cli`}]},{title:`Extensions`,links:[{label:`Hanzo in Chrome`,href:`${$}/extension`},{label:`Desktop app`,href:`${$}/desktop`},{label:`Hanzo IDE`,href:`${$}/ide`}]},{title:`Models`,href:`${$}/models`,links:[{label:`All models`,href:`${$}/models`},{label:`Zen`,href:`${$}/zen`},{label:`Enso`,href:`${$}/enso`},{label:`Kai`,href:`${$}/kai`},{label:`Video · Koma`,href:`${$}/koma`},{label:`Images · Iro`,href:`${$}/iro`},{label:`3D · Mori`,href:`${$}/mori`},{label:`Voice · Koe`,href:`${$}/koe`},{label:`Benchmarks`,href:`${$}/benchmarks`}]}],[{title:`Enterprise`,href:`${$}/enterprise`,links:[{label:`Overview`,href:`${$}/enterprise`},{label:`All solutions`,href:`${$}/solutions`},{label:`Customer stories`,href:`${$}/customers`},{label:`Contact sales`,href:`${$}/contact-sales`}]},{title:`Teams`,href:`${$}/solutions`,links:[{label:`Engineering`,href:`${$}/solutions/engineering`},{label:`Operations`,href:`${$}/solutions/operations`},{label:`Finance`,href:`${$}/solutions/finance`},{label:`Data`,href:`${$}/solutions/data`},{label:`Sales`,href:`${$}/solutions/sales`},{label:`Marketing`,href:`${$}/solutions/marketing`},{label:`Design`,href:`${$}/solutions/design`}]},{title:`Industries`,href:`${$}/solutions`,links:[{label:`Cybersecurity`,href:`${$}/solutions/cybersecurity`},{label:`Financial services`,href:`${$}/solutions/financial-services`},{label:`Government`,href:`${$}/solutions/government`},{label:`Healthcare`,href:`${$}/solutions/healthcare`},{label:`Education`,href:`${$}/solutions/education`},{label:`Law`,href:`${$}/solutions/law`},{label:`Retail`,href:`${$}/solutions/retail`}]},{title:`Programs`,href:`${$}/startups`,links:[{label:`Startups`,href:`${$}/startups`},{label:`Affiliate program`,href:`${$}/affiliate`},{label:`Referral program`,href:`${$}/referral`},{label:`Reserved tier`,href:`${$}/solutions/reserved`},{label:`OSS grants`,href:`${$}/open-source`}]}],[{title:`Developers`,href:q9,links:[{label:`Developer docs`,href:q9},{label:`API reference`,href:`${q9}/docs/openapi/`},{label:`Quickstart`,href:`${q9}/docs/quickstart/`},{label:`SDKs`,href:`${$}/sdks`},{label:`Console`,href:`https://platform.hanzo.ai`},{label:`GitHub`,href:Cse}]},{title:`API Platform`,href:`${$}/platform`,links:[{label:`Overview`,href:`${$}/platform`},{label:`API keys`,href:`https://platform.hanzo.ai/settings/organization/keys`},{label:`Gateway`,href:`${$}/gateway`},{label:`Agents`,href:`${$}/agents`},{label:`Playground`,href:`${$}/playground`}]},{title:`Cloud`,href:`${$}/products`,links:[{label:`Base`,href:`${$}/base`},{label:`Machines`,href:`${$}/machines`},{label:`Search`,href:`${$}/search`},{label:`Datastore`,href:`${$}/datastore`},{label:`Memory`,href:`${$}/products/memory`},{label:`Realtime`,href:`${$}/realtime`},{label:`Observability`,href:`${$}/o11y`},{label:`Insights`,href:`${$}/insights`},{label:`Commerce`,href:`${$}/commerce`}]},{title:`Help and security`,links:[{label:`Availability`,href:wse},{label:`Help center`,href:`${$}/support`},{label:`Security and compliance`,href:`${$}/security`},{label:`Trust & transparency`,href:`${$}/trust`}]}],[{title:`Company`,href:`${$}/about`,links:[{label:`Hanzo AI`,href:`${$}/about`},{label:`Careers`,href:`${$}/careers`},{label:`Philosophy`,href:`${$}/philosophy`},{label:`Research`,href:`${$}/research`},{label:`News`,href:`${$}/press`},{label:`Investors`,href:`${$}/investors`},{label:`Brand`,href:`${$}/brand`},{label:`Open source`,href:`${$}/open-source`},{label:`Contact`,href:`${$}/contact`}]},{title:`Resources`,href:`${$}/learn`,links:[{label:`Blog`,href:`${$}/blog`},{label:`Guides`,href:`${q9}/docs/guides/`},{label:`Cookbook`,href:`${q9}/docs/guides/cookbook/`},{label:`Hanzo University`,href:Ese},{label:`Hanzo Agency`,href:Tse},{label:`Cost calculator`,href:`${$}/calculator`}]},{title:`Terms and policies`,href:`${$}/legal`,links:[{label:`Privacy choices`,href:`${$}/privacy#choices`},{label:`Privacy policy`,href:`${$}/privacy`},{label:`Terms of service`,href:`${$}/terms`},{label:`Usage policy`,href:`${$}/aup`},{label:`Cookie policy`,href:`${$}/cookies`},{label:`Other policies`,href:`${$}/legal`}]}]],kse=[{label:`Discord`,href:`https://discord.gg/XthHQQj`},{label:`Telegram`,href:`https://t.me/hanzoai`},{label:`X`,href:`https://x.com/hanzoai`},{label:`GitHub`,href:`https://github.com/hanzoai`},{label:`LinkedIn`,href:`https://linkedin.com/company/hanzo-ai`},{label:`Facebook`,href:`https://facebook.com/hanzoinc`},{label:`Bluesky`,href:`https://bsky.app/profile/hanzoai.bsky.social`},{label:`Reddit`,href:`https://www.reddit.com/r/HanzoAI/`},{label:`TikTok`,href:`https://www.tiktok.com/@hanzoinc`},{label:`Instagram`,href:`https://www.instagram.com/hanzoinc`}];function Ase(){let e=(0,V.useRef)(null);return(0,V.useEffect)(()=>{let t=e.current,n=t?.parentElement;if(!t||!n)return;let r=t.getContext(`2d`);if(!r)return;let i=window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,a=0,o=0,s=0,c=0,l=0,u=-1e4,d=-1e4,f=-1e4,p=-1e4,m=!1,h=0,g=0,_=[.085,.155,.235],v=[.32,.44,.56,.68,.8,.92],y=[[],[],[]],b=[[],[],[],[],[],[]],x=()=>{if(a<1||o<1)return;r.clearRect(0,0,a,o),r.fillStyle=getComputedStyle(t).color;for(let e=0;e<3;e++)y[e].length=0;for(let e=0;e<6;e++)b[e].length=0;let e=a*.18,n=o*.58,i=a*.82,l=o*.48,u=1/Math.max(1,o),d=Math.max(1,a*.3),m=Math.max(1,a*.34),g=h>.01&&f>-5e3;for(let t=0;t<c;t++){let r=t*10,o=.28+r*u*.95,c=o<1?o:1,_=o<1?u*.95:0;for(let t=0;t<s;t++){let o=t*10,s=1-o/d,u=(o-a*.66)/m,v=.14,x=0;s>=u&&s>.14?(v=s,x=-1/d):u>.14&&(v=u,x=1/m);let S=o*.012+r*.006,C=r*.014-o*.005,w=(o+r)*.007,T=Math.sin(S),E=Math.cos(S),D=Math.cos(C),O=Math.sin(C),k=Math.sin(w),A=Math.cos(w),j=T*D*.65+k*.35,ee=.65*(.012*E*D+T*.005*O)+.00245*A,M=.65*(.006*E*D-T*.014*O)+.00245*A,N=.56+.44*j,P=v*c*N*1.24,te=(x*c*N+v*c*.44*ee)*1.24,F=(v*_*N+v*c*.44*M)*1.24,I=o-e,ne=r-n,re=I*I+ne*ne;if(re<57600){let e=Math.sqrt(re)||1,t=1-e/240;P+=t*t*.24;let n=-.48*t/(240*e);te+=n*I,F+=n*ne}let ie=o-i,L=r-l,ae=ie*ie+L*L;if(ae<57600){let e=Math.sqrt(ae)||1,t=1-e/240;P+=t*t*.24;let n=-.48*t/(240*e);te+=n*ie,F+=n*L}let oe=P<0?0:P>1?1:P;if(oe<.05)continue;let R=-te*68,se=-F*68,ce=1/Math.sqrt(R*R+se*se+1),le=R*ce,ue=se*ce,de=ce,fe=o+le*oe*2.4,pe=r+ue*oe*2.4,me=oe*10*.38,he=-1;if(g){let e=f-o,t=p-r,n=e*e+t*t;if(n<65025){let r=1-Math.sqrt(n)/255,i=r*r*(3-2*r),a=108-oe*44,o=1/Math.sqrt(n+a*a),s=e*o,c=t*o,l=a*o,u=Math.max(0,le*s+ue*c+de*l),d=l+1,f=1/Math.sqrt(s*s+c*c+d*d),p=Math.max(0,(le*s+ue*c+de*d)*f),m=p*p,g=m*m,_=g*g*g,v=Math.max(.06,Math.min(1,(j+.72)*.68))*(.2+.8*oe),y=i*h*v*(.42*u+1.05*_),b=y*(.35+.65*oe);me=Math.min(4.8,me+b*10*.16),fe-=e/255*oe*2.2*i*h,pe-=t/255*oe*2.2*i*h,y>.07&&(he=Math.min(5,Math.floor((y-.07)*7.2)))}}he>=0?b[he].push(fe,pe,me):y[oe<.28?0:oe<.56?1:2].push(fe,pe,me)}}for(let e=0;e<3;e++){let t=y[e];if(t.length){r.globalAlpha=_[e],r.beginPath();for(let e=0;e<t.length;e+=3){let n=t[e],i=t[e+1],a=t[e+2];r.moveTo(n+a,i),r.arc(n,i,a,0,6.2832)}r.fill()}}for(let e=0;e<6;e++){let t=b[e];if(t.length){r.globalAlpha=v[e],r.beginPath();for(let e=0;e<t.length;e+=3){let n=t[e],i=t[e+1],a=t[e+2];r.moveTo(n+a,i),r.arc(n,i,a,0,6.2832)}r.fill()}}r.globalAlpha=1},S=()=>{g*=.9;let e=m?Math.min(1,.72+g*.28):0;h+=(e-h)*(m?.18:.08),f<-5e3&&u>-5e3?(f=u,p=d):u>-5e3&&(f+=(u-f)*.28,p+=(d-p)*.28),x(),l=h>.01||m?requestAnimationFrame(S):0},C=()=>{!l&&(h>.01||m)&&(l=requestAnimationFrame(S))},w=()=>{let e=n.getBoundingClientRect(),i=Math.min(window.devicePixelRatio||1,2);a=e.width,o=e.height,!(a<1||o<1)&&(t.width=Math.round(a*i),t.height=Math.round(o*i),t.style.width=`${a}px`,t.style.height=`${o}px`,r.setTransform(i,0,0,i,0,0),s=Math.ceil(a/10)+1,c=Math.ceil(o/10)+1,x())},T=e=>{if(i||e.pointerType===`touch`)return;let t=n.getBoundingClientRect(),r=e.clientX-t.left,a=e.clientY-t.top;u>-5e3&&(g=Math.min(1.4,g+Math.hypot(r-u,a-d)*.016)),u=r,d=a,m=!0,C()},E=()=>{m=!1,C()};w();let D=new ResizeObserver(w);return D.observe(n),window.addEventListener(`pointermove`,T,{passive:!0}),document.addEventListener(`mouseleave`,E,{passive:!0}),()=>{l&&cancelAnimationFrame(l),D.disconnect(),window.removeEventListener(`pointermove`,T),document.removeEventListener(`mouseleave`,E)}},[]),(0,H.jsx)(`canvas`,{ref:e,"aria-hidden":`true`,style:{position:`absolute`,inset:0,width:`100%`,height:`100%`,pointerEvents:`none`,zIndex:0,color:`var(--foreground)`}})}var jse=()=>{let{standing:e,depart:t,request:n}=dV(),[r,i]=(0,V.useState)(null);if(e===`in`)return null;let o=(e,n)=>{i(e),t(n).catch(()=>i(null))},s=r!==null;return(0,H.jsxs)(z,{flex:1,bg:X.ground,overflow:`scroll`,children:[(0,H.jsxs)(y,{width:`100%`,minH:68,px:DH.wide,py:DH.tight,items:`center`,justify:`space-between`,borderBottomWidth:1,borderColor:X.rule,bg:X.ground,style:{position:`sticky`,top:0,zIndex:40},children:[(0,H.jsx)(y,{items:`center`,gap:DH.tight,cursor:`pointer`,shrink:0,onPress:()=>window.location.assign(`/`),children:(0,H.jsx)(a,{size:Z.row,color:X.ink,fontWeight:`600`,children:`Hanzo ${PB.title}`})}),(0,H.jsxs)(y,{items:`center`,gap:DH.tight,shrink:0,children:[(0,H.jsx)(`div`,{className:`hz-landing-nav-links`,children:J9.map(e=>(0,H.jsx)(W,{size:`sm`,chromeless:!0,rounded:Q.pill,onPress:()=>window.location.assign(e.href),children:(0,H.jsx)(a,{size:Z.small,color:X.mute,children:e.label})},e.label))}),(0,H.jsx)(W,{size:`sm`,variant:`outline`,rounded:Q.pill,onPress:()=>window.location.assign(`https://hanzo.ai/contact-sales`),children:(0,H.jsx)(a,{size:Z.small,color:X.ink,fontWeight:`500`,children:`Contact sales`})}),(0,H.jsx)(W,{size:`sm`,rounded:Q.pill,bg:X.ink,disabled:s,onPress:()=>o(`open`,`login`),children:(0,H.jsx)(a,{size:Z.small,color:X.ground,fontWeight:`600`,children:((e,t)=>r===e?`One moment…`:t)(`open`,`Open Team`)})})]})]}),(0,H.jsxs)(`main`,{className:`hz-signin`,children:[(0,H.jsx)(Ase,{}),(0,H.jsxs)(`div`,{className:`hz-signin-row`,children:[(0,H.jsxs)(`div`,{className:`hz-signin-copy`,children:[(0,H.jsx)(dJ,{bare:!0,title:`Sign in to Hanzo ${PB.title}`,line:`AI cockpit, live streams, issue boards, channels, and bots for your team.`,request:n,termsHref:`${$}/terms`,privacyHref:`${$}/privacy`}),(0,H.jsx)(y,{items:`center`,justify:`center`,pt:DH.tight,children:(0,H.jsx)(a,{size:Z.small,color:X.mute,cursor:`pointer`,onPress:()=>window.location.assign(`${$}/team`),style:{textDecoration:`underline`,textUnderlineOffset:`3px`},children:`Learn more about Hanzo Team →`})})]}),(0,H.jsxs)(`div`,{className:`hz-signin-figure`,children:[(0,H.jsx)(fse,{}),(0,H.jsx)(mse,{})]})]})]}),(0,H.jsxs)(z,{width:`100%`,items:`center`,px:DH.wide,py:DH.edge,gap:DH.inset,bg:X.ground,children:[(0,H.jsx)(a,{size:Z.small,color:X.mute,fontWeight:`500`,style:{textAlign:`center`},children:`Companies building with the Hanzo API`}),(0,H.jsx)(`div`,{className:`hz-mq-view`,children:(0,H.jsx)(`div`,{className:`hz-mq-track`,children:[0,1].map(e=>Dse.map(t=>{let n=e>0;return(0,H.jsx)(`a`,{href:t.href,className:`hz-logo`,"aria-label":n?void 0:t.name,"aria-hidden":n||void 0,tabIndex:n?-1:void 0,target:`_blank`,rel:`noopener noreferrer`,title:t.name,children:(0,H.jsx)(`img`,{src:t.logo,alt:n?``:t.name,loading:`lazy`})},`${e}-${t.id}`)}))})})]}),(0,H.jsx)(K9,{onOpen:()=>o(`open`,`login`),working:s}),(0,H.jsx)(z,{width:`100%`,borderTopWidth:1,borderColor:X.rule,bg:X.ground,px:DH.wide,py:DH.edge,children:(0,H.jsxs)(z,{width:`100%`,maxW:1240,mx:`auto`,gap:DH.edge,children:[(0,H.jsxs)(y,{justify:`space-between`,items:`flex-start`,gap:DH.edge,flexWrap:`wrap`,children:[(0,H.jsx)(z,{minW:160,gap:DH.tight,children:(0,H.jsxs)(y,{items:`center`,gap:DH.tight,cursor:`pointer`,onPress:()=>window.location.assign($),children:[(0,H.jsx)(z,{width:22,height:22,rounded:Q.field,bg:X.ink,items:`center`,justify:`center`,children:(0,H.jsx)(a,{size:Z.small,color:X.ground,fontWeight:`700`,children:`H`})}),(0,H.jsx)(a,{size:Z.row,color:X.ink,fontWeight:`600`,children:`Hanzo`})]})}),(0,H.jsx)(y,{gap:DH.edge,flexWrap:`wrap`,grow:1,justify:`space-between`,children:Ose.map((e,t)=>(0,H.jsx)(z,{minW:150,gap:DH.inset,children:e.map(e=>(0,H.jsxs)(z,{gap:DH.tight,children:[(0,H.jsx)(a,{size:Z.small,color:X.ink,fontWeight:`600`,cursor:e.href?`pointer`:void 0,onPress:e.href?()=>window.location.assign(e.href):void 0,style:{lineHeight:`1.35`},children:e.title}),(0,H.jsx)(z,{style:{gap:`2.5px`},children:e.links.map(e=>(0,H.jsx)(a,{size:Z.small,color:X.mute,cursor:e.href?`pointer`:void 0,onPress:()=>window.location.assign(e.href),style:{lineHeight:`1.32`},children:e.label},e.href+e.label))})]},e.title))},t))})]}),(0,H.jsx)(y,{pt:DH.inset,borderTopWidth:1,borderColor:X.rule,items:`center`,flexWrap:`wrap`,style:{columnGap:`24px`,rowGap:`8px`},children:kse.map(e=>(0,H.jsxs)(a,{size:Z.small,color:X.mute,cursor:`pointer`,onPress:()=>window.location.assign(e.href),style:{lineHeight:`1.35`},children:[e.label,` ↗`]},e.label))}),(0,H.jsxs)(y,{pt:DH.inset,borderTopWidth:1,borderColor:X.rule,items:`center`,justify:`space-between`,flexWrap:`wrap`,gap:DH.tight,children:[(0,H.jsx)(a,{size:Z.chip,color:X.dim,children:`© 2026 Hanzo AI, Inc. All rights reserved.`}),(0,H.jsx)(y,{gap:DH.inset,flexWrap:`wrap`,children:[[`Terms`,`${$}/terms`],[`Privacy`,`${$}/privacy`],[`Usage policy`,`${$}/aup`],[`Privacy choices`,`${$}/privacy#choices`]].map(([e,t])=>(0,H.jsx)(a,{size:Z.chip,color:X.dim,cursor:`pointer`,onPress:()=>window.location.assign(t),children:e},e))})]})]})})]})},Y9=`team.enrol_tried`,Mse=({children:e})=>{let{standing:t,who:n,depart:r,leave:i}=dV(),{standing:o,refusal:s,enrolNow:c,enrolment:l}=eH(),[u,d]=(0,V.useState)(!1),[f,p]=(0,V.useState)(!1);if((0,V.useEffect)(()=>{if(o===`settled`){try{sessionStorage.removeItem(Y9)}catch{}p(!1)}},[o]),(0,V.useEffect)(()=>{if(t!==`in`||o!==`stranger`)return;let e=!1;try{e=sessionStorage.getItem(Y9)===`1`}catch{e=!0}if(e){p(!0);return}try{sessionStorage.setItem(Y9,`1`)}catch{}d(!0),c().then(e=>{e?d(!1):navigator.webdriver?(d(!1),p(!0)):window.location.replace(l)})},[t,o,c,l]),window.location.pathname===Sse)return(0,H.jsx)(sse,{});if(window.location.pathname===`/start`)return(0,H.jsx)(Nse,{to:xse(window.location.search,window.location.origin)});if(t===`unknown`)return(0,H.jsx)(Z9,{});if(t===`out`)return(0,H.jsx)(jse,{});let m=n?.email??n?.label??null,h=()=>{try{sessionStorage.removeItem(Y9)}catch{}d(!0),c().then(e=>{e?d(!1):window.location.assign(l)})};return o===`stranger`?f?(0,H.jsx)(Q9,{title:`Finish setting up Hanzo Team`,body:`Provision your Team workspace to open channels, issues, docs, and CRM.`,account:m,onLeave:i,onOpen:h,working:u,children:(0,H.jsxs)(y,{items:`center`,justify:`center`,gap:DH.tight,flexWrap:`wrap`,pt:DH.tight,children:[(0,H.jsx)(W,{disabled:u,rounded:Q.pill,bg:X.ink,onPress:h,children:(0,H.jsx)(a,{size:Z.small,color:X.ground,fontWeight:`600`,children:u?`Setting up…`:`Set up workspace`})}),(0,H.jsx)(W,{variant:`outline`,rounded:Q.pill,onPress:()=>{r(`another`)},children:(0,H.jsx)(a,{size:Z.small,color:X.ink,fontWeight:`500`,children:`Switch account`})})]})}):(0,H.jsx)(Z9,{account:m,onLeave:i}):o===`refused`?(0,H.jsx)(Q9,{title:`Your workspace is not answering`,body:s?.message??`Check your connection or try signing in again.`,account:m,onLeave:i,onOpen:()=>window.location.reload(),working:!1,children:(0,H.jsxs)(y,{items:`center`,justify:`center`,gap:DH.tight,flexWrap:`wrap`,pt:DH.tight,children:[(0,H.jsx)(W,{rounded:Q.pill,bg:X.ink,onPress:()=>window.location.reload(),children:(0,H.jsx)(a,{size:Z.small,color:X.ground,fontWeight:`600`,children:`Try again`})}),(0,H.jsx)(W,{variant:`outline`,rounded:Q.pill,onPress:()=>{r(`another`)},children:(0,H.jsx)(a,{size:Z.small,color:X.ink,fontWeight:`500`,children:`Switch account`})})]})}):o===`unknown`?(0,H.jsx)(Z9,{account:m,onLeave:i}):(0,H.jsx)(H.Fragment,{children:e})},Nse=({to:e})=>((0,V.useEffect)(()=>window.location.replace(e),[e]),(0,H.jsx)(Z9,{})),X9=({account:e,onLeave:t})=>{let n=`Hanzo ${PB.title}`;return(0,H.jsxs)(y,{width:`100%`,minH:68,px:DH.wide,py:DH.tight,items:`center`,justify:`space-between`,borderBottomWidth:1,borderColor:X.rule,bg:X.ground,style:{position:`sticky`,top:0,zIndex:40},children:[(0,H.jsx)(y,{items:`center`,gap:DH.tight,cursor:`pointer`,shrink:0,onPress:()=>window.location.assign(`/`),children:(0,H.jsx)(a,{size:Z.row,color:X.ink,fontWeight:`600`,children:n})}),(0,H.jsxs)(y,{items:`center`,gap:DH.tight,shrink:0,children:[e?(0,H.jsx)(a,{size:Z.small,color:X.mute,children:e}):null,(0,H.jsx)(W,{size:`sm`,variant:`outline`,rounded:Q.pill,onPress:()=>window.location.assign(`${$}/contact-sales`),children:(0,H.jsx)(a,{size:Z.small,color:X.ink,fontWeight:`500`,children:`Contact sales`})}),t?(0,H.jsx)(W,{size:`sm`,variant:`outline`,rounded:Q.pill,onPress:t,children:(0,H.jsx)(a,{size:Z.small,color:X.ink,fontWeight:`500`,children:`Sign out`})}):null]})]})},Z9=({account:e,onLeave:t})=>(0,H.jsxs)(z,{flex:1,minH:`100vh`,bg:X.ground,children:[(0,H.jsx)(X9,{account:e,onLeave:t}),(0,H.jsxs)(z,{flex:1,items:`center`,justify:`center`,gap:DH.tight,children:[(0,H.jsx)(tv,{}),(0,H.jsx)(a,{size:Z.body,color:X.ink,fontWeight:`500`,children:`Opening Hanzo ${PB.title}…`})]})]}),Q9=({title:e,body:t,account:n,onLeave:r,onOpen:i,working:o,children:s})=>(0,H.jsxs)(z,{flex:1,bg:X.ground,overflow:`scroll`,children:[(0,H.jsx)(X9,{account:n,onLeave:r}),(0,H.jsx)(z,{width:`100%`,minH:540,items:`center`,justify:`center`,px:DH.wide,py:DH.wide,children:(0,H.jsxs)(z,{width:`100%`,maxW:480,items:`center`,gap:DH.inset,p:DH.wide,rounded:Q.panel,bg:X.panel,borderWidth:1,borderColor:X.rule,children:[(0,H.jsx)(a,{size:Z.title,color:X.ink,fontWeight:`600`,style:{textAlign:`center`},children:e}),t?(0,H.jsx)(a,{size:Z.body,color:X.mute,style:{textAlign:`center`},children:t}):null,s]})}),(0,H.jsx)(K9,{onOpen:i,working:o})]}),Pse=()=>Ti(ose),Fse=200,Ise=()=>{let{effectiveTheme:e}=t7();return(0,V.useEffect)(()=>{$5(X5()),dae(UB().getAccessToken())},[]),(0,H.jsx)(Ay,{theme:e,position:`top-center`})},Lse=()=>(0,H.jsxs)(Qne,{children:[(0,H.jsx)(Zm,{delay:Fse,children:(0,H.jsx)(xV,{children:(0,H.jsxs)(rH,{children:[(0,H.jsx)(yoe,{}),(0,H.jsx)(Mse,{children:(0,H.jsx)(Aa,{children:(0,H.jsx)(Pse,{})})})]})})}),(0,H.jsx)(Ise,{}),(0,H.jsx)(lre,{floating:!1})]});Te({token:()=>UB().getAccessToken()??void 0});var $9=document.getElementById(`root`);if(!$9)throw Error(`no #root`);(0,Wn.createRoot)($9).render((0,H.jsx)(V.StrictMode,{children:(0,H.jsx)(Lse,{})}));export{dW as $,C3 as A,JG as B,p3 as C,v3 as D,g3 as E,YJ as F,gG as G,HG as H,CJ as I,TG as J,wG as K,vK as L,J0 as M,NZ as N,b3 as O,VY as P,lW as Q,cK as R,f3 as S,h3 as T,EG as U,WG as V,hG as W,hW as X,uG as Y,cW as Z,a3 as _,Fp as _t,I3 as a,rv as at,u3 as b,La as bt,K4 as c,F_ as ct,Z4 as d,Jg as dt,eH as et,$4 as f,u_ as ft,i3 as g,vm as gt,r3 as h,W as ht,R3 as i,eC as it,I2 as j,x3 as k,q4 as l,Rg as lt,n3 as m,Bg as mt,K3 as n,$S as nt,F3 as o,P_ as ot,t3 as p,d_ as pt,DG as q,L3 as r,nC as rt,G4 as s,I_ as st,T8 as t,HB as tt,Y4 as u,Wg as ut,o3 as v,wp as vt,m3 as w,d3 as x,c3 as y,U as yt,oK as z};
|
|
194
|
-
//# sourceMappingURL=index-
|
|
192
|
+
`).map(e=>e.trimEnd()).filter(e=>e!==``).map(e=>`<p>${V8(e)}</p>`).join(``)||`<p></p>`,oie={"&":`&`,"<":`<`,">":`>`,""":`"`,"'":`'`,""":`"`," ":` `},sie=e=>e.replace(/&(?:amp|lt|gt|quot|nbsp|#39|#34);/g,e=>oie[e]??e),V8=e=>e.replace(/[&<>"']/g,e=>`&${{"&":`amp`,"<":`lt`,">":`gt`,'"':`quot`,"'":`#39`}[e]};`),cie=/(?<![\w.@-])(@[\w.-]+)|(https?:\/\/[^\s<>()]+)/g,lie=e=>{let t=[],n=0;for(let r of e.matchAll(cie)){let i=r.index;i>n&&t.push({kind:`text`,value:e.slice(n,i)}),t.push(r[1]?{kind:`mention`,value:r[1]}:{kind:`link`,value:r[2]}),n=i+r[0].length}return n<e.length&&t.push({kind:`text`,value:e.slice(n)}),t},H8={channel:P8.channel,direct:P8.direct,message:P8.message,reply:P8.reply,reaction:P8.reaction,person:P8.person},U8=F8.create,uie=F8.remove,W8=(e,t)=>e.name||e.members.map(e=>t.find(t=>t.id===e)?.name).filter(e=>!!e).join(`, `),G8=e=>typeof e==`string`?e:``,K8=e=>typeof e==`number`?e:0,die=async e=>{let[t,n]=await Promise.all([e.find(H8.channel),e.find(H8.direct)]);return[...t.map(e=>q8(e,`channel`)),...n.map(e=>q8(e,`direct`))].filter(e=>!e.archived)},fie=e=>{let t=new Set;if(Array.isArray(e.bindings))for(let n of e.bindings)typeof n==`string`&&n.startsWith(`connect:`)&&t.add(n.slice(8));let n=G8(e.topic)||G8(e.description);for(let e of n.matchAll(/connect:([a-z0-9_-]+)/gi))e[1]&&t.add(e[1].toLowerCase());let r=G8(e.name).match(/^[a-z0-9]+-x-([a-z0-9_-]+)$/i);return r?.[1]&&t.add(r[1].toLowerCase()),t.size>0?[...t]:void 0},q8=(e,t)=>({id:G8(e._id),kind:t,name:G8(e.name),topic:G8(e.topic)||void 0,private:e.private===!0,archived:e.archived===!0,members:Array.isArray(e.members)?e.members.filter(e=>typeof e==`string`):[],connectedOrgs:fie(e)}),pie=async(e,t)=>(await e.find(H8.message,{attachedTo:t})).map(e=>Y8(e,t)).sort(J8),J8=(e,t)=>e.at-t.at||(e.id<t.id?-1:1),Y8=(e,t)=>({id:G8(e._id),room:t,author:G8(e.createdBy)||G8(e.modifiedBy),lines:tie(G8(e.message)),at:K8(e.createdOn)||K8(e.modifiedOn),replies:K8(e.replies),pinned:e.isPinned===!0}),mie=async(e,t)=>(await e.find(H8.reply,{attachedTo:t})).map(e=>({...hie(e),room:t})).sort(J8),hie=e=>Y8(e,G8(e.attachedTo)),gie=async(e,t)=>t.length===0?[]:(await e.find(H8.reaction,{attachedTo:{$in:t}})).map(e=>({id:G8(e._id),message:G8(e.attachedTo),emoji:G8(e.emoji),by:G8(e.createBy)||G8(e.createdBy)})),_ie=e=>R8({name:e}).replace(/\s+/g,` `),vie=e=>{let t=e[`contact:mixin:Employee`];return G8(e.position)||(t&&typeof t==`object`?G8(t.position):``)},yie=e=>{let t=e[`contact:mixin:Employee`],n=t&&typeof t==`object`?t.active:e.active;return typeof n==`boolean`?n:void 0},bie=async e=>(await e.find(H8.person)).map(e=>({id:G8(e.personUuid)||G8(e._id),name:_ie(G8(e.name)),avatar:G8(e.avatar)||void 0,bot:vie(e)===`Agent`||void 0,gone:yie(e)===!1||void 0})),xie=(e,t,n,r=[])=>e.write(Q8($8(),H8.message,t.id,t.id,X8(t),`messages`,Z8(e),{message:B8(n,r)})),Sie=(e,t,n,r,i=[])=>e.write(Q8($8(),H8.reply,t.id,n.id,H8.message,`replies`,Z8(e),{message:B8(r,i),objectId:t.id,objectClass:X8(t)})),Cie=(e,t,n,r)=>e.write(Q8($8(),H8.reaction,t.id,n.id,H8.message,`reactions`,Z8(e),{emoji:r})),wie=(e,t,n)=>e.write({_class:uie,objectId:n.id,objectClass:H8.reaction,objectSpace:t.id,modifiedBy:Z8(e),modifiedOn:Date.now()}),Tie=async(e,t,n,r)=>{let i=t.trim().replace(/^#+/,``).toLowerCase().replace(/[^a-z0-9_-]+/g,`-`),a=n.map(e=>e.trim().toLowerCase().replace(/[^a-z0-9_-]+/g,``)).filter(Boolean),o=`connect-${i}-${$8().slice(0,8)}`,s=Date.now(),c=Z8(e),l=a.map(e=>`connect:${e}`),u=[r?.trim(),...l].filter(Boolean).join(` · `);return await e.write({_class:U8,objectId:o,objectClass:H8.channel,objectSpace:`core:space:Space`,modifiedBy:c,modifiedOn:s,createdBy:c,createdOn:s,attributes:{name:i,topic:u,description:u,private:!1,archived:!1,members:c?[c]:[],owners:c?[c]:[],life:`standing`,bindings:l}}),o},X8=e=>e.kind===`direct`?H8.direct:H8.channel,Z8=e=>e.account??``,Q8=(e,t,n,r,i,a,o,s)=>{let c=Date.now();return{_class:U8,objectId:e,objectClass:t,objectSpace:n,modifiedBy:o,modifiedOn:c,createdBy:o,createdOn:c,attributes:s,attachedTo:r,attachedToClass:i,collection:a}},$8=()=>[...crypto.getRandomValues(new Uint8Array(16))].map(e=>e.toString(16).padStart(2,`0`)).join(``),Eie=(e,t)=>e.some(e=>{let n=G8(e.objectClass);return n!==H8.message&&n!==H8.reaction&&n!==H8.reply?!1:G8(e.objectSpace)===t||G8(e.attachedTo)===t||n!==H8.message}),e5=()=>{let{plane:e,current:t}=eH();return oV(`chat:rooms:${t?.uuid??`-`}`,()=>e?die(e):Promise.resolve([]),{enabled:!!e})},Die=e=>{let{plane:t}=eH();return oV(`chat:messages:${e??`-`}`,()=>t&&e?pie(t,e):Promise.resolve([]),{enabled:!!(t&&e)})},Oie=e=>{let{plane:t}=eH();return oV(`chat:reactions:${e.join(`,`).slice(0,200)}:${e.length}`,()=>t?gie(t,e):Promise.resolve([]),{enabled:!!t&&e.length>0})},kie=e=>{let{plane:t}=eH();return oV(`chat:replies:${e??`-`}`,()=>t&&e?mie(t,e):Promise.resolve([]),{enabled:!!(t&&e)})},t5=()=>{let{plane:e,current:t}=eH();return oV(`chat:people:${t?.uuid??`-`}`,()=>e?bie(e):Promise.resolve([]),{enabled:!!e})},Aie=e=>{let{plane:t}=eH();(0,V.useEffect)(()=>{if(t&&e)return t.watch(t=>{Eie(t,e)&&(sV(`chat:messages:${e}`),sV(`chat:reactions:`),sV(`chat:replies:`))})},[t,e])},n5=(e,t)=>{let n=t.startsWith(`hanzo:`)?t.slice(6):t;return e.find(e=>e.id===n||e.id===t)?.name||jie(n)},jie=e=>(e.length>12?`${e.slice(0,8)}…`:e)||`Someone`,Mie=e=>e.split(/[\s._-]+/).filter(Boolean).slice(0,2).map(e=>e[0].toUpperCase()).join(``)||`?`;function r5(e,t){return e?.trim()?e.trim():(t?.split(`@`)[0])?.trim()||``}function Nie(e,t){let n=r5(e,t).replace(/,/g,` `).trim();if(!n)return`HZ`;let r=n.split(/\s+/).filter(Boolean);return r.length>=2?`${r[0][0]??``}${r[r.length-1][0]??``}`.toUpperCase():n.slice(0,2).toUpperCase()}var Pie=[{id:`chat`,label:`Chat — Channels & threads`,desc:`Workspace channels, threads & teammates`,path:`/chat`},{id:`issues`,label:`Tracker — All issues`,desc:`Kanban board, list & project issues`,path:`/issues`},{id:`projects`,label:`Projects`,desc:`Every project in this space`,path:`/projects`},{id:`crm`,label:`CRM`,desc:`Investors, contacts & pipeline`,path:`/crm/investors`}];function Fie({currentOrg:e,navSpan:t,navOpen:n=!1,onToggleNav:r,surfaceTitle:i,leftSlot:a,children:o,rightSlot:s,onNavigate:c}){let[l,u]=(0,V.useState)(!1),[d,f]=(0,V.useState)(``),[p,m]=(0,V.useState)(()=>typeof window>`u`?1200:window.innerWidth),h=p<680,g=e?.displayName?.trim()||e?.name||`Hanzo AI`;(0,V.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`&&(e.preventDefault(),u(e=>!e))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let _=t5().data??[],v=e5().data??[],b=(0,V.useMemo)(()=>{let e=d.trim().toLowerCase(),t=M8(_).map(e=>({id:`bot-${e.id}`,kind:`bot`,label:e.name,desc:`Agent`,path:A8(e)})),n=v.filter(e=>e.kind===`channel`).map(e=>({id:e.id,kind:`channel`,label:`#${e.name}`,desc:e.topic??``,path:`/chat/${e.id}`})),r=[...Pie.map(e=>({...e,kind:`surface`})),...n,...t];return e?r.filter(t=>t.label.toLowerCase().includes(e)||t.desc.toLowerCase().includes(e)).slice(0,14):r.slice(0,12)},[d,_,v]),x=e=>{u(!1),f(``),c?c(e):typeof window<`u`&&window.location.assign(e)};return(0,H.jsxs)(y,{render:`header`,height:36,items:`center`,borderBottomWidth:1,shrink:0,style:{backgroundColor:X.bar,borderBottomColor:X.barRule},onLayout:e=>m(e.nativeEvent.layout.width),"data-testid":`hanzo-business-header`,children:[(0,H.jsxs)(y,{height:`100%`,width:n&&t?48+t:void 0,minW:n&&t?48+t:void 0,pl:11,pr:8,gap:2,items:`center`,borderRightWidth:n&&t?1:0,shrink:0,style:{borderRightColor:X.barRule},children:[a,r?(0,H.jsx)(y,{role:`button`,tabIndex:0,cursor:`pointer`,width:26,height:26,rounded:6,items:`center`,justify:`center`,hoverStyle:{bg:`$color3`},"aria-label":n?`Collapse sidebar`:`Expand sidebar`,"data-testid":`toggle-team-sidebar`,onPress:r,children:(0,H.jsx)(fm,{size:15,color:`$color10`})}):null,h?null:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(y,{role:`button`,tabIndex:0,cursor:`pointer`,width:26,height:26,rounded:6,items:`center`,justify:`center`,hoverStyle:{bg:`$color3`},"aria-label":`Go back`,onPress:()=>{typeof window<`u`&&window.history.back()},children:(0,H.jsx)(mp,{size:14,color:`$color10`})}),(0,H.jsx)(y,{role:`button`,tabIndex:0,cursor:`pointer`,width:26,height:26,rounded:6,items:`center`,justify:`center`,hoverStyle:{bg:`$color3`},"aria-label":`Go forward`,onPress:()=>{typeof window<`u`&&window.history.forward()},children:(0,H.jsx)(hp,{size:14,color:`$color10`})})]})]}),(0,H.jsxs)(y,{flex:1,height:`100%`,pl:12,pr:12,gap:`$2`,items:`center`,justify:`space-between`,minW:0,children:[(0,H.jsxs)(y,{items:`center`,gap:6,minW:0,shrink:1,children:[(0,H.jsx)(U,{fontSize:12.5,fontWeight:`600`,color:`$color11`,numberOfLines:1,children:g}),i&&!h?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(U,{fontSize:12,color:`$color9`,children:`/`}),(0,H.jsx)(U,{fontSize:12.5,fontWeight:`500`,color:`$color10`,numberOfLines:1,children:i})]}):null]}),(0,H.jsxs)(y,{items:`center`,justify:`flex-end`,gap:`$1.5`,minW:0,shrink:0,children:[o??(0,H.jsxs)(pt,{open:l,onOpenChange:u,placement:`bottom-end`,allowFlip:!0,stayInFrame:!0,children:[(0,H.jsx)(pt.Trigger,{asChild:!0,children:(0,H.jsx)(y,{role:`button`,tabIndex:0,cursor:`pointer`,width:h?28:240,maxW:h?28:`38vw`,height:25,px:h?0:`$2`,rounded:7,borderWidth:1,items:`center`,justify:h?`center`:`space-between`,style:{backgroundColor:X.sidebar,borderColor:X.sidebarRule},hoverStyle:{bg:`$color3`},"aria-label":`Search ${g}`,"data-testid":`slack-top-search-trigger`,children:h?(0,H.jsx)(vm,{size:13,color:`$color10`}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(y,{items:`center`,gap:`$1.5`,minW:0,flex:1,children:[(0,H.jsx)(vm,{size:12,color:`$color10`}),(0,H.jsx)(U,{fontSize:12,color:`$color10`,numberOfLines:1,children:`Search ${g}…`})]}),(0,H.jsx)(U,{fontSize:10,fontWeight:`600`,color:`$color9`,px:`$1`,py:1,rounded:`$1`,children:`⌘K`})]})})}),(0,H.jsx)(pt.Content,{role:`dialog`,"aria-label":`Jump to channel, bot, or surface`,borderWidth:1,elevation:`$4`,p:`$2`,width:460,bg:`$background`,borderColor:`$borderColor`,rounded:`$4`,style:{zIndex:1e5},children:(0,H.jsxs)(z,{gap:`$2`,width:`100%`,children:[(0,H.jsxs)(y,{height:34,px:`$2.5`,items:`center`,gap:`$2`,rounded:`$3`,bg:`$color2`,borderWidth:1,borderColor:`$borderColor`,children:[(0,H.jsx)(vm,{size:14,color:`$color10`}),(0,H.jsx)(ht,{flex:1,height:30,fontSize:13,borderWidth:0,bg:`transparent`,placeholder:`Jump to a channel, bot or issue board…`,value:d,onChangeText:f,autoFocus:!0})]}),(0,H.jsx)(z,{gap:`$0.5`,maxH:340,style:{overflowY:`auto`},children:b.map(e=>(0,H.jsxs)(y,{role:`menuitem`,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2.5`,py:`$1.5`,rounded:`$3`,hoverStyle:{bg:`$color3`},onPress:()=>x(e.path),children:[(0,H.jsx)(z,{width:24,height:24,rounded:`$2`,bg:`$color3`,items:`center`,justify:`center`,shrink:0,children:e.kind===`bot`?(0,H.jsx)(vp,{size:13,color:`$color11`}):e.kind===`channel`?(0,H.jsx)(Yp,{size:13,color:`$color11`}):(0,H.jsx)(Tm,{size:13,color:`$color11`})}),(0,H.jsxs)(z,{flex:1,minW:0,children:[(0,H.jsx)(U,{fontSize:12,fontWeight:`600`,color:`$color12`,numberOfLines:1,children:e.label}),(0,H.jsx)(U,{fontSize:11,color:`$color10`,numberOfLines:1,children:e.desc})]})]},e.id))})]})})]}),s]})]})]})}function Iie({user:e,currentOrg:t,orgs:n=[],onSelectOrg:r,onCreateOrg:i,onConnectOrg:a,accounts:o=[],onSwitchAccount:s,onAddAccount:c,onSettings:l,onSignOut:u}){let[d,f]=(0,V.useState)(!1),p=t?.displayName?.trim()||t?.name||`Hanzo AI`,m=r5(e?.name,e?.email)||`Account`,h=e?.email||``,g=e?.sub||``,_=(()=>{let n=[],r=new Set;g&&(r.add(g),n.push({sub:g,owner:e?.owner||t?.name||`hanzo`,name:m,email:h||void 0,avatar:e?.avatar}));for(let e of o)e.sub&&!r.has(e.sub)&&(r.add(e.sub),n.push(e));return n})();return(0,H.jsxs)(pt,{open:d,onOpenChange:f,placement:`right-end`,allowFlip:!0,stayInFrame:!0,children:[(0,H.jsx)(pt.Trigger,{asChild:!0,children:(0,H.jsx)(z,{role:`button`,tabIndex:0,cursor:`pointer`,width:36,height:36,rounded:10,items:`center`,justify:`center`,position:`relative`,style:d?{backgroundColor:X.railActive}:void 0,hoverStyle:d?void 0:{background:`$hover`},focusVisibleStyle:kH,"aria-label":`${m} · Account & settings`,"aria-haspopup":`menu`,"aria-expanded":d,"data-testid":`rail-account-menu-trigger`,onKeyDown:e=>{(e?.key===`Enter`||e?.key===` `)&&(e.preventDefault?.(),f(!d))},children:e?.avatar?(0,H.jsx)(z,{width:24,height:24,rounded:Q.pill,overflow:`hidden`,items:`center`,justify:`center`,style:{backgroundColor:X.avatar},children:(0,H.jsx)(`img`,{src:e.avatar,alt:``,width:24,height:24,style:{width:24,height:24,objectFit:`cover`}})}):(0,H.jsx)(z,{width:24,height:24,rounded:Q.pill,items:`center`,justify:`center`,style:{backgroundColor:X.avatar},children:(0,H.jsx)(U,{fontSize:10.5,fontWeight:`600`,style:{color:X.avatarInk},children:Nie(e?.name,e?.email)})})})}),(0,H.jsx)(pt.Content,{role:`menu`,"aria-label":`Account menu`,borderWidth:1,elevation:`$4`,p:`$2`,width:300,bg:`$background`,borderColor:`$borderColor`,rounded:`$4`,style:{zIndex:1e5},children:(0,H.jsxs)(z,{gap:`$1`,width:`100%`,children:[(0,H.jsxs)(y,{items:`center`,gap:`$2.5`,px:`$2`,py:`$2`,rounded:`$3`,bg:`$color2`,children:[(0,H.jsx)(kZ,{org:{name:m,logo:e?.avatar},size:36}),(0,H.jsxs)(z,{flex:1,minW:0,gap:1,children:[(0,H.jsx)(U,{fontSize:`$3`,fontWeight:`700`,color:`$color12`,numberOfLines:1,children:m}),h&&h!==m?(0,H.jsx)(U,{fontSize:`$1`,color:`$color10`,numberOfLines:1,children:h}):null,(0,H.jsxs)(y,{items:`center`,gap:`$1.5`,mt:2,children:[(0,H.jsx)(z,{width:6,height:6,rounded:Q.pill,style:{backgroundColor:bH.done}}),(0,H.jsxs)(U,{fontSize:11,fontWeight:`600`,color:`$color10`,children:[`Active · `,p]})]})]})]}),(0,H.jsx)(Lc,{borderColor:`$borderColor`,my:`$1`}),(0,H.jsxs)(z,{gap:`$0.5`,children:[(0,H.jsxs)(y,{px:`$2`,py:`$1`,items:`center`,justify:`space-between`,children:[(0,H.jsx)(U,{fontSize:`$1`,fontWeight:`700`,color:`$color10`,textTransform:`uppercase`,letterSpacing:.5,children:`Switch account`}),(0,H.jsx)(U,{fontSize:11,color:`$color9`,children:`Identities`})]}),_.map(e=>{let t=!!(g&&e.sub===g),n=e.name||e.email||e.sub;return(0,H.jsxs)(y,{role:`menuitem`,"aria-checked":t,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2`,py:`$1.5`,rounded:`$3`,bg:t?`$color3`:`transparent`,hoverStyle:{bg:`$color3`},onPress:()=>{f(!1),t||s?.(e)},children:[(0,H.jsx)(kZ,{org:{name:n,logo:e.avatar},size:24}),(0,H.jsxs)(z,{flex:1,minW:0,children:[(0,H.jsx)(U,{fontSize:`$2`,fontWeight:t?`600`:`500`,color:`$color12`,numberOfLines:1,children:n}),(0,H.jsx)(U,{fontSize:`$1`,color:`$color10`,numberOfLines:1,children:e.email&&e.email!==n?e.email:t?`Current account`:`Identity · ${e.owner}`})]}),t?(0,H.jsx)(Vt,{size:14,color:`$color12`}):null]},e.sub)}),c?(0,H.jsxs)(y,{role:`menuitem`,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2`,py:`$1.5`,rounded:`$3`,hoverStyle:{bg:`$color3`},onPress:()=>{f(!1),c()},children:[(0,H.jsx)(z,{width:24,height:24,rounded:Q.pill,bg:`$color3`,items:`center`,justify:`center`,children:(0,H.jsx)(Pm,{size:13,color:`$color11`})}),(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`500`,color:`$color12`,children:`Add another account`})]}):null]}),(0,H.jsx)(Lc,{borderColor:`$borderColor`,my:`$1`}),(0,H.jsxs)(z,{gap:`$0.5`,children:[(0,H.jsxs)(y,{px:`$2`,py:`$1`,items:`center`,justify:`space-between`,children:[(0,H.jsx)(U,{fontSize:`$1`,fontWeight:`700`,color:`$color10`,textTransform:`uppercase`,letterSpacing:.5,children:`Switch organization`}),(0,H.jsx)(U,{fontSize:11,color:`$color9`,children:p})]}),n.slice(0,5).map(e=>{let n=e.name===t?.name,i=e.displayName?.trim()||e.name;return(0,H.jsxs)(y,{role:`menuitem`,"aria-checked":n,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2`,py:`$1.5`,rounded:`$3`,bg:n?`$color3`:`transparent`,hoverStyle:{bg:`$color3`},onPress:()=>{f(!1),n||r?.(e.name)},children:[(0,H.jsx)(kZ,{org:{name:i,logo:e.logo},size:20}),(0,H.jsx)(U,{flex:1,fontSize:`$2`,fontWeight:n?`600`:`500`,color:`$color12`,numberOfLines:1,children:i}),n?(0,H.jsx)(Vt,{size:14,color:`$color12`}):null]},e.name)}),i?(0,H.jsxs)(y,{role:`menuitem`,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2`,py:`$1.5`,rounded:`$3`,hoverStyle:{bg:`$color3`},onPress:()=>{f(!1),i()},children:[(0,H.jsx)(z,{width:20,height:20,rounded:Q.field,bg:`$color3`,items:`center`,justify:`center`,children:(0,H.jsx)(hm,{size:12,color:`$color11`})}),(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`500`,color:`$color12`,children:`Create new organization…`})]}):null,a?(0,H.jsxs)(y,{role:`menuitem`,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2`,py:`$1.5`,rounded:`$3`,hoverStyle:{bg:`$color3`},onPress:()=>{f(!1),a()},children:[(0,H.jsx)(z,{width:20,height:20,rounded:Q.field,bg:`$color3`,items:`center`,justify:`center`,children:(0,H.jsx)(bm,{size:12,color:`$color11`})}),(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`500`,color:`$color12`,children:`Hanzo Connect (share channel)…`})]}):null]}),(0,H.jsx)(Lc,{borderColor:`$borderColor`,my:`$1`}),(0,H.jsxs)(z,{gap:`$0.5`,children:[(0,H.jsxs)(y,{items:`center`,justify:`space-between`,px:`$2`,py:`$1.5`,rounded:`$3`,children:[(0,H.jsx)(U,{fontSize:`$2`,color:`$color12`,children:`Theme`}),(0,H.jsx)(IZ,{})]}),l?(0,H.jsxs)(y,{role:`menuitem`,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2`,py:`$1.5`,rounded:`$3`,hoverStyle:{bg:`$color3`},onPress:()=>{f(!1),l()},children:[(0,H.jsx)(ym,{size:15,color:`$color10`}),(0,H.jsx)(U,{flex:1,fontSize:`$2`,color:`$color12`,children:`Settings & Preferences`}),(0,H.jsx)(U,{fontSize:11,color:`$color9`,children:`⌘,`})]}):null]}),u?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Lc,{borderColor:`$borderColor`,my:`$1`}),(0,H.jsxs)(y,{role:`menuitem`,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2`,py:`$1.5`,rounded:`$3`,hoverStyle:{bg:`$color3`},onPress:()=>{f(!1),u()},children:[(0,H.jsx)(rm,{size:15,color:X.alert}),(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`500`,style:{color:X.alert},children:`Sign out`})]})]}):null]})})]})}var i5=(e,t)=>({role:`button`,tabIndex:0,cursor:`pointer`,...t?{"aria-label":t}:{},onPress:e,onKeyDown:t=>{(t.nativeEvent.key===`Enter`||t.nativeEvent.key===` `)&&(t.preventDefault(),e())}}),a5=new Set,o5=null,s5=(e=`connect`)=>{o5=e;for(let e of a5)e(o5)},c5=()=>{o5=null;for(let e of a5)e(null)};function Lie(){let[e,t]=(0,V.useState)(o5),n=xi(),{all:r,current:i,plane:o}=eH(),[s,c]=(0,V.useState)(`lux`),[l,u]=(0,V.useState)(``),[d,f]=(0,V.useState)(`hanzo-x-lux`),[p,m]=(0,V.useState)(`Cross-organization engineering, shared agents & delivery`),[h,g]=(0,V.useState)(!1);(0,V.useEffect)(()=>{let e=e=>t(e);return a5.add(e),()=>{a5.delete(e)}},[]);let _=i?.url??`hanzo`,v=i?.name??`Hanzo AI`,b=r.filter(e=>e.url!==_),x=(l.trim()||s||`partner`).toLowerCase().replace(/[^a-z0-9-]+/g,`-`).replace(/^-|-$/g,``);if((0,V.useEffect)(()=>{x&&f(`${_}-x-${x}`)},[_,x]),!e)return null;let S=async()=>{if(!o||h)return;let e=x||`partner`,t=d.trim().toLowerCase().replace(/^#+/,``).replace(/[^a-z0-9-]+/g,`-`).replace(/^-|-$/g,``)||`${_}-x-${e}`;g(!0);try{let r=await Tie(o,t,[e],p);sV(`chat:rooms:`),c5(),n(`/chat/${r}`)}finally{g(!1)}};return(0,H.jsx)(z,{position:`fixed`,t:0,l:0,r:0,b:0,z:1e5,items:`center`,justify:`center`,p:16,style:{backgroundColor:`var(--team-backdrop, rgba(0, 0, 0, 0.65))`,backdropFilter:`blur(4px)`},onPress:()=>c5(),children:(0,H.jsxs)(z,{width:`100%`,maxW:520,rounded:Q.card,bg:`$panel`,borderWidth:1,borderColor:`$edge`,p:20,gap:16,onPress:e=>e.stopPropagation?.(),"data-testid":`hanzo-connect-modal`,children:[(0,H.jsxs)(y,{items:`center`,justify:`space-between`,gap:12,children:[(0,H.jsxs)(y,{items:`center`,gap:10,children:[(0,H.jsx)(z,{width:32,height:32,rounded:Q.field,bg:`$background`,borderWidth:1,borderColor:`$edge`,items:`center`,justify:`center`,children:(0,H.jsx)(bm,{size:16,color:`$ink`})}),(0,H.jsxs)(z,{children:[(0,H.jsx)(a,{fontSize:Z.row,fontWeight:`700`,color:`$ink`,children:`Hanzo Connect`}),(0,H.jsx)(a,{fontSize:Z.chip,color:`$soft`,children:`Multi-org shared channels & isolated organization workspaces`})]})]}),(0,H.jsx)(y,{...i5(()=>c5(),`Close Hanzo Connect modal`),px:8,py:4,rounded:Q.field,hoverStyle:{background:`$hover`},children:(0,H.jsx)(a,{fontSize:Z.body,color:`$soft`,children:`✕`})})]}),(0,H.jsx)(y,{bg:`$background`,p:3,rounded:Q.field,borderWidth:1,borderColor:`$edge`,gap:4,children:(0,H.jsxs)(y,{flex:1,...i5(()=>t(`connect`),`Connect organizations tab`),py:7,px:10,rounded:Q.field,items:`center`,justify:`center`,gap:6,bg:e===`connect`?`$panel`:`transparent`,children:[(0,H.jsx)(bm,{size:14,color:e===`connect`?`$ink`:`$soft`}),(0,H.jsx)(a,{fontSize:Z.body,fontWeight:e===`connect`?`600`:`500`,color:e===`connect`?`$ink`:`$soft`,children:`Connect Orgs (Shared Channel)`})]})}),(0,H.jsx)(H.Fragment,{children:(0,H.jsxs)(z,{gap:14,children:[(0,H.jsxs)(y,{p:12,rounded:Q.field,bg:`$background`,borderWidth:1,borderColor:`$edge`,items:`center`,justify:`space-between`,gap:8,children:[(0,H.jsxs)(z,{gap:2,children:[(0,H.jsx)(a,{fontSize:Z.chip,color:`$faint`,children:`HOST ORGANIZATION`}),(0,H.jsxs)(a,{fontSize:Z.body,fontWeight:`700`,color:`$ink`,children:[v,` (`,_,`)`]})]}),(0,H.jsxs)(y,{px:8,py:3,rounded:Q.pill,bg:`$panel`,borderWidth:1,borderColor:`$edge`,items:`center`,gap:5,children:[(0,H.jsx)(qp,{size:12,color:`$ink`}),(0,H.jsxs)(a,{fontSize:Z.chip,fontWeight:`600`,color:`$ink`,children:[`connect:`,x||`org`]})]}),(0,H.jsxs)(z,{gap:2,items:`flex-end`,children:[(0,H.jsx)(a,{fontSize:Z.chip,color:`$faint`,children:`PARTNER ORGANIZATION`}),(0,H.jsx)(a,{fontSize:Z.body,fontWeight:`700`,color:`$ink`,children:x||`partner`})]})]}),(0,H.jsxs)(z,{gap:6,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`600`,color:`$quiet`,children:`Select or enter partner organization slug`}),(0,H.jsx)(y,{gap:6,flexWrap:`wrap`,children:b.map(e=>{let t=!l.trim()&&s===e.url;return(0,H.jsxs)(y,{...i5(()=>{u(``),c(e.url)},`Select ${e.name}`),px:10,py:5,rounded:Q.pill,bg:t?`$ink`:`$background`,borderWidth:1,borderColor:t?`$ink`:`$edge`,items:`center`,gap:5,children:[t?(0,H.jsx)(Vt,{size:12,color:`$background`}):null,(0,H.jsxs)(a,{fontSize:Z.chip,fontWeight:`600`,color:t?`$background`:`$ink`,children:[e.name,` (`,e.url,`)`]})]},e.url)})}),(0,H.jsx)(y,{px:10,py:6,rounded:Q.field,bg:`$background`,borderWidth:1,borderColor:`$edge`,children:(0,H.jsx)(`input`,{value:l,onChange:e=>u(e.target.value),placeholder:`Or enter external organization slug (e.g. acme, skully, partner)...`,style:{width:`100%`,border:`none`,background:`transparent`,color:`inherit`,fontSize:13,outline:`none`}})})]}),(0,H.jsxs)(z,{gap:6,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`600`,color:`$quiet`,children:`Shared channel name`}),(0,H.jsxs)(y,{items:`center`,gap:6,px:10,py:6,rounded:Q.field,bg:`$background`,borderWidth:1,borderColor:`$edge`,children:[(0,H.jsx)(Yp,{size:14,color:`$soft`}),(0,H.jsx)(`input`,{value:d,onChange:e=>f(e.target.value),placeholder:`hanzo-x-partner`,style:{flex:1,border:`none`,background:`transparent`,color:`inherit`,fontSize:13,outline:`none`}})]})]}),(0,H.jsxs)(z,{gap:6,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`600`,color:`$quiet`,children:`Channel purpose & agent scope`}),(0,H.jsx)(y,{px:10,py:6,rounded:Q.field,bg:`$background`,borderWidth:1,borderColor:`$edge`,children:(0,H.jsx)(`input`,{value:p,onChange:e=>m(e.target.value),placeholder:`Cross-org engineering, shared agents & delivery`,style:{width:`100%`,border:`none`,background:`transparent`,color:`inherit`,fontSize:13,outline:`none`}})})]}),(0,H.jsxs)(a,{fontSize:Z.chip,color:`$soft`,children:[`Both organizations keep strict tenant isolation (separate IAM, KMS secrets, private repos, and billing) while humans and AI agents (@vi, @dev, @mark) collaborate in real time inside #`,d||`${_}-x-${x}`,`.`]}),(0,H.jsxs)(y,{justify:`flex-end`,gap:8,pt:4,children:[(0,H.jsx)(y,{...i5(()=>c5(),`Cancel`),px:12,py:8,rounded:Q.field,borderWidth:1,borderColor:`$edge`,children:(0,H.jsx)(a,{fontSize:Z.body,color:`$quiet`,children:`Cancel`})}),(0,H.jsxs)(y,{...i5(()=>void S(),`Connect and create shared channel`),px:14,py:8,rounded:Q.field,bg:`$ink`,items:`center`,gap:6,children:[(0,H.jsx)(bm,{size:14,color:`$background`}),(0,H.jsx)(a,{fontSize:Z.body,fontWeight:`600`,color:`$background`,children:h?`Connecting…`:`Connect & Share Channel`})]})]})]})})]})})}var l5=e=>{let t=e,n=new Set;return{set:e=>{if(e!==t){t=e;for(let e of n)e()}},use:()=>(0,V.useSyncExternalStore)(e=>(n.add(e),()=>n.delete(e)),()=>t,()=>e)}},u5=l5(0),d5=l5(null),Rie=u5.set,f5=u5.use,zie=d5.set;d5.use;var p5=[{id:`chat`,label:`Chat`,icon:lm,path:`/chat`},{id:`bots`,label:`Bots`,icon:vp,path:`/bots`},{id:`tracker`,label:`Tracker`,icon:Tm,path:`/issues`},{id:`crm`,label:`CRM`,icon:bp,path:`/crm`}],m5=e=>p5.find(t=>e===t.path||e.startsWith(`${t.path}/`)||t.id===`tracker`&&(e===`/mine`||e.startsWith(`/mine/`)||e===`/projects`||e===`/projects/`||e.startsWith(`/projects/`))),h5={outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},g5={backgroundColor:X.railActive},Bie={background:X.alert},Vie=({notices:e,onNotices:t,onSurface:n,account:r})=>{let{pathname:i}=yi(),o=f5(),s=r?.orgs&&r.orgs.length>0?r.orgs:r?.currentOrg?.name||r?.currentOrg?.displayName?[r.currentOrg]:[];return(0,H.jsxs)(z,{width:48,shrink:0,height:`100%`,items:`center`,justify:`space-between`,pt:6,pb:6,borderRightWidth:1,style:{backgroundColor:X.rail,borderRightColor:X.railRule},"data-parity-key":`shell.rail`,children:[(0,H.jsx)(U_,{flex:1,minH:0,width:`100%`,children:(0,H.jsxs)(z,{items:`center`,width:`100%`,gap:4,children:[s.length>0?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(z,{items:`center`,width:`100%`,gap:5,"data-parity-key":`shell.orgs`,children:[s.slice(0,5).map(e=>{let t=e.name===r?.currentOrg?.name||s.length===1,n=e.displayName?.trim()||e.name||`Workspace`;return(0,H.jsxs)(Ym,{children:[(0,H.jsx)(Xm,{children:(0,H.jsxs)(z,{...i5(()=>r?.onSelectOrg?.(e.name),`${n} organization`),width:36,height:36,rounded:10,items:`center`,justify:`center`,position:`relative`,style:t?g5:void 0,hoverStyle:t?void 0:{background:`$hover`},focusVisibleStyle:h5,children:[t?(0,H.jsx)(z,{position:`absolute`,l:-6,width:3,height:16,rounded:Q.pill,style:{backgroundColor:X.railFgActive}}):null,(0,H.jsx)(kZ,{org:{name:n,logo:e.logo},size:22})]})}),(0,H.jsx)(Qm,{children:n})]},e.name||n)}),r?.onConnectOrg?(0,H.jsxs)(Ym,{children:[(0,H.jsx)(Xm,{children:(0,H.jsx)(z,{...i5(r.onConnectOrg,`Connect or switch organization`),width:28,height:28,rounded:8,items:`center`,justify:`center`,hoverStyle:{background:`$hover`},focusVisibleStyle:h5,children:(0,H.jsx)(hm,{size:15,color:X.railFg})})}),(0,H.jsx)(Qm,{children:`Connect organization`})]}):null]}),(0,H.jsx)(_5,{})]}):null,(0,H.jsxs)(v5,{label:o>0?`${e?`Hide`:`Show`} Activity (${o} unread)`:e?`Hide Activity`:`Show Activity`,pressed:e,onPress:t,children:[(0,H.jsx)(_p,{size:18,color:e?X.railFgActive:X.railFg}),o>0?(0,H.jsx)(z,{position:`absolute`,t:2,r:2,minW:14,height:14,px:3,rounded:Q.pill,items:`center`,justify:`center`,style:Bie,children:(0,H.jsx)(a,{fontSize:9,lineHeight:11,fontWeight:`700`,style:{color:X.panel},children:o})}):null]}),(0,H.jsx)(_5,{}),p5.map(e=>{let t=m5(i)?.id===e.id;return(0,H.jsx)(v5,{label:e.label,here:t,onPress:()=>n(e.path),children:(0,H.jsx)(e.icon,{size:18,color:t?X.railFgActive:X.railFg})},e.id)})]})}),(0,H.jsxs)(z,{items:`center`,width:`100%`,gap:6,pt:6,children:[r?.onSettings?(0,H.jsx)(v5,{label:`Preferences (⌘,)`,onPress:r.onSettings,children:(0,H.jsx)(Sm,{size:16,color:X.railFg})}):null,(0,H.jsx)(Iie,{...r})]})]})},_5=()=>(0,H.jsx)(Lc,{width:28,my:4,borderColor:`$edge`}),v5=({label:e,here:t=!1,pressed:n,onPress:r,children:i})=>{let a=!!(t||n);return(0,H.jsxs)(Ym,{children:[(0,H.jsx)(Xm,{children:(0,H.jsx)(z,{...i5(r,e),"aria-current":t?`page`:void 0,"aria-pressed":n,width:36,height:36,items:`center`,justify:`center`,position:`relative`,rounded:10,style:a?g5:void 0,hoverStyle:a?void 0:{background:`$hover`},focusVisibleStyle:h5,children:i})}),(0,H.jsx)(Qm,{children:e})]})},y5=({nav:e,children:t,aside:n})=>{let{pathname:r}=yi(),i=xi(),{who:a,leave:o,depart:s}=dV(),{all:c,current:l,choose:u}=eH(),[d,f]=(0,V.useState)(()=>typeof window>`u`?vH:window.innerWidth),[p,m]=(0,V.useState)(220),[h,g]=(0,V.useState)(!1),[_,v]=(0,V.useState)(!1),[b,x]=(0,V.useState)(!1),S=gH(),C=_H(),w=d>=vH,T=d>=800,E=!!(T&&e&&!h),D=t=>{if(!T&&e&&(r===t||r.startsWith(`${t}/`)))return v(!0);if(T&&e&&h&&(r===t||r.startsWith(`${t}/`))){g(!1);return}i(t)},O=c,k=l??O[0],A=a?{sub:a.id,name:a.label||a.name,email:a.email,avatar:a.avatar,owner:k?.org??``}:{sub:``,name:``,email:``,owner:``},j={name:k?.url??``,displayName:k?.name??``},ee=O.map(e=>({name:e.url,displayName:e.name}));return(0,H.jsxs)(ev,{bg:`$background`,children:[(0,H.jsx)(Fie,{currentOrg:j,onNavigate:D,navSpan:p+1,navOpen:E,onToggleNav:e?()=>{T?g(e=>!e):v(e=>!e)}:void 0,surfaceTitle:m5(r)?.label}),(0,H.jsxs)(y,{flex:1,minH:0,onLayout:e=>f(e.nativeEvent.layout.width),children:[(0,H.jsx)(Vie,{notices:!!n&&(w?S&&C===`inbox`:b),onNotices:()=>{w?mH(`inbox`):(pH(`inbox`),x(!b))},onSurface:D,account:{user:A,currentOrg:j,orgs:ee,onSelectOrg:e=>u(e),onConnectOrg:()=>s5(`connect`),onAddAccount:()=>void s(`another`),onSettings:()=>O8(`general`),onSignOut:()=>o()}}),E?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(z,{width:p,shrink:0,minH:0,style:{backgroundColor:X.sidebar},"data-parity-key":`shell.nav`,children:e}),(0,H.jsx)(Hie,{value:p,onChange:m})]}):null,(0,H.jsxs)(y,{flex:1,minW:0,minH:0,pt:0,pb:0,pr:0,gap:0,children:[(0,H.jsx)(b5,{parity:`shell.main`,children:t}),n&&S&&w?(0,H.jsx)(z,{width:284,shrink:0,borderLeftWidth:1,style:{borderLeftColor:X.sidebarRule},children:(0,H.jsx)(b5,{parity:`shell.aside`,children:n})}):null]})]}),(0,H.jsx)($S,{open:!!n&&!w&&b,onOpenChange:x,children:(0,H.jsx)(nC,{side:`right`,width:284,p:0,bg:`$panel`,children:n})}),(0,H.jsx)($S,{open:!!e&&_&&!T,onOpenChange:v,children:(0,H.jsx)(nC,{side:`left`,width:220,p:0,style:{backgroundColor:X.sidebar},children:e})}),(0,H.jsx)(Lie,{}),(0,H.jsx)(Qre,{user:A,orgName:j.displayName})]})},b5=({parity:e,children:t})=>(0,H.jsx)(z,{flex:1,minW:0,minH:0,rounded:0,overflow:`hidden`,style:{backgroundColor:X.panel},"data-parity-key":e,children:t}),Hie=({value:e,onChange:t})=>{let n=(0,V.useRef)(0),r=(0,V.useRef)(e),i=(0,V.useRef)(!1),a=e=>Math.min(340,Math.max(188,e));return(0,H.jsx)(z,{role:`separator`,"aria-orientation":`vertical`,"aria-label":`Resize the navigator`,"aria-valuenow":e,"aria-valuemin":188,"aria-valuemax":340,tabIndex:0,width:1,shrink:0,position:`relative`,cursor:`col-resize`,style:{backgroundColor:X.sidebarRule},hoverStyle:{bg:`$soft`},focusVisibleStyle:{bg:`$outlineColor`},onPointerDown:t=>{i.current=!0,n.current=t.clientX,r.current=e,t.currentTarget.setPointerCapture?.(t.pointerId)},onPointerMove:e=>{i.current&&t(a(r.current+e.clientX-n.current))},onPointerUp:e=>{i.current=!1,e.currentTarget.releasePointerCapture?.(e.pointerId)},onPointerCancel:()=>{i.current=!1},onKeyDown:n=>{let r=n.shiftKey?1:8;n.key===`ArrowLeft`&&t(a(e-r)),n.key===`ArrowRight`&&t(a(e+r))},children:(0,H.jsx)(z,{position:`absolute`,t:0,b:0,l:-8,r:-8})})},x5={outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},S5={flexDirection:`row`},C5=({title:e,children:t})=>(0,H.jsxs)(z,{flex:1,minH:0,pt:6,pb:8,children:[(0,H.jsx)(y,{height:36,px:10,pb:4,items:`center`,justify:`space-between`,children:(0,H.jsxs)(y,{items:`center`,gap:4,minW:0,children:[(0,H.jsx)(a,{fontSize:Z.row,fontWeight:`600`,color:`$ink`,numberOfLines:1,children:e}),(0,H.jsx)(wp,{size:13,color:`$soft`})]})}),t]}),w5=({value:e,onChange:t})=>(0,H.jsxs)(y,{mx:10,height:30,items:`center`,gap:8,px:12,rounded:Q.field,borderWidth:1,borderColor:`$edge`,bg:`$panel`,focusWithinStyle:x5,children:[(0,H.jsx)(vm,{size:16,color:`$soft`}),(0,H.jsx)(k_,{flex:1,unstyled:!0,height:28,borderWidth:0,bg:`transparent`,fontSize:Z.body,color:`$ink`,placeholderTextColor:`$faint`,placeholder:`Search…`,value:e,onChangeText:t})]}),T5=()=>(0,H.jsx)(Lc,{my:6,mx:10,borderColor:`$edge`}),E5=({children:e,count:t,open:n=!0,onToggle:r})=>(0,H.jsxs)(y,{...r?i5(r):{},height:26,items:`center`,justify:`space-between`,px:10,gap:5,children:[(0,H.jsxs)(y,{items:`center`,gap:4,minW:0,flex:1,children:[r?(0,H.jsx)(Uie,{open:n}):null,(0,H.jsx)(a,{fontSize:12,fontWeight:`500`,color:`$soft`,numberOfLines:1,children:e})]}),t===void 0?null:(0,H.jsx)(a,{fontSize:Z.chip,color:`$faint`,children:t})]}),Uie=({open:e=!0})=>(0,H.jsx)(z,{width:18,height:18,items:`center`,justify:`center`,rotate:e?`0deg`:`-90deg`,children:(0,H.jsx)(z,{width:7,height:7,borderBottomWidth:1.5,borderRightWidth:1.5,borderColor:`$soft`,rotate:`45deg`,mt:-3})}),D5=({to:e,icon:t,children:n,indent:r})=>{let{pathname:i}=yi(),o=i===e||i.startsWith(`${e}/`);return(0,H.jsx)(y,{asChild:!0,style:o?{...S5,backgroundColor:X.rowActive}:S5,height:r?27:29,items:`center`,gap:8,pl:r?32:8,pr:8,mx:6,rounded:8,hoverStyle:o?void 0:{bg:`$hover`},focusVisibleStyle:x5,children:(0,H.jsxs)(ja,{to:e,"aria-current":o?`page`:void 0,children:[t?(0,H.jsx)(z,{width:18,height:18,items:`center`,justify:`center`,children:t}):null,(0,H.jsx)(a,{fontSize:Z.small,fontWeight:o?`500`:`400`,color:o?`$ink`:`$quiet`,numberOfLines:1,children:n})]})})},Wie=({icon:e,children:t,open:n,onPress:r})=>(0,H.jsxs)(y,{...i5(r),"aria-expanded":n,height:29,items:`center`,gap:8,px:10,mx:4,rounded:Q.field,hoverStyle:{bg:`$hover`},focusVisibleStyle:x5,children:[e?(0,H.jsx)(z,{width:18,height:18,items:`center`,justify:`center`,children:e}):null,(0,H.jsx)(a,{fontSize:Z.row,color:`$quiet`,numberOfLines:1,children:t})]}),Gie=({children:e})=>(0,H.jsxs)(z,{position:`relative`,children:[(0,H.jsx)(z,{position:`absolute`,l:23,t:0,b:0,width:1,bg:`$edge`}),e]}),O5=({children:e})=>(0,H.jsx)(U_,{flex:1,minH:0,children:(0,H.jsx)(z,{pb:10,children:e})}),Kie=36,k5=21,A5=9,j5=18,qie=e=>e.split(/\s+/).slice(0,2).map(e=>e[0]??``).join(``).toUpperCase(),M5=({spans:e,clamp:t,parity:n})=>(0,H.jsx)(a,{"data-parity-key":n,size:Z.body,lineHeight:k5,color:X.mute,numberOfLines:t,children:e.map((e,t)=>(0,H.jsx)(a,{size:Z.body,lineHeight:k5,fontWeight:e.strong?`600`:`400`,color:e.mention?X.alert:e.strong?X.ink:X.mute,children:e.text},t))}),Jie=({note:e,onSee:t})=>(0,H.jsxs)(y,{"data-parity-key":`inbox.row`,"data-seen":e.seen?`yes`:`no`,...i5(()=>t(e.id),e.line.map(e=>e.text).join(``)),px:10,py:DH.inset,gap:DH.tight,bg:e.seen?`transparent`:X.card,borderBottomWidth:1,borderColor:X.rule,hoverStyle:{background:X.card},focusVisibleStyle:kH,children:[(0,H.jsxs)(Bh,{"data-parity-key":`inbox.face`,size:Kie,children:[e.actor.face?(0,H.jsx)(Vh,{src:e.actor.face,alt:``}):null,(0,H.jsx)(Hh,{bg:CH(e.actor.name).background,children:(0,H.jsx)(a,{size:Z.small,fontWeight:`600`,color:CH(e.actor.name).color,children:qie(e.actor.name)})})]}),(0,H.jsxs)(z,{flex:1,minW:0,gap:DH.tight,children:[(0,H.jsxs)(z,{children:[(0,H.jsx)(M5,{spans:e.line,parity:`inbox.line`}),e.quote?(0,H.jsx)(M5,{spans:e.quote,clamp:1,parity:`inbox.quote`}):null]}),(0,H.jsxs)(y,{"data-parity-key":`inbox.meta`,items:`center`,gap:DH.tight,overflow:`hidden`,children:[(0,H.jsx)(a,{size:Z.small,lineHeight:j5,color:X.dim,children:(0,H.jsx)(YL,{date:new Date(e.at),format:`short`,style:{fontSize:`inherit`,lineHeight:`inherit`,color:`inherit`,whiteSpace:`nowrap`}})}),e.place?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(a,{size:Z.small,lineHeight:j5,color:X.dim,children:`•`}),(0,H.jsx)(a,{size:Z.small,lineHeight:j5,color:X.dim,numberOfLines:1,children:e.place})]}):null]})]}),(0,H.jsx)(z,{"data-parity-key":`inbox.lane`,width:A5,shrink:0,pt:6,children:e.seen?null:(0,H.jsx)(z,{"data-parity-key":`inbox.dot`,role:`img`,"aria-label":`unread`,width:A5,height:A5,rounded:Q.pill,bg:X.alert})})]}),Yie=12,Xie=12,Zie=36,Qie=6,$ie=17,N5=16,P5=24,eae={all:tm,task:Pp,chat:sm},tae={all:`All`,task:`Tasks`,chat:`Chat`},F5=e=>e.line.some(e=>e.mention||e.text.includes(`mentioned`))||(e.quote?.some(e=>e.mention)??!1),I5=({children:e})=>(0,H.jsx)(z,{flex:1,items:`center`,justify:`center`,p:10,gap:DH.inset,children:e}),nae=({tab:e,filter:t})=>{let n=LH();if(n.phase===`loading`)return(0,H.jsx)(I5,{children:(0,H.jsx)(tv,{})});if(n.phase===`failure`)return(0,H.jsxs)(I5,{children:[(0,H.jsx)(a,{size:Z.body,color:X.mute,children:`The inbox is not answering.`}),(0,H.jsx)(a,{size:Z.body,color:X.ink,textDecorationLine:`underline`,...i5(n.reload),focusVisibleStyle:kH,children:`Try again`})]});let r=jH(n.data??[],e).filter(e=>t===`unread`?!e.seen:t!==`mentions`||F5(e));return r.length===0?(0,H.jsx)(I5,{children:(0,H.jsx)(a,{size:Z.body,color:X.dim,children:t===`unread`?`All caught up — no unread notifications.`:t===`mentions`?`No mentions in this view.`:`Nothing here.`})}):(0,H.jsx)(U_,{"data-parity-key":`inbox.list`,flex:1,pt:Qie,children:(0,H.jsx)(z,{role:`list`,children:r.map(e=>(0,H.jsx)(Jie,{note:e,onSee:zH},e.id))})})},L5=()=>{let[e,t]=(0,V.useState)(`all`),[n,r]=(0,V.useState)(`all`),i=LH().data??[],o=RH(),s=i.filter(F5).length;return(0,H.jsxs)(z,{"data-parity-key":`inbox.panel`,flex:1,minH:0,children:[(0,H.jsxs)(y,{px:10,pt:Yie,items:`center`,justify:`space-between`,children:[(0,H.jsxs)(y,{items:`center`,gap:8,children:[(0,H.jsx)(a,{"data-parity-key":`inbox.title`,size:Z.row,fontWeight:`600`,color:X.ink,children:`Inbox`}),o>0?(0,H.jsx)(y,{px:7,py:2,rounded:Q.pill,items:`center`,justify:`center`,bg:X.alert,children:(0,H.jsx)(a,{size:Z.chip,fontWeight:`700`,color:X.panel,children:`${o} unread`})}):null]}),(0,H.jsxs)(y,{items:`center`,gap:6,children:[o>0?(0,H.jsx)(y,{...i5(BH,`Mark all notifications as read`),px:7,py:3,rounded:Q.field,hoverStyle:{background:X.card},focusVisibleStyle:kH,children:(0,H.jsx)(a,{size:Z.chip,fontWeight:`500`,color:X.mute,children:`Mark all read`})}):null,(0,H.jsx)(y,{"data-parity-key":`inbox.close`,...i5(hH,`Close the inbox`),width:P5,height:P5,items:`center`,justify:`center`,rounded:Q.field,hoverStyle:{background:X.card},focusVisibleStyle:kH,children:(0,H.jsx)(Rn,{size:14,color:X.dim})})]})]}),(0,H.jsxs)(sv,{value:e,onValueChange:e=>t(e),orientation:`horizontal`,flex:1,minH:0,gap:0,mt:Xie,children:[(0,H.jsx)(z,{"data-parity-key":`inbox.rail`,borderBottomWidth:1,borderColor:X.rule,children:(0,H.jsx)(cv,{height:Zie,self:`stretch`,justify:`flex-start`,items:`stretch`,p:0,pl:DH.tight,gap:DH.tight,bg:`transparent`,rounded:0,children:AH.map(t=>{let n=t===e,r=eae[t],o=t===`all`?0:MH(i,t);return(0,H.jsxs)(uv,{"data-parity-key":`inbox.tab.${t}`,value:t,height:`100%`,flexDirection:`row`,px:DH.tight,gap:`$1.5`,items:`center`,justify:`center`,rounded:0,bg:`transparent`,borderBottomWidth:2,borderColor:n?X.accent:`transparent`,activeStyle:{background:`transparent`},hoverStyle:{background:`transparent`},focusStyle:{background:`transparent`},focusVisibleStyle:kH,children:[(0,H.jsx)(r,{size:$ie,color:n?X.ink:X.dim}),(0,H.jsx)(a,{size:Z.small,fontWeight:n?`600`:`500`,color:n?X.ink:X.dim,children:tae[t]}),o>0?(0,H.jsx)(z,{"data-parity-key":`inbox.badge`,minW:N5,height:N5,px:4,rounded:Q.pill,items:`center`,justify:`center`,bg:X.alert,children:(0,H.jsx)(a,{size:Z.chip,fontWeight:`600`,color:X.panel,children:o})}):null]},t)})})}),(0,H.jsx)(y,{px:10,py:8,gap:6,items:`center`,borderBottomWidth:1,borderColor:X.rule,children:[[`all`,`All (${i.length})`],[`unread`,`Unread (${o})`],[`mentions`,`Mentions (${s})`]].map(([e,t])=>{let i=n===e;return(0,H.jsx)(y,{...i5(()=>r(e),`Filter ${t}`),px:8,py:3,rounded:Q.pill,bg:i?X.card:`transparent`,borderWidth:1,borderColor:i?X.ink:X.rule,hoverStyle:{background:X.card},focusVisibleStyle:kH,children:(0,H.jsx)(a,{size:Z.chip,fontWeight:i?`600`:`500`,color:i?X.ink:X.mute,children:t})},e)})}),AH.map(t=>(0,H.jsx)(dv,{value:t,flex:1,minH:0,children:t===e?(0,H.jsx)(nae,{tab:t,filter:n}):null},t))]})]})},rae=()=>{let{id:e}=Ci(),t=t5().data??[],n=e5().data??[],r=j8(e);if(r)return t.find(e=>e.id===r&&e.bot);let i=n.find(t=>t.id===e);return i?N8(i,t):void 0},R5=({person:e,size:t})=>(0,H.jsx)(z,{width:t,height:t,rounded:Q.pill,overflow:`hidden`,bg:`$panel`,borderWidth:1,borderColor:`$edge`,items:`center`,justify:`center`,shrink:0,children:e.avatar?(0,H.jsx)(`img`,{src:e.avatar,alt:e.name,width:t,height:t,style:{width:t,height:t,objectFit:`cover`,display:`block`}}):(0,H.jsx)(a,{fontSize:Math.max(10,t*.42),fontWeight:`600`,color:`$quiet`,children:e.name.slice(0,1).toUpperCase()})});function iae(){let e=_H(),t=rae();return!t||e===`inbox`?(0,H.jsx)(L5,{}):(0,H.jsxs)(z,{flex:1,minH:0,px:10,pt:12,pb:10,gap:14,children:[(0,H.jsxs)(y,{items:`center`,justify:`space-between`,children:[(0,H.jsx)(a,{fontSize:Z.small,fontWeight:`600`,color:`$quiet`,children:`${t.name} · Agent`}),(0,H.jsx)(y,{...i5(hH,`Close inspector`),width:24,height:24,items:`center`,justify:`center`,rounded:Q.field,hoverStyle:{background:X.card},focusVisibleStyle:kH,children:(0,H.jsx)(Rn,{size:14,color:X.dim})})]}),(0,H.jsxs)(z,{items:`center`,gap:6,children:[(0,H.jsx)(R5,{person:t,size:52}),(0,H.jsx)(a,{fontSize:Z.body,fontWeight:`600`,color:`$ink`,children:t.name})]})]})}var aae=async(e,t)=>{let n=await EV(LB.dms,{space:e,members:[t.id]});return{id:n.channel.id,kind:`direct`,name:t.name,private:!0,archived:n.channel.archived===!0,members:n.channel.members??[]}},z5=`hanzo.appearance`,B5=`hanzo.chat.preferences`,oae=new Set([`system`,`light`,`dark`]),V5=new Set([`compact`,`default`,`spacious`]),H5=new Set([`compact`,`default`,`large`]),U5=new Set([`ink`,`iris`,`jade`,`amber`,`coral`,`plum`]),sae=new Set([`low`,`medium`,`high`]),cae=new Set([`auto`,`manual`]),W5={theme:`dark`,density:`default`,font:`default`},G5={effort:`medium`,approvalMode:`auto`,allowThirdPartyModels:!0,spokenLanguage:`auto`},K5=new Set,q5=()=>{for(let e of K5)e()};function J5(e){if(!e||typeof e!=`object`)return{...W5};let t=e,n=oae.has(t.theme)?t.theme:W5.theme,r=V5.has(t.density)?t.density:W5.density,i=H5.has(t.font)?t.font:W5.font,a=U5.has(t.accent)?t.accent:void 0;return a?{theme:n,density:r,font:i,accent:a}:{theme:n,density:r,font:i}}function Y5(e){if(!e||typeof e!=`object`)return{...G5};let t=e;return{effort:sae.has(t.effort)?t.effort:G5.effort,approvalMode:cae.has(t.approvalMode)?t.approvalMode:G5.approvalMode,allowThirdPartyModels:typeof t.allowThirdPartyModels==`boolean`?t.allowThirdPartyModels:G5.allowThirdPartyModels,spokenLanguage:typeof t.spokenLanguage==`string`&&t.spokenLanguage.trim()?t.spokenLanguage.trim():G5.spokenLanguage}}function X5(){if(typeof window>`u`)return{...W5};try{let e=window.localStorage.getItem(z5);return e?J5(JSON.parse(e)):{...W5}}catch{return{...W5}}}function Z5(){if(typeof window>`u`)return{...G5};try{let e=window.localStorage.getItem(B5);return e?Y5(JSON.parse(e)):{...G5}}catch{return{...G5}}}function Q5(e){return e===`light`||e===`dark`?e:typeof window<`u`&&typeof window.matchMedia==`function`?window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:`dark`}function lae(e){return e===`compact`?`0.92`:e===`large`?`1.08`:`1`}function $5(e){let t=Q5(e.theme);if(typeof document>`u`)return t;let n=document.documentElement;n.dataset.theme=t,n.dataset.density=e.density,n.classList.toggle(`dark`,t===`dark`),n.classList.toggle(`light`,t===`light`),n.style.setProperty(`--hanzo-font-scale`,lae(e.font)),e.accent&&(n.dataset.accent=e.accent);let r=window.getComputedStyle(n).getPropertyValue(`--background`).trim(),i=document.querySelector(`meta[name="theme-color"]`);return i&&r&&i.setAttribute(`content`,r),t}function e7(e){let t=J5({...X5(),...e});if(typeof window<`u`)try{window.localStorage.setItem(z5,JSON.stringify(t))}catch{}return $5(t),q5(),t}function uae(e){let t=Y5({...Z5(),...e});if(typeof window<`u`)try{window.localStorage.setItem(B5,JSON.stringify(t))}catch{}return q5(),t}async function dae(e){if(e&&typeof fetch==`function`)try{let t=await fetch(`https://api.hanzo.ai/v1/account/appearance`,{method:`GET`,headers:{Authorization:`Bearer ${e}`,Accept:`application/json`}});if(!t.ok)return;let n=await t.json();if(!n||typeof n!=`object`)return;let r=n,i={};H5.has(r.font)&&(i.font=r.font),V5.has(r.density)&&(i.density=r.density),U5.has(r.accent)&&(i.accent=r.accent),Object.keys(i).length>0&&e7(i)}catch{}}function t7(){let[,e]=(0,V.useState)(0);(0,V.useEffect)(()=>{let t=()=>e(e=>e+1);K5.add(t);let n=e=>{(e.key===`hanzo.appearance`||e.key===`hanzo.chat.preferences`)&&($5(X5()),t())};return window.addEventListener(`storage`,n),()=>{K5.delete(t),window.removeEventListener(`storage`,n)}},[]);let t=X5();return{appearance:t,chat:Z5(),effectiveTheme:Q5(t.theme),setAppearance:e7,setChat:uae}}var n7=22,fae=44,r7=198;function i7({placeholder:e,disabled:t,onSend:n}){let[r,i]=(0,V.useState)(``),[o,s]=(0,V.useState)(!1),[c,l]=(0,V.useState)(null),{chat:u,setChat:d}=t7(),f=u.approvalMode===`auto`,p=r.trim()!==``&&!o&&!t,m=async()=>{if(!p)return;let e=r;s(!0),l(null);try{await n(e),i(``)}catch(e){l(e instanceof Error?e.message:String(e))}finally{s(!1)}},h=Math.min(8,r.split(`
|
|
193
|
+
`).length),g=Math.max(fae,Math.min(r7,h*n7+22));return(0,H.jsxs)(z,{px:16,pb:12,pt:6,gap:6,children:[c?(0,H.jsx)(a,{fontSize:`$1`,style:{color:X.alert},children:c}):null,(0,H.jsxs)(z,{gap:4,px:12,pt:8,pb:8,rounded:18,borderWidth:1,opacity:t?.6:1,style:{backgroundColor:X.composer,borderTopColor:X.composerRule,borderRightColor:X.composerRule,borderBottomColor:X.composerRule,borderLeftColor:X.composerRule},focusWithinStyle:{borderColor:`$bound`},"data-testid":`team-composer`,children:[(0,H.jsx)(hv,{flex:1,unstyled:!0,rows:1,height:g-12,minH:g-12,maxH:r7,py:4,px:2,borderWidth:0,bg:`transparent`,fontSize:`$3`,lineHeight:n7,color:`$ink`,placeholderTextColor:`$placeholderColor`,placeholder:t??e,value:r,disabled:!!t,"aria-label":e,onChangeText:i,onKeyDown:e=>{e.nativeEvent.key!==`Enter`||e.shiftKey||(e.preventDefault?.(),m())}}),(0,H.jsxs)(y,{items:`center`,justify:`space-between`,pt:2,children:[(0,H.jsxs)(y,{items:`center`,gap:6,children:[(0,H.jsx)(z,{width:26,height:26,rounded:13,items:`center`,justify:`center`,hoverStyle:{bg:`$hover`},children:(0,H.jsx)(hm,{size:15,color:`$soft`})}),(0,H.jsxs)(y,{...i5(()=>d({approvalMode:f?`manual`:`auto`}),f?`Switch to manual approval`:`Switch to full access`),height:24,px:7,gap:5,rounded:7,items:`center`,hoverStyle:{bg:`$hover`},"data-testid":`composer-approval-toggle`,children:[f?(0,H.jsx)(sp,{size:13,color:X.composerWarn}):(0,H.jsx)(xm,{size:13,color:`$soft`}),(0,H.jsx)(a,{fontSize:12,fontWeight:`500`,style:{color:f?X.composerWarn:void 0},color:f?void 0:`$soft`,children:f?`Full access`:`Manual approval`})]})]}),(0,H.jsx)(z,{"aria-disabled":!p,...i5(()=>void m(),`Send`),cursor:p?`pointer`:`default`,width:30,height:30,items:`center`,justify:`center`,rounded:15,style:{backgroundColor:X.composerAccent},opacity:p?1:.92,focusVisibleStyle:{outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},children:(0,H.jsx)(gp,{size:16,color:X.composerAccentInk})})]})]})]})}var pae=3e5,mae=e=>{let t=[],n=null,r=``;for(let i of e){let e=gae(i.at);if(e!==r&&(r=e,n=null,t.push({kind:`day`,id:`day:${e}`,at:i.at})),n&&n.author===i.author&&i.at-hae(n).at<=pae){n.messages.push(i);continue}n={id:i.id,author:i.author,at:i.at,messages:[i]},t.push({kind:`run`,...n})}return t},hae=e=>e.messages[e.messages.length-1],gae=e=>{let t=new Date(e);return`${t.getFullYear()}-${t.getMonth()+1}-${t.getDate()}`},_ae=(e,t=Date.now())=>{let n=a7(t)-a7(e);if(n===0)return`Today`;if(n===1)return`Yesterday`;let r=new Date(e),i=r.getFullYear()===new Date(t).getFullYear()?void 0:`numeric`;return r.toLocaleDateString(void 0,{month:`long`,day:`numeric`,year:i})},a7=e=>{let t=new Date(e);return Math.floor((e-t.getTimezoneOffset()*6e4)/864e5)},vae=e=>new Date(e).toLocaleTimeString(void 0,{hour:`numeric`,minute:`2-digit`});function o7({author:e,at:t,messages:n,people:r,reactions:i,me:o,onReact:s,onOpen:c,open:l}){let u=n5(r,e),d=r.find(e=>e.name===u);return(0,H.jsxs)(y,{px:16,pt:10,gap:10,items:`flex-start`,children:[(0,H.jsxs)(Bh,{circular:!0,size:36,children:[d?.avatar?(0,H.jsx)(Vh,{src:d.avatar,alt:``}):null,(0,H.jsx)(Hh,{bg:`$raised`,children:(0,H.jsx)(a,{fontSize:`$2`,color:`$quiet`,children:Mie(u)})})]}),(0,H.jsxs)(z,{flex:1,minW:0,gap:2,children:[(0,H.jsxs)(y,{gap:8,items:`baseline`,children:[(0,H.jsx)(a,{fontSize:`$3`,fontWeight:`600`,color:`$ink`,children:u}),(0,H.jsx)(a,{fontSize:`$1`,color:`$dim`,children:vae(t)})]}),n.map(e=>(0,H.jsx)(yae,{message:e,reactions:i.filter(t=>t.message===e.id),me:o,onReact:s,onOpen:c,open:l===e.id},e.id))]})]})}function yae({message:e,reactions:t,me:n,onReact:r,onOpen:i,open:o}){let s=c7(t),c=!!n&&e.author===n;return(0,H.jsxs)(z,{group:!0,position:`relative`,pr:72,py:2,rounded:`$1`,bg:o?`$hover`:`transparent`,hoverStyle:{background:`$hover`},children:[(0,H.jsx)(z,{self:c?`flex-start`:void 0,px:c?12:0,py:c?6:0,rounded:c?12:0,style:c?{backgroundColor:X.chatUser}:void 0,children:e.lines.map((e,t)=>(0,H.jsx)(a,{fontSize:`$3`,lineHeight:22,color:c?void 0:`$ink`,style:c?{color:X.chatUserInk}:void 0,children:lie(e).map((e,t)=>e.kind===`text`?(0,H.jsx)(a,{fontSize:`$3`,lineHeight:22,color:c?void 0:`$ink`,style:c?{color:X.chatUserInk}:void 0,children:e.value},t):(0,H.jsx)(a,{fontSize:`$3`,lineHeight:22,style:{color:e.kind===`mention`?X.alert:X.accent},fontWeight:e.kind===`mention`?`500`:`400`,...e.kind===`link`?{tag:`a`,href:e.value,target:`_blank`,rel:`noreferrer`}:{},children:e.value},t))},t))}),s.length>0?(0,H.jsx)(y,{gap:4,pt:4,flexWrap:`wrap`,children:s.map(t=>(0,H.jsx)(bae,{emoji:t.emoji,count:t.by.length,mine:t.by.includes(n),onPress:()=>r(e,t.emoji)},t.emoji))}):null,e.replies>0?(0,H.jsxs)(y,{items:`center`,gap:5,pt:4,...i5(()=>i(e)),children:[(0,H.jsx)(cm,{size:13,color:X.accent}),(0,H.jsx)(a,{fontSize:`$1`,style:{color:X.accent},children:e.replies===1?`1 reply`:`${e.replies} replies`})]}):null,(0,H.jsxs)(y,{position:`absolute`,t:0,r:8,gap:2,opacity:0,"$group-hover":{opacity:1},focusWithinStyle:{opacity:1},children:[(0,H.jsx)(s7,{label:`React`,onPress:()=>r(e,`👍`),children:(0,H.jsx)(Cm,{size:15,color:`$soft`})}),(0,H.jsx)(s7,{label:`Reply in thread`,onPress:()=>i(e),children:(0,H.jsx)(cm,{size:15,color:`$soft`})})]})]})}var s7=({label:e,onPress:t,children:n})=>(0,H.jsx)(z,{width:26,height:26,items:`center`,justify:`center`,rounded:`$1`,bg:`$panel`,borderWidth:1,borderColor:`$edge`,...i5(t,e),hoverStyle:{background:`$hover`},focusVisibleStyle:{outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},children:n}),bae=({emoji:e,count:t,mine:n,onPress:r})=>(0,H.jsxs)(y,{"aria-pressed":n,height:22,items:`center`,gap:4,px:7,rounded:11,borderWidth:1,borderColor:n?`$bound`:`$edge`,bg:n?`$hover`:`$raised`,...i5(r),hoverStyle:{borderColor:`$bound`},focusVisibleStyle:{outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},children:[(0,H.jsx)(a,{fontSize:12,lineHeight:14,children:e}),(0,H.jsx)(a,{fontSize:`$1`,color:n?`$ink`:`$quiet`,children:t})]}),c7=e=>{let t=[];for(let n of e){let e=t.find(e=>e.emoji===n.emoji);e?e.by.push(n.by):t.push({emoji:n.emoji,by:[n.by]})}return t};function l7({room:e,phase:t,error:n,messages:r,people:i,reactions:a,me:o,onRetry:s,onReact:c,onOpen:l,open:u}){return t===`loading`?(0,H.jsx)(d7,{}):t===`failure`?(0,H.jsx)(f7,{error:n,onRetry:s}):r.length===0?(0,H.jsx)(Cae,{room:e}):(0,H.jsx)(xae,{messages:r,people:i,reactions:a,me:o,onReact:c,onOpen:l,open:u})}function xae({messages:e,people:t,reactions:n,me:r,onReact:i,onOpen:a,open:o}){let s=(0,V.useRef)(null),c=e[e.length-1]?.id;return(0,V.useEffect)(()=>{s.current?.scrollIntoView({block:`end`})},[c]),(0,H.jsx)(z,{flex:1,minH:0,style:{overflowY:`auto`},children:(0,H.jsxs)(z,{pt:4,pb:12,children:[mae(e).map(e=>e.kind===`day`?(0,H.jsx)(Sae,{at:e.at},e.id):(0,H.jsx)(o7,{author:e.author,at:e.at,messages:e.messages,people:t,reactions:n,me:r,onReact:i,onOpen:a,open:o},e.id)),(0,H.jsx)(`div`,{ref:e=>void(s.current=e)})]})})}var Sae=({at:e})=>(0,H.jsx)(z,{px:16,pt:14,pb:4,children:(0,H.jsx)(z,{height:1,bg:`$edge`,position:`relative`,justify:`center`,children:(0,H.jsx)(a,{position:`absolute`,self:`center`,px:10,style:{backgroundColor:X.panel},fontSize:`$1`,color:`$dim`,children:_ae(e)})})}),u7=({children:e})=>(0,H.jsx)(z,{flex:1,minH:0,items:`center`,justify:`center`,p:24,children:e}),d7=()=>(0,H.jsx)(u7,{children:(0,H.jsx)(tv,{size:16})}),f7=({error:e,onRetry:t})=>(0,H.jsx)(u7,{children:(0,H.jsx)(HZ,{state:zZ(e),onRetry:t})}),Cae=({room:e})=>(0,H.jsx)(u7,{children:(0,H.jsxs)(z,{gap:6,maxW:340,items:`center`,children:[(0,H.jsx)(a,{fontSize:`$4`,fontWeight:`500`,color:`$ink`,children:e.kind===`direct`?e.name:`#${e.name}`}),(0,H.jsx)(a,{fontSize:`$2`,color:`$dim`,text:`center`,children:e.topic?e.topic:e.kind===`direct`?`The beginning of your conversation.`:`This is the beginning of the channel. Say something.`})]})}),p7=({people:e,size:t=28,show:n=3,ground:r=X.ground})=>{if(e.length===0)return null;let i=e.slice(0,n),o=e.length-i.length,s=Math.round(t*.575);return(0,H.jsxs)(y,{items:`center`,"aria-label":`${e.length} assigned`,children:[i.map((e,n)=>(0,H.jsx)(z,{ml:n===0?0:s-t,rounded:9999,borderWidth:2,style:{backgroundColor:r,borderColor:r},children:(0,H.jsxs)(Bh,{size:t,"aria-label":e.name,children:[e.face?(0,H.jsx)(Vh,{src:e.face,alt:``}):null,(0,H.jsx)(Hh,{children:wae(e.name)})]})},e.id)),o>0?(0,H.jsxs)(a,{fontSize:`$2`,color:`$quiet`,ml:6,children:[`+`,o]}):null]})},wae=e=>(e[0]??``).toUpperCase();function Tae({members:e,people:t}){return e.length===0?null:(0,H.jsx)(p7,{people:e.map(e=>({id:e,name:n5(t,e),face:Eae(t,e)})),size:28,show:4,ground:`$panel`})}var Eae=(e,t)=>{let n=t.startsWith(`hanzo:`)?t.slice(6):t;return e.find(e=>e.id===n||e.id===t)?.avatar};function Dae({room:e,parent:t,replies:n,phase:r,error:i,people:o,reactions:s,me:c,onClose:l,onRetry:u,onReact:d,onSend:f}){return(0,H.jsxs)(z,{width:360,shrink:0,minH:0,borderLeftWidth:1,borderLeftColor:`$edge`,children:[(0,H.jsxs)(y,{height:56,items:`center`,px:20,gap:8,children:[(0,H.jsx)(a,{flex:1,fontSize:`$4`,fontWeight:`500`,color:`$ink`,children:`Thread`}),(0,H.jsx)(z,{width:28,height:28,items:`center`,justify:`center`,rounded:`$1`,...i5(l,`Close the thread`),hoverStyle:{background:`$hover`},focusVisibleStyle:{outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},children:(0,H.jsx)(Rn,{size:16,color:`$soft`})})]}),(0,H.jsx)(z,{pb:8,borderBottomWidth:1,borderBottomColor:`$edge`,children:(0,H.jsx)(o7,{author:t.author,at:t.at,messages:[t],people:o,reactions:s,me:c,onReact:d,onOpen:()=>{}})}),(0,H.jsx)(l7,{room:e,phase:r,error:i,messages:n,people:o,reactions:s,me:c,onRetry:u,onReact:d,onOpen:()=>{}}),(0,H.jsx)(i7,{placeholder:`Reply…`,onSend:f})]})}var Oae={"dm-algo":`dm-sci`,"dm-cal":`dm-mana`,"dm-core":`dm-opera`,"dm-db":`dm-data`,"dm-sec":`dm-cyber`};function m7(){let{id:e}=Ci(),t=e&&(Oae[e]??e),{plane:n,current:r}=eH(),i=e5(),a=t5(),o=j8(t),s=(0,V.useMemo)(()=>o?(a.data??[]).find(e=>e.id===o):void 0,[o,a.data]),c=r?.uuid??``,l=oV(`chat:dm:${c}:${s?.id??`-`}`,()=>aae(c,s),{enabled:!!(n&&s&&c)}),u=(0,V.useMemo)(()=>(i.data??[]).find(e=>e.id===t)??null,[i.data,t]),d=o?l.data??null:u,f=d?N8(d,a.data??[]):void 0,p=Die(d?.id??null),m=p.data??[],h=Oie((0,V.useMemo)(()=>m.map(e=>e.id),[m]));Aie(d?.id??null);let[g,_]=(0,V.useState)(null),v=m.find(e=>e.id===g)??null,b=kie(v?.id??null),x=n?.account??``,S=a.data??[],C=h.data??[],w=(0,V.useCallback)((e,t)=>{if(!n||!d)return;let r=c7(C.filter(t=>t.message===e.id)).find(e=>e.emoji===t),i=C.find(n=>n.message===e.id&&n.emoji===t&&n.by===x);(r&&i?wie(n,d,i):Cie(n,d,e,t)).then(()=>sV(`chat:reactions:`))},[n,d,C,x]);if(!t){if(i.phase===`failure`)return(0,H.jsx)(f7,{error:i.error,onRetry:i.reload});if(i.phase===`loading`||!n)return(0,H.jsx)(d7,{});let e=(i.data??[]).find(e=>e.kind===`channel`)??(i.data??[])[0];return e?(0,H.jsx)(Gi,{to:`/chat/${e.id}`,replace:!0}):(0,H.jsx)(Aae,{})}if(o){if(a.phase===`failure`)return(0,H.jsx)(f7,{error:a.error,onRetry:a.reload});if(a.phase===`loading`||!n)return(0,H.jsx)(d7,{});if(!s)return(0,H.jsx)(h7,{});if(l.phase===`failure`)return(0,H.jsx)(f7,{error:l.error,onRetry:l.reload});if(!d)return(0,H.jsx)(d7,{})}else if(i.phase===`failure`)return(0,H.jsx)(f7,{error:i.error,onRetry:i.reload});else if(i.phase===`loading`||!n)return(0,H.jsx)(d7,{});return d?(0,H.jsxs)(y,{flex:1,minH:0,children:[(0,H.jsxs)(z,{flex:1,minW:0,minH:0,children:[(0,H.jsx)(kae,{room:d,people:S,agent:f}),(0,H.jsx)(l7,{room:d,phase:p.phase,error:p.error,messages:m,people:S,reactions:C,me:x,onRetry:p.reload,onReact:w,onOpen:e=>_(e.id),open:g??void 0}),(0,H.jsx)(i7,{placeholder:d.kind===`direct`?`Message ${W8(d,S)}`:`Message #${d.name}`,onSend:e=>xie(n,d,e,S)})]}),v?(0,H.jsx)(Dae,{room:d,parent:v,replies:b.data??[],phase:b.phase,error:b.error,people:S,reactions:C,me:x,onClose:()=>_(null),onRetry:b.reload,onReact:w,onSend:e=>Sie(n,d,v,e,S)}):null]}):(0,H.jsx)(h7,{})}function kae({room:e,people:t,agent:n}){let r=f5(),i=gH(),o=_H();return(0,H.jsx)(z,{borderBottomWidth:1,borderBottomColor:`$edge`,bg:`$panel`,children:(0,H.jsxs)(y,{px:16,py:8,items:`center`,justify:`space-between`,gap:10,children:[n?(0,H.jsxs)(y,{flex:1,minW:0,items:`center`,gap:12,children:[(0,H.jsx)(R5,{person:n,size:34}),(0,H.jsxs)(y,{items:`center`,gap:8,flexWrap:`wrap`,children:[(0,H.jsx)(a,{fontSize:Z.row,fontWeight:`600`,color:`$ink`,children:n.name}),(0,H.jsx)(y,{px:7,py:2,rounded:Q.field,bg:`$raised`,borderWidth:1,borderColor:`$edge`,children:(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`500`,color:`$quiet`,children:`Agent`})})]})]}):(0,H.jsxs)(y,{flex:1,minW:0,items:`center`,gap:10,children:[(0,H.jsxs)(y,{items:`center`,gap:6,shrink:0,children:[e.kind===`direct`?null:e.private?(0,H.jsx)(nm,{size:16,color:`$quiet`}):(0,H.jsx)(Yp,{size:17,color:`$quiet`}),(0,H.jsx)(a,{fontSize:Z.row,fontWeight:`600`,color:`$ink`,numberOfLines:1,children:W8(e,t??[])})]}),e.topic?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(z,{width:1,height:14,bg:`$edge`,shrink:0}),(0,H.jsx)(a,{fontSize:Z.small,color:`$dim`,numberOfLines:1,flex:1,children:e.topic})]}):null]}),(0,H.jsxs)(y,{items:`center`,gap:8,shrink:0,children:[n?null:(0,H.jsx)(Tae,{members:e.members,people:t??[]}),(0,H.jsxs)(y,{...i5(()=>mH(`inbox`),`Toggle Inbox drawer`),"aria-pressed":i&&o===`inbox`,px:9,py:5,rounded:Q.field,bg:i&&o===`inbox`?`$hover`:`$raised`,borderWidth:1,borderColor:i&&o===`inbox`?`$bound`:`$edge`,items:`center`,gap:6,hoverStyle:{background:`$hover`},focusVisibleStyle:kH,children:[(0,H.jsx)(_p,{size:13,color:i&&o===`inbox`?`$ink`:`$quiet`}),(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`500`,color:i&&o===`inbox`?`$ink`:`$quiet`,children:`Inbox`}),r>0?(0,H.jsx)(z,{minW:16,height:16,px:4,rounded:Q.pill,items:`center`,justify:`center`,style:{background:X.alert},children:(0,H.jsx)(a,{fontSize:10,lineHeight:12,fontWeight:`700`,style:{color:X.panel},children:r})}):null]})]})]})})}var Aae=()=>(0,H.jsx)(u7,{children:(0,H.jsx)(KZ,{icon:lm,title:`Chat`,description:`Choose a channel or a conversation to read it.`})}),h7=()=>(0,H.jsx)(u7,{children:(0,H.jsx)(KZ,{icon:lm,title:`No such room`,description:`It may have been archived, or it may belong to another space.`})});function jae(){let{pathname:e}=yi(),t=xi(),[n,r]=(0,V.useState)(``),[i,o]=(0,V.useState)(!0),[s,c]=(0,V.useState)(!0),[l,u]=(0,V.useState)(!0),d=e5(),f=t5().data??[],p=d.data??[],m=n.trim().toLowerCase(),h=m?p.filter(e=>e.name.toLowerCase().includes(m)):p,g=h.filter(e=>e.kind===`channel`),_=g.filter(e=>!e.connectedOrgs||e.connectedOrgs.length===0),v=g.filter(e=>e.connectedOrgs&&e.connectedOrgs.length>0),b=h.filter(e=>e.kind===`direct`),x=M8(f).filter(e=>!m||e.name.toLowerCase().includes(m));return(0,H.jsxs)(C5,{title:m5(e)?.label??`Chat`,children:[(0,H.jsx)(w5,{value:n,onChange:r}),(0,H.jsx)(z,{height:8}),(0,H.jsx)(T5,{}),(0,H.jsxs)(O5,{children:[d.phase===`loading`?(0,H.jsx)(z,{px:10,py:12,children:(0,H.jsx)(tv,{size:16})}):null,d.phase===`failure`?(0,H.jsx)(_7,{children:`Your rooms could not be read.`}):null,d.phase===`ready`&&p.length===0&&x.length===0?(0,H.jsx)(_7,{children:`No rooms yet.`}):null,d.phase===`ready`&&p.length>0&&h.length===0&&x.length===0?(0,H.jsx)(_7,{children:`Nothing matches “${n.trim()}”.`}):null,_.length>0?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(E5,{count:_.length,open:i,onToggle:()=>o(e=>!e),children:`Channels`}),i?_.map(e=>(0,H.jsx)(g7,{room:e,roster:f},e.id)):null]}):null,d.phase===`ready`&&(!m||v.length>0)?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(T5,{}),(0,H.jsx)(E5,{count:v.length,open:s,onToggle:()=>c(e=>!e),children:`Hanzo Connect`}),s?(0,H.jsxs)(H.Fragment,{children:[v.map(e=>(0,H.jsx)(g7,{room:e,roster:f},e.id)),(0,H.jsxs)(y,{...i5(()=>s5(`connect`),`Connect external organization channel`),px:10,py:6,mx:4,gap:8,items:`center`,rounded:Q.field,hoverStyle:{background:`$hover`},"data-testid":`hanzo-connect-add-trigger`,children:[(0,H.jsx)(hm,{size:14,color:`$soft`}),(0,H.jsx)(a,{fontSize:Z.body,color:`$quiet`,fontWeight:`500`,children:`Connect organization…`})]})]}):null]}):null,x.length>0?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(T5,{}),(0,H.jsx)(E5,{count:x.length,open:l,onToggle:()=>u(e=>!e),children:`Bots`}),l?x.map(e=>{let n=A8(e);return(0,H.jsxs)(y,{...i5(()=>t(n),e.name),px:8,py:6,mx:6,gap:10,items:`center`,rounded:8,bg:`transparent`,hoverStyle:{background:`$hover`},children:[(0,H.jsx)(R5,{person:e,size:26}),(0,H.jsx)(a,{fontSize:Z.body,fontWeight:`600`,color:`$ink`,numberOfLines:1,flex:1,children:e.name})]},e.id)}):null]}):null,b.length>0?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(T5,{}),(0,H.jsx)(E5,{count:b.length,children:`Direct`}),b.map(e=>(0,H.jsx)(g7,{room:e,roster:f},e.id))]}):null]})]})}var g7=({room:e,roster:t})=>{let n=e.connectedOrgs&&e.connectedOrgs.length>0?`${e.name} · ${e.connectedOrgs.join(`, `)}`:W8(e,t);return(0,H.jsx)(D5,{to:`/chat/${e.id}`,icon:(0,H.jsx)(Mae,{room:e}),children:n})},Mae=({room:e})=>e.kind===`direct`?null:e.connectedOrgs&&e.connectedOrgs.length>0?(0,H.jsx)(bm,{size:14,color:`$soft`}):e.private?(0,H.jsx)(nm,{size:14,color:`$soft`}):(0,H.jsx)(Yp,{size:16,color:`$soft`}),_7=({children:e})=>(0,H.jsx)(a,{px:10,py:8,fontSize:`$2`,color:`$faint`,children:e});U$();var Nae=`https://api.hanzo.ai`,v7=e=>TV(`${Nae}${e}`),Pae=[`investors`,`funds`,`customers`,`leads`,`feedback`,`errors`,`lists`],y7=[{value:`NEW`,label:`New`,color:`pink`},{value:`SCREENING`,label:`Screening`,color:`cyan`},{value:`MEETING`,label:`Meeting`,color:`blue`},{value:`PROPOSAL`,label:`Proposal`,color:`amber`},{value:`CUSTOMER`,label:`Customer`,color:`green`}],Fae=[{name:`name`,label:`Investor`,type:`text`,metadata:{avatar:`circle`}},{name:`company`,label:`Firm / Fund`,type:`relation`,metadata:{labelField:`name`,shape:`square`}},{name:`category`,label:`Category`,type:`select`,metadata:{options:[{value:`vc`,label:`Institutional VC`,color:`blue`},{value:`crypto_vc`,label:`Crypto / Web3 VC`,color:`cyan`},{value:`accredited`,label:`Accredited High-Check`,color:`green`},{value:`angel`,label:`Angel Investor`,color:`amber`},{value:`family_office`,label:`Family Office`,color:`cyan`},{value:`crowdfunding_republic`,label:`Republic / Reg CF`,color:`orange`}]}},{name:`stage`,label:`Stage`,type:`select`,metadata:{options:y7}},{name:`email`,label:`Email`,type:`email`},{name:`title`,label:`Title`,type:`text`},{name:`checkSize`,label:`Check Size`,type:`text`},{name:`location`,label:`Location`,type:`text`}],Iae=[{name:`name`,label:`Fund / Firm`,type:`text`,metadata:{avatar:`square`}},{name:`stage`,label:`Stage`,type:`select`,metadata:{options:y7}},{name:`aum`,label:`AUM`,type:`text`},{name:`checkSize`,label:`Check Size`,type:`text`},{name:`primaryEmail`,label:`Primary Email`,type:`email`},{name:`website`,label:`Url`,type:`url`},{name:`location`,label:`Location`,type:`text`}],Lae=[{name:`name`,label:`Customer`,type:`text`,metadata:{avatar:`circle`}},{name:`email`,label:`Email`,type:`email`},{name:`product`,label:`Product`,type:`text`},{name:`totalSpent`,label:`Total Spent`,type:`currency`,metadata:{currencyCode:`USD`,decimals:0}},{name:`stage`,label:`Stage`,type:`select`,metadata:{options:y7}},{name:`location`,label:`Location`,type:`text`}],Rae=[{name:`name`,label:`Developer`,type:`text`,metadata:{avatar:`circle`}},{name:`handle`,label:`GitHub`,type:`text`},{name:`email`,label:`Email`,type:`email`},{name:`company`,label:`Company`,type:`relation`,metadata:{labelField:`name`,shape:`square`}},{name:`stars`,label:`Stars`,type:`number`},{name:`followers`,label:`Followers`,type:`number`},{name:`location`,label:`Location`,type:`text`}],zae=[{name:`name`,label:`Audience / Segment`,type:`text`,metadata:{avatar:`square`}},{name:`purpose`,label:`Engine`,type:`text`},{name:`totalCount`,label:`Total Contacts`,type:`number`},{name:`eligibleCount`,label:`Deliverable`,type:`number`},{name:`description`,label:`Description`,type:`text`}],Bae=[{name:`name`,label:`Subject / Summary`,type:`text`,metadata:{avatar:`square`}},{name:`program`,label:`Kind`,type:`text`},{name:`email`,label:`Submitter`,type:`email`},{name:`company`,label:`Organization`,type:`text`},{name:`source`,label:`Source`,type:`text`},{name:`recordCode`,label:`Ref / Report ID`,type:`text`,readOnly:!0},{name:`closeDate`,label:`Submitted At`,type:`date`}],Vae=[{name:`name`,label:`Exception / Fault`,type:`text`,metadata:{avatar:`square`}},{name:`program`,label:`Class / Type`,type:`text`},{name:`company`,label:`Service / App`,type:`text`},{name:`location`,label:`Origin / File`,type:`text`},{name:`source`,label:`Env & Release`,type:`text`},{name:`recordCode`,label:`Event / Issue ID`,type:`text`,readOnly:!0},{name:`closeDate`,label:`Occurred At`,type:`date`}],Hae={name:(0,H.jsx)(xp,{size:14,color:`$color10`}),domainName:(0,H.jsx)($p,{size:14,color:`$color10`}),website:(0,H.jsx)($p,{size:14,color:`$color10`}),createdBy:(0,H.jsx)(Fm,{size:14,color:`$color10`}),city:(0,H.jsx)(am,{size:14,color:`$color10`}),location:(0,H.jsx)(am,{size:14,color:`$color10`}),country:(0,H.jsx)(qp,{size:14,color:`$color10`}),employees:(0,H.jsx)(Im,{size:14,color:`$color10`}),arr:(0,H.jsx)(Lp,{size:14,color:`$color10`}),amount:(0,H.jsx)(Lp,{size:14,color:`$color10`}),totalSpent:(0,H.jsx)(Lp,{size:14,color:`$color10`}),company:(0,H.jsx)(xp,{size:14,color:`$color10`}),pointOfContact:(0,H.jsx)(Fm,{size:14,color:`$color10`}),rating:(0,H.jsx)(Em,{size:14,color:`$color10`}),closeDate:(0,H.jsx)(Cp,{size:14,color:`$color10`}),recordCode:(0,H.jsx)(Yp,{size:14,color:`$color10`}),email:(0,H.jsx)(im,{size:14,color:`$color10`}),primaryEmail:(0,H.jsx)(im,{size:14,color:`$color10`}),jobTitle:(0,H.jsx)(bp,{size:14,color:`$color10`}),title:(0,H.jsx)(bp,{size:14,color:`$color10`})};function Uae(){let[e,t]=(0,V.useState)(``),n=e.trim().toLowerCase(),r=[{to:`investors`,label:`Investors`,icon:(0,H.jsx)(Am,{size:15,color:wH(`investors`)}),group:`Audiences`},{to:`funds`,label:`Funds`,icon:(0,H.jsx)(bp,{size:15,color:wH(`funds`)}),group:`Audiences`},{to:`customers`,label:`Customers`,icon:(0,H.jsx)(Im,{size:15,color:wH(`customers`)}),group:`Audiences`},{to:`leads`,label:`Developer Leads`,icon:(0,H.jsx)(Bm,{size:15,color:wH(`leads`)}),group:`Audiences`},{to:`feedback`,label:`Feedback, Bugs & Forms`,icon:(0,H.jsx)(Up,{size:15,color:wH(`feedback`)}),group:`Inbound`},{to:`errors`,label:`Runtime & CLI Errors`,icon:(0,H.jsx)(lp,{size:15,color:wH(`errors`)}),group:`Inbound`},{to:`lists`,label:`Lists & Segments`,icon:(0,H.jsx)(Zp,{size:15,color:`$soft`}),group:`Engagement`}].filter(e=>!n||e.label.toLowerCase().includes(n)),i=[...new Set(r.map(e=>e.group))];return(0,H.jsxs)(C5,{title:`CRM`,children:[(0,H.jsx)(w5,{value:e,onChange:t}),(0,H.jsx)(z,{height:12}),(0,H.jsx)(O5,{children:i.map((e,t)=>(0,H.jsxs)(z,{children:[t>0?(0,H.jsx)(T5,{}):null,(0,H.jsx)(E5,{children:e}),r.filter(t=>t.group===e).map(e=>(0,H.jsx)(D5,{to:`/crm/${e.to}`,icon:e.icon,children:e.label},e.to))]},e))})]})}var b7=e=>[e.city,e.state,e.country].filter(Boolean).join(`, `)||String(e.location??``),x7=e=>typeof e==`string`?e.slice(0,10):``,Wae=async(e,t,n)=>{switch(e){case`investors`:{let e=await v7(`/v1/crm/investors?limit=250&category=${n===`all`?`vc`:n}`),t=(e.items??[]).filter(e=>e.name||e.email).map(e=>({id:String(e.id),name:String(e.name??e.email),company:String(e.company??e.fund_name??``),category:String(e.category??``),stage:String(e.stage??``).toUpperCase(),email:String(e.email??``),title:String(e.title??``),checkSize:String(e.check_size??``),location:b7(e)}));return{rows:t,total:e.total??t.length}}case`funds`:{let e=await v7(`/v1/crm/funds?limit=250`),t=(e.items??[]).map(e=>({id:String(e.id),name:String(e.name??``),stage:String(e.stage??``).toUpperCase(),aum:String(e.aum??``),checkSize:String(e.check_size??``),primaryEmail:String(e.primary_email??``),website:String(e.website??``),location:String(e.location??e.country??``)}));return{rows:t,total:e.total??t.length}}case`customers`:{let e=await v7(`/v1/crm/customers?limit=250`),t=(e.items??[]).map(e=>({id:String(e.id),name:String(e.name??e.email??``),email:String(e.email??``),product:String(e.products??e.product??``),totalSpent:Number(e.total_spent??e.amount??0),stage:`CUSTOMER`,location:b7(e)}));return{rows:t,total:e.total??t.length}}case`leads`:{let e=new URLSearchParams({limit:`200`}),[n,r]=t===`all`?[]:t.endsWith(`+`)?[t.slice(0,-1)]:t.split(`-`);n&&e.set(`min_stars`,n===`0`?`1`:n),r&&e.set(`max_stars`,r);let i=await v7(`/v1/crm/leads?${e}`),a=(i.leads??[]).map((e,t)=>({id:String(e.id??e.github_login??t),name:String(e.name??e.github_login??e.email??``),handle:e.github_login?`@${e.github_login}`:``,email:String(e.email??``),company:String(e.company??``),stars:Number(e.total_stars??e.stars??0),followers:Number(e.followers??0),location:String(e.location??e.country??``)}));return{rows:a,total:i.total??a.length}}case`feedback`:{let[e,t]=await Promise.all([v7(`/v1/base/collections/activities/records?perPage=150&sort=-at,-created`),v7(`/v1/base/collections/people/records?perPage=250`)]),n=new Map((t.items??[]).map(e=>[String(e.id),e])),r=(e.items??[]).filter(e=>e.kind===`form`||e.data?.program).map((e,t)=>{let r=e.data??{},i=n.get(String(e.person_id??``))??{};return{id:String(e.id??t),name:String(e.subject??r.need??r.description??``),program:String(r.program??r.kind??`feedback`),email:String(i.email??r.email??``),company:String(i.company??i.name??r.company??``),source:String(r.source??e.channel??``),recordCode:String(r.public_ref??e.source_id??e.id??``),closeDate:x7(e.at??e.created)}});return{rows:r,total:e.totalItems??r.length}}case`errors`:{let e=await v7(`/v1/event/errors?limit=100`),t=(Array.isArray(e)?e:e.items??e.errors??[]).map((e,t)=>{let n=String(e.environment??e.env??``),r=String(e.release??``);return{id:String(e.id??e.event_id??t),name:String(e.value??e.message??e.title??``),program:String(e.type??e.class??e.name??``),company:String(e.app??e.service??e.product??``),location:String(e.culprit??e.origin??e.path??``),source:[n,r].filter(Boolean).join(` · `),recordCode:String(e.issue??e.id??e.event_id??``),closeDate:x7(e.timestamp??e.time??e.created_at)}});return{rows:t,total:t.length}}case`lists`:{let e=await v7(`/v1/crm/lists`),t=(e.items??[]).map(e=>({id:String(e.id),name:String(e.name??``),purpose:String(e.purpose??e.kind??``),totalCount:Number(e.total_count??e.eligible_count??0),eligibleCount:Number(e.eligible_count??e.total_count??0),description:String(e.description??``)}));return{rows:t,total:e.total??t.length}}}},Gae={investors:Fae,funds:Iae,customers:Lae,leads:Rae,feedback:Bae,errors:Vae,lists:zae},Kae={investors:{title:`Investors`,icon:(0,H.jsx)(Am,{size:14})},funds:{title:`Funds`,icon:(0,H.jsx)(bp,{size:14})},customers:{title:`Customers`,icon:(0,H.jsx)(Im,{size:14})},leads:{title:`Developer Leads`,icon:(0,H.jsx)(Bm,{size:14})},feedback:{title:`Feedback, Bugs & Forms`,icon:(0,H.jsx)(Up,{size:14})},errors:{title:`Runtime & CLI Errors`,icon:(0,H.jsx)(lp,{size:14})},lists:{title:`Lists & Segments`,icon:(0,H.jsx)(Zp,{size:14})}},qae=[{id:`all`,label:`Institutional VCs`},{id:`crypto_vc`,label:`Crypto / Web3 VCs`},{id:`accredited`,label:`Accredited High-Check`},{id:`family_office`,label:`Family Offices`},{id:`crowdfunding_republic`,label:`Republic / Reg CF`}],Jae=[`all`,`0-100`,`100-500`,`500-1000`,`1000-5000`,`5000-15000`,`15000+`];function Yae(){let{section:e}=Ci(),t=Pae.includes(e)?e:`investors`,[n,r]=(0,V.useState)(`all`),[i,o]=(0,V.useState)(`all`),[s,c]=(0,V.useState)(null),[l,u]=(0,V.useState)(null),[d,f]=(0,V.useState)(!1),[p,m]=(0,V.useState)(null),h=(0,V.useCallback)(async()=>{f(!0),m(null),u(null);try{c(await Wae(t,n,i))}catch(e){c(null),u(e instanceof Error?e.message:`The read failed.`)}finally{f(!1)}},[t,n,i]);(0,V.useEffect)(()=>{h()},[h]);let g=Gae[t],_=(0,V.useMemo)(()=>CH(t),[t]),{title:v,icon:b}=Kae[t],x=(e,t,n)=>(0,H.jsx)(y,{height:36,px:`$3`,items:`center`,gap:`$1.5`,borderBottomWidth:1,borderColor:`$borderColor`,bg:`$background`,children:e.map(e=>(0,H.jsx)(W,{size:`xs`,height:24,px:`$2`,rounded:`$2`,chromeless:t!==e.id,bg:t===e.id?`$color3`:`transparent`,onPress:()=>n(e.id),children:(0,H.jsx)(a,{fontSize:11,fontWeight:t===e.id?`600`:`400`,color:t===e.id?`$color12`:`$color10`,children:e.label})},e.id))});return(0,H.jsx)(Lt,{value:`compact`,children:(0,H.jsxs)(z,{flex:1,minH:0,bg:`$background`,children:[(0,H.jsxs)(y,{height:44,px:`$3`,items:`center`,justify:`space-between`,borderBottomWidth:1,borderColor:`$borderColor`,gap:`$2`,children:[(0,H.jsxs)(y,{items:`center`,gap:`$2`,children:[(0,H.jsx)(y,{width:22,height:22,rounded:`$2`,items:`center`,justify:`center`,style:{backgroundColor:_.background,color:_.color},children:b}),(0,H.jsx)(a,{fontSize:14,fontWeight:`600`,color:`$color12`,children:v}),s?(0,H.jsx)(a,{fontSize:12,color:`$color10`,children:`${s.total.toLocaleString()} total`}):null]}),(0,H.jsx)(W,{size:`xs`,height:24,px:`$2`,chromeless:!0,startIcon:(0,H.jsx)(gm,{size:12}),onPress:()=>void h(),children:(0,H.jsx)(a,{fontSize:12,color:`$color10`,children:`Refresh`})})]}),t===`leads`?x(Jae.map(e=>({id:e,label:e===`all`?`All`:`★ ${e}`})),n,r):null,t===`investors`?x(qae,i,o):null,l?(0,H.jsxs)(z,{p:`$4`,gap:`$2`,children:[(0,H.jsx)(a,{fontSize:13,fontWeight:`600`,color:`$color12`,children:`This list could not be read.`}),(0,H.jsx)(a,{fontSize:12,color:`$color10`,children:l})]}):(0,H.jsxs)(y,{flex:1,minW:0,minH:0,children:[(0,H.jsx)(U_,{flex:1,minW:0,minH:0,children:(0,H.jsx)(K0,{fields:g,records:s?.rows??[],loading:d,editable:!1,selectable:!1,defaultKind:`table`,boardDisabled:!0,fieldIcons:Hae,onOpen:e=>m(e),empty:`No records.`},t)}),p?(0,H.jsxs)(z,{width:380,shrink:0,borderLeftWidth:1,borderColor:`$borderColor`,bg:`$background`,children:[(0,H.jsxs)(y,{height:44,px:`$3`,items:`center`,justify:`space-between`,borderBottomWidth:1,borderColor:`$borderColor`,children:[(0,H.jsx)(a,{fontSize:13,fontWeight:`600`,color:`$color12`,numberOfLines:1,children:String(p.name||p.email||`Record`)}),(0,H.jsx)(W,{size:`xs`,width:26,height:26,p:`$0`,chromeless:!0,onPress:()=>m(null),children:(0,H.jsx)(Rn,{size:14,color:`$color10`})})]}),(0,H.jsx)(U_,{flex:1,minH:0,children:(0,H.jsx)(z,{p:`$3`,children:(0,H.jsx)(t0,{fields:g,record:p})})})]}):null]})]})})}var S7=()=>{let e=Math.floor(Date.now()/1e3),t=crypto.getRandomValues(new Uint8Array(8));return e.toString(16).padStart(8,`0`)+Array.from(t,e=>e.toString(16).padStart(2,`0`)).join(``)},C7=(e,t)=>({_id:S7(),space:`core:space:Tx`,objectSpace:e,modifiedBy:t,modifiedOn:Date.now()}),w7=(e,t,n,r,i=S7())=>({...C7(e,t),_class:F8.create,objectId:i,objectClass:n,attributes:r}),T7=(e,t,n)=>({...C7(e.space,t),_class:F8.update,objectId:e._id,objectClass:e._class,operations:n}),E7=(e,t)=>({...C7(e.space,t),_class:F8.remove,objectId:e._id,objectClass:e._class}),D7=`0123456789abcdefghijklmnopqrstuvwxyz`,O7=0,Xae=35,k7=D7[18],A7=(e,t)=>D7.indexOf(e[t]),j7=(e,t)=>{let n=e??``,r=t??``,i=0;for(;i<n.length&&i<r.length&&n[i]===r[i];)i++;return n.slice(0,i)+Zae(n.slice(i),r.slice(i))},Zae=(e,t)=>{if(t===``)return M7(e);if(e===``)return N7(t);let n=A7(e,0),r=A7(t,0);return r-n>1?D7[Math.floor((n+r)/2)]:e[0]+M7(e.slice(1))},M7=e=>{for(let t=e.length-1;t>=0;t--)if(A7(e,t)<Xae)return e.slice(0,t)+D7[A7(e,t)+1];return e+k7},N7=e=>{let t=A7(e,0);return t>1?D7[Math.floor(t/2)]:t===1?D7[O7]+k7:D7[O7]+N7(e.slice(1))},P7=[I8.backlog,I8.todo,I8.doing,I8.done],F7=e=>e.find(P8.project),I7=(e,t)=>e.one(P8.project,{_id:t}),L7=async(e,t)=>{let n=await e.find(P8.status,t?{space:t}:{}),r=new Map(P7.map((e,t)=>[e,t]));return n.sort((e,t)=>(r.get(e.category)??P7.length)-(r.get(t.category)??P7.length)||(e.rank??``).localeCompare(t.rank??``))},R7=async(e,t)=>(await e.find(P8.issue,t?{space:t}:{})).sort((e,t)=>(e.rank??``).localeCompare(t.rank??``)||e.number-t.number),z7=e=>e.find(P8.person),B7=e=>e.find(P8.tag),Qae=e=>e.find(P8.component),V7={projects:()=>z8(P8.project),statuses:e=>z8(P8.status,e),issues:e=>z8(P8.issue,e),people:()=>z8(P8.person),tags:()=>z8(P8.tag),components:()=>z8(P8.component)},$ae=(e,t,n,r,i={})=>e.write(T7(n,t,{status:r,rank:j7(i.before?.rank,i.after?.rank)})),H7=(e,t,n,r)=>e.write(T7(n,t,r)),eoe=(e,t,n,r)=>e.write(w7(n,t,P8.issue,{title:r.title,status:r.status,priority:r.priority,number:r.number,rank:j7(void 0,r.after?.rank),assignee:null,subIssues:0,comments:0,attachments:0,estimation:0,reportedTime:0,remainingTime:0})),toe=[`issues`,`components`,`milestones`,`templates`],noe=e=>e[0].toUpperCase()+e.slice(1),roe=()=>{let[e,t]=(0,V.useState)(``),{pathname:n}=yi(),{plane:r}=eH(),i=oV(V7.projects(),()=>F7(r),{enabled:!!r}),a=(i.data??[]).filter(t=>t.name.toLowerCase().includes(e.trim().toLowerCase()));return(0,H.jsxs)(C5,{title:m5(n)?.label??`Tracker`,children:[(0,H.jsx)(w5,{value:e,onChange:t}),(0,H.jsx)(z,{height:24}),(0,H.jsx)(D5,{to:`/mine`,icon:(0,H.jsx)(Gp,{size:16,color:`$soft`}),children:`My issues`}),(0,H.jsx)(D5,{to:`/issues`,icon:(0,H.jsx)(Tm,{size:16,color:`$soft`}),children:`All issues`}),(0,H.jsx)(T5,{}),(0,H.jsx)(D5,{to:`/projects`,icon:(0,H.jsx)(dp,{size:16,color:`$soft`}),children:`All projects`}),(0,H.jsx)(T5,{}),(0,H.jsxs)(O5,{children:[(0,H.jsx)(E5,{children:`Your projects`}),i.phase===`loading`?(0,H.jsx)(z,{px:10,py:12,children:(0,H.jsx)(tv,{size:16})}):null,i.phase===`failure`?(0,H.jsx)(W7,{children:`Your projects could not be read.`}):null,i.phase===`ready`&&a.length===0?(0,H.jsx)(W7,{children:e.trim()?`No project by that name.`:`No projects yet.`}):null,a.map(e=>(0,H.jsx)(ioe,{project:e},e._id))]})]})},ioe=({project:e})=>{let t=Ci().id===e._id,[n,r]=(0,V.useState)(t);return(0,H.jsxs)(z,{children:[(0,H.jsx)(Wie,{open:n,onPress:()=>r(!n),icon:(0,H.jsx)(aoe,{id:e._id}),children:e.name}),n?(0,H.jsx)(Gie,{children:toe.map(t=>(0,H.jsx)(D5,{to:`/projects/${e._id}/${t}`,indent:!0,children:noe(t)},t))}):null]})},U7=[`M8 1.5 14.5 8 8 14.5 1.5 8Z`,`M8 1.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13Z`,`M8 1.5 15 14.5H1Z`,`M2 2h12v12H2Z`],aoe=({id:e})=>(0,H.jsx)(`svg`,{width:16,height:16,viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":!0,children:(0,H.jsx)(`path`,{d:U7[SH(e)%U7.length],stroke:wH(e),strokeWidth:1.5,strokeLinejoin:`round`})}),W7=({children:e})=>(0,H.jsx)(a,{px:10,py:8,fontSize:Z.small,color:`$faint`,children:e}),G7=async(e,t)=>{let n=await e.find(P8.notice,{space:t});return(n.length>0?n:await e.find(P8.notice)).sort((e,t)=>t.modifiedOn-e.modifiedOn)},ooe=async(e,t)=>{let[n,r,i]=await Promise.all([e.find(P8.channel,{space:t}),e.find(P8.issue),e.find(P8.project)]),a=n.length>0?n:await e.find(P8.channel),o=new Map;for(let e of i)o.set(e._id,e.name);for(let e of a)o.set(e._id,`#${e.name}`);for(let e of r){let t=o.get(e.space);t&&o.set(e._id,t)}return o},soe=(e,t,n)=>e.write(T7(n,t,{isViewed:!0})),K7={[I8.backlog]:`backlog`,[I8.todo]:`todo`,[I8.doing]:`progress`,[I8.done]:`done`,[I8.cancelled]:`done`},coe=[void 0,`urgent`,`high`,`medium`,`low`],q7={urgent:L8.urgent,high:L8.high,medium:L8.medium,low:L8.low},loe=e=>{let t=e.estimation??0;return t<=0?0:Math.max(0,Math.min(1,(e.reportedTime??0)/t))},J7=e=>({id:e._id,name:R8(e),face:e.avatar??void 0}),uoe=(e,t)=>{let n=[e.assignee,...e.collaborators??[]].filter(e=>!!e),r=new Set,i=[];for(let e of n){if(r.has(e))continue;r.add(e);let n=t.get(e);n&&i.push(J7(n))}return i},doe=(e,t)=>({id:e._id,key:eie(t.project??t.projects.get(e.space),e),title:e.title,description:e.description,projectId:e.space,status:t.columns.get(e.status)??`backlog`,priority:coe[e.priority]??void 0,labels:t.words.get(e._id)??[],done:loe(e),people:uoe(e,t.crowd),origin:e.component?foe(t.parts.get(e.component)):void 0,files:e.attachments??0,replies:e.comments??0}),foe=e=>e?{name:e}:void 0,Y7=e=>new Map(e.map(e=>[e._id,K7[e.category]??`backlog`])),poe=(e,t)=>async(n,r,i)=>{let a=t??`proj-crm`,[o,s,c]=await Promise.all([R7(e,a),L7(e,a),I7(e,a)]),l=s.find(e=>(K7[e.category]??`backlog`)===n)??s[0];if(!l)throw Error(`this project has no ${n} column`);let u=Math.max(c?.sequence??0,...o.map(e=>e.number))+1,d=i?.priority?q7[i.priority]:0;if(await eoe(e,e.account??``,a,{title:r,status:l._id,priority:d,number:u,after:o.find(e=>e.status===l._id)}),i&&(i.description||i.assigneeId||i.labels&&i.labels.length>0)){let t=(await R7(e,a)).find(e=>e.number===u&&e.title===r);if(t&&(await H7(e,e.account??``,t,{...i.description===void 0?{}:{description:i.description},...i.assigneeId===void 0?{}:{assignee:i.assigneeId,collaborators:i.assigneeId?[i.assigneeId]:[]}}),i.labels&&i.labels.length>0))for(let n of i.labels)await e.write(w7(a,e.account??``,P8.tag,{attachedTo:t._id,attachedToClass:P8.issue,collection:`labels`,tag:`tag-${n.toLowerCase()}`,title:n}))}},moe=(e,t)=>({watch(n,r){let i=!0,a=()=>{Promise.all([L7(e,t),R7(e,t),z7(e),B7(e),Qae(e),F7(e)]).then(async([r,a,o,s,c,l])=>{if(!i)return;let u=t&&a.length?await I7(e,t):void 0;if(!i)return;let d=new Map;for(let e of s){let t=d.get(e.attachedTo);t?t.push(e.title):d.set(e.attachedTo,[e.title])}let f={columns:Y7(r),crowd:new Map(o.map(e=>[e._id,e])),words:d,parts:new Map(c.map(e=>[e._id,e.label])),project:u,projects:new Map(l.map(e=>[e._id,e]))};n(a.map(e=>doe(e,f)))}).catch(e=>i&&r(e instanceof Error?e:Error(String(e))))};a();let o=e.watch(a);return()=>{i=!1,o()}},add:poe(e,t),async move(n,r,i){let a=await R7(e,t),o=a.find(e=>e._id===n);if(!o)throw Error(`no issue to move`);let s=(await L7(e,o.space)).find(e=>(K7[e.category]??`backlog`)===r);if(!s)throw Error(`no column to move into`);let c=a.filter(e=>e.status===s._id&&e._id!==n),l=i?c.findIndex(e=>e._id===i):c.length,u=l<0?c.length:l;await $ae(e,e.account??``,o,s._id,{before:c[u-1],after:c[u]})},async update(n,r){let i=(await R7(e,t)).find(e=>e._id===n);if(!i)return;let a={};if(r.title!==void 0&&(a.title=r.title),r.description!==void 0&&(a.description=r.description),r.priority!==void 0&&(a.priority=r.priority?q7[r.priority]:0),r.done!==void 0){let e=i.estimation&&i.estimation>0?i.estimation:100;a.estimation=e,a.reportedTime=Math.round(Math.max(0,Math.min(1,r.done))*e)}if(r.assigneeId!==void 0){a.assignee=r.assigneeId;let e=(i.collaborators??[]).filter(e=>e!==r.assigneeId);a.collaborators=r.assigneeId?[r.assigneeId,...e]:e}if(r.replies!==void 0&&(a.comments=r.replies),r.status!==void 0){let t=(await L7(e,i.space)).find(e=>(K7[e.category]??`backlog`)===r.status);t&&(a.status=t._id)}if(Object.keys(a).length>0&&await H7(e,e.account??``,i,a),r.labels!==void 0){let t=(await B7(e)).filter(e=>e.attachedTo===n);for(let n of t)await e.write(E7(n,e.account??``));for(let t of r.labels)await e.write(w7(i.space,e.account??``,P8.tag,{attachedTo:n,attachedToClass:P8.issue,collection:`labels`,tag:`tag-${t.toLowerCase()}`,title:t}))}},async remove(n){let r=(await R7(e,t)).find(e=>e._id===n);r&&await e.write(E7(r,e.account??``))}}),X7=e=>{let{plane:t,current:n}=eH();return(0,V.useMemo)(()=>t&&n?moe(t,e):null,[t,n,e])},Z7=e=>{let{plane:t}=eH(),n=oV(V7.people(),()=>z7(t),{enabled:!!t}),r=oV(V7.projects(),()=>F7(t),{enabled:!!t}),i=e?(r.data??[]).find(t=>t._id===e)?.members:void 0,a=new Map((n.data??[]).map(e=>[e._id,e]));return(i?i.map(e=>a.get(e)):n.data??[]).filter(e=>!!e).map(J7)},Q7=e=>e===`refused`?`refused`:e===`homeless`?`nowhere`:`opening`,$7=()=>{let{plane:e}=eH();return oV(V7.projects(),()=>F7(e),{enabled:!!e})},hoe=e=>{let t=$7();return e?(t.data??[]).find(t=>t._id===e):void 0},goe=/(@[\w.-]+)/g,e9=(e,t)=>e?[{text:e,[t]:!0}]:[],_oe=(e,t,n)=>{let r=[{text:e,strong:!0}];return(n?t.split(n):[t]).forEach((e,t)=>{t>0&&r.push(...e9(n,`strong`));for(let t of e.split(goe))t&&(t.startsWith(`@`)?r.push(...e9(t,`mention`)):r.push({text:t}))}),r.map((e,t)=>t===1&&e.text?{...e,text:` ${e.text}`}:e)},voe=(e,t,n)=>{let r=t.get(String(e.modifiedBy??``)),i=r?R8(r):`Somebody`,a=n.get(String(e.attachedTo??``));return{id:e._id,kind:e.attachedToClass===P8.channel||e.attachedToClass===P8.direct||e.attachedToClass===P8.message?`chat`:`task`,actor:{name:i,face:r?.avatar??void 0},line:_oe(i,e.body??e.title??``,a),at:e.modifiedOn,place:a,seen:e.isViewed}},yoe=()=>{let{plane:e,current:t,standing:n}=eH();return(0,V.useEffect)(()=>{if(!e||!t){let e=Q7(n);IH({list:e===`refused`?()=>Promise.reject(Error(`Your workspace is not answering.`)):e===`nowhere`?()=>Promise.resolve([]):()=>new Promise(()=>{}),see:()=>Promise.resolve()});return}let r=t.uuid;IH({async list(){let[t,n,i]=await Promise.all([G7(e,r),z7(e),ooe(e,r)]),a=new Map(n.map(e=>[e._id,e]));return t.map(e=>voe(e,a,i))},async see(t){let n=(await G7(e,r)).find(e=>e._id===t);n&&!n.isViewed&&await soe(e,e.account??``,n)}})},[e,t,n]),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(boe,{}),(0,H.jsx)(xoe,{})]})},boe=()=>{let e=RH();return(0,V.useEffect)(()=>Rie(e),[e]),null},xoe=()=>{let{plane:e}=eH(),t=oV(V7.statuses(),()=>L7(e),{enabled:!!e}),n=oV(V7.issues(),()=>R7(e),{enabled:!!e}),r=Y7(t.data??[]),i=n.data??[],a=i.filter(e=>r.get(e.status)!==`done`).length,o=i.length?Math.round(a/i.length*100):null;return(0,V.useEffect)(()=>zie(o),[o]),null},t9=({glyph:e,n:t,label:n})=>t>0?(0,H.jsxs)(y,{items:`center`,gap:4,"aria-label":`${t} ${n}`,children:[e,(0,H.jsx)(a,{fontSize:`$3`,color:`$dim`,children:t})]}):null,n9=[`backlog`,`todo`,`progress`,`done`],r9=[`low`,`medium`,`high`,`urgent`],i9={backlog:`Backlog`,todo:`To do`,progress:`In progress`,done:`Done`},Soe={urgent:1,high:2,medium:3,low:4},a9=(e,t)=>t&&e.toLowerCase()===t?EH(Soe[t]):CH(e),o9={backlog:bH.backlog,todo:bH.todo,progress:bH.doing,done:bH.done},s9={arc:X.accent,track:X.rule},c9=({done:e,size:t=16,width:n=2})=>{let r=Math.min(1,Math.max(0,e)),i=(t-n)/2,a=2*Math.PI*i;return(0,H.jsxs)(`svg`,{width:t,height:t,viewBox:`0 0 ${t} ${t}`,role:`img`,"aria-label":`${Math.round(r*100)}% done`,children:[(0,H.jsx)(`circle`,{cx:t/2,cy:t/2,r:i,fill:`none`,stroke:s9.track,strokeWidth:n}),r>0?(0,H.jsx)(`circle`,{cx:t/2,cy:t/2,r:i,fill:`none`,stroke:s9.arc,strokeWidth:n,strokeLinecap:`round`,strokeDasharray:`${a*r} ${a}`,transform:`rotate(-90 ${t/2} ${t/2})`}):null]})},l9=12,Coe=48,woe=({issue:e,dragging:t,onOpen:n,...r})=>{let i=e.priority?[Eoe(e.priority),...e.labels]:e.labels;return(0,H.jsxs)(z,{"data-slot":`issue`,"data-issue":e.id,bg:`$raised`,rounded:Q.card,overflow:`hidden`,opacity:t?.4:1,cursor:n?`pointer`:`grab`,hoverStyle:{background:`$hover`},role:`article`,tabIndex:0,"aria-label":`${e.key} ${e.title}`,onPress:()=>n?.(e),...Doe(r),children:[(0,H.jsxs)(z,{p:l9,gap:DH.tight,children:[e.cover?(0,H.jsx)(lo,{src:e.cover,alt:``,width:`100%`,aspectRatio:1.44,rounded:`$1`,mb:4}):null,(0,H.jsx)(y,{items:`center`,justify:`space-between`,gap:6,children:(0,H.jsx)(a,{fontSize:Z.small,fontWeight:`600`,color:`$dim`,children:e.key})}),(0,H.jsx)(a,{fontSize:Z.body,lineHeight:20,color:`$ink`,style:koe,children:e.title}),i.length>0?(0,H.jsx)(y,{gap:DH.tight,flexWrap:`wrap`,children:i.map(t=>{let{background:n,color:r}=a9(t,e.priority);return(0,H.jsx)(Yh,{variant:`default`,style:{...Toe,backgroundColor:n},children:(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`600`,style:{color:r},children:t})},t)})}):null,e.done!==void 0||e.origin?(0,H.jsxs)(y,{items:`center`,gap:`$4`,mt:`$2`,children:[e.done===void 0?null:(0,H.jsxs)(y,{items:`center`,gap:4,children:[(0,H.jsx)(c9,{done:e.done}),(0,H.jsxs)(a,{fontSize:Z.body,color:`$soft`,children:[Math.round(e.done*100),`%`]})]}),e.origin?(0,H.jsx)(Ooe,{name:e.origin.name,mark:e.origin.mark}):null]}):null]}),(0,H.jsx)(Lc,{}),(0,H.jsxs)(y,{height:Coe,px:l9,items:`center`,justify:`space-between`,children:[(0,H.jsx)(p7,{people:e.people}),(0,H.jsxs)(y,{items:`center`,gap:`$3`,children:[(0,H.jsx)(t9,{glyph:(0,H.jsx)(pm,{size:12,color:`$dim`}),n:e.files,label:`attachments`}),(0,H.jsx)(t9,{glyph:(0,H.jsx)(cm,{size:12,color:`$dim`}),n:e.replies,label:`replies`})]})]})]})},Toe={minHeight:18,height:18,paddingHorizontal:8,borderRadius:9999},Eoe=e=>e[0].toUpperCase()+e.slice(1),Doe=e=>({draggable:!0,...e}),Ooe=({name:e,mark:t})=>(0,H.jsxs)(y,{items:`center`,gap:6,children:[t?(0,H.jsx)(lo,{src:t,alt:``,width:20,height:20,rounded:9999}):(0,H.jsx)(y,{width:20,height:20,rounded:9999,bg:`$edge`,items:`center`,justify:`center`,children:(0,H.jsx)(a,{fontSize:`$1`,color:`$quiet`,children:e[0]?.toUpperCase()})}),(0,H.jsx)(a,{fontSize:`$2`,color:`$quiet`,children:e})]}),koe={display:`-webkit-box`,WebkitBoxOrient:`vertical`,WebkitLineClamp:3,overflow:`hidden`},Aoe=({column:e,drag:t,over:n,onOver:r,onDrop:i,onAdd:o,onOpen:s,onLift:c,onLand:l})=>{let u=t=>n=>{n.preventDefault(),n.stopPropagation(),i(e.status,t)},d=t=>n=>{n.preventDefault(),r(e.status,t)};return(0,H.jsxs)(z,{"data-slot":`column`,"data-status":e.status,flex:1,minW:240,shrink:0,gap:DH.tight,role:`list`,"aria-label":e.name,onDragOver:d(`end`),onDrop:u(),children:[(0,H.jsxs)(y,{items:`center`,gap:DH.tight,height:24,children:[(0,H.jsx)(z,{width:8,height:8,rounded:9999,shrink:0,style:{backgroundColor:o9[e.status]}}),(0,H.jsx)(a,{fontSize:Z.small,fontWeight:`700`,color:`$ink`,...OH,children:e.name}),(0,H.jsxs)(a,{fontSize:Z.small,color:`$dim`,children:[`– `,e.issues.length]}),(0,H.jsx)(y,{flex:1}),o?(0,H.jsxs)(Rg,{children:[(0,H.jsx)(Bg,{asChild:!0,children:(0,H.jsx)(W,{variant:`ghost`,size:`icon-sm`,"aria-label":`${e.name} actions`,children:(0,H.jsx)(cp,{size:14})})}),(0,H.jsx)(Wg,{align:`end`,children:(0,H.jsx)(Jg,{onSelect:()=>o(e.status),children:`Add issue`})})]}):null]}),o?(0,H.jsx)(W,{variant:`ghost`,height:36,width:`100%`,borderWidth:1,borderStyle:`dashed`,borderColor:`$edge`,rounded:Q.card,"aria-label":`Add issue to ${e.name}`,onPress:()=>o(e.status),children:(0,H.jsx)(hm,{size:16})}):null,e.issues.map(e=>(0,H.jsxs)(z,{role:`listitem`,gap:DH.tight,onDragOver:d(e.id),onDrop:u(e.id),children:[t&&n===e.id?(0,H.jsx)(u9,{height:t.cover?260:176}):null,(0,H.jsx)(woe,{issue:e,dragging:t?.id===e.id,onOpen:s,onDragStart:()=>c(e),onDragEnd:l})]},e.id)),t&&n===`end`?(0,H.jsx)(u9,{height:t.cover?260:176}):null,(0,H.jsx)(z,{flex:1,minH:24})]})},u9=({height:e})=>(0,H.jsx)(z,{height:e,rounded:Q.card,borderWidth:1,borderStyle:`dashed`,borderColor:`$edge`}),d9=e=>n9.map(t=>({status:t,name:i9[t],issues:e.filter(e=>e.status===t)})),f9=(e,t,n,r)=>{let i=e.find(e=>e.id===t);if(!i||i.status===n&&r===void 0&&joe(e,n)?.id===t||t===r)return e;let a=e.filter(e=>e.id!==t),o={...i,status:n},s=r?a.findIndex(e=>e.id===r):-1;if(s<0){let e=a.map(e=>e.status===n).lastIndexOf(!0);return p9(a,e<0?a.length:e+1,o)}return p9(a,s,o)},p9=(e,t,n)=>[...e.slice(0,t),n,...e.slice(t)],joe=(e,t)=>e.filter(e=>e.status===t).at(-1),m9=10,h9=14,Moe=({source:e,only:t,onOpen:n,onCreateIn:r})=>{let[i,a]=(0,V.useState)(null),[o,s]=(0,V.useState)(null),[c,l]=(0,V.useState)(null),[u,d]=(0,V.useState)(null),[f,p]=(0,V.useState)(0);(0,V.useEffect)(()=>(a(null),s(null),e.watch(e=>{a(e),s(null)},s)),[e,f]);let m=(0,V.useCallback)((t,n)=>{d(null);let r=c;l(null),r&&i&&(a(f9(i,r.id,t,n)),e.move(r.id,t,n).catch(s))},[c,i,e]),h=e.add?.bind(e),g=r??(h?e=>{h(e,`New issue`).catch(s)}:void 0);if(o)return(0,H.jsx)(Foe,{why:o.message,onRetry:()=>p(e=>e+1)});if(!i)return(0,H.jsx)(Noe,{});if(i.length===0)return(0,H.jsx)(Poe,{onAdd:g&&(()=>g(`backlog`))});let _=t?.length?i.filter(e=>e.priority&&t.includes(e.priority)):i;return(0,H.jsx)(Mt,{horizontal:!0,contentContainerStyle:{p:h9,gap:m9,shrink:0,grow:1,minW:`100%`},children:d9(_).map(e=>(0,H.jsx)(Aoe,{column:e,drag:c,over:u?.status===e.status?u.before:null,onOver:(e,t)=>d({status:e,before:t}),onDrop:m,onAdd:g,onOpen:n,onLift:l,onLand:()=>{l(null),d(null)}},e.status))})},Noe=()=>(0,H.jsx)(y,{p:h9,gap:m9,"aria-busy":!0,"aria-label":`Loading issues`,children:[0,1,2,3].map(e=>(0,H.jsxs)(z,{width:240,gap:`$2`,children:[(0,H.jsx)(oC,{height:12,width:96}),(0,H.jsx)(oC,{height:36}),[0,1,2].map(e=>(0,H.jsx)(oC,{height:176},e))]},e))}),Poe=({onAdd:e})=>(0,H.jsx)(z,{p:h9,items:`flex-start`,children:(0,H.jsx)(KZ,{icon:Qp,title:`No issues yet`,description:`Issues you open appear here, one column per status.`,primary:e?{label:`New issue`,onPress:e}:void 0})}),Foe=({why:e,onRetry:t})=>(0,H.jsxs)(z,{p:h9,gap:`$3`,items:`flex-start`,role:`alert`,children:[(0,H.jsx)(a,{fontSize:`$4`,color:`$ink`,children:e}),(0,H.jsx)(W,{variant:`outline`,size:`sm`,onPress:t,children:`Try again`})]}),Ioe=()=>new Promise(()=>{}),g9=e=>({watch(t,n){return e===`refused`&&n(Error(`Your workspace is not answering.`)),e===`nowhere`&&t([]),()=>{}},move:Ioe}),_9=16,Loe=12,Roe=20,zoe=4,Boe=28,Voe=10,Hoe=34,v9=[{id:`kanban`,label:`Kanban`,icon:eee},{id:`list`,label:`List`,icon:tm},{id:`timeline`,label:`Timeline`,icon:Sp}],Uoe=({trail:e,title:t,base:n,here:r,people:i,only:o,onOnly:s,onAdd:c})=>(0,H.jsxs)(z,{"data-parity-key":`board.head`,pt:Loe,children:[(0,H.jsxs)(y,{px:_9,height:Roe,items:`center`,gap:8,children:[(0,H.jsx)(Woe,{steps:e}),(0,H.jsx)(y,{flex:1,minW:0}),i.length>0?(0,H.jsx)(y,{rounded:Q.pill,bg:`$hover`,px:6,py:2,items:`center`,children:(0,H.jsx)(p7,{people:i,size:24,show:4,ground:X.card})}):null,c?(0,H.jsx)(Joe,{onAdd:c}):null]}),(0,H.jsx)(z,{height:zoe}),(0,H.jsx)(y,{px:_9,height:Boe,items:`center`,children:(0,H.jsx)(a,{fontSize:Z.title,fontWeight:`500`,color:`$ink`,children:t})}),(0,H.jsx)(z,{height:Voe}),(0,H.jsxs)(y,{px:10,height:Hoe,items:`flex-end`,gap:4,children:[v9.map(e=>(0,H.jsxs)(Koe,{to:e.id===`kanban`?n:`${n}/${e.id}`,here:e.id===r,children:[(0,H.jsx)(e.icon,{size:16,color:e.id===r?`$ink`:`$soft`}),(0,H.jsx)(a,{fontSize:Z.row,color:e.id===r?`$ink`:`$soft`,children:e.label})]},e.id)),(0,H.jsx)(y,{flex:1,minW:0}),(0,H.jsx)(qoe,{only:o,onOnly:s}),c?(0,H.jsxs)(y,{role:`button`,tabIndex:0,cursor:`pointer`,height:26,mb:3,px:10,items:`center`,gap:6,rounded:Q.field,style:{backgroundColor:X.accent},focusVisibleStyle:kH,"aria-label":`New issue`,onPress:c,children:[(0,H.jsx)(hm,{size:14,color:X.ground}),(0,H.jsx)(a,{fontSize:Z.small,fontWeight:`600`,style:{color:X.ground},children:`New issue`})]}):null]}),(0,H.jsx)(Lc,{borderColor:`$edge`})]}),Woe=({steps:e})=>(0,H.jsx)(y,{items:`center`,gap:8,minW:0,children:e.map((e,t)=>(0,H.jsxs)(y,{items:`center`,gap:8,minW:0,children:[t>0?(0,H.jsx)(a,{fontSize:Z.small,color:`$faint`,children:`/`}):null,e.to?(0,H.jsx)(y,{asChild:!0,style:Goe,rounded:Q.field,focusVisibleStyle:kH,children:(0,H.jsx)(ja,{to:e.to,children:(0,H.jsx)(a,{fontSize:Z.small,color:`$soft`,numberOfLines:1,hoverStyle:{color:`$ink`},children:e.label})})}):(0,H.jsx)(a,{fontSize:Z.small,numberOfLines:1,"aria-current":`page`,style:{color:X.accent},children:e.label})]},`${e.label}-${t}`))}),Goe={flexDirection:`row`,alignItems:`center`},Koe=({to:e,here:t,children:n})=>(0,H.jsx)(z,{asChild:!0,style:{alignItems:`center`},rounded:Q.field,focusVisibleStyle:kH,children:(0,H.jsxs)(ja,{to:e,"aria-current":t?`page`:void 0,children:[(0,H.jsx)(y,{height:30,px:6,items:`center`,gap:8,children:n}),(0,H.jsx)(z,{height:2,width:`100%`,rounded:Q.pill,style:{backgroundColor:t?X.accent:`transparent`}})]})}),qoe=({only:e,onOnly:t})=>{let n=new Set(e),r=r=>t(n.has(r)?e.filter(e=>e!==r):[...e,r]);return(0,H.jsxs)(Rg,{children:[(0,H.jsx)(Bg,{asChild:!0,children:(0,H.jsxs)(y,{role:`button`,tabIndex:0,cursor:`pointer`,height:30,px:8,items:`center`,gap:8,rounded:Q.field,hoverStyle:{background:`$hover`},focusVisibleStyle:kH,"aria-label":`Filter issues`,children:[(0,H.jsx)(Sm,{size:16,color:e.length?`$ink`:`$soft`}),(0,H.jsx)(a,{fontSize:Z.row,color:e.length?`$ink`:`$soft`,children:e.length?`Filter · ${e.length}`:`Filter`})]})}),(0,H.jsxs)(Wg,{align:`end`,children:[(0,H.jsx)(u_,{children:`Priority`}),r9.map(e=>(0,H.jsx)(Yg,{checked:n.has(e),onCheckedChange:()=>r(e),children:(0,H.jsx)(a,{...OH,fontSize:Z.small,children:e})},e)),e.length?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(d_,{}),(0,H.jsx)(Jg,{onSelect:()=>t([]),children:`Show every priority`})]}):null]})]})},Joe=({onAdd:e})=>(0,H.jsxs)(Rg,{children:[(0,H.jsx)(Bg,{asChild:!0,children:(0,H.jsx)(y,{role:`button`,tabIndex:0,cursor:`pointer`,width:24,height:24,items:`center`,justify:`center`,rounded:Q.field,hoverStyle:{background:`$hover`},focusVisibleStyle:kH,"aria-label":`Board actions`,children:(0,H.jsx)(zp,{size:16,color:`$soft`})})}),(0,H.jsx)(Wg,{align:`end`,children:(0,H.jsx)(Jg,{onSelect:e,children:`New issue`})})]}),y9=[`Backend`,`Frontend`,`Devops`,`Feature`,`Design`,`Sales`,`Marketing`,`QA`,`Research`],Yoe=[0,.25,.5,.75,1],b9=e=>e[0].toUpperCase()+e.slice(1);function Xoe({issue:e,source:t,people:n,onClose:r}){let[i,o]=(0,V.useState)(e.title),[s,c]=(0,V.useState)(e.description??``),[l,u]=(0,V.useState)(``),[d,f]=(0,V.useState)(!1);(0,V.useEffect)(()=>{o(e.title),c(e.description??``)},[e.id,e.title,e.description]);let p=n=>{t.update?t.update(e.id,n):n.status&&t.move(e.id,n.status),f(!0),setTimeout(()=>f(!1),1200)},m=()=>{let t=i.trim()||e.title;p({title:t,description:s.trim()})},h=t=>{let n=e.labels.includes(t)?e.labels.filter(e=>e!==t):[...e.labels,t];p({labels:n})},g=()=>{let t=l.trim();t&&(e.labels.includes(t)||p({labels:[...e.labels,t]}),u(``))},_=e.people[0]?.id??null;return(0,H.jsxs)(z,{"data-slot":`issue-drawer`,width:420,shrink:0,borderLeftWidth:1,borderColor:`$edge`,bg:`$panel`,height:`100%`,children:[(0,H.jsxs)(y,{height:48,px:16,items:`center`,justify:`space-between`,borderBottomWidth:1,borderColor:`$edge`,gap:8,children:[(0,H.jsxs)(y,{items:`center`,gap:8,children:[(0,H.jsx)(z,{width:8,height:8,rounded:9999,style:{backgroundColor:o9[e.status]}}),(0,H.jsx)(a,{fontSize:Z.body,fontWeight:`700`,color:`$ink`,children:e.key}),e.origin?(0,H.jsx)(y,{px:8,height:20,rounded:9999,bg:`$raised`,borderWidth:1,borderColor:`$edge`,items:`center`,children:(0,H.jsx)(a,{fontSize:Z.chip,color:`$soft`,children:e.origin.name})}):null,d?(0,H.jsxs)(y,{items:`center`,gap:4,px:6,py:2,rounded:Q.pill,bg:`$hover`,children:[(0,H.jsx)(Vt,{size:11,color:`$ink`}),(0,H.jsx)(a,{fontSize:Z.chip,color:`$ink`,children:`Saved`})]}):null]}),(0,H.jsxs)(y,{items:`center`,gap:4,children:[t.remove?(0,H.jsx)(W,{variant:`ghost`,size:`icon-sm`,"aria-label":`Delete issue`,onPress:()=>{t.remove?.(e.id),r()},children:(0,H.jsx)(km,{size:14,color:`$soft`})}):null,(0,H.jsx)(W,{variant:`ghost`,size:`icon-sm`,"aria-label":`Close issue drawer`,onPress:r,children:(0,H.jsx)(Rn,{size:15,color:`$soft`})})]})]}),(0,H.jsx)(U_,{flex:1,minH:0,children:(0,H.jsxs)(z,{p:16,gap:16,children:[(0,H.jsxs)(z,{gap:8,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...OH,children:`Title`}),(0,H.jsx)(k_,{height:32,value:i,onChangeText:o,onBlur:m,fontSize:13,fontWeight:`600`,bg:`$raised`,borderColor:`$edge`})]}),(0,H.jsxs)(z,{gap:8,children:[(0,H.jsxs)(y,{items:`center`,justify:`space-between`,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...OH,children:`Specification & Notes`}),(0,H.jsx)(W,{size:`xs`,height:22,px:8,rounded:Q.field,style:{backgroundColor:X.accent},onPress:m,children:(0,H.jsx)(a,{fontSize:11,fontWeight:`600`,style:{color:X.ground},children:`Save`})})]}),(0,H.jsx)(k_,{height:32,value:s,onChangeText:c,onBlur:m,placeholder:`Add acceptance criteria, PR links, or technical context...`,fontSize:12,bg:`$raised`,borderColor:`$edge`})]}),(0,H.jsx)(Lc,{borderColor:`$edge`}),(0,H.jsxs)(z,{gap:8,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...OH,children:`Workflow Status`}),(0,H.jsx)(y,{gap:6,flexWrap:`wrap`,children:n9.map(t=>{let n=e.status===t;return(0,H.jsxs)(y,{role:`button`,tabIndex:0,cursor:`pointer`,px:10,height:28,rounded:Q.field,items:`center`,gap:6,bg:n?`$hover`:`$raised`,borderWidth:1,borderColor:n?`$ink`:`$edge`,focusVisibleStyle:kH,onPress:()=>p({status:t}),children:[(0,H.jsx)(z,{width:7,height:7,rounded:9999,style:{backgroundColor:o9[t]}}),(0,H.jsx)(a,{fontSize:Z.small,fontWeight:n?`700`:`500`,color:n?`$ink`:`$soft`,children:i9[t]})]},t)})})]}),(0,H.jsxs)(z,{gap:8,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...OH,children:`Priority`}),(0,H.jsx)(y,{gap:6,flexWrap:`wrap`,children:r9.map(t=>{let n=e.priority===t,{background:r,color:i}=a9(b9(t),t);return(0,H.jsx)(y,{role:`button`,tabIndex:0,cursor:`pointer`,px:10,height:26,rounded:Q.pill,items:`center`,borderWidth:1,borderColor:n?`$ink`:`transparent`,style:{backgroundColor:r},onPress:()=>p({priority:n?null:t}),children:(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,style:{color:i},children:b9(t)})},t)})})]}),(0,H.jsxs)(z,{gap:8,children:[(0,H.jsxs)(y,{items:`center`,justify:`space-between`,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...OH,children:`Completion Progress`}),(0,H.jsxs)(y,{items:`center`,gap:6,children:[(0,H.jsx)(c9,{done:e.done??0}),(0,H.jsxs)(a,{fontSize:Z.small,fontWeight:`600`,color:`$ink`,children:[Math.round((e.done??0)*100),`%`]})]})]}),(0,H.jsx)(y,{gap:6,children:Yoe.map(t=>{let n=Math.round(t*100),r=Math.round((e.done??0)*100)===n;return(0,H.jsx)(y,{role:`button`,tabIndex:0,cursor:`pointer`,flex:1,height:26,rounded:Q.field,items:`center`,justify:`center`,bg:r?`$hover`:`$raised`,borderWidth:1,borderColor:r?`$ink`:`$edge`,onPress:()=>p({done:t}),children:(0,H.jsxs)(a,{fontSize:Z.chip,fontWeight:r?`700`:`500`,color:r?`$ink`:`$soft`,children:[n,`%`]})},n)})})]}),(0,H.jsxs)(z,{gap:8,children:[(0,H.jsxs)(y,{items:`center`,gap:6,children:[(0,H.jsx)(Fm,{size:12,color:`$dim`}),(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...OH,children:`Assignee`})]}),(0,H.jsx)(y,{gap:6,flexWrap:`wrap`,children:n.slice(0,10).map(e=>{let t=_===e.id;return(0,H.jsxs)(y,{role:`button`,tabIndex:0,cursor:`pointer`,px:8,height:28,rounded:Q.pill,items:`center`,gap:6,bg:t?`$hover`:`$raised`,borderWidth:1,borderColor:t?`$ink`:`$edge`,onPress:()=>p({assigneeId:e.id}),children:[(0,H.jsx)(p7,{people:[e],size:18,show:1}),(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:t?`700`:`500`,color:t?`$ink`:`$soft`,children:e.name.split(` `)[0]})]},e.id)})})]}),(0,H.jsxs)(z,{gap:8,children:[(0,H.jsxs)(y,{items:`center`,gap:6,children:[(0,H.jsx)(Om,{size:12,color:`$dim`}),(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...OH,children:`Labels`})]}),(0,H.jsx)(y,{gap:6,flexWrap:`wrap`,children:y9.map(t=>{let n=e.labels.includes(t),{background:r,color:i}=a9(t);return(0,H.jsx)(Yh,{variant:`default`,style:{minHeight:22,height:22,paddingLeft:9,paddingRight:9,borderRadius:9999,cursor:`pointer`,backgroundColor:n?r:`transparent`,borderWidth:1,borderStyle:`solid`,borderColor:n?i:X.rule,opacity:n?1:.7},onClick:()=>h(t),children:(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`600`,style:{color:n?i:X.mute},children:n?`✓ ${t}`:t})},t)})}),(0,H.jsxs)(y,{gap:6,children:[(0,H.jsx)(k_,{flex:1,height:26,fontSize:11,placeholder:`Add custom label...`,value:l,onChangeText:u,bg:`$raised`,borderColor:`$edge`}),(0,H.jsx)(W,{size:`xs`,height:26,px:10,variant:`outline`,onPress:g,children:(0,H.jsx)(hm,{size:12})})]})]})]})})]})}function Zoe({initialStatus:e=`backlog`,people:t,onCreate:n,onClose:r}){let[i,o]=(0,V.useState)(``),[s,c]=(0,V.useState)(``),[l,u]=(0,V.useState)(e),[d,f]=(0,V.useState)(`medium`),[p,m]=(0,V.useState)(t[0]?.id??null),[h,g]=(0,V.useState)([`Feature`]),[_,v]=(0,V.useState)(!1),b=e=>{g(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},x=async()=>{let e=i.trim();if(e&&!_){v(!0);try{await n(l,e,{description:s.trim()||void 0,priority:d,assigneeId:p,labels:h}),r()}finally{v(!1)}}};return(0,H.jsx)(z,{position:`fixed`,t:0,l:0,r:0,b:0,z:1e3,bg:X.ground,items:`center`,justify:`center`,p:16,children:(0,H.jsxs)(z,{width:`100%`,maxW:520,rounded:Q.card,borderWidth:1,borderColor:`$edge`,bg:`$panel`,overflow:`hidden`,children:[(0,H.jsxs)(y,{height:46,px:16,items:`center`,justify:`space-between`,borderBottomWidth:1,borderColor:`$edge`,children:[(0,H.jsxs)(y,{items:`center`,gap:8,children:[(0,H.jsx)(vp,{size:15,color:`$ink`}),(0,H.jsx)(a,{fontSize:Z.body,fontWeight:`700`,color:`$ink`,children:`Create New Issue`})]}),(0,H.jsx)(W,{variant:`ghost`,size:`icon-sm`,"aria-label":`Close modal`,onPress:r,children:(0,H.jsx)(Rn,{size:15,color:`$soft`})})]}),(0,H.jsxs)(z,{p:16,gap:14,children:[(0,H.jsxs)(z,{gap:6,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...OH,children:`Issue Title`}),(0,H.jsx)(k_,{autoFocus:!0,placeholder:`e.g. Wire real-time webhook retry metrics in hanzo/cloud`,value:i,onChangeText:o,fontSize:13,bg:`$raised`,borderColor:`$edge`})]}),(0,H.jsxs)(z,{gap:6,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...OH,children:`Description & Acceptance Criteria`}),(0,H.jsx)(k_,{placeholder:`Context, repository, and target milestone...`,value:s,onChangeText:c,fontSize:12,bg:`$raised`,borderColor:`$edge`})]}),(0,H.jsxs)(z,{gap:6,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...OH,children:`Status`}),(0,H.jsx)(y,{gap:6,flexWrap:`wrap`,children:n9.map(e=>{let t=l===e;return(0,H.jsxs)(y,{role:`button`,tabIndex:0,cursor:`pointer`,px:10,height:26,rounded:Q.field,items:`center`,gap:6,bg:t?`$hover`:`$raised`,borderWidth:1,borderColor:t?`$ink`:`$edge`,onPress:()=>u(e),children:[(0,H.jsx)(z,{width:7,height:7,rounded:9999,style:{backgroundColor:o9[e]}}),(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:t?`700`:`500`,color:t?`$ink`:`$soft`,children:i9[e]})]},e)})})]}),(0,H.jsxs)(z,{gap:6,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...OH,children:`Priority`}),(0,H.jsx)(y,{gap:6,flexWrap:`wrap`,children:r9.map(e=>{let t=d===e,{background:n,color:r}=a9(b9(e),e);return(0,H.jsx)(y,{role:`button`,tabIndex:0,cursor:`pointer`,px:10,height:24,rounded:Q.pill,items:`center`,borderWidth:1,borderColor:t?`$ink`:`transparent`,style:{backgroundColor:n},onPress:()=>f(e),children:(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,style:{color:r},children:b9(e)})},e)})})]}),(0,H.jsxs)(z,{gap:6,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...OH,children:`Assign to a team member`}),(0,H.jsx)(y,{gap:6,flexWrap:`wrap`,children:t.slice(0,8).map(e=>{let t=p===e.id;return(0,H.jsxs)(y,{role:`button`,tabIndex:0,cursor:`pointer`,px:8,height:26,rounded:Q.pill,items:`center`,gap:6,bg:t?`$hover`:`$raised`,borderWidth:1,borderColor:t?`$ink`:`$edge`,onPress:()=>m(e.id),children:[(0,H.jsx)(p7,{people:[e],size:16,show:1}),(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:t?`700`:`500`,color:t?`$ink`:`$soft`,children:e.name.split(` `)[0]})]},e.id)})})]}),(0,H.jsxs)(z,{gap:6,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...OH,children:`Labels`}),(0,H.jsx)(y,{gap:6,flexWrap:`wrap`,children:y9.slice(0,6).map(e=>{let t=h.includes(e),{background:n,color:r}=a9(e);return(0,H.jsx)(Yh,{variant:`default`,style:{minHeight:20,height:20,paddingLeft:8,paddingRight:8,borderRadius:9999,cursor:`pointer`,backgroundColor:t?n:`transparent`,borderWidth:1,borderStyle:`solid`,borderColor:t?r:X.rule},onClick:()=>b(e),children:(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`600`,style:{color:t?r:X.mute},children:e})},e)})})]})]}),(0,H.jsxs)(y,{px:16,py:12,items:`center`,justify:`flex-end`,gap:8,borderTopWidth:1,borderColor:`$edge`,bg:`$raised`,children:[(0,H.jsx)(W,{size:`sm`,variant:`ghost`,onPress:r,children:`Cancel`}),(0,H.jsx)(W,{size:`sm`,style:{backgroundColor:X.accent},disabled:!i.trim()||_,onPress:()=>void x(),children:(0,H.jsx)(a,{fontSize:12,fontWeight:`600`,style:{color:X.ground},children:_?`Creating…`:`Create issue`})})]})]})})}var Qoe={minHeight:18,height:18,paddingHorizontal:8,borderRadius:9999},$oe=e=>e[0].toUpperCase()+e.slice(1),x9=e=>n9[(n9.indexOf(e)+1)%n9.length]??`backlog`,ese=({source:e,only:t,mine:n,onOpen:r,onCreateIn:i})=>{let[o,s]=(0,V.useState)(null),[c,l]=(0,V.useState)(null),[u,d]=(0,V.useState)(0);(0,V.useEffect)(()=>(s(null),l(null),e.watch(e=>{s(e),l(null)},l)),[e,u]);let f=e.add?.bind(e),p=i??(f?e=>void f(e,`New issue`).catch(l):void 0),m=t=>{if(!o)return;let n=x9(t.status);s(f9(o,t.id,n)),e.move(t.id,n).catch(l)};if(c)return(0,H.jsxs)(z,{p:24,gap:`$3`,items:`flex-start`,role:`alert`,children:[(0,H.jsx)(a,{fontSize:`$4`,color:`$ink`,children:c.message}),(0,H.jsx)(W,{variant:`outline`,size:`sm`,onPress:()=>d(e=>e+1),children:`Try again`})]});if(!o)return(0,H.jsx)(z,{p:24,gap:`$3`,"aria-busy":!0,"aria-label":`Loading issue list`,children:[0,1,2,3,4,5].map(e=>(0,H.jsx)(oC,{height:44},e))});let h=t?.length?o.filter(e=>e.priority&&t.includes(e.priority)):o,g=n?h.filter((e,t)=>t%2==0||h.length<=6):h;return g.length===0?(0,H.jsx)(z,{p:24,items:`flex-start`,children:(0,H.jsx)(KZ,{icon:tm,title:`No matching issues`,description:`Issues appear here grouped by workflow status.`,primary:p?{label:`New issue`,onPress:()=>p(`backlog`)}:void 0})}):(0,H.jsx)(U_,{flex:1,minH:0,children:(0,H.jsx)(z,{p:24,gap:20,children:d9(g).map(e=>(0,H.jsxs)(z,{rounded:Q.card,borderWidth:1,borderColor:`$edge`,bg:`$background`,overflow:`hidden`,children:[(0,H.jsxs)(y,{px:16,height:40,items:`center`,gap:DH.tight,bg:`$panel`,borderBottomWidth:+(e.issues.length>0),borderColor:`$edge`,children:[(0,H.jsx)(z,{width:8,height:8,rounded:9999,shrink:0,style:{backgroundColor:o9[e.status]}}),(0,H.jsx)(a,{fontSize:Z.small,fontWeight:`700`,color:`$ink`,...OH,children:e.name}),(0,H.jsx)(a,{fontSize:Z.small,color:`$dim`,children:e.issues.length}),(0,H.jsx)(y,{flex:1}),p?(0,H.jsx)(W,{variant:`ghost`,size:`icon-sm`,"aria-label":`Add issue to ${e.name}`,onPress:()=>p(e.status),children:(0,H.jsx)(hm,{size:14})}):null]}),e.issues.map((e,t)=>{let n=e.priority?[$oe(e.priority),...e.labels]:e.labels;return(0,H.jsxs)(z,{children:[t>0?(0,H.jsx)(Lc,{borderColor:`$edge`}):null,(0,H.jsxs)(y,{px:16,py:10,items:`center`,gap:12,cursor:r?`pointer`:`default`,hoverStyle:{background:`$hover`},onPress:()=>r?.(e),children:[(0,H.jsx)(y,{...i5(t=>{t?.stopPropagation?.(),m(e)},`Advance ${e.key} status`),width:20,height:20,rounded:9999,items:`center`,justify:`center`,borderWidth:1,borderColor:`$edge`,bg:`$panel`,children:(0,H.jsx)(z,{width:8,height:8,rounded:9999,style:{backgroundColor:o9[e.status]}})}),(0,H.jsx)(a,{fontSize:Z.small,fontWeight:`600`,color:`$soft`,width:68,shrink:0,children:e.key}),(0,H.jsx)(a,{fontSize:Z.body,color:`$ink`,flex:1,minW:160,numberOfLines:1,children:e.title}),(0,H.jsxs)(y,{gap:DH.tight,items:`center`,flexWrap:`wrap`,children:[n.map(t=>{let{background:n,color:r}=a9(t,e.priority);return(0,H.jsx)(Yh,{variant:`default`,style:{...Qoe,backgroundColor:n},children:(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`600`,style:{color:r},children:t})},t)}),e.origin?(0,H.jsx)(y,{px:8,height:18,rounded:9999,bg:`$panel`,borderWidth:1,borderColor:`$edge`,items:`center`,children:(0,H.jsx)(a,{fontSize:Z.chip,color:`$quiet`,children:e.origin.name})}):null]}),(0,H.jsx)(y,{width:64,items:`center`,justify:`flex-end`,gap:4,shrink:0,children:e.done===void 0?null:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(c9,{done:e.done}),(0,H.jsxs)(a,{fontSize:Z.small,color:`$soft`,children:[Math.round(e.done*100),`%`]})]})}),(0,H.jsxs)(y,{width:64,items:`center`,justify:`flex-end`,gap:`$2`,shrink:0,children:[(0,H.jsx)(t9,{glyph:(0,H.jsx)(pm,{size:12,color:`$dim`}),n:e.files,label:`attachments`}),(0,H.jsx)(t9,{glyph:(0,H.jsx)(cm,{size:12,color:`$dim`}),n:e.replies,label:`replies`})]}),(0,H.jsx)(y,{width:76,justify:`flex-end`,shrink:0,children:(0,H.jsx)(p7,{people:e.people,size:24,show:3})})]})]},e.id)})]},e.status))})})},S9=[{id:`w1`,label:`W1 · Oct 20`,sub:`Sprint 14`},{id:`w2`,label:`W2 · Oct 27`,sub:`Sprint 14`},{id:`w3`,label:`W3 · Nov 03`,sub:`Current · Active`,now:!0},{id:`w4`,label:`W4 · Nov 10`,sub:`Sprint 15`},{id:`w5`,label:`W5 · Nov 17`,sub:`Sprint 15`},{id:`w6`,label:`W6 · Nov 24`,sub:`Release Cut`}],tse=(e,t)=>{switch(e){case`done`:return{start:t%2==0?0:1,span:2};case`progress`:return{start:1+t%2,span:2};case`todo`:return{start:2+t%2,span:2};default:return{start:3+t%2,span:2}}},nse=({source:e,only:t,mine:n,onOpen:r})=>{let[i,o]=(0,V.useState)(null),[s,c]=(0,V.useState)(null);(0,V.useEffect)(()=>(o(null),c(null),e.watch(e=>{o(e),c(null)},c)),[e]);let l=t=>{if(!i)return;let n=x9(t.status);o(f9(i,t.id,n)),e.move(t.id,n).catch(c)};if(s)return(0,H.jsx)(z,{p:24,children:(0,H.jsx)(a,{fontSize:`$4`,color:`$ink`,children:s.message})});if(!i)return(0,H.jsx)(z,{p:24,gap:`$3`,"aria-busy":!0,"aria-label":`Loading timeline`,children:[0,1,2,3,4].map(e=>(0,H.jsx)(oC,{height:48},e))});let u=t?.length?i.filter(e=>e.priority&&t.includes(e.priority)):i,d=n?u.filter((e,t)=>t%2==0||u.length<=6):u;return d.length===0?(0,H.jsx)(z,{p:24,items:`flex-start`,children:(0,H.jsx)(KZ,{icon:Sp,title:`No issues on timeline`,description:`Scheduled issues and sprint milestones appear here across weeks.`})}):(0,H.jsx)(U_,{flex:1,minH:0,children:(0,H.jsx)(z,{p:24,gap:16,children:(0,H.jsxs)(z,{rounded:Q.card,borderWidth:1,borderColor:`$edge`,bg:`$background`,overflow:`hidden`,children:[(0,H.jsxs)(y,{bg:`$panel`,borderBottomWidth:1,borderColor:`$edge`,height:48,items:`center`,children:[(0,H.jsxs)(y,{width:280,shrink:0,px:16,items:`center`,justify:`space-between`,borderRightWidth:1,borderColor:`$edge`,height:`100%`,children:[(0,H.jsx)(a,{fontSize:Z.small,fontWeight:`700`,color:`$ink`,...OH,children:`Issue / Assignee`}),(0,H.jsxs)(a,{fontSize:Z.chip,color:`$soft`,children:[d.length,` tracked`]})]}),(0,H.jsx)(y,{flex:1,height:`100%`,children:S9.map(e=>(0,H.jsxs)(z,{flex:1,px:10,justify:`center`,borderRightWidth:1,borderColor:`$edge`,bg:`now`in e&&e.now?`$hover`:`transparent`,children:[(0,H.jsxs)(y,{items:`center`,gap:6,children:[`now`in e&&e.now?(0,H.jsx)(z,{width:6,height:6,rounded:9999,style:{backgroundColor:X.accent}}):null,(0,H.jsx)(a,{fontSize:Z.small,fontWeight:`600`,color:`now`in e&&e.now?`$ink`:`$soft`,children:e.label})]}),(0,H.jsx)(a,{fontSize:Z.chip,color:`$quiet`,children:e.sub})]},e.id))})]}),d.map((e,t)=>{let{start:n,span:i}=tse(e.status,t),o=n/S9.length*100,s=i/S9.length*100,c=Math.round((e.done??(e.status===`done`?1:.25))*100);return(0,H.jsxs)(z,{children:[t>0?(0,H.jsx)(Lc,{borderColor:`$edge`}):null,(0,H.jsxs)(y,{height:46,items:`center`,hoverStyle:{background:`$hover`},children:[(0,H.jsxs)(y,{width:280,shrink:0,px:16,gap:8,items:`center`,borderRightWidth:1,borderColor:`$edge`,height:`100%`,cursor:r?`pointer`:`default`,onPress:()=>r?.(e),children:[(0,H.jsx)(z,{width:8,height:8,rounded:9999,shrink:0,style:{backgroundColor:o9[e.status]}}),(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`600`,color:`$soft`,width:54,shrink:0,children:e.key}),(0,H.jsx)(a,{fontSize:Z.small,color:`$ink`,flex:1,numberOfLines:1,children:e.title}),(0,H.jsx)(p7,{people:e.people,size:20,show:1})]}),(0,H.jsxs)(y,{flex:1,height:`100%`,position:`relative`,items:`center`,children:[S9.map(e=>(0,H.jsx)(z,{flex:1,height:`100%`,borderRightWidth:1,borderColor:`$edge`,bg:`now`in e&&e.now?`$panel`:`transparent`},e.id)),(0,H.jsxs)(y,{...i5(()=>l(e),`${e.key} (${c}% done) — click to advance status`),position:`absolute`,style:{left:`${o+1}%`,width:`${s-2}%`},height:26,rounded:Q.field,bg:`$panel`,borderWidth:1,borderColor:`$edge`,overflow:`hidden`,items:`center`,px:8,justify:`space-between`,children:[(0,H.jsx)(z,{position:`absolute`,l:0,t:0,b:0,width:`${c}%`,opacity:.22,pointerEvents:`none`,style:{backgroundColor:o9[e.status]}}),(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`600`,color:`$ink`,numberOfLines:1,z:1,children:e.title}),(0,H.jsxs)(a,{fontSize:Z.chip,color:`$soft`,shrink:0,ml:6,z:1,children:[c,`%`]})]})]})]})]},e.id)})]})})})},rse=e=>v9.find(t=>t.id===e)?.id??`kanban`,C9=({mine:e=!1})=>{let{id:t,view:n}=Ci(),r=hoe(t),{standing:i}=eH(),a=X7(t)??g9(Q7(i)),o=a.add?.bind(a),s=Z7(t),[c,l]=(0,V.useState)([]),[u,d]=(0,V.useState)(null),[f,p]=(0,V.useState)([]),[m,h]=(0,V.useState)(null),g=rse(n);(0,V.useEffect)(()=>a.watch(e=>p(e),()=>{}),[a]);let _=u?f.find(e=>e.id===u)??null:null,v=e?`/mine`:t?`/projects/${t}/issues`:`/issues`,b=[{label:`Your projects`,to:`/projects`},...t?[{label:r?.name??`…`,to:v}]:[],{label:e?`My issues`:t?`Issues`:`All issues`}];return(0,H.jsxs)(z,{flex:1,minH:0,children:[(0,H.jsx)(Uoe,{trail:b,title:e?`My issues`:t?`Issues`:`All issues`,base:v,here:g,people:s,only:c,onOnly:l,onAdd:o?()=>h(`backlog`):void 0}),(0,H.jsxs)(y,{flex:1,minH:0,minW:0,children:[(0,H.jsx)(z,{flex:1,minH:0,minW:0,children:g===`kanban`?(0,H.jsx)(Moe,{source:a,only:c,onOpen:e=>d(e.id),onCreateIn:o?e=>h(e):void 0}):g===`list`?(0,H.jsx)(ese,{source:a,only:c,mine:e,onOpen:e=>d(e.id),onCreateIn:o?e=>h(e):void 0}):(0,H.jsx)(nse,{source:a,only:c,mine:e,onOpen:e=>d(e.id)})}),_?(0,H.jsx)(Xoe,{issue:_,source:a,people:s,onClose:()=>d(null)}):null]}),m&&o?(0,H.jsx)(Zoe,{initialStatus:m,people:s,onCreate:async(e,t,n)=>{await o(e,t,n)},onClose:()=>h(null)}):null]})};function ise(){let e=xi(),{current:t,standing:n}=eH(),r=$7(),i=X7()??g9(Q7(n)),o=Z7(),[s,c]=(0,V.useState)([]);(0,V.useEffect)(()=>i.watch(e=>c(e),()=>{}),[i]);let l=r.data??[];return(0,H.jsx)(U_,{flex:1,minH:0,children:(0,H.jsxs)(z,{p:24,gap:20,children:[(0,H.jsxs)(y,{items:`center`,justify:`space-between`,flexWrap:`wrap`,gap:12,children:[(0,H.jsxs)(z,{gap:4,children:[(0,H.jsxs)(a,{...OH,fontSize:Z.chip,fontWeight:`600`,color:`$soft`,children:[t?.name??`Hanzo AI`,` · Portfolio & Tracker`]}),(0,H.jsxs)(a,{fontSize:Z.title,fontWeight:`600`,color:`$ink`,children:[`All projects (`,l.length,`)`]}),(0,H.jsx)(a,{fontSize:Z.body,color:`$quiet`,children:`The projects in this space and the issues on their boards.`})]}),(0,H.jsxs)(y,{gap:8,items:`center`,children:[(0,H.jsx)(p7,{people:o,size:26,show:5}),(0,H.jsxs)(W,{onPress:()=>e(`/issues`),children:[`All Issues (`,s.length,`)`]})]})]}),(0,H.jsx)(y,{flexWrap:`wrap`,gap:16,children:l.map(t=>{let n=t.identifier.toUpperCase(),r=s.filter(e=>e.key.startsWith(`${n}-`)),i=r.length||t.sequence,o=r.filter(e=>e.status===`done`).length,c=r.filter(e=>e.status===`progress`).length,l=r.filter(e=>e.status===`todo`).length,u=r.filter(e=>e.status===`backlog`).length,d=r.length>0?o/r.length:0;return(0,H.jsxs)(z,{width:380,grow:1,p:20,rounded:Q.card,bg:`$background`,borderWidth:1,borderColor:`$edge`,gap:14,children:[(0,H.jsxs)(y,{items:`center`,justify:`space-between`,gap:10,children:[(0,H.jsxs)(y,{items:`center`,gap:10,children:[(0,H.jsx)(z,{width:36,height:36,rounded:Q.field,items:`center`,justify:`center`,bg:`$panel`,borderWidth:1,borderColor:`$edge`,children:(0,H.jsx)(Wp,{size:18,color:`$ink`})}),(0,H.jsxs)(z,{children:[(0,H.jsxs)(y,{items:`center`,gap:8,children:[(0,H.jsx)(a,{fontSize:Z.row,fontWeight:`600`,color:`$ink`,children:t.name}),(0,H.jsx)(y,{px:8,py:2,rounded:Q.pill,style:CH(t.identifier),children:(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,style:{color:CH(t.identifier).color},children:t.identifier})})]}),(0,H.jsxs)(a,{fontSize:Z.small,color:`$soft`,children:[r.length,` active issues · `,(t.members??[]).length,` members`]})]})]}),(0,H.jsxs)(y,{items:`center`,gap:6,children:[(0,H.jsx)(c9,{done:d,size:20,width:2.5}),(0,H.jsxs)(a,{fontSize:Z.small,fontWeight:`600`,color:`$ink`,children:[Math.round(d*100),`%`]})]})]}),(0,H.jsxs)(z,{gap:6,children:[(0,H.jsxs)(y,{height:6,rounded:Q.pill,bg:`$panel`,overflow:`hidden`,gap:2,children:[(0,H.jsx)(z,{flex:Math.max(1,o),style:{backgroundColor:bH.done}}),(0,H.jsx)(z,{flex:Math.max(1,c),style:{backgroundColor:bH.doing}}),(0,H.jsx)(z,{flex:Math.max(1,l),style:{backgroundColor:bH.todo}}),(0,H.jsx)(z,{flex:Math.max(1,u),style:{backgroundColor:bH.backlog}})]}),(0,H.jsxs)(y,{justify:`space-between`,flexWrap:`wrap`,gap:8,children:[(0,H.jsxs)(a,{fontSize:Z.chip,color:`$quiet`,children:[`Backlog: `,u]}),(0,H.jsxs)(a,{fontSize:Z.chip,color:`$quiet`,children:[`To do: `,l]}),(0,H.jsxs)(a,{fontSize:Z.chip,color:`$quiet`,children:[`In progress: `,c]}),(0,H.jsxs)(a,{fontSize:Z.chip,color:`$quiet`,children:[`Done: `,o,` / `,i]})]})]}),(0,H.jsxs)(y,{items:`center`,justify:`space-between`,flexWrap:`wrap`,gap:8,children:[(0,H.jsx)(y,{gap:6,flexWrap:`wrap`,children:[[`issues`,`Board`],[`issues/list`,`List`],[`issues/timeline`,`Timeline`]].map(([n,r])=>(0,H.jsx)(y,{...i5(()=>e(`/projects/${t._id}/${n}`),`${t.name} ${r}`),px:10,py:5,rounded:Q.field,bg:`$panel`,borderWidth:1,borderColor:`$edge`,hoverStyle:{background:`$hover`},children:(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`600`,color:`$soft`,children:r})},n))}),(0,H.jsx)(W,{size:`sm`,onPress:()=>e(`/projects/${t._id}/issues`),children:`Open Board →`})]})]},t._id)})})]})})}var ase=(0,V.lazy)(()=>Le(()=>import(`./Bots-CkMBi-Ni.js`).then(e=>({default:e.Bots})),__vite__mapDeps([6,1,2,7,3,4]))),w9=()=>{let{id:e}=Ci();return(0,H.jsx)(Gi,{to:e?`/projects/${e}/issues`:`/projects`,replace:!0})},T9=()=>(0,H.jsx)(Gi,{to:`/chat`,replace:!0}),E9=e=>(0,H.jsx)(y5,{nav:(0,H.jsx)(roe,{}),aside:(0,H.jsx)(L5,{}),children:e}),D9=e=>(0,H.jsx)(y5,{nav:(0,H.jsx)(jae,{}),aside:(0,H.jsx)(iae,{}),children:e}),ose=[{path:`/`,element:(0,H.jsx)(T9,{})},{path:`/login`,element:(0,H.jsx)(T9,{})},{path:`/auth`,element:(0,H.jsx)(T9,{})},{path:`/auth/callback`,element:(0,H.jsx)(T9,{})},{path:`/issues`,element:E9((0,H.jsx)(C9,{}))},{path:`/issues/:view`,element:E9((0,H.jsx)(C9,{}))},{path:`/mine`,element:E9((0,H.jsx)(C9,{mine:!0}))},{path:`/mine/:view`,element:E9((0,H.jsx)(C9,{mine:!0}))},{path:`/projects`,element:E9((0,H.jsx)(ise,{}))},{path:`/projects/:id`,element:(0,H.jsx)(w9,{})},{path:`/projects/:id/issues`,element:E9((0,H.jsx)(C9,{}))},{path:`/projects/:id/issues/:view`,element:E9((0,H.jsx)(C9,{}))},{path:`/projects/:id/:page`,element:(0,H.jsx)(w9,{})},{path:`/chat`,element:D9((0,H.jsx)(m7,{}))},{path:`/chat/:id`,element:D9((0,H.jsx)(m7,{}))},{path:`/bots`,element:(0,H.jsx)(y5,{nav:null,children:(0,H.jsx)(V.Suspense,{fallback:null,children:(0,H.jsx)(ase,{})})})},{path:`/crm`,element:(0,H.jsx)(Gi,{to:`/crm/investors`,replace:!0})},{path:`/crm/:section`,element:(e=>(0,H.jsx)(y5,{nav:(0,H.jsx)(Uae,{}),children:e}))((0,H.jsx)(Yae,{}))},{path:`/overview`,element:(0,H.jsx)(Gi,{to:`/chat`,replace:!0})},{path:`/agents`,element:(0,H.jsx)(Gi,{to:`/chat`,replace:!0})},{path:`/agents/:id`,element:(0,H.jsx)(Gi,{to:`/chat`,replace:!0})},{path:`/apps`,element:(0,H.jsx)(Gi,{to:`/chat`,replace:!0})},{path:`/apps/:appId`,element:(0,H.jsx)(Gi,{to:`/chat`,replace:!0})},{path:`/calendar`,element:(0,H.jsx)(Gi,{to:`/chat`,replace:!0})},{path:`/cal`,element:(0,H.jsx)(Gi,{to:`/chat`,replace:!0})},{path:`/time`,element:(0,H.jsx)(Gi,{to:`/chat`,replace:!0})},{path:`/meet`,element:(0,H.jsx)(Gi,{to:`/chat`,replace:!0})},{path:`/inbox`,element:(0,H.jsx)(Gi,{to:`/chat`,replace:!0})},{path:`/docs`,element:(0,H.jsx)(Gi,{to:`/chat`,replace:!0})},{path:`/files`,element:(0,H.jsx)(Gi,{to:`/chat`,replace:!0})},{path:`/mail`,element:(0,H.jsx)(Gi,{to:`/chat`,replace:!0})},{path:`/admin`,element:(0,H.jsx)(Gi,{to:`/chat`,replace:!0})},{path:`/settings`,element:(0,H.jsx)(Gi,{to:`/chat`,replace:!0})},{path:`/people`,element:(0,H.jsx)(Gi,{to:`/crm/investors`,replace:!0})},{path:`*`,element:(0,H.jsx)(Gi,{to:`/chat`,replace:!0})}],sse=()=>{let{land:e,depart:t}=dV(),[n,r]=(0,V.useState)(null),i=`Hanzo ${PB.title}`;return(0,V.useEffect)(()=>{document.title=`${n?`Sign in`:`Signing you in`} — ${i}`},[n,i]),(0,V.useEffect)(()=>{e().then(e=>window.location.replace(e)).catch(e=>r(e instanceof Error?e.message:String(e)))},[e]),(0,H.jsxs)(z,{flex:1,minH:`100vh`,bg:X.ground,children:[(0,H.jsxs)(y,{width:`100%`,minH:68,px:DH.wide,py:DH.tight,items:`center`,justify:`space-between`,borderBottomWidth:1,borderColor:X.rule,bg:X.ground,children:[(0,H.jsx)(y,{items:`center`,gap:DH.tight,cursor:`pointer`,shrink:0,onPress:()=>window.location.replace(`/`),children:(0,H.jsx)(a,{size:Z.row,color:X.ink,fontWeight:`600`,children:i})}),(0,H.jsx)(W,{size:`sm`,variant:`outline`,rounded:Q.pill,onPress:()=>window.location.replace(`/`),children:(0,H.jsx)(a,{size:Z.small,color:X.ink,fontWeight:`500`,children:`← Back to ${i}`})})]}),(0,H.jsx)(z,{flex:1,items:`center`,justify:`center`,gap:DH.inset,px:DH.wide,children:n?(0,H.jsxs)(z,{maxW:440,items:`center`,gap:DH.inset,children:[(0,H.jsx)(a,{size:Z.title,color:X.ink,fontWeight:`600`,style:{textAlign:`center`},children:`Couldn’t finish signing in`}),(0,H.jsx)(a,{size:Z.body,color:X.mute,style:{textAlign:`center`},children:n}),(0,H.jsxs)(y,{items:`center`,justify:`center`,gap:DH.tight,flexWrap:`wrap`,pt:DH.tight,children:[(0,H.jsx)(W,{rounded:Q.pill,bg:X.ink,onPress:()=>{t(`login`)},children:(0,H.jsx)(a,{size:Z.small,color:X.ground,fontWeight:`600`,children:`Try again`})}),(0,H.jsx)(W,{variant:`outline`,rounded:Q.pill,onPress:()=>window.location.replace(`/`),children:(0,H.jsx)(a,{size:Z.small,color:X.ink,fontWeight:`500`,children:`Back to ${i}`})})]})]}):(0,H.jsxs)(z,{items:`center`,gap:DH.tight,children:[(0,H.jsx)(tv,{}),(0,H.jsx)(a,{size:Z.body,color:X.ink,fontWeight:`500`,children:`Signing you in to ${i}…`})]})})]})},O9=[{id:`chat`,label:`Chat`,scene:0},{id:`projects`,label:`Projects`,scene:1},{id:`tasks`,label:`Tasks`,scene:1},{id:`crm`,label:`CRM`,scene:2},{id:`docs`,label:`Docs`,scene:2}],cse=[`bugfix`,`engineering`,`launch`,`security`,`ops`],k9=`PR #418`,lse=[{name:`Dev`,role:k9,hue:`var(--pv-blue)`},{name:`Sci`,role:`42/42 E2E`,hue:`var(--pv-green)`},{name:`Mark`,role:`v2.4.1`,hue:`var(--pv-amber)`},{name:`Opera`,role:`us-west`,hue:`var(--pv-violet)`}],A9=[{name:`Dev`,domain:`Engineering`,sandbox:`sbx-eng-01`,task:`Merged ${k9} · release PaySheet lock`,badge:`+14 −3`,hue:`var(--pv-blue)`},{name:`Sci`,domain:`QA & Eval`,sandbox:`sbx-webkit-02`,task:`iOS 18.2 Safari checkout suite green`,badge:`42/42 PASS`,hue:`var(--pv-green)`},{name:`Cyber`,domain:`Security`,sandbox:`sbx-sec-03`,task:`Diff & webhook signature audit clean`,badge:`0 CVEs`,hue:`var(--pv-rose)`},{name:`Mark`,domain:`Growth`,sandbox:`sbx-mkt-04`,task:`Drafted release note for #launch`,badge:`READY`,hue:`var(--pv-amber)`},{name:`Opera`,domain:`Infra & SRE`,sandbox:`sbx-sre-05`,task:`Canary rollout 100% healthy · 18ms p95`,badge:`LIVE`,hue:`var(--pv-violet)`},{name:`Fin`,domain:`Revenue Ops`,sandbox:`sbx-fin-06`,task:`Apple Pay settlement ledger reconciled`,badge:`$0 DRIFT`,hue:`var(--pv-green)`}],use=[{id:0,label:`Chat · #engineering`,short:`Chat`},{id:1,label:`Projects · Board`,short:`Projects`},{id:2,label:`Agents · Live Ops`,short:`Live Ops`}];function j9({pct:e,color:t}){let n=2*Math.PI*6,r=n*(1-Math.max(0,Math.min(100,e))/100);return(0,H.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,style:{flexShrink:0,transform:`rotate(-90deg)`},children:[(0,H.jsx)(`circle`,{cx:`8`,cy:`8`,r:6,fill:`none`,stroke:`var(--pv-rule-strong)`,strokeWidth:`2`}),(0,H.jsx)(`circle`,{cx:`8`,cy:`8`,r:6,fill:`none`,stroke:t,strokeWidth:`2`,strokeDasharray:n,strokeDashoffset:r,strokeLinecap:`round`,style:{transition:`stroke-dashoffset 0.55s ease`}})]})}function dse({x:e,y:t,label:n}){return(0,H.jsxs)(`div`,{className:`hz-pv-cursor`,style:{transform:`translate3d(${e}px, ${t}px, 0)`},children:[(0,H.jsx)(`svg`,{width:`13`,height:`15`,viewBox:`0 0 14 16`,fill:`none`,children:(0,H.jsx)(`path`,{d:`M1.5 1.2L12.4 7.1L7.3 8.6L4.9 13.7L1.5 1.2Z`,fill:`var(--pv-ink)`,stroke:`var(--pv-bar)`,strokeWidth:`1.2`,strokeLinejoin:`round`})}),(0,H.jsx)(`span`,{className:`hz-pv-cursor-tag`,children:n})]})}var fse=()=>{let e=(0,V.useRef)(null),[t,n]=(0,V.useState)(680),[r,i]=(0,V.useState)(0),[a,o]=(0,V.useState)(2),[s,c]=(0,V.useState)(`engineering`),[l,u]=(0,V.useState)(!1);(0,V.useEffect)(()=>{let t=e.current;if(!t)return;let r=()=>{let e=t.getBoundingClientRect().width;e>0&&n(e)};r();let i=new ResizeObserver(r);return i.observe(t),()=>i.disconnect()},[]),(0,V.useEffect)(()=>{if(l)return;let e=window.setInterval(()=>{o(e=>e<3?e+1:(i(e=>(e+1)%3),0))},1650);return()=>window.clearInterval(e)},[l]);let d=e=>{i(e),o(2)},f=t>=540,p=f?640:500,m=f?400:336,h=f?540:412,g=f?338:284,_=f?184:156,v=f?348:292,y=Math.max(.45,Math.min(1.16,t/p)),b=Math.round(m*y),x=r===0?a===0?{x:f?248:124,y:108,label:`◆ Dev`}:a===1?{x:f?316:186,y:184,label:`◆ Dev`}:a===2?{x:f?298:174,y:238,label:`◆ Sci`}:{x:f?344:196,y:g-28,label:`◆ Zoe`}:r===1?a<=1?{x:f?336:188,y:158,label:`◆ Dev`}:{x:f?378:218,y:132,label:`◆ Dev`}:{x:(f?204:84)+a%3*(f?82:68),y:a<2?126:212,label:a%2==0?`◆ Opera`:`◆ Sci`},S=r===1&&a>=2,C=r===1?a===0?76:a===1?84:a===2?94:100:94;return(0,H.jsxs)(`div`,{style:{width:`100%`,maxWidth:740},onPointerEnter:()=>u(!0),onPointerLeave:()=>u(!1),children:[(0,H.jsx)(`div`,{ref:e,className:`hz-pv-host`,style:{height:b},children:(0,H.jsxs)(`div`,{className:`hz-pv-stage`,style:{width:p,height:m,transform:`scale(${y})`},children:[(0,H.jsxs)(`div`,{className:`hz-pv-desk`,style:{width:h,height:g},children:[(0,H.jsxs)(`div`,{className:`hz-pv-topbar`,children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:7},children:[(0,H.jsxs)(`div`,{className:`hz-pv-traffic`,children:[(0,H.jsx)(`span`,{className:`hz-pv-dot`,style:{background:`var(--pv-dot-red)`}}),(0,H.jsx)(`span`,{className:`hz-pv-dot`,style:{background:`var(--pv-dot-yellow)`}}),(0,H.jsx)(`span`,{className:`hz-pv-dot`,style:{background:`var(--pv-dot-green)`}})]}),(0,H.jsx)(`span`,{style:{color:`var(--pv-mute)`,display:`inline-flex`},children:(0,H.jsx)(fm,{size:12,color:`var(--pv-mute)`})}),(0,H.jsxs)(`span`,{className:`hz-pv-pill`,children:[(0,H.jsx)(`span`,{className:`hz-pv-live-dot`}),(0,H.jsx)(`span`,{children:`hanzo.team`})]})]}),(0,H.jsx)(`div`,{className:`hz-pv-tabs`,role:`tablist`,"aria-label":`Hanzo Team preview surfaces`,children:(f?O9:O9.slice(0,4)).map(e=>{let t=e.id===`chat`&&r===0||e.id===`projects`&&r===1||e.id===`crm`&&r===2;return(0,H.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":t,className:`hz-pv-tab`,"data-active":t?`true`:`false`,onClick:()=>d(e.scene),children:e.label},e.id)})})]}),(0,H.jsxs)(`div`,{className:`hz-pv-body`,children:[(0,H.jsxs)(`div`,{className:`hz-pv-rail`,children:[(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:4},children:[(0,H.jsx)(`button`,{type:`button`,"aria-label":`Hanzo AI organization`,onClick:()=>d(0),style:{width:22,height:22,borderRadius:6,border:0,background:`var(--pv-ink)`,color:`var(--pv-bar)`,fontSize:10,fontWeight:800,cursor:`pointer`,marginBottom:2},children:`H`}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`Chat channels`,className:`hz-pv-rail-btn`,"data-active":r===0?`true`:`false`,onClick:()=>d(0),children:(0,H.jsx)(cm,{size:13,color:r===0?`var(--pv-ink)`:`var(--pv-mute)`})}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`Project boards`,className:`hz-pv-rail-btn`,"data-active":r===1?`true`:`false`,onClick:()=>d(1),children:(0,H.jsx)(Tm,{size:13,color:r===1?`var(--pv-ink)`:`var(--pv-mute)`})}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`Activity inbox`,className:`hz-pv-rail-btn`,"data-active":`false`,onClick:()=>d(0),children:(0,H.jsx)(_p,{size:13,color:`var(--pv-mute)`})}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`Workspace docs`,className:`hz-pv-rail-btn`,"data-active":`false`,onClick:()=>d(1),children:(0,H.jsx)(Up,{size:13,color:`var(--pv-mute)`})}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`AI Teammates`,className:`hz-pv-rail-btn`,"data-active":r===2?`true`:`false`,onClick:()=>d(2),children:(0,H.jsx)(vp,{size:13,color:r===2?`var(--pv-ink)`:`var(--pv-mute)`})})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:5},children:[(0,H.jsx)(`span`,{className:`hz-pv-rail-btn`,"aria-hidden":`true`,children:(0,H.jsx)(ym,{size:12,color:`var(--pv-mute)`})}),(0,H.jsxs)(`div`,{style:{position:`relative`,width:20,height:20,borderRadius:999,background:`var(--pv-send)`,color:`var(--pv-ink)`,fontSize:8,fontWeight:700,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[`ZK`,(0,H.jsx)(`span`,{style:{position:`absolute`,right:-1,bottom:-1,width:6,height:6,borderRadius:999,background:`var(--pv-green)`,border:`1.5px solid var(--pv-rail)`}})]})]})]}),f?(0,H.jsxs)(`div`,{className:`hz-pv-sidebar`,children:[(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:[(0,H.jsx)(`div`,{className:`hz-pv-sec-head`,children:`Channels`}),cse.map(e=>{let t=r===0&&s===e;return(0,H.jsxs)(`button`,{type:`button`,className:`hz-pv-nav-row`,"data-active":t?`true`:`false`,onClick:()=>{c(e),d(0)},children:[(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:4,minWidth:0},children:[(0,H.jsx)(Yp,{size:10,color:t?`var(--pv-ink)`:`var(--pv-mute)`}),(0,H.jsx)(`span`,{style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e})]}),e===`engineering`?(0,H.jsx)(`span`,{style:{fontSize:7.5,fontWeight:700,padding:`1px 4px`,borderRadius:999,background:`var(--pv-send)`,color:`var(--pv-ink)`},children:`3`}):null]},e)})]}),(0,H.jsx)(`div`,{style:{height:1,background:`var(--pv-rule)`}}),(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:[(0,H.jsx)(`div`,{className:`hz-pv-sec-head`,children:`Teammates`}),lse.map(e=>(0,H.jsxs)(`button`,{type:`button`,className:`hz-pv-nav-row`,"data-active":r===2&&e.name===`Dev`?`true`:`false`,onClick:()=>d(2),children:[(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:5},children:[(0,H.jsx)(`span`,{className:`hz-pv-live-dot`}),(0,H.jsx)(`span`,{children:e.name})]}),(0,H.jsx)(`span`,{style:{fontSize:7.5,color:`var(--pv-dim)`},children:e.role})]},e.name))]})]}):null,(0,H.jsxs)(`div`,{className:`hz-pv-main`,children:[r===0?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`hz-pv-pane-head`,children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,minWidth:0},children:[(0,H.jsx)(Yp,{size:12,color:`var(--pv-mute)`}),(0,H.jsx)(`span`,{style:{fontSize:10.5,fontWeight:600},children:s}),(0,H.jsx)(`span`,{style:{fontSize:8.5,color:`var(--pv-dim)`,whiteSpace:`nowrap`},children:`· Checkout & Apple Pay`})]}),(0,H.jsx)(`span`,{style:{marginRight:f?78:98,fontSize:8,fontWeight:600,padding:`2px 6px`,borderRadius:999,background:`var(--pv-green-bg)`,border:`1px solid var(--pv-green-edge)`,color:`var(--pv-green)`,flexShrink:0},children:`Agents active`})]}),(0,H.jsxs)(`div`,{style:{flex:1,padding:`8px 11px 6px`,paddingRight:f?96:122,display:`flex`,flexDirection:`column`,gap:7,overflow:`hidden`},children:[(0,H.jsxs)(`div`,{className:`hz-pv-rise`,style:{display:`flex`,gap:7,alignItems:`flex-start`},children:[(0,H.jsx)(`div`,{style:{width:20,height:20,borderRadius:999,background:`var(--pv-amber)`,color:`var(--pv-bar)`,fontSize:9,fontWeight:800,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0},children:`Z`}),(0,H.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:5,marginBottom:2},children:[(0,H.jsx)(`span`,{style:{fontSize:9.5,fontWeight:600},children:`Zoe`}),(0,H.jsx)(`span`,{style:{fontSize:7.5,color:`var(--pv-dim)`},children:`9:40 AM`})]}),(0,H.jsxs)(`div`,{style:{display:`inline-block`,padding:`5px 9px`,borderRadius:9,background:`var(--pv-bubble)`,color:`var(--pv-bubble-ink)`,fontSize:9.2,lineHeight:1.35,maxWidth:f?`92%`:`88%`},children:[(0,H.jsx)(`span`,{style:{color:`var(--pv-amber)`,fontWeight:600},children:`@Dev`}),` Checkout fails on mobile Safari when Apple Pay closes early.`]})]})]}),a>=1?(0,H.jsxs)(`div`,{className:`hz-pv-rise`,style:{display:`flex`,gap:7,alignItems:`flex-start`},children:[(0,H.jsx)(`div`,{style:{width:20,height:20,borderRadius:999,background:`var(--pv-blue)`,color:`var(--pv-bar)`,fontSize:9,fontWeight:800,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0},children:`D`}),(0,H.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:5,marginBottom:2},children:[(0,H.jsx)(`span`,{style:{fontSize:9.5,fontWeight:600},children:`Dev`}),(0,H.jsx)(`span`,{style:{fontSize:7.5,padding:`0.5px 4px`,borderRadius:4,background:`var(--pv-card)`,border:`1px solid var(--pv-rule-strong)`,color:`var(--pv-mute)`},children:`Agent`})]}),(0,H.jsxs)(`div`,{style:{fontSize:9,color:`var(--pv-mute)`,lineHeight:1.32},children:[`PaySheet mutex stayed locked on cancel. Opened PR and linked`,` `,(0,H.jsx)(`span`,{style:{color:`var(--pv-ink)`,fontWeight:600},children:`TEAM-142`}),`:`]}),(0,H.jsxs)(`div`,{style:{marginTop:4,padding:`4.5px 7px`,borderRadius:7,background:`var(--pv-card)`,border:`1px solid var(--pv-rule-strong)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:6,maxWidth:f?`86%`:`76%`},children:[(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:5,fontSize:8.5,fontWeight:600,minWidth:0},children:[(0,H.jsx)(Kp,{size:11,color:`var(--pv-green)`}),(0,H.jsx)(`span`,{style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:`${k9} · fix(checkout): release PaySheet lock`})]}),(0,H.jsx)(`span`,{style:{fontSize:8,color:`var(--pv-green)`,fontWeight:700,flexShrink:0},children:`+14 −3`})]})]})]}):(0,H.jsxs)(`div`,{className:`hz-pv-rise`,style:{display:`flex`,alignItems:`center`,gap:6,paddingLeft:27,paddingTop:4},children:[(0,H.jsx)(`span`,{className:`hz-pv-live-dot`}),(0,H.jsx)(`span`,{style:{fontSize:8.8,color:`var(--pv-mute)`},children:`Dev is inspecting checkout/pay-sheet.ts…`})]}),a>=2?(0,H.jsxs)(`div`,{className:`hz-pv-rise`,style:{display:`flex`,gap:7,alignItems:`flex-start`},children:[(0,H.jsx)(`div`,{style:{width:20,height:20,borderRadius:999,background:`var(--pv-green)`,color:`var(--pv-bar)`,fontSize:9,fontWeight:800,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0},children:`S`}),(0,H.jsxs)(`div`,{style:{flex:1,minWidth:0,display:`flex`,alignItems:`center`,gap:6,flexWrap:`wrap`},children:[(0,H.jsx)(`span`,{style:{fontSize:9.2,fontWeight:600},children:`Sci`}),(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:3,fontSize:8,fontWeight:700,padding:`2px 6px`,borderRadius:5,background:`var(--pv-green-bg)`,border:`1px solid var(--pv-green-edge)`,color:`var(--pv-green)`},children:[(0,H.jsx)(Vt,{size:9,color:`var(--pv-green)`}),`42/42 E2E GREEN`]}),(0,H.jsx)(`span`,{style:{fontSize:8.5,color:`var(--pv-mute)`},children:`WebKit iOS 18.2 verified`})]})]}):null]}),(0,H.jsxs)(`div`,{className:`hz-pv-composer`,style:{marginRight:f?92:118},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,minWidth:0},children:[(0,H.jsx)(hm,{size:11,color:`var(--pv-mute)`}),(0,H.jsx)(`span`,{style:{fontSize:8.8,color:a===3?`var(--pv-ink)`:`var(--pv-mute)`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:a===3?(0,H.jsxs)(H.Fragment,{children:[`@Opera deploy v2.4.1 to prod`,(0,H.jsx)(`span`,{className:`hz-pv-caret`})]}):`Message #${s}`})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,flexShrink:0},children:[(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:3,fontSize:7.8,fontWeight:600,color:`var(--pv-warn)`},children:[(0,H.jsx)(sp,{size:9,color:`var(--pv-warn)`}),`Full access`]}),(0,H.jsx)(`span`,{className:`hz-pv-send`,children:(0,H.jsx)(gp,{size:11,color:`var(--pv-ink)`})})]})]})]}):null,r===1?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`hz-pv-pane-head`,children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,H.jsx)(Tm,{size:12,color:`var(--pv-blue)`}),(0,H.jsx)(`span`,{style:{fontSize:10.5,fontWeight:600},children:`Projects · Cycle 18`}),(0,H.jsx)(`span`,{style:{fontSize:8.5,color:`var(--pv-dim)`},children:`4 columns`})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:5,paddingRight:f?78:96},children:[(0,H.jsx)(j9,{pct:C,color:`var(--pv-green)`}),(0,H.jsxs)(`span`,{style:{fontSize:8.5,fontWeight:700,color:`var(--pv-ink)`},children:[C,`%`]})]})]}),(0,H.jsxs)(`div`,{style:{flex:1,padding:`8px 9px`,paddingRight:f?92:118,display:`grid`,gridTemplateColumns:`repeat(4, minmax(0, 1fr))`,gap:6,overflow:`hidden`},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:5},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,H.jsx)(`span`,{className:`hz-pv-dot`,style:{width:6,height:6,background:`var(--pv-amber)`}}),(0,H.jsx)(`span`,{style:{fontSize:8,fontWeight:700,color:`var(--pv-mute)`},children:`Backlog`})]}),(0,H.jsx)(M9,{code:`TEAM-151`,title:`Webhook retry jitter`,agent:`O`,hue:`var(--pv-violet)`,pct:25})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:5},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,H.jsx)(`span`,{className:`hz-pv-dot`,style:{width:6,height:6,background:`var(--pv-mute)`}}),(0,H.jsx)(`span`,{style:{fontSize:8,fontWeight:700,color:`var(--pv-mute)`},children:`To Do`})]}),(0,H.jsx)(M9,{code:`TEAM-148`,title:`Apple Pay telemetry`,agent:`M`,hue:`var(--pv-amber)`,pct:40})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:5},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,H.jsx)(`span`,{className:`hz-pv-dot`,style:{width:6,height:6,background:`var(--pv-blue)`}}),(0,H.jsx)(`span`,{style:{fontSize:8,fontWeight:700,color:`var(--pv-ink)`},children:`In Progress`})]}),(0,H.jsx)(M9,{code:`TEAM-145`,title:`Stripe 3DS fallback`,agent:`S`,hue:`var(--pv-green)`,pct:a>=1?82:64}),S?null:(0,H.jsx)(M9,{code:`TEAM-142`,title:`Release PaySheet lock`,agent:`D`,hue:`var(--pv-blue)`,pct:a===0?68:92,highlight:!0})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:5},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,H.jsx)(`span`,{className:`hz-pv-dot`,style:{width:6,height:6,background:`var(--pv-green)`}}),(0,H.jsx)(`span`,{style:{fontSize:8,fontWeight:700,color:`var(--pv-green)`},children:`Done`})]}),S?(0,H.jsx)(M9,{code:`TEAM-142`,title:`Release PaySheet lock`,agent:`D`,hue:`var(--pv-green)`,pct:100,done:!0,highlight:!0}):null,(0,H.jsx)(M9,{code:`TEAM-139`,title:`Unified SSO cookie`,agent:`C`,hue:`var(--pv-rose)`,pct:100,done:!0})]})]})]}):null,r===2?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`hz-pv-pane-head`,children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,H.jsx)(wm,{size:12,color:`var(--pv-amber)`}),(0,H.jsx)(`span`,{style:{fontSize:10.5,fontWeight:600},children:`Agents · Live Ops`}),(0,H.jsx)(`span`,{style:{fontSize:8.5,color:`var(--pv-dim)`},children:`6 teammates online`})]}),(0,H.jsx)(`span`,{style:{marginRight:f?78:96,fontSize:7.8,fontWeight:700,color:`var(--pv-green)`},children:`Sandboxes healthy`})]}),(0,H.jsx)(`div`,{style:{flex:1,padding:`8px 10px 6px`,paddingRight:f?92:118,display:`grid`,gridTemplateColumns:`repeat(3, minmax(0, 1fr))`,gap:6,alignContent:`start`},children:A9.map((e,t)=>{let n=t===a||a===3&&t===4;return(0,H.jsxs)(`div`,{className:`hz-pv-rise`,style:{padding:`6px 7px`,borderRadius:8,background:n?`var(--pv-card-hi)`:`var(--pv-card)`,border:n?`1px solid var(--pv-blue)`:`1px solid var(--pv-rule-strong)`,display:`flex`,flexDirection:`column`,gap:3.5,transition:`border-color 0.2s ease, background-color 0.2s ease`},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:4},children:[(0,H.jsx)(`span`,{style:{width:14,height:14,borderRadius:999,background:e.hue,color:`var(--pv-bar)`,fontSize:7.5,fontWeight:800,display:`inline-flex`,alignItems:`center`,justifyContent:`center`},children:e.name[0]}),(0,H.jsx)(`span`,{style:{fontSize:8.8,fontWeight:700},children:e.name})]}),(0,H.jsx)(`span`,{className:`hz-pv-live-dot`})]}),(0,H.jsx)(`div`,{style:{fontSize:7.6,color:`var(--pv-mute)`,lineHeight:1.28,display:`-webkit-box`,WebkitLineClamp:2,WebkitBoxOrient:`vertical`,overflow:`hidden`},children:e.task}),(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginTop:`auto`,paddingTop:1},children:[(0,H.jsx)(`span`,{style:{fontSize:7,color:`var(--pv-dim)`},children:e.sandbox}),(0,H.jsx)(`span`,{style:{fontSize:7,fontWeight:700,color:e.hue},children:e.badge})]})]},e.name)})}),(0,H.jsxs)(`div`,{style:{margin:`0 10px 8px`,marginRight:f?92:118,padding:`4.5px 8px`,borderRadius:7,background:`var(--pv-bar)`,border:`1px solid var(--pv-rule)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,fontSize:8,color:`var(--pv-mute)`},children:[(0,H.jsx)(`span`,{children:`Handoff: #engineering → @Dev → @Sci → @Opera`}),(0,H.jsx)(`span`,{style:{color:`var(--pv-green)`,fontWeight:700},children:`v2.4.1 live · 48s`})]})]}):null]})]}),(0,H.jsx)(dse,{x:x.x,y:x.y,label:x.label})]}),(0,H.jsx)(`div`,{className:`hz-pv-phone`,style:{width:_,height:v},children:(0,H.jsxs)(`div`,{className:`hz-pv-phone-screen`,children:[(0,H.jsxs)(`div`,{className:`hz-pv-phone-status`,children:[(0,H.jsx)(`span`,{children:`9:41`}),(0,H.jsx)(`div`,{className:`hz-pv-island`,children:(0,H.jsx)(`span`,{className:`hz-pv-island-lens`})}),(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:3},children:[(0,H.jsx)(Rm,{size:8.5,color:`var(--pv-ink)`}),(0,H.jsx)(`span`,{style:{width:12,height:6.5,borderRadius:2,border:`1px solid var(--pv-mute)`,padding:1,display:`inline-flex`},children:(0,H.jsx)(`span`,{style:{flex:1,background:`var(--pv-green)`,borderRadius:.5}})})]})]}),(0,H.jsxs)(`div`,{style:{height:25,padding:`0 9px`,borderBottom:`1px solid var(--pv-rule)`,background:`var(--pv-bar)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,flexShrink:0},children:[(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:4,fontSize:8.5,fontWeight:700},children:[(0,H.jsx)(`span`,{style:{width:13,height:13,borderRadius:4,background:`var(--pv-ink)`,color:`var(--pv-bar)`,fontSize:7.5,fontWeight:800,display:`inline-flex`,alignItems:`center`,justifyContent:`center`},children:`H`}),(0,H.jsx)(`span`,{children:r===0?`#${s}`:r===1?`Projects`:`Live Ops`})]}),(0,H.jsx)(`span`,{className:`hz-pv-live-dot`})]}),(0,H.jsxs)(`div`,{style:{flex:1,minHeight:0,background:`var(--pv-canvas)`,padding:`7px 8px`,display:`flex`,flexDirection:`column`,gap:6,overflow:`hidden`},children:[r===0?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{style:{alignSelf:`flex-end`,padding:`5px 7px`,borderRadius:`9px 9px 3px 9px`,background:`var(--pv-bubble)`,color:`var(--pv-bubble-ink)`,fontSize:7.8,lineHeight:1.32,maxWidth:`92%`},children:`@Dev Safari Apple Pay closes early on checkout`}),a>=1?(0,H.jsxs)(`div`,{className:`hz-pv-rise`,style:{padding:`5px 7px`,borderRadius:8,background:`var(--pv-card)`,border:`1px solid var(--pv-rule-strong)`,display:`flex`,flexDirection:`column`,gap:3},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{style:{fontSize:7.8,fontWeight:700,color:`var(--pv-blue)`},children:`◆ Dev`}),(0,H.jsx)(`span`,{style:{fontSize:7,color:`var(--pv-green)`,fontWeight:700},children:`+14 −3`})]}),(0,H.jsx)(`div`,{style:{fontSize:7.5,color:`var(--pv-ink)`},children:`${k9} · Release PaySheet lock`})]}):(0,H.jsx)(`div`,{style:{fontSize:7.5,color:`var(--pv-mute)`},children:`◆ Dev is fixing PaySheet…`}),a>=2?(0,H.jsxs)(`div`,{className:`hz-pv-rise`,style:{padding:`4px 7px`,borderRadius:7,background:`var(--pv-green-bg)`,border:`1px solid var(--pv-green-edge)`,color:`var(--pv-green)`,fontSize:7.5,fontWeight:700,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{children:`◆ Sci · 42/42 E2E`}),(0,H.jsx)(`span`,{children:`GREEN`})]}):null]}):null,r===1?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{style:{fontSize:7.5,color:`var(--pv-mute)`,fontWeight:600},children:`Cycle 18 Sprint`}),(0,H.jsxs)(`span`,{style:{fontSize:7.8,color:`var(--pv-green)`,fontWeight:700},children:[C,`%`]})]}),(0,H.jsxs)(`div`,{style:{padding:`5.5px 7px`,borderRadius:8,background:`var(--pv-card-hi)`,border:S?`1px solid var(--pv-green)`:`1px solid var(--pv-blue)`,display:`flex`,flexDirection:`column`,gap:3},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{style:{fontSize:7.2,color:`var(--pv-dim)`,fontWeight:700},children:`TEAM-142`}),(0,H.jsx)(`span`,{style:{fontSize:6.8,fontWeight:700,color:S?`var(--pv-green)`:`var(--pv-blue)`},children:S?`✓ Done`:`In Progress`})]}),(0,H.jsx)(`div`,{style:{fontSize:7.8,fontWeight:600},children:`Release PaySheet lock`})]}),(0,H.jsxs)(`div`,{style:{padding:`5px 7px`,borderRadius:8,background:`var(--pv-card)`,border:`1px solid var(--pv-rule)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{style:{fontSize:7.5},children:`TEAM-145 · 3DS`}),(0,H.jsx)(`span`,{style:{fontSize:7,color:`var(--pv-mute)`},children:`82%`})]}),(0,H.jsxs)(`div`,{style:{padding:`5px 7px`,borderRadius:8,background:`var(--pv-card)`,border:`1px solid var(--pv-rule)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{style:{fontSize:7.5},children:`TEAM-139 · SSO`}),(0,H.jsx)(`span`,{style:{fontSize:7,color:`var(--pv-green)`,fontWeight:700},children:`Done`})]})]}):null,r===2?(0,H.jsx)(H.Fragment,{children:A9.slice(0,4).map(e=>(0,H.jsxs)(`div`,{style:{padding:`4.5px 6.5px`,borderRadius:7,background:`var(--pv-card)`,border:`1px solid var(--pv-rule)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:4},children:[(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:4,minWidth:0},children:[(0,H.jsx)(`span`,{className:`hz-pv-live-dot`}),(0,H.jsx)(`span`,{style:{fontSize:7.8,fontWeight:700},children:e.name})]}),(0,H.jsx)(`span`,{style:{fontSize:6.8,fontWeight:700,color:e.hue},children:e.badge})]},e.name))}):null]}),(0,H.jsxs)(`div`,{style:{padding:`4px 7px 5px`,background:`var(--pv-canvas)`},children:[(0,H.jsxs)(`div`,{style:{height:22,padding:`0 4px 0 8px`,borderRadius:999,background:`var(--pv-composer)`,border:`1px solid var(--pv-composer-rule)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{style:{fontSize:7.4,color:`var(--pv-mute)`},children:`Message team…`}),(0,H.jsx)(`span`,{style:{width:15,height:15,borderRadius:999,background:`var(--pv-send)`,color:`var(--pv-ink)`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`},children:(0,H.jsx)(gp,{size:9,color:`var(--pv-ink)`})})]}),(0,H.jsx)(`div`,{style:{width:48,height:3,borderRadius:999,background:`var(--pv-rule-strong)`,margin:`5px auto 0`}})]})]})})]})}),(0,H.jsx)(`div`,{className:`hz-pv-scene-pills`,role:`tablist`,"aria-label":`Preview scenes`,children:use.map(e=>{let t=r===e.id;return(0,H.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":t,className:`hz-pv-scene-pill`,"data-active":t?`true`:`false`,onClick:()=>d(e.id),children:[t?(0,H.jsx)(`span`,{className:`hz-pv-live-dot`}):(0,H.jsx)(xm,{size:11,color:`var(--muted-foreground)`}),(0,H.jsx)(`span`,{children:f?e.label:e.short})]},e.id)})})]})};function M9({code:e,title:t,agent:n,hue:r,pct:i,done:a=!1,highlight:o=!1}){return(0,H.jsxs)(`div`,{className:`hz-pv-rise`,style:{padding:`6px 6.5px`,borderRadius:7,background:o?`var(--pv-card-hi)`:`var(--pv-card)`,border:o?a?`1px solid var(--pv-green)`:`1px solid var(--pv-blue)`:`1px solid var(--pv-rule-strong)`,display:`flex`,flexDirection:`column`,gap:4},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{style:{fontSize:7.2,fontWeight:700,color:`var(--pv-dim)`},children:e}),(0,H.jsx)(j9,{pct:i,color:a?`var(--pv-green)`:r})]}),(0,H.jsx)(`div`,{style:{fontSize:8,fontWeight:600,lineHeight:1.25,color:`var(--pv-ink)`},children:t}),(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{style:{width:13,height:13,borderRadius:999,background:r,color:`var(--pv-bar)`,fontSize:7,fontWeight:800,display:`inline-flex`,alignItems:`center`,justifyContent:`center`},children:n}),(0,H.jsx)(`span`,{style:{fontSize:7,fontWeight:700,color:a?`var(--pv-green)`:`var(--pv-mute)`},children:a?`Merged`:`${i}%`})]})]})}var pse=[[`Channels`,`Your people and your agents, in one conversation.`],[`Agents`,`Hand an agent the work; it reports back when it is done.`],[`Issue boards`,`Every task from backlog to done, on one board.`]],mse=()=>(0,H.jsx)(y,{width:`100%`,maxW:740,gap:DH.wide,flexWrap:`wrap`,children:pse.map(([e,t])=>(0,H.jsxs)(z,{flex:1,minW:180,gap:4,children:[(0,H.jsx)(a,{size:Z.body,color:X.ink,fontWeight:`600`,children:e}),(0,H.jsx)(a,{size:Z.small,color:X.mute,children:t})]},e))}),N9=`PR #418`,P9=`PR #421`,hse=`#E5E7EB`,gse=`#EC4899`,F9=`#1A1A1A`,I9=`#F472B6`,L9=`Read https://hanzo.ai/skill.md and use Hanzo Team in my project.`,_se={vi:`V`,opera:`O`,mana:`M`,dev:`D`,des:`D`,doc:`D`,su:`S`,sal:`S`,sci:`S`,cyber:`C`,mark:`M`,fin:`F`,law:`L`,data:`D`,rev:`R`};function R9({id:e,size:t=26}){let n={width:t,height:t,"--img":`url(https://hanzo.ai/agents/${e}.png)`};return(0,H.jsx)(`span`,{className:`hz-ts-face`,style:n,"aria-hidden":`true`,children:_se[e]??e.slice(0,1).toUpperCase()})}function z9({pct:e,size:t=13}){let n=t/2-1.5,r=2*Math.PI*n,i=Math.max(0,Math.min(100,e));return(0,H.jsxs)(`svg`,{width:t,height:t,viewBox:`0 0 ${t} ${t}`,"aria-hidden":`true`,style:{flexShrink:0},children:[(0,H.jsx)(`circle`,{cx:t/2,cy:t/2,r:n,fill:`none`,stroke:`var(--ts-rule-strong)`,strokeWidth:`1.6`}),(0,H.jsx)(`circle`,{cx:t/2,cy:t/2,r:n,fill:`none`,stroke:`var(--ts-green)`,strokeWidth:`1.6`,strokeDasharray:r,strokeDashoffset:r*(1-i/100),transform:`rotate(-90 ${t/2} ${t/2})`,style:{transition:`stroke-dashoffset 0.45s ease`}})]})}var B9=[{head:`BACKLOG – 7`,tone:`var(--ts-amber)`,cards:[{id:`CRM-1`,tag:`Devops`,title:`Set up cluster monitoring & telemetry`,pct:12,owner:`opera`,col:0},{id:`CRM-2`,tag:`Research`,title:`Analyze and cluster search queries`,pct:35,owner:`sci`,col:0}]},{head:`TO DO – 6`,tone:`var(--ts-mute)`,cards:[{id:`CRM-8`,tag:`Sales`,title:`Sales planning & enterprise deal desk`,pct:20,owner:`rev`,col:1},{id:`CRM-11`,tag:`Backend`,title:`Deduplicate contacts on CRM import`,pct:40,owner:`dev`,col:1}]},{head:`IN PROGRESS – 3`,tone:`var(--ts-blue)`,cards:[{id:`CRM-15`,tag:`QA`,title:`Conduct custdev interview w/ client`,pct:90,owner:`sal`,col:2},{id:`CRM-16`,tag:`Feature`,title:`Add view-resource for MVP Deal Screen`,pct:65,owner:`des`,col:2}]},{head:`DONE – 3`,tone:`var(--ts-green)`,cards:[{id:`CRM-17`,tag:`Backend`,title:`Ship seat-count billing reconciliation`,pct:100,owner:`rev`,col:3},{id:`CRM-19`,tag:`Feature`,title:`Cut first release of the deal screen`,pct:100,owner:`dev`,col:3}]}],V9=B9.flatMap(e=>e.cards),H9=[{num:`01`,title:`Channels for every part of the work`,body:`A channel for each team and project, direct messages, and threads that keep a decision next to the question that started it.`},{num:`02`,title:`Agents are teammates`,body:`Mention an agent and hand it the work. It answers in the channel with the work done: a pull request, a drafted reply, an updated deck.`},{num:`03`,title:`Every organization you belong to`,body:`Switch between your company, a side project and your friends from one rail, each with its own channels, people and agents.`}],U9=[[`dev`,`Dev`,`Repos, PRs, CI`],[`sci`,`Sci`,`E2E specs, WebKit`],[`cyber`,`Cyber`,`Security, audits`],[`des`,`Des`,`UI, tokens, specs`],[`mark`,`Mark`,`Launch, growth`],[`su`,`Su`,`Triage, replies`],[`opera`,`Opera`,`Deploys, infra`]],W9=[{title:`Coding`,body:`A bug report becomes a pull request; a person reviews it, the checks pass, and it ships, all in the channel.`,pair:[`vi`,`dev`]},{title:`Support`,body:`An agent drafts the reply, a person makes it warmer, and it goes out.`,pair:[`su`,`vi`]},{title:`Email`,body:`The inbox is sorted and the replies are drafted in your voice. You approve them as a batch.`,pair:[`su`,`vi`]},{title:`Fundraising`,body:`The deck and the model are built, the intros are drafted, and the meeting lands on the calendar.`,pair:[`fin`,`vi`]},{title:`Docs & Specs`,body:`Shared specifications stay linked to issues, pull requests, and channel decisions without drifting out of date.`,pair:[`doc`,`dev`]},{title:`Science & R&D Ops`,body:`Run LillyMol MedChem screens, targets + crew Slurm DAGs, pytest-wdl proteomics, and admiral/brms.mmrm clinical tables right from #research.`,pair:[`vi`,`sci`]}],G9=[{channel:`bugfix`,category:`Engineering & QA`,no:`01`,title:`E2E Bug Reproduction, Patch & Verification`,summary:`A human drops a one-line bug report in #bugfix. @Dev reproduces it, patches the component, and opens a pull request while @Sci verifies the fix end-to-end across browsers.`,faces:[`dev`,`sci`],humanInitials:`ZM`,humanName:`Zoe Maxwell`,humanTime:`10:14 AM`,humanAsk:`Checkout button is unresponsive on mobile Safari when Apple Pay sheet closes — @Dev can we patch this before noon?`,leadAgent:`dev`,leadName:`Dev`,leadReply:`Reproduced in WebKit simulator: oncancel left the sheet lock active in PaySheet.tsx:84. Cleared lock in finally block and opened ${N9}.`,artifact:`${N9} · fix(checkout): release PaySheet lock on cancel (+14 -3)`,verifyAgent:`sci`,verifyName:`Sci`,badge:`42/42 E2E GREEN`,verifyLine:`Verified e2e across iOS 18 Safari & Chromium — 42/42 checkout specs green. Ready to merge.`,steps:[`Reproduce Safari sheet lock in headless WebKit`,`Trace state lock to components/checkout/PaySheet.tsx:84`,`Patch finally handler & push branch fix/apple-pay-lock`,`Run 42 Playwright e2e checkout specs across iOS & desktop`],tools:[`GitHub`,`Playwright`,`Safari WebKit`,`CI Runner`]},{channel:`security`,category:`Security & SecOps`,no:`02`,title:`Continuous Zero-Trust Audit & Secret Rotation`,summary:`Every new endpoint or auth change is audited in #security. @Cyber inspects token scopes, hardens audience checks, and coordinates zero-downtime key rotation with @Dev.`,faces:[`cyber`,`dev`],humanInitials:`AR`,humanName:`Alex Rivera`,humanTime:`11:02 AM`,humanAsk:`New OAuth callback & WIMSE token exchange landed on staging — @Cyber can you run a full audit before we cut the release?`,leadAgent:`cyber`,leadName:`Cyber`,leadReply:`Audited 14 endpoints & SBOM: 0 critical CVEs. Tightened JWT audience validation on /v1/oauth/token and opened ${P9}.`,artifact:`${P9} · sec(oauth): enforce strict WIMSE audience & nonce (+28 -6)`,verifyAgent:`dev`,verifyName:`Dev`,badge:`0 CRITICAL CVEs`,verifyLine:`Merged ${P9} and rotated staging signing keys in KMS with zero dropped sessions.`,steps:[`Scan 14 OAuth & WIMSE endpoints for token scope drift`,`Verify dependency SBOM against CVE advisories`,`Enforce strict aud + nonce claim validation in ${P9}`,`Rotate KMS signing keys and verify zero session drops`],tools:[`Hanzo KMS`,`WIMSE IAM`,`Trivy SBOM`,`GitHub`]},{channel:`launch`,category:`Marketing & Design`,no:`03`,title:`Coordinated Product Launch & Creative Assets`,summary:`From a single brief in #launch, @Mark drafts the announcement post, changelog, and social thread while @Des renders responsive OpenGraph cards and video cuts.`,faces:[`mark`,`des`],humanInitials:`AW`,humanName:`Antje Worring`,humanTime:`9:20 AM`,humanAsk:`We ship Team v2 at noon PT — @Mark @Des prepare the launch post, changelog, and social cards.`,leadAgent:`mark`,leadName:`Mark`,leadReply:`Drafted launch post, customer email segment, and 6-part X/LinkedIn thread synced with live release notes.`,artifact:`Canvas · Team v2 Launch Kit + 28-channel Post queue`,verifyAgent:`des`,verifyName:`Des`,badge:`LAUNCH READY`,verifyLine:`Rendered 1080p hero loop + dark-mode OG cards across hanzo.ai/team and hanzo.team.`,steps:[`Synthesize merged PR changelog into product narrative`,`Render 16:9 + 9:16 launch cards on canonical brand tokens`,`Stage scheduled posts in Hanzo Post queue`,`Verify UTM attribution and OG previews`],tools:[`Hanzo Post`,`Canvas`,`Hanzo Insights`,`CDN`]},{channel:`support`,category:`Customer Support`,no:`04`,title:`Instant Ticket Triage, Reproduction & Warm Reply`,summary:`@Su correlates inbound customer threads with telemetry traces, reproduces config issues, and drafts an accurate reply linked to docs.`,faces:[`su`,`doc`],humanInitials:`HB`,humanName:`Harry Boone`,humanTime:`1:08 PM`,humanAsk:`@Su Enterprise tenant acme-corp is seeing 403 on custom MCP webhook — can we diagnose and draft the reply?`,leadAgent:`su`,leadName:`Su`,leadReply:`Traced request req_98a2f: webhook secret header used legacy prefix. Drafted step-by-step reply for Acme eng.`,artifact:`Ticket SUP-884 · Root cause + verified cURL snippet attached`,verifyAgent:`doc`,verifyName:`Doc`,badge:`SLA 3 MIN`,verifyLine:`Updated MCP webhook header guide in docs.hanzo.ai so future setups copy the v2 header.`,steps:[`Correlate tenant org slug with gateway request logs`,`Pinpoint header mismatch without exposing tenant secrets`,`Draft warm customer reply with copy-paste fix`,`Patch docs quickstart example`],tools:[`Hanzo O11y`,`Zendesk / Slack`,`Docs MCP`,`Gateway`]},{channel:`ops`,category:`Infra & SRE`,no:`05`,title:`Zero-Downtime Canary Rollouts & Latency Guard`,summary:`@Opera advances multi-region Kubernetes rollouts while watching p95 latency, error budgets, and KMS health checks.`,faces:[`opera`,`cyber`],humanInitials:`ZK`,humanName:`Zach Kelling`,humanTime:`2:40 PM`,humanAsk:`@Opera roll team-gateway v0.1.17 across us-west and eu-central with 10% canary hold.`,leadAgent:`opera`,leadName:`Opera`,leadReply:`Canary held 5m at 10% traffic: 17.8ms p95, 0.00% 5xx. Promoted 100% across all regions.`,artifact:`deploy/team-gateway · sha256:9f4c…81e2 · 6/6 pods healthy`,verifyAgent:`cyber`,verifyName:`Cyber`,badge:`17.8ms P95`,verifyLine:`Verified mTLS mesh certificates and egress policy across all 6 replicas.`,steps:[`Verify container signature & image digest`,`Shift 10% canary traffic and sample 10k spans`,`Promote rollout across us-west & eu-central`,`Confirm mTLS & health probes green`],tools:[`Kubernetes`,`Prometheus`,`Hanzo O11y`,`Hanzo KMS`]},{channel:`research`,category:`Science & BioOps`,no:`06`,title:`Reproducible Compute DAGs, Benchmarks & Tables`,summary:`@Sci runs distributed evaluation suites, MedChem screens, and statistical tables directly from #research with pinned artifacts.`,faces:[`sci`,`data`],humanInitials:`ZM`,humanName:`Zoe Maxwell`,humanTime:`3:15 PM`,humanAsk:`@Sci run the Zen-4 tool-use eval matrix against the new router checkpoint and post throughput + pass@1.`,leadAgent:`sci`,leadName:`Sci`,leadReply:`Completed 1,200-task tool-use benchmark on 8xH200 cluster: +3.4% pass@1 at 148 tok/s.`,artifact:`eval/zen4-router-r18.parquet · 1,200 trajectories archived`,verifyAgent:`data`,verifyName:`Data`,badge:`REPRODUCIBLE`,verifyLine:`Published interactive comparison table to Datastore and pinned seed manifest.`,steps:[`Provision ephemeral GPU batch on Hanzo Machines`,`Execute deterministic eval harness with pinned seeds`,`Aggregate latency, token cost & pass@1 deltas`,`Archive artifacts to S3 & Datastore`],tools:[`Hanzo Machines`,`Datastore`,`S3 Storage`,`Zen Eval`]},{channel:`deals`,category:`Sales & RevOps`,no:`07`,title:`Inbound Enrichment, Deal Desk & Custom Terms`,summary:`@Sal enriches enterprise leads, prepares tailored architecture decks, and syncs stage updates into Hanzo CRM.`,faces:[`sal`,`des`],humanInitials:`AW`,humanName:`Antje Worring`,humanTime:`4:05 PM`,humanAsk:`@Sal prep the sovereign cloud proposal and security questionnaire for Meridian Health before tomorrow’s call.`,leadAgent:`sal`,leadName:`Sal`,leadReply:`Completed 94-item HIPAA/SOC2 security matrix, sized 64-GPU reserved tier, and updated CRM deal stage.`,artifact:`CRM Deal · Meridian Health ($240k ARR) · Proposal v1`,verifyAgent:`des`,verifyName:`Des`,badge:`CRM SYNCED`,verifyLine:`Formatted custom architecture deck with Meridian VPC topology diagram.`,steps:[`Enrich account footprint & compliance requirements`,`Auto-complete security questionnaire from Trust KB`,`Model reserved compute pricing & margins`,`Sync proposal + calendar invite to Hanzo CRM`],tools:[`Hanzo CRM`,`Data Room`,`Hanzo Sign`,`Calendar`]},{channel:`finance`,category:`Finance & Billing`,no:`08`,title:`Multi-Cloud Cost Reconciliation & Ledger Close`,summary:`@Fin reconciles Stripe settlements, usage-metered API credits, and cloud GPU invoices with zero spreadsheet drift.`,faces:[`fin`,`data`],humanInitials:`ZK`,humanName:`Zach Kelling`,humanTime:`4:45 PM`,humanAsk:`@Fin reconcile October metered token usage against Stripe payouts and flag any margin anomalies.`,leadAgent:`fin`,leadName:`Fin`,leadReply:`Reconciled 48,912 usage invoices against Stripe & Commerce ledger: $0.00 variance, gross margin +2.1% MoM.`,artifact:`Ledger Close · 2026-10 · 100% matched`,verifyAgent:`data`,verifyName:`Data`,badge:`$0 DRIFT`,verifyLine:`Verified ClickHouse usage rollups match billing snapshots across all orgs.`,steps:[`Ingest Stripe payouts & Hanzo Billing credit ledgers`,`Cross-check per-org token & compute metering`,`Flag outlier unit-cost SKUs`,`Lock monthly close report in Drive`],tools:[`Hanzo Billing`,`Stripe`,`QuickBooks`,`Datastore`]},{channel:`legal`,category:`Legal & Compliance`,no:`09`,title:`DPA Redlines, OSS License Gate & E-Sign`,summary:`@Law reviews vendor DPAs against standard playbook fallback clauses and routes clean agreements to Hanzo Sign.`,faces:[`law`,`cyber`],humanInitials:`AR`,humanName:`Alex Rivera`,humanTime:`5:12 PM`,humanAsk:`@Law check redlines on the enterprise MSA + DPA from Northstar Bank against our standard liability cap.`,leadAgent:`law`,leadName:`Law`,leadReply:`Reviewed 19 clauses: 17 standard, 2 redlines on subprocessor notice window. Applied approved 30-day fallback.`,artifact:`Northstar_MSA_DPA_clean.pdf · Ready for Hanzo Sign`,verifyAgent:`cyber`,verifyName:`Cyber`,badge:`PLAYBOOK PASS`,verifyLine:`Confirmed subprocessor list and data-residency annex match EU-Central deployment.`,steps:[`Parse incoming DOCX redlines against clause playbook`,`Verify GDPR / SOC2 data-residency commitments`,`Generate clean comparison + redline summary`,`Stage envelope in Hanzo Sign`],tools:[`Hanzo Sign`,`Data Room`,`Trust KB`,`Drive`]},{channel:`growth`,category:`Growth & Analytics`,no:`10`,title:`Funnel Diagnostics, Cohort Retention & Experiments`,summary:`@Mark and @Sci monitor signup-to-activation funnels in Hanzo Insights and ship copy/UX improvements in hours.`,faces:[`mark`,`sci`],humanInitials:`HB`,humanName:`Harry Boone`,humanTime:`5:50 PM`,humanAsk:`@Mark check 7-day activation on team invite links after yesterday’s onboarding update.`,leadAgent:`mark`,leadName:`Mark`,leadReply:`Workspace invite completion jumped from 64.2% → 81.9% (+17.7pp) after removing the manual setup gate.`,artifact:`Insights Funnel · 7d Invite Activation (+17.7pp)`,verifyAgent:`sci`,verifyName:`Sci`,badge:`P < 0.001`,verifyLine:`Confirmed statistical significance across 4,180 sessions on desktop and mobile Safari.`,steps:[`Query 7-day cohort funnel in Hanzo Insights`,`Segment conversion by browser & auth provider`,`Run two-proportion significance check`,`Post weekly growth digest to #growth`],tools:[`Hanzo Insights`,`Datastore`,`GitHub`,`Hanzo Post`]}],vse=[`1. Code trace`,`2. Loop in design`,`3. Decision`,`4. Canvas summary`,`5. E2E verify`,`6. Session complete`],yse=[[`12`,`12`,``,`.cta-button {`],[`13`,`13`,``,` display: inline-flex;`],[`14`,`14`,``,` align-items: center;`],[`15`,``,`del`,`- color: ${hse.toLowerCase()};`],[`16`,``,`del`,`- background: ${gse.toLowerCase()};`],[``,`15`,`add`,`+ color: ${F9.toLowerCase()};`],[``,`16`,`add`,`+ background: ${I9.toLowerCase()};`],[``,`17`,`add`,`+ font-weight: 600;`],[`17`,`18`,``,` border-radius: 8px;`],[`18`,`19`,``,`}`]];function K9({onOpen:e,working:t}){let[n,r]=(0,V.useState)(4),[i,o]=(0,V.useState)(!0),[s,c]=(0,V.useState)(0),[l,u]=(0,V.useState)(0),[d,f]=(0,V.useState)(0),[p,m]=(0,V.useState)(!1),[h,g]=(0,V.useState)(6),[_,v]=(0,V.useState)(`Code`),[b,x]=(0,V.useState)(!1);(0,V.useEffect)(()=>{if(!i)return;let e=window.setInterval(()=>{r(e=>(e+1)%V9.length)},2200);return()=>window.clearInterval(e)},[i]),(0,V.useEffect)(()=>{if(p)return;let e=window.setInterval(()=>{f(e=>(e+1)%G9.length)},3400);return()=>window.clearInterval(e)},[p]);let S=V9[n]??V9[0],C=G9[d]??G9[0],w=W9[l]??W9[0];return(0,H.jsxs)(`div`,{className:`hz-ts-wrap`,children:[(0,H.jsxs)(`section`,{className:`hz-ts-sec`,"aria-label":`Live Tracker Board and Mobile Sync`,children:[(0,H.jsxs)(`div`,{className:`hz-ts-head`,children:[(0,H.jsx)(`span`,{className:`hz-ts-kicker`,children:`Web + Mobile Synced`}),(0,H.jsx)(`h2`,{className:`hz-ts-h2`,children:`The playground for humans + AI`}),(0,H.jsx)(`p`,{className:`hz-ts-sub`,children:`Your people and your AI agents plan, build, and ship together — click any card to watch its specialist teammate pick it up and sync live to mobile.`})]}),(0,H.jsxs)(`div`,{className:`hz-ts-board-win`,children:[(0,H.jsxs)(`div`,{className:`hz-ts-win-bar`,children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,H.jsx)(`strong`,{style:{fontWeight:600},children:`hanzo.team`}),(0,H.jsx)(`span`,{style:{color:`var(--ts-dim)`},children:`·`}),(0,H.jsx)(`span`,{style:{color:`var(--ts-ink)`,fontWeight:500},children:`Tracker Board`}),(0,H.jsx)(`span`,{style:{color:`var(--ts-mute)`},children:`23 AI Teammates`}),(0,H.jsx)(`span`,{style:{color:`var(--ts-mute)`},children:`Virtual Office`})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:6,fontSize:12,color:`var(--ts-mute)`},children:[(0,H.jsx)(z9,{pct:83,size:14}),`83% Sprint complete`]}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>o(e=>!e),"aria-label":i?`Pause board`:`Replay board`,style:{appearance:`none`,border:`1px solid var(--ts-rule-strong)`,background:`var(--ts-card)`,color:`var(--ts-ink)`,borderRadius:6,width:26,height:26,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`},children:i?(0,H.jsx)(mm,{size:12}):(0,H.jsx)(_m,{size:12})})]})]}),(0,H.jsxs)(`div`,{className:`hz-ts-board-body`,children:[(0,H.jsx)(`div`,{className:`hz-ts-cols`,children:B9.map(e=>(0,H.jsxs)(`div`,{className:`hz-ts-col`,children:[(0,H.jsxs)(`div`,{className:`hz-ts-col-h`,children:[(0,H.jsx)(`span`,{style:{width:7,height:7,borderRadius:999,background:e.tone}}),(0,H.jsx)(`span`,{children:e.head})]}),e.cards.map(e=>{let t=V9.findIndex(t=>t.id===e.id),i=t===n;return(0,H.jsxs)(`button`,{type:`button`,className:`hz-ts-card`,"data-active":i?`true`:`false`,onClick:()=>{o(!1),r(t)},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,fontSize:11,color:`var(--ts-mute)`},children:[(0,H.jsx)(`span`,{style:{fontFamily:`var(--font-mono, monospace)`},children:e.id}),(0,H.jsx)(`span`,{style:{padding:`1px 6px`,borderRadius:999,background:`var(--ts-panel)`,border:`1px solid var(--ts-rule)`},children:e.tag})]}),(0,H.jsx)(`div`,{style:{fontSize:13,fontWeight:500,lineHeight:1.38},children:e.title}),(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,fontSize:11.5,color:`var(--ts-mute)`},children:[(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:5},children:[(0,H.jsx)(z9,{pct:e.pct}),e.pct,`%`]}),(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:5,color:i?`var(--ts-ink)`:`var(--ts-mute)`,fontWeight:600},children:[(0,H.jsx)(R9,{id:e.owner,size:18}),`@`,e.owner]})]})]},e.id)})]},e.head))}),(0,H.jsx)(`div`,{className:`hz-ts-phone`,"aria-label":`Synced iPhone workspace`,children:(0,H.jsxs)(`div`,{className:`hz-ts-phone-in`,children:[(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,fontSize:11},children:[(0,H.jsx)(`strong`,{children:`9:41`}),(0,H.jsx)(`span`,{style:{color:`var(--ts-green)`,fontSize:10.5,fontWeight:600},children:`● Synced`})]}),(0,H.jsxs)(`div`,{style:{padding:10,borderRadius:10,background:`var(--ts-card)`,border:`1px solid var(--ts-rule)`,display:`flex`,flexDirection:`column`,gap:6},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,fontSize:10.5,color:`var(--ts-mute)`},children:[(0,H.jsx)(`span`,{children:S.id}),(0,H.jsx)(`span`,{children:S.tag})]}),(0,H.jsx)(`div`,{style:{fontSize:12,fontWeight:600,lineHeight:1.35},children:S.title}),(0,H.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,fontSize:11,color:`var(--ts-mute)`},children:[(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:5},children:[(0,H.jsx)(z9,{pct:S.pct,size:12}),S.pct,`%`]}),(0,H.jsxs)(`span`,{children:[`@`,S.owner]})]})]}),(0,H.jsxs)(`div`,{style:{padding:9,borderRadius:10,background:`var(--ts-panel)`,border:`1px solid var(--ts-rule)`,display:`flex`,gap:8,alignItems:`center`},children:[(0,H.jsx)(R9,{id:`mark`,size:24}),(0,H.jsxs)(`div`,{style:{minWidth:0},children:[(0,H.jsx)(`div`,{style:{fontSize:11,fontWeight:600},children:`#hanzo-mark · Mark`}),(0,H.jsx)(`div`,{style:{fontSize:10.5,color:`var(--ts-mute)`},children:`28-day GA4 checkout funnel synced`})]})]})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,paddingTop:6,borderTop:`1px solid var(--ts-rule)`,fontSize:10.5,color:`var(--ts-mute)`},children:[(0,H.jsx)(`div`,{style:{display:`flex`,gap:4},children:[`dev`,`cyber`,`mark`,`sci`].map(e=>(0,H.jsx)(R9,{id:e,size:18},e))}),(0,H.jsx)(`span`,{children:`Web + iOS`})]})]})})]})]})]}),(0,H.jsx)(`div`,{className:`hz-ts-drift`,"aria-hidden":`true`,children:(0,H.jsx)(`div`,{className:`hz-ts-drift-track`,children:[0,1].flatMap(e=>G9.map(t=>(0,H.jsxs)(`span`,{children:[`# `,t.channel]},`${e}-${t.channel}`)))})}),(0,H.jsxs)(`section`,{className:`hz-ts-sec`,"aria-label":`What it is`,children:[(0,H.jsxs)(`div`,{className:`hz-ts-head`,children:[(0,H.jsx)(`span`,{className:`hz-ts-kicker`,children:`What it is`}),(0,H.jsx)(`h2`,{className:`hz-ts-h2`,children:`One workspace. Everything connected.`}),(0,H.jsx)(`p`,{className:`hz-ts-sub`,children:`Stop jumping between tools just to get work done.`})]}),(0,H.jsxs)(`div`,{className:`hz-ts-split`,children:[(0,H.jsx)(`div`,{role:`tablist`,"aria-label":`Workspace chapters`,style:{display:`flex`,flexDirection:`column`,gap:10},children:H9.map((e,t)=>(0,H.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":s===t,className:`hz-ts-tab-btn`,onClick:()=>c(t),children:[(0,H.jsx)(`span`,{style:{fontFamily:`var(--font-mono, monospace)`,fontSize:11,color:`var(--ts-dim)`},children:e.num}),(0,H.jsx)(`span`,{style:{fontSize:15.5,fontWeight:600,color:s===t?`var(--ts-ink)`:`var(--foreground)`},children:e.title}),(0,H.jsx)(`span`,{style:{fontSize:13.5,lineHeight:1.5,color:`var(--ts-mute)`},children:e.body})]},e.num))}),(0,H.jsxs)(`div`,{className:`hz-ts-stage-card`,children:[s===0?(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,paddingBottom:10,borderBottom:`1px solid var(--ts-rule)`},children:[(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:6,fontWeight:600},children:[(0,H.jsx)(Yp,{size:15}),` bugfix`]}),(0,H.jsx)(`span`,{style:{fontSize:11.5,color:`var(--ts-green)`,fontWeight:600},children:`42/42 E2E GREEN`})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,gap:10,alignItems:`flex-start`},children:[(0,H.jsx)(`span`,{className:`hz-ts-face`,style:{width:28,height:28},children:`ZM`}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontSize:12.5,fontWeight:600},children:`Zoe Maxwell · 10:14 AM`}),(0,H.jsx)(`div`,{style:{fontSize:13.5,color:`var(--ts-mute)`,marginTop:2},children:`Checkout button is unresponsive on mobile Safari when Apple Pay sheet closes.`})]})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,gap:10,alignItems:`flex-start`,paddingLeft:18,borderLeft:`2px solid var(--ts-rule-strong)`},children:[(0,H.jsx)(R9,{id:`dev`,size:28}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontSize:12.5,fontWeight:600},children:`Dev · Agent`}),(0,H.jsx)(`div`,{style:{fontSize:13.5,color:`var(--ts-mute)`,marginTop:2},children:`Cleared lock in finally block and opened ${N9}.`})]})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,gap:10,alignItems:`flex-start`,paddingLeft:18,borderLeft:`2px solid var(--ts-rule-strong)`},children:[(0,H.jsx)(R9,{id:`sci`,size:28}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontSize:12.5,fontWeight:600},children:`Sci · Agent`}),(0,H.jsx)(`div`,{style:{fontSize:13,color:`var(--ts-green)`,fontWeight:600,marginTop:2},children:`Verified across iOS 18 Safari & Chromium — 42/42 checkout specs green.`})]})]})]}):s===1?(0,H.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(180px, 1fr))`,gap:10},children:U9.map(([e,t,n])=>(0,H.jsxs)(`div`,{style:{padding:12,borderRadius:10,background:`var(--ts-card)`,border:`1px solid var(--ts-rule)`,display:`flex`,alignItems:`center`,gap:10},children:[(0,H.jsx)(R9,{id:e,size:36}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontSize:13.5,fontWeight:600},children:t}),(0,H.jsx)(`div`,{style:{fontSize:11.5,color:`var(--ts-mute)`},children:n})]})]},e))}):(0,H.jsxs)(`div`,{style:{display:`flex`,gap:14,alignItems:`stretch`},children:[(0,H.jsxs)(`div`,{style:{width:46,borderRadius:10,background:`var(--ts-panel)`,border:`1px solid var(--ts-rule)`,padding:`10px 0`,display:`flex`,flexDirection:`column`,alignItems:`center`,gap:8},children:[(0,H.jsx)(`span`,{style:{width:30,height:30,borderRadius:8,background:`var(--ts-ink)`,color:`var(--ts-bg)`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,fontWeight:800,fontSize:12},children:`HA`}),(0,H.jsx)(`span`,{style:{width:30,height:30,borderRadius:8,background:`var(--ts-card-hi)`,color:`var(--ts-ink)`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,fontWeight:700,fontSize:12},children:`LN`}),(0,H.jsx)(`span`,{style:{width:30,height:30,borderRadius:8,background:`var(--ts-card)`,color:`var(--ts-mute)`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,fontWeight:700,fontSize:12},children:`ZL`}),(0,H.jsx)(`span`,{style:{width:30,height:30,borderRadius:8,border:`1px dashed var(--ts-rule-strong)`,color:`var(--ts-mute)`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,fontSize:14},children:`+`})]}),(0,H.jsxs)(`div`,{style:{flex:1,display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(200px, 1fr))`,gap:12},children:[(0,H.jsxs)(`div`,{style:{padding:14,borderRadius:10,background:`var(--ts-card)`,border:`1px solid var(--ts-ink)`},children:[(0,H.jsx)(`div`,{style:{fontSize:13.5,fontWeight:600},children:`Hanzo AI · hanzo.ai`}),(0,H.jsxs)(`div`,{style:{fontSize:12,color:`var(--ts-mute)`,marginTop:8,display:`flex`,flexDirection:`column`,gap:4},children:[(0,H.jsx)(`span`,{children:`# bugfix`}),(0,H.jsx)(`span`,{children:`# launch`}),(0,H.jsx)(`span`,{children:`# ops`})]})]}),(0,H.jsxs)(`div`,{style:{padding:14,borderRadius:10,background:`var(--ts-panel)`,border:`1px solid var(--ts-rule)`},children:[(0,H.jsx)(`div`,{style:{fontSize:13.5,fontWeight:600},children:`Lux Network · lux.network`}),(0,H.jsxs)(`div`,{style:{fontSize:12,color:`var(--ts-mute)`,marginTop:8,display:`flex`,flexDirection:`column`,gap:4},children:[(0,H.jsx)(`span`,{children:`# consensus`}),(0,H.jsx)(`span`,{children:`# validator-ops`}),(0,H.jsx)(`span`,{children:`# bridge-audit`})]})]})]})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,paddingTop:10,borderTop:`1px solid var(--ts-rule)`,fontSize:12,color:`var(--ts-dim)`},children:[(0,H.jsxs)(`span`,{children:[`Chapter `,H9[s].num,` / 03`]}),(0,H.jsx)(`span`,{children:`Slack-style org rail · Threads · Native AI teammates`})]})]})]})]}),(0,H.jsxs)(`section`,{className:`hz-ts-sec`,"aria-label":`Humans and agents on the same work`,children:[(0,H.jsxs)(`div`,{className:`hz-ts-head`,children:[(0,H.jsx)(`span`,{className:`hz-ts-kicker`,children:`Together`}),(0,H.jsx)(`h2`,{className:`hz-ts-h2`,children:`Humans and agents, on the same work`})]}),(0,H.jsxs)(`div`,{className:`hz-ts-split`,children:[(0,H.jsxs)(`div`,{className:`hz-ts-stage-card`,style:{justifyContent:`center`,alignItems:`flex-start`},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14},children:[(0,H.jsx)(R9,{id:w.pair[0],size:52}),(0,H.jsx)(`span`,{style:{width:36,height:2,background:`var(--ts-ink)`,display:`inline-block`}}),(0,H.jsx)(R9,{id:w.pair[1],size:52})]}),(0,H.jsxs)(`div`,{style:{fontFamily:`var(--font-mono, monospace)`,fontSize:12,color:`var(--ts-dim)`},children:[`HANDOFF `,String(l+1).padStart(2,`0`),` / 06`]}),(0,H.jsx)(`div`,{style:{fontSize:22,fontWeight:600},children:w.title}),(0,H.jsx)(`p`,{style:{margin:0,fontSize:14.5,lineHeight:1.55,color:`var(--ts-mute)`},children:w.body})]}),(0,H.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(240px, 1fr))`,gap:10},children:W9.map((e,t)=>(0,H.jsxs)(`button`,{type:`button`,className:`hz-ts-tab-btn`,"aria-selected":l===t,onMouseEnter:()=>u(t),onClick:()=>u(t),children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,H.jsx)(R9,{id:e.pair[0],size:24}),(0,H.jsx)(`span`,{style:{color:`var(--ts-dim)`,fontSize:11},children:`→`}),(0,H.jsx)(R9,{id:e.pair[1],size:24}),(0,H.jsx)(`span`,{style:{fontSize:14.5,fontWeight:600,color:`var(--foreground)`},children:e.title})]}),(0,H.jsx)(`span`,{style:{fontSize:12.5,lineHeight:1.48,color:`var(--ts-mute)`},children:e.body})]},e.title))})]})]}),(0,H.jsxs)(`section`,{className:`hz-ts-sec`,"aria-label":`Everything the team works in`,children:[(0,H.jsxs)(`div`,{className:`hz-ts-head`,children:[(0,H.jsx)(`span`,{className:`hz-ts-kicker`,children:`The rooms`}),(0,H.jsx)(`h2`,{className:`hz-ts-h2`,children:`Everything the team works in`})]}),(0,H.jsxs)(`div`,{className:`hz-ts-bento`,children:[(0,H.jsxs)(`article`,{className:`hz-ts-tile`,children:[(0,H.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(3, 1fr)`,gap:6,fontSize:10.5},children:[`Backlog`,`Doing`,`Done`].map((e,t)=>(0,H.jsxs)(`div`,{style:{padding:7,borderRadius:7,background:`var(--ts-bg)`,border:`1px solid var(--ts-rule)`},children:[(0,H.jsx)(`div`,{style:{color:`var(--ts-dim)`,marginBottom:5},children:e}),(0,H.jsx)(`div`,{style:{padding:`5px 6px`,borderRadius:5,background:t===2?`var(--ts-green-bg)`:`var(--ts-card)`,border:`1px solid var(--ts-rule)`,fontWeight:500},children:t===0?`Email`:t===1?`R&D Ops`:`Specs ✓`})]},e))}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontSize:15.5,fontWeight:600},children:`Board`}),(0,H.jsx)(`div`,{style:{fontSize:13,color:`var(--ts-mute)`,marginTop:4},children:`Cards in Backlog, Doing and Done, each with its owner, person or agent.`})]})]}),(0,H.jsxs)(`article`,{className:`hz-ts-tile`,children:[(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:5,padding:10,borderRadius:8,background:`var(--ts-bg)`,border:`1px solid var(--ts-rule)`,fontSize:11.5,fontFamily:`var(--font-mono, monospace)`},children:[(0,H.jsx)(`span`,{style:{color:`var(--ts-ink)`,fontWeight:600},children:`▾ Docs & Specs/`}),(0,H.jsx)(`span`,{style:{color:`var(--ts-mute)`,paddingLeft:12},children:`PaySheet.tsx`}),(0,H.jsx)(`span`,{style:{color:`var(--ts-mute)`,paddingLeft:12},children:`BuyNowButton.tsx`}),(0,H.jsx)(`span`,{style:{color:`var(--ts-mute)`,paddingLeft:12},children:`styles.css`})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontSize:15.5,fontWeight:600},children:`Drive`}),(0,H.jsx)(`div`,{style:{fontSize:13,color:`var(--ts-mute)`,marginTop:4},children:`The team's documents and files, in folders.`})]})]}),(0,H.jsxs)(`article`,{className:`hz-ts-tile`,children:[(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6,padding:10,borderRadius:8,background:`var(--ts-bg)`,border:`1px solid var(--ts-rule)`,fontSize:11.5},children:[(0,H.jsxs)(`div`,{style:{padding:`5px 8px`,borderRadius:6,background:`var(--ts-card-hi)`,display:`flex`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{children:`09:30 · Design Crit`}),(0,H.jsx)(`span`,{style:{color:`var(--ts-mute)`},children:`@Des`})]}),(0,H.jsxs)(`div`,{style:{padding:`5px 8px`,borderRadius:6,background:`var(--ts-green-bg)`,border:`1px solid var(--ts-green-edge)`,display:`flex`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{children:`12:00 · Canary Rollout`}),(0,H.jsx)(`span`,{style:{color:`var(--ts-green)`},children:`@Opera`})]})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontSize:15.5,fontWeight:600},children:`Calendar`}),(0,H.jsx)(`div`,{style:{fontSize:13,color:`var(--ts-mute)`,marginTop:4},children:`The week's meetings and agent routines on one schedule.`})]})]}),(0,H.jsxs)(`article`,{className:`hz-ts-tile`,children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:10,borderRadius:8,background:`var(--ts-bg)`,border:`1px solid var(--ts-rule)`},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,H.jsx)(R9,{id:`vi`,size:32}),(0,H.jsx)(R9,{id:`dev`,size:32})]}),(0,H.jsxs)(`div`,{style:{fontSize:11,textAlign:`right`},children:[(0,H.jsx)(`div`,{style:{fontWeight:600},children:`Fix: Button Dark Mode`}),(0,H.jsx)(`div`,{style:{color:`var(--ts-mute)`},children:`Canvas · Live notes`})]})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontSize:15.5,fontWeight:600},children:`Meet`}),(0,H.jsx)(`div`,{style:{fontSize:13,color:`var(--ts-mute)`,marginTop:4},children:`Calls with notes taken for you, in the same workspace as the work.`})]})]}),(0,H.jsxs)(`article`,{className:`hz-ts-tile`,children:[(0,H.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:5,padding:10,borderRadius:8,background:`var(--ts-bg)`,border:`1px solid var(--ts-rule)`,fontSize:11.5},children:[[`vi`,`Zoe Maxwell`,`@Dev`],[`dev`,`Harry Boone`,`@Zoe`],[`sci`,`Dev`,`@Sci`]].map(([e,t,n])=>(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:6},children:[(0,H.jsx)(R9,{id:e,size:18}),(0,H.jsx)(`span`,{children:t})]}),(0,H.jsx)(`span`,{style:{color:`var(--ts-blue)`,fontWeight:600},children:n})]},t+n))}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontSize:15.5,fontWeight:600},children:`Inbox`}),(0,H.jsx)(`div`,{style:{fontSize:13,color:`var(--ts-mute)`,marginTop:4},children:`Every mention, thread reply, and review request in one triage queue.`})]})]}),(0,H.jsxs)(`article`,{className:`hz-ts-tile`,children:[(0,H.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:6,padding:10,borderRadius:8,background:`var(--ts-bg)`,border:`1px solid var(--ts-rule)`},children:U9.map(([e,t])=>(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:5,padding:`3px 8px 3px 4px`,borderRadius:999,background:`var(--ts-card)`,border:`1px solid var(--ts-rule)`,fontSize:11},children:[(0,H.jsx)(R9,{id:e,size:18}),t]},e))}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontSize:15.5,fontWeight:600},children:`Agents`}),(0,H.jsx)(`div`,{style:{fontSize:13,color:`var(--ts-mute)`,marginTop:4},children:`Dedicated AI teammates configured with your repos, docs, and permissions.`})]})]})]})]}),(0,H.jsxs)(`section`,{className:`hz-ts-sec`,"aria-label":`Ten everyday workflows`,children:[(0,H.jsxs)(`div`,{className:`hz-ts-head`,children:[(0,H.jsx)(`span`,{className:`hz-ts-kicker`,children:`10 Everyday Workflows`}),(0,H.jsx)(`h2`,{className:`hz-ts-h2`,children:`Ten everyday workflows your team hands off in a single mention.`}),(0,H.jsx)(`p`,{className:`hz-ts-sub`,children:`Open a channel, mention the right specialist teammate, and get finished work back — verified end-to-end by a second agent before you merge or send.`})]}),(0,H.jsxs)(`div`,{className:`hz-ts-flows`,children:[(0,H.jsxs)(`div`,{className:`hz-ts-flow-nav`,role:`tablist`,"aria-label":`Workflow channels`,children:[(0,H.jsx)(`div`,{style:{padding:`4px 10px 8px`,fontSize:11,fontFamily:`var(--font-mono, monospace)`,color:`var(--ts-dim)`},children:`HANZO · 10 CHANNELS`}),G9.map((e,t)=>(0,H.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":d===t,className:`hz-ts-flow-btn`,onClick:()=>{m(!0),f(t)},children:[(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:7},children:[(0,H.jsx)(`span`,{style:{fontFamily:`var(--font-mono, monospace)`,fontSize:11,color:`var(--ts-dim)`},children:e.no}),(0,H.jsxs)(`span`,{children:[`#`,e.channel]})]}),(0,H.jsxs)(`span`,{style:{display:`inline-flex`,gap:3},children:[(0,H.jsx)(R9,{id:e.faces[0],size:20}),(0,H.jsx)(R9,{id:e.faces[1],size:20})]})]},e.channel))]}),(0,H.jsxs)(`div`,{style:{padding:24,display:`flex`,flexDirection:`column`,gap:18},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,alignItems:`center`,justifyContent:`space-between`,gap:8},children:[(0,H.jsxs)(`span`,{style:{fontFamily:`var(--font-mono, monospace)`,fontSize:11.5,color:`var(--ts-mute)`},children:[`ACTIVE CREW · #`,C.channel,` · `,C.category]}),(0,H.jsx)(`span`,{style:{padding:`3px 9px`,borderRadius:999,background:`var(--ts-green-bg)`,border:`1px solid var(--ts-green-edge)`,color:`var(--ts-green)`,fontSize:11,fontWeight:700,fontFamily:`var(--font-mono, monospace)`},children:C.badge})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h3`,{style:{margin:0,fontSize:20,fontWeight:600},children:C.title}),(0,H.jsx)(`p`,{style:{margin:`6px 0 0`,fontSize:13.5,lineHeight:1.5,color:`var(--ts-mute)`},children:C.summary})]}),(0,H.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(280px, 1fr))`,gap:16},children:[(0,H.jsxs)(`div`,{style:{padding:14,borderRadius:12,background:`var(--ts-panel)`,border:`1px solid var(--ts-rule)`,display:`flex`,flexDirection:`column`,gap:12},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,gap:9,alignItems:`flex-start`},children:[(0,H.jsx)(`span`,{className:`hz-ts-face`,style:{width:28,height:28},children:C.humanInitials}),(0,H.jsxs)(`div`,{style:{fontSize:12.5},children:[(0,H.jsxs)(`div`,{style:{fontWeight:600},children:[C.humanName,` `,(0,H.jsx)(`span`,{style:{color:`var(--ts-dim)`,fontWeight:400},children:C.humanTime})]}),(0,H.jsx)(`div`,{style:{color:`var(--ts-mute)`,marginTop:2,lineHeight:1.45},children:C.humanAsk})]})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,gap:9,alignItems:`flex-start`},children:[(0,H.jsx)(R9,{id:C.leadAgent,size:28}),(0,H.jsxs)(`div`,{style:{fontSize:12.5,flex:1},children:[(0,H.jsxs)(`div`,{style:{fontWeight:600},children:[C.leadName,` · Agent`]}),(0,H.jsx)(`div`,{style:{color:`var(--ts-mute)`,marginTop:2,lineHeight:1.45},children:C.leadReply}),(0,H.jsxs)(`div`,{style:{marginTop:6,padding:`6px 9px`,borderRadius:7,background:`var(--ts-card)`,border:`1px solid var(--ts-rule-strong)`,fontFamily:`var(--font-mono, monospace)`,fontSize:11,display:`flex`,alignItems:`center`,gap:6},children:[(0,H.jsx)(Kp,{size:12,color:`var(--ts-green)`}),(0,H.jsx)(`span`,{children:C.artifact})]})]})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,gap:9,alignItems:`flex-start`},children:[(0,H.jsx)(R9,{id:C.verifyAgent,size:28}),(0,H.jsxs)(`div`,{style:{fontSize:12.5},children:[(0,H.jsxs)(`div`,{style:{fontWeight:600},children:[C.verifyName,` · Agent`]}),(0,H.jsx)(`div`,{style:{color:`var(--ts-mute)`,marginTop:2,lineHeight:1.45},children:C.verifyLine})]})]})]}),(0,H.jsxs)(`div`,{style:{padding:14,borderRadius:12,background:`var(--ts-panel)`,border:`1px solid var(--ts-rule)`,display:`flex`,flexDirection:`column`,justifyContent:`space-between`,gap:12},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:9},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,fontSize:11,fontFamily:`var(--font-mono, monospace)`,color:`var(--ts-mute)`},children:[(0,H.jsx)(`strong`,{children:`AUTOMATED WORKFLOW`}),(0,H.jsx)(`span`,{children:`4 / 4 complete`})]}),C.steps.map(e=>(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`flex-start`,gap:8,fontSize:12.5,color:`var(--ts-ink)`},children:[(0,H.jsx)(Vt,{size:14,color:`var(--ts-green)`,style:{marginTop:2,flexShrink:0}}),(0,H.jsx)(`span`,{children:e})]},e))]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontSize:10.5,fontFamily:`var(--font-mono, monospace)`,color:`var(--ts-dim)`,marginBottom:6},children:`TOOLS & SANDBOXES USED`}),(0,H.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:6},children:C.tools.map(e=>(0,H.jsx)(`span`,{style:{padding:`3px 8px`,borderRadius:6,background:`var(--ts-card)`,border:`1px solid var(--ts-rule)`,fontSize:11.5,color:`var(--ts-mute)`},children:e},e))})]})]})]})]})]})]}),(0,H.jsxs)(`section`,{className:`hz-ts-sec`,"aria-label":`Code channels and artifacts`,children:[(0,H.jsxs)(`div`,{className:`hz-ts-head`,children:[(0,H.jsx)(`span`,{className:`hz-ts-kicker`,children:`Code Channels & Artifacts`}),(0,H.jsx)(`h2`,{className:`hz-ts-h2`,children:`Code channels where engineers, designers, and agents ship together.`}),(0,H.jsx)(`p`,{className:`hz-ts-sub`,children:`Every code channel pairs the conversation with a live Artifacts pane — Canvas root-cause writeups, unified branch diffs, and interactive previews.`})]}),(0,H.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:8},role:`tablist`,"aria-label":`Code session steps`,children:vse.map((e,t)=>{let n=t+1,r=h===n;return(0,H.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":r,onClick:()=>g(n),style:{appearance:`none`,padding:`6px 12px`,borderRadius:999,border:`1px solid ${r?`var(--ts-ink)`:`var(--ts-rule-strong)`}`,background:r?`var(--ts-card-hi)`:`var(--ts-panel)`,color:r?`var(--ts-ink)`:`var(--ts-mute)`,fontSize:12,fontWeight:r?600:500,cursor:`pointer`},children:e},e)})}),(0,H.jsxs)(`div`,{className:`hz-ts-board-win`,children:[(0,H.jsxs)(`div`,{className:`hz-ts-win-bar`,children:[(0,H.jsx)(`span`,{style:{fontFamily:`var(--font-mono, monospace)`,fontSize:12},children:`hanzo.team — Hanzo AI (hanzo.ai) · #bug-button-darkmode`}),(0,H.jsx)(`span`,{style:{fontSize:11.5,color:`var(--ts-green)`,fontWeight:600},children:`Working · Session channel`})]}),(0,H.jsxs)(`div`,{className:`hz-ts-code-grid`,children:[(0,H.jsxs)(`aside`,{style:{padding:14,borderRight:`1px solid var(--ts-rule)`,background:`var(--ts-panel)`,display:`flex`,flexDirection:`column`,gap:10,fontSize:12.5},children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontWeight:600},children:`Hanzo AI`}),(0,H.jsx)(`div`,{style:{fontSize:11,color:`var(--ts-dim)`},children:`hanzo.ai`})]}),(0,H.jsx)(`div`,{style:{fontSize:10.5,fontFamily:`var(--font-mono, monospace)`,color:`var(--ts-dim)`,marginTop:4},children:`CODE CHANNELS`}),(0,H.jsx)(`div`,{style:{padding:`6px 8px`,borderRadius:7,background:`var(--ts-card-hi)`,fontWeight:600},children:`# bug-button-darkmode`}),(0,H.jsx)(`div`,{style:{padding:`4px 8px`,color:`var(--ts-mute)`},children:`# feat-wimse-tokens`}),(0,H.jsxs)(`div`,{style:{marginTop:`auto`,padding:8,borderRadius:8,background:`var(--ts-bg)`,border:`1px solid var(--ts-rule)`,fontFamily:`var(--font-mono, monospace)`,fontSize:10.5,color:`var(--ts-mute)`},children:[(0,H.jsx)(`div`,{children:`hanzoai/app`}),(0,H.jsx)(`div`,{style:{color:`var(--ts-ink)`},children:`main → update-cta-color`})]})]}),(0,H.jsxs)(`div`,{style:{padding:16,borderRight:`1px solid var(--ts-rule)`,display:`flex`,flexDirection:`column`,gap:12,fontSize:13},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,gap:9},children:[(0,H.jsx)(R9,{id:`dev`,size:26}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontWeight:600},children:`Dev · 9:31 AM`}),(0,H.jsxs)(`div`,{style:{color:`var(--ts-mute)`,marginTop:2},children:[`Searched `,(0,H.jsx)(`code`,{children:`components/ui/`}),` and `,(0,H.jsx)(`code`,{children:`styles/cta-button.css`}),`: button foreground is too light on dark backgrounds. What contrast target should we use?`]})]})]}),h>=2?(0,H.jsxs)(`div`,{style:{display:`flex`,gap:9},children:[(0,H.jsx)(`span`,{className:`hz-ts-face`,style:{width:26,height:26},children:`HB`}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontWeight:600},children:`Harry Boone · 9:32 AM`}),(0,H.jsx)(`div`,{style:{color:`var(--ts-mute)`,marginTop:2},children:`@Zoe Maxwell what token should we pair with the accent fill?`})]})]}):null,h>=3?(0,H.jsxs)(`div`,{style:{display:`flex`,gap:9},children:[(0,H.jsx)(`span`,{className:`hz-ts-face`,style:{width:26,height:26},children:`ZM`}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontWeight:600},children:`Zoe Maxwell · 9:34 AM`}),(0,H.jsxs)(`div`,{style:{color:`var(--ts-mute)`,marginTop:2},children:[`Keep the pink pill and switch the label ink to `,(0,H.jsx)(`code`,{children:F9}),` for AAA contrast.`]})]})]}):null,h>=4?(0,H.jsxs)(`div`,{style:{display:`flex`,gap:9},children:[(0,H.jsx)(R9,{id:`dev`,size:26}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontWeight:600},children:`Dev · 9:36 AM`}),(0,H.jsxs)(`div`,{style:{color:`var(--ts-mute)`,marginTop:2},children:[`Updated `,(0,H.jsx)(`code`,{children:`styles/cta-button.css`}),` and wrote the root-cause summary in Canvas. @Sci running E2E checks now.`]})]})]}):null,h>=5?(0,H.jsxs)(`div`,{style:{display:`flex`,gap:9},children:[(0,H.jsx)(R9,{id:`sci`,size:26}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:{fontWeight:600},children:`Sci · 9:41 AM`}),(0,H.jsx)(`div`,{style:{color:`var(--ts-green)`,fontWeight:600,marginTop:2},children:`Verified across Chromium & Safari — WCAG AAA contrast (8.9:1) and 28/28 checkout specs green.`})]})]}):null,h>=6?(0,H.jsxs)(`div`,{style:{marginTop:`auto`,padding:`8px 12px`,borderRadius:8,background:`var(--ts-green-bg)`,border:`1px solid var(--ts-green-edge)`,color:`var(--ts-green)`,fontWeight:600,fontSize:12.5,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{children:`✓ ${N9} merged · E2E green`}),(0,H.jsx)(`span`,{style:{color:`var(--ts-mute)`,fontWeight:500},children:`Session complete`})]}):null]}),(0,H.jsxs)(`div`,{style:{background:`var(--ts-panel)`,display:`flex`,flexDirection:`column`},children:[(0,H.jsxs)(`div`,{style:{padding:`10px 12px`,borderBottom:`1px solid var(--ts-rule)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsx)(`strong`,{style:{fontSize:12.5},children:`Artifacts`}),(0,H.jsx)(`div`,{style:{display:`flex`,gap:4},children:[`Code`,`View`,`Canvas`].map(e=>(0,H.jsx)(`button`,{type:`button`,onClick:()=>v(e),style:{appearance:`none`,border:`1px solid var(--ts-rule)`,background:_===e?`var(--ts-card-hi)`:`transparent`,color:_===e?`var(--ts-ink)`:`var(--ts-mute)`,borderRadius:6,padding:`3px 8px`,fontSize:11.5,fontWeight:600,cursor:`pointer`},children:e},e))})]}),_===`Code`?(0,H.jsxs)(`div`,{style:{padding:`10px 0`,display:`flex`,flexDirection:`column`,gap:2},children:[(0,H.jsx)(`div`,{style:{padding:`0 12px 8px`,fontSize:11,fontFamily:`var(--font-mono, monospace)`,color:`var(--ts-mute)`},children:`styles/cta-button.css · +3 -2`}),yse.map(([e,t,n,r],i)=>(0,H.jsxs)(`div`,{className:`hz-ts-diff-row`,"data-kind":n||void 0,children:[(0,H.jsx)(`span`,{style:{color:`var(--ts-dim)`},children:e}),(0,H.jsx)(`span`,{style:{color:`var(--ts-dim)`},children:t}),(0,H.jsx)(`span`,{children:r})]},i))]}):_===`View`?(0,H.jsxs)(`div`,{style:{padding:16,display:`flex`,flexDirection:`column`,gap:12},children:[(0,H.jsx)(`div`,{style:{fontSize:11,fontFamily:`var(--font-mono, monospace)`,color:`var(--ts-mute)`},children:`BEFORE (LOW CONTRAST · 1.9:1)`}),(0,H.jsx)(`div`,{style:{padding:`9px 14px`,borderRadius:8,background:`var(--ts-pink-low)`,color:`var(--ts-pink-ink-bad)`,fontWeight:500,textAlign:`center`,fontSize:13},children:`Buy Now — $49`}),(0,H.jsx)(`div`,{style:{fontSize:11,fontFamily:`var(--font-mono, monospace)`,color:`var(--ts-green)`},children:`AFTER FIX (${F9} ON ${I9} · 8.9:1 AAA)`}),(0,H.jsx)(`div`,{style:{padding:`9px 14px`,borderRadius:8,background:`var(--ts-pink-fill)`,color:`var(--ts-pink-ink-good)`,fontWeight:700,textAlign:`center`,fontSize:13},children:`Buy Now — $49`})]}):(0,H.jsxs)(`div`,{style:{padding:16,display:`flex`,flexDirection:`column`,gap:10,fontSize:12.5},children:[(0,H.jsx)(`div`,{style:{fontWeight:600},children:`Fix: Button Dark Mode`}),(0,H.jsxs)(`div`,{style:{color:`var(--ts-mute)`,lineHeight:1.5},children:[`Global dark theme inherited light foreground text onto `,(0,H.jsx)(`code`,{children:`.cta-button`}),` without scoping contrast to the accent surface token.`]}),(0,H.jsx)(`div`,{style:{color:`var(--ts-green)`,fontWeight:600},children:`✓ WCAG AAA contrast ratio (8.9:1) verified`})]})]})]})]})]}),(0,H.jsxs)(`section`,{className:`hz-ts-sec`,"aria-label":`Get Hanzo Team`,children:[(0,H.jsxs)(`div`,{className:`hz-ts-split`,style:{alignItems:`center`},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:10},children:[(0,H.jsx)(`span`,{className:`hz-ts-kicker`,children:`Paste and ship`}),(0,H.jsx)(`h2`,{className:`hz-ts-h2`,children:`Get Team`}),(0,H.jsx)(`p`,{className:`hz-ts-sub`,children:`Paste this prompt into any agent. It reads the skill manifest and connects your project to Hanzo Team.`})]}),(0,H.jsxs)(`div`,{className:`hz-ts-stage-card`,style:{gap:12},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,fontSize:12,color:`var(--ts-mute)`},children:[(0,H.jsx)(`span`,{style:{fontFamily:`var(--font-mono, monospace)`},children:`Agent prompt · MIT Open Source`}),(0,H.jsxs)(`button`,{type:`button`,onClick:()=>{navigator.clipboard?.writeText(L9),x(!0),window.setTimeout(()=>x(!1),1800)},style:{appearance:`none`,border:`1px solid var(--ts-rule-strong)`,background:`var(--ts-card)`,color:`var(--ts-ink)`,borderRadius:7,padding:`4px 10px`,fontSize:11.5,fontWeight:600,display:`inline-flex`,alignItems:`center`,gap:6,cursor:`pointer`},children:[b?(0,H.jsx)(Vt,{size:12,color:`var(--ts-green)`}):(0,H.jsx)(Fp,{size:12}),(0,H.jsx)(`span`,{children:b?`Copied`:`Copy`})]})]}),(0,H.jsx)(`div`,{style:{padding:`12px 14px`,borderRadius:10,background:`var(--ts-panel)`,border:`1px solid var(--ts-rule)`,fontFamily:`var(--font-mono, monospace)`,fontSize:12.5,color:`var(--ts-ink)`,wordBreak:`break-word`},children:L9})]})]}),(0,H.jsxs)(z,{width:`100%`,p:DH.edge,rounded:Q.card,borderWidth:1,borderColor:X.rule,bg:X.panel,items:`center`,gap:DH.inset,style:{textAlign:`center`,marginTop:12},children:[(0,H.jsx)(a,{size:Z.title,color:X.ink,fontWeight:`700`,children:`One workspace for how your team actually works.`}),(0,H.jsx)(a,{size:Z.body,color:X.mute,style:{maxWidth:560},children:`Bring your projects, tasks, conversations, docs, meetings, and AI teammates together.`}),(0,H.jsxs)(y,{gap:DH.tight,flexWrap:`wrap`,justify:`center`,pt:DH.tight,children:[(0,H.jsx)(W,{size:`lg`,rounded:Q.pill,bg:X.ink,disabled:t,onPress:e,children:(0,H.jsx)(a,{size:Z.small,color:X.ground,fontWeight:`600`,children:t?`One moment…`:`Open Team`})}),(0,H.jsx)(W,{size:`lg`,variant:`outline`,rounded:Q.pill,onPress:()=>window.location.assign(`https://hanzo.ai/contact-sales`),children:(0,H.jsx)(a,{size:Z.small,color:X.ink,fontWeight:`500`,children:`Contact sales`})})]})]})]})]})}var bse=`https://pay.hanzo.ai/cart`,xse=(e,t)=>{let n=new URL(bse);return new URLSearchParams(e).forEach((e,t)=>n.searchParams.set(t,e)),n.searchParams.get(`plan`)||n.searchParams.set(`plan`,`team`),n.searchParams.set(`returnUrl`,`${t}/`),n.toString()},Sse=`/auth/callback`,$=`https://hanzo.ai`,q9=`https://docs.hanzo.ai`,Cse=`https://github.com/hanzoai`,wse=`https://status.hanzo.ai`,Tse=`https://hanzo.agency`,Ese=`https://hanzo.university`,J9=[{label:`Features`,href:`https://hanzo.ai/team`},{label:`Docs`,href:`https://docs.hanzo.ai`},{label:`Hanzo Bot`,href:`https://hanzo.bot`},{label:`Hanzo App`,href:`https://hanzo.app`},{label:`API Platform`,href:`https://platform.hanzo.ai`},{label:`Hanzo AI`,href:`https://hanzo.ai`}],Dse=[{id:`damon`,name:`Damon Motorcycles`,logo:`/logos/customers/damon-motorcycles.svg`,href:`${$}/customers/damon-motorcycles`},{id:`kanoa`,name:`KANOA`,logo:`/logos/customers/kanoa.png`,href:`${$}/customers/kanoa`},{id:`skully`,name:`SKULLY`,logo:`/logos/customers/skully.png`,href:`${$}/customers#skully`},{id:`bellabeat`,name:`Bellabeat`,logo:`/logos/customers/bellabeat.svg`,href:`${$}/customers#bellabeat`},{id:`stoned`,name:`STONED Audio`,logo:`/logos/customers/stoned.svg`,href:`${$}/customers#stoned`},{id:`unikrn`,name:`Unikrn`,logo:`/logos/customers/unikoin-gold.svg`,href:`${$}/customers#unikoin-gold`},{id:`arca`,name:`Arca`,logo:`/logos/customers/arca.png`,href:`${$}/customers#arca`},{id:`casper`,name:`Casper Labs`,logo:`/logos/customers/casper-blockchain.svg`,href:`${$}/customers#casper-blockchain`},{id:`triller`,name:`Triller`,logo:`/logos/customers/trillerfest.png`,href:`${$}/customers#trillerfest`},{id:`cover`,name:`Cover Build`,logo:`/logos/customers/cover-build.svg`,href:`${$}/customers#cover-build`},{id:`myle`,name:`Myle Tap`,logo:`/logos/customers/myle-tap.png`,href:`${$}/customers#myle-tap`},{id:`keek`,name:`Personas Social`,logo:`/logos/customers/keek-social.svg`,href:`${$}/customers#keek-social`}],Ose=[[{title:`Products`,href:`${$}/products`,links:[{label:`Hanzo App`,href:`https://hanzo.app`},{label:`Hanzo Dev`,href:`${$}/dev`},{label:`Hanzo Bot`,href:`https://hanzo.bot`},{label:`Hanzo Team`,href:`https://hanzo.team`},{label:`Hanzo Science`,href:`${$}/science`},{label:`Hanzo Security`,href:`${$}/security`},{label:`Download app`,href:`${$}/download`},{label:`Pricing`,href:`${$}/pricing`}]},{title:`Capabilities`,links:[{label:`Hanzo Design`,href:`${$}/design`},{label:`MCP`,href:`${$}/mcp`},{label:`Skills`,href:`${$}/skills`},{label:`Integrations`,href:`${$}/integrations`},{label:`Hanzo CLI`,href:`${$}/cli`}]},{title:`Extensions`,links:[{label:`Hanzo in Chrome`,href:`${$}/extension`},{label:`Desktop app`,href:`${$}/desktop`},{label:`Hanzo IDE`,href:`${$}/ide`}]},{title:`Models`,href:`${$}/models`,links:[{label:`All models`,href:`${$}/models`},{label:`Zen`,href:`${$}/zen`},{label:`Enso`,href:`${$}/enso`},{label:`Kai`,href:`${$}/kai`},{label:`Video · Koma`,href:`${$}/koma`},{label:`Images · Iro`,href:`${$}/iro`},{label:`3D · Mori`,href:`${$}/mori`},{label:`Voice · Koe`,href:`${$}/koe`},{label:`Benchmarks`,href:`${$}/benchmarks`}]}],[{title:`Enterprise`,href:`${$}/enterprise`,links:[{label:`Overview`,href:`${$}/enterprise`},{label:`All solutions`,href:`${$}/solutions`},{label:`Customer stories`,href:`${$}/customers`},{label:`Contact sales`,href:`${$}/contact-sales`}]},{title:`Teams`,href:`${$}/solutions`,links:[{label:`Engineering`,href:`${$}/solutions/engineering`},{label:`Operations`,href:`${$}/solutions/operations`},{label:`Finance`,href:`${$}/solutions/finance`},{label:`Data`,href:`${$}/solutions/data`},{label:`Sales`,href:`${$}/solutions/sales`},{label:`Marketing`,href:`${$}/solutions/marketing`},{label:`Design`,href:`${$}/solutions/design`}]},{title:`Industries`,href:`${$}/solutions`,links:[{label:`Cybersecurity`,href:`${$}/solutions/cybersecurity`},{label:`Financial services`,href:`${$}/solutions/financial-services`},{label:`Government`,href:`${$}/solutions/government`},{label:`Healthcare`,href:`${$}/solutions/healthcare`},{label:`Education`,href:`${$}/solutions/education`},{label:`Law`,href:`${$}/solutions/law`},{label:`Retail`,href:`${$}/solutions/retail`}]},{title:`Programs`,href:`${$}/startups`,links:[{label:`Startups`,href:`${$}/startups`},{label:`Affiliate program`,href:`${$}/affiliate`},{label:`Referral program`,href:`${$}/referral`},{label:`Reserved tier`,href:`${$}/solutions/reserved`},{label:`OSS grants`,href:`${$}/open-source`}]}],[{title:`Developers`,href:q9,links:[{label:`Developer docs`,href:q9},{label:`API reference`,href:`${q9}/docs/openapi/`},{label:`Quickstart`,href:`${q9}/docs/quickstart/`},{label:`SDKs`,href:`${$}/sdks`},{label:`Console`,href:`https://platform.hanzo.ai`},{label:`GitHub`,href:Cse}]},{title:`API Platform`,href:`${$}/platform`,links:[{label:`Overview`,href:`${$}/platform`},{label:`API keys`,href:`https://platform.hanzo.ai/settings/organization/keys`},{label:`Gateway`,href:`${$}/gateway`},{label:`Agents`,href:`${$}/agents`},{label:`Playground`,href:`${$}/playground`}]},{title:`Cloud`,href:`${$}/products`,links:[{label:`Base`,href:`${$}/base`},{label:`Machines`,href:`${$}/machines`},{label:`Search`,href:`${$}/search`},{label:`Datastore`,href:`${$}/datastore`},{label:`Memory`,href:`${$}/products/memory`},{label:`Realtime`,href:`${$}/realtime`},{label:`Observability`,href:`${$}/o11y`},{label:`Insights`,href:`${$}/insights`},{label:`Commerce`,href:`${$}/commerce`}]},{title:`Help and security`,links:[{label:`Availability`,href:wse},{label:`Help center`,href:`${$}/support`},{label:`Security and compliance`,href:`${$}/security`},{label:`Trust & transparency`,href:`${$}/trust`}]}],[{title:`Company`,href:`${$}/about`,links:[{label:`Hanzo AI`,href:`${$}/about`},{label:`Careers`,href:`${$}/careers`},{label:`Philosophy`,href:`${$}/philosophy`},{label:`Research`,href:`${$}/research`},{label:`News`,href:`${$}/press`},{label:`Investors`,href:`${$}/investors`},{label:`Brand`,href:`${$}/brand`},{label:`Open source`,href:`${$}/open-source`},{label:`Contact`,href:`${$}/contact`}]},{title:`Resources`,href:`${$}/learn`,links:[{label:`Blog`,href:`${$}/blog`},{label:`Guides`,href:`${q9}/docs/guides/`},{label:`Cookbook`,href:`${q9}/docs/guides/cookbook/`},{label:`Hanzo University`,href:Ese},{label:`Hanzo Agency`,href:Tse},{label:`Cost calculator`,href:`${$}/calculator`}]},{title:`Terms and policies`,href:`${$}/legal`,links:[{label:`Privacy choices`,href:`${$}/privacy#choices`},{label:`Privacy policy`,href:`${$}/privacy`},{label:`Terms of service`,href:`${$}/terms`},{label:`Usage policy`,href:`${$}/aup`},{label:`Cookie policy`,href:`${$}/cookies`},{label:`Other policies`,href:`${$}/legal`}]}]],kse=[{label:`Discord`,href:`https://discord.gg/XthHQQj`},{label:`Telegram`,href:`https://t.me/hanzoai`},{label:`X`,href:`https://x.com/hanzoai`},{label:`GitHub`,href:`https://github.com/hanzoai`},{label:`LinkedIn`,href:`https://linkedin.com/company/hanzo-ai`},{label:`Facebook`,href:`https://facebook.com/hanzoinc`},{label:`Bluesky`,href:`https://bsky.app/profile/hanzoai.bsky.social`},{label:`Reddit`,href:`https://www.reddit.com/r/HanzoAI/`},{label:`TikTok`,href:`https://www.tiktok.com/@hanzoinc`},{label:`Instagram`,href:`https://www.instagram.com/hanzoinc`}];function Ase(){let e=(0,V.useRef)(null);return(0,V.useEffect)(()=>{let t=e.current,n=t?.parentElement;if(!t||!n)return;let r=t.getContext(`2d`);if(!r)return;let i=window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,a=0,o=0,s=0,c=0,l=0,u=-1e4,d=-1e4,f=-1e4,p=-1e4,m=!1,h=0,g=0,_=[.085,.155,.235],v=[.32,.44,.56,.68,.8,.92],y=[[],[],[]],b=[[],[],[],[],[],[]],x=()=>{if(a<1||o<1)return;r.clearRect(0,0,a,o),r.fillStyle=getComputedStyle(t).color;for(let e=0;e<3;e++)y[e].length=0;for(let e=0;e<6;e++)b[e].length=0;let e=a*.18,n=o*.58,i=a*.82,l=o*.48,u=1/Math.max(1,o),d=Math.max(1,a*.3),m=Math.max(1,a*.34),g=h>.01&&f>-5e3;for(let t=0;t<c;t++){let r=t*10,o=.28+r*u*.95,c=o<1?o:1,_=o<1?u*.95:0;for(let t=0;t<s;t++){let o=t*10,s=1-o/d,u=(o-a*.66)/m,v=.14,x=0;s>=u&&s>.14?(v=s,x=-1/d):u>.14&&(v=u,x=1/m);let S=o*.012+r*.006,C=r*.014-o*.005,w=(o+r)*.007,T=Math.sin(S),E=Math.cos(S),D=Math.cos(C),O=Math.sin(C),k=Math.sin(w),A=Math.cos(w),j=T*D*.65+k*.35,ee=.65*(.012*E*D+T*.005*O)+.00245*A,M=.65*(.006*E*D-T*.014*O)+.00245*A,N=.56+.44*j,P=v*c*N*1.24,te=(x*c*N+v*c*.44*ee)*1.24,F=(v*_*N+v*c*.44*M)*1.24,I=o-e,ne=r-n,re=I*I+ne*ne;if(re<57600){let e=Math.sqrt(re)||1,t=1-e/240;P+=t*t*.24;let n=-.48*t/(240*e);te+=n*I,F+=n*ne}let ie=o-i,L=r-l,ae=ie*ie+L*L;if(ae<57600){let e=Math.sqrt(ae)||1,t=1-e/240;P+=t*t*.24;let n=-.48*t/(240*e);te+=n*ie,F+=n*L}let oe=P<0?0:P>1?1:P;if(oe<.05)continue;let R=-te*68,se=-F*68,ce=1/Math.sqrt(R*R+se*se+1),le=R*ce,ue=se*ce,de=ce,fe=o+le*oe*2.4,pe=r+ue*oe*2.4,me=oe*10*.38,he=-1;if(g){let e=f-o,t=p-r,n=e*e+t*t;if(n<65025){let r=1-Math.sqrt(n)/255,i=r*r*(3-2*r),a=108-oe*44,o=1/Math.sqrt(n+a*a),s=e*o,c=t*o,l=a*o,u=Math.max(0,le*s+ue*c+de*l),d=l+1,f=1/Math.sqrt(s*s+c*c+d*d),p=Math.max(0,(le*s+ue*c+de*d)*f),m=p*p,g=m*m,_=g*g*g,v=Math.max(.06,Math.min(1,(j+.72)*.68))*(.2+.8*oe),y=i*h*v*(.42*u+1.05*_),b=y*(.35+.65*oe);me=Math.min(4.8,me+b*10*.16),fe-=e/255*oe*2.2*i*h,pe-=t/255*oe*2.2*i*h,y>.07&&(he=Math.min(5,Math.floor((y-.07)*7.2)))}}he>=0?b[he].push(fe,pe,me):y[oe<.28?0:oe<.56?1:2].push(fe,pe,me)}}for(let e=0;e<3;e++){let t=y[e];if(t.length){r.globalAlpha=_[e],r.beginPath();for(let e=0;e<t.length;e+=3){let n=t[e],i=t[e+1],a=t[e+2];r.moveTo(n+a,i),r.arc(n,i,a,0,6.2832)}r.fill()}}for(let e=0;e<6;e++){let t=b[e];if(t.length){r.globalAlpha=v[e],r.beginPath();for(let e=0;e<t.length;e+=3){let n=t[e],i=t[e+1],a=t[e+2];r.moveTo(n+a,i),r.arc(n,i,a,0,6.2832)}r.fill()}}r.globalAlpha=1},S=()=>{g*=.9;let e=m?Math.min(1,.72+g*.28):0;h+=(e-h)*(m?.18:.08),f<-5e3&&u>-5e3?(f=u,p=d):u>-5e3&&(f+=(u-f)*.28,p+=(d-p)*.28),x(),l=h>.01||m?requestAnimationFrame(S):0},C=()=>{!l&&(h>.01||m)&&(l=requestAnimationFrame(S))},w=()=>{let e=n.getBoundingClientRect(),i=Math.min(window.devicePixelRatio||1,2);a=e.width,o=e.height,!(a<1||o<1)&&(t.width=Math.round(a*i),t.height=Math.round(o*i),t.style.width=`${a}px`,t.style.height=`${o}px`,r.setTransform(i,0,0,i,0,0),s=Math.ceil(a/10)+1,c=Math.ceil(o/10)+1,x())},T=e=>{if(i||e.pointerType===`touch`)return;let t=n.getBoundingClientRect(),r=e.clientX-t.left,a=e.clientY-t.top;u>-5e3&&(g=Math.min(1.4,g+Math.hypot(r-u,a-d)*.016)),u=r,d=a,m=!0,C()},E=()=>{m=!1,C()};w();let D=new ResizeObserver(w);return D.observe(n),window.addEventListener(`pointermove`,T,{passive:!0}),document.addEventListener(`mouseleave`,E,{passive:!0}),()=>{l&&cancelAnimationFrame(l),D.disconnect(),window.removeEventListener(`pointermove`,T),document.removeEventListener(`mouseleave`,E)}},[]),(0,H.jsx)(`canvas`,{ref:e,"aria-hidden":`true`,style:{position:`absolute`,inset:0,width:`100%`,height:`100%`,pointerEvents:`none`,zIndex:0,color:`var(--foreground)`}})}var jse=()=>{let{standing:e,depart:t,request:n}=dV(),[r,i]=(0,V.useState)(null);if(e===`in`)return null;let o=(e,n)=>{i(e),t(n).catch(()=>i(null))},s=r!==null;return(0,H.jsxs)(z,{flex:1,bg:X.ground,overflow:`scroll`,children:[(0,H.jsxs)(y,{width:`100%`,minH:68,px:DH.wide,py:DH.tight,items:`center`,justify:`space-between`,borderBottomWidth:1,borderColor:X.rule,bg:X.ground,style:{position:`sticky`,top:0,zIndex:40},children:[(0,H.jsx)(y,{items:`center`,gap:DH.tight,cursor:`pointer`,shrink:0,onPress:()=>window.location.assign(`/`),children:(0,H.jsx)(a,{size:Z.row,color:X.ink,fontWeight:`600`,children:`Hanzo ${PB.title}`})}),(0,H.jsxs)(y,{items:`center`,gap:DH.tight,shrink:0,children:[(0,H.jsx)(`div`,{className:`hz-landing-nav-links`,children:J9.map(e=>(0,H.jsx)(W,{size:`sm`,chromeless:!0,rounded:Q.pill,onPress:()=>window.location.assign(e.href),children:(0,H.jsx)(a,{size:Z.small,color:X.mute,children:e.label})},e.label))}),(0,H.jsx)(W,{size:`sm`,variant:`outline`,rounded:Q.pill,onPress:()=>window.location.assign(`https://hanzo.ai/contact-sales`),children:(0,H.jsx)(a,{size:Z.small,color:X.ink,fontWeight:`500`,children:`Contact sales`})}),(0,H.jsx)(W,{size:`sm`,rounded:Q.pill,bg:X.ink,disabled:s,onPress:()=>o(`open`,`login`),children:(0,H.jsx)(a,{size:Z.small,color:X.ground,fontWeight:`600`,children:((e,t)=>r===e?`One moment…`:t)(`open`,`Open Team`)})})]})]}),(0,H.jsxs)(`main`,{className:`hz-signin`,children:[(0,H.jsx)(Ase,{}),(0,H.jsxs)(`div`,{className:`hz-signin-row`,children:[(0,H.jsxs)(`div`,{className:`hz-signin-copy`,children:[(0,H.jsx)(dJ,{bare:!0,title:`Sign in to Hanzo ${PB.title}`,line:`AI cockpit, live streams, issue boards, channels, and bots for your team.`,request:n,termsHref:`${$}/terms`,privacyHref:`${$}/privacy`}),(0,H.jsx)(y,{items:`center`,justify:`center`,pt:DH.tight,children:(0,H.jsx)(a,{size:Z.small,color:X.mute,cursor:`pointer`,onPress:()=>window.location.assign(`${$}/team`),style:{textDecoration:`underline`,textUnderlineOffset:`3px`},children:`Learn more about Hanzo Team →`})})]}),(0,H.jsxs)(`div`,{className:`hz-signin-figure`,children:[(0,H.jsx)(fse,{}),(0,H.jsx)(mse,{})]})]})]}),(0,H.jsxs)(z,{width:`100%`,items:`center`,px:DH.wide,py:DH.edge,gap:DH.inset,bg:X.ground,children:[(0,H.jsx)(a,{size:Z.small,color:X.mute,fontWeight:`500`,style:{textAlign:`center`},children:`Companies building with the Hanzo API`}),(0,H.jsx)(`div`,{className:`hz-mq-view`,children:(0,H.jsx)(`div`,{className:`hz-mq-track`,children:[0,1].map(e=>Dse.map(t=>{let n=e>0;return(0,H.jsx)(`a`,{href:t.href,className:`hz-logo`,"aria-label":n?void 0:t.name,"aria-hidden":n||void 0,tabIndex:n?-1:void 0,target:`_blank`,rel:`noopener noreferrer`,title:t.name,children:(0,H.jsx)(`img`,{src:t.logo,alt:n?``:t.name,loading:`lazy`})},`${e}-${t.id}`)}))})})]}),(0,H.jsx)(K9,{onOpen:()=>o(`open`,`login`),working:s}),(0,H.jsx)(z,{width:`100%`,borderTopWidth:1,borderColor:X.rule,bg:X.ground,px:DH.wide,py:DH.edge,children:(0,H.jsxs)(z,{width:`100%`,maxW:1240,mx:`auto`,gap:DH.edge,children:[(0,H.jsxs)(y,{justify:`space-between`,items:`flex-start`,gap:DH.edge,flexWrap:`wrap`,children:[(0,H.jsx)(z,{minW:160,gap:DH.tight,children:(0,H.jsxs)(y,{items:`center`,gap:DH.tight,cursor:`pointer`,onPress:()=>window.location.assign($),children:[(0,H.jsx)(z,{width:22,height:22,rounded:Q.field,bg:X.ink,items:`center`,justify:`center`,children:(0,H.jsx)(a,{size:Z.small,color:X.ground,fontWeight:`700`,children:`H`})}),(0,H.jsx)(a,{size:Z.row,color:X.ink,fontWeight:`600`,children:`Hanzo`})]})}),(0,H.jsx)(y,{gap:DH.edge,flexWrap:`wrap`,grow:1,justify:`space-between`,children:Ose.map((e,t)=>(0,H.jsx)(z,{minW:150,gap:DH.inset,children:e.map(e=>(0,H.jsxs)(z,{gap:DH.tight,children:[(0,H.jsx)(a,{size:Z.small,color:X.ink,fontWeight:`600`,cursor:e.href?`pointer`:void 0,onPress:e.href?()=>window.location.assign(e.href):void 0,style:{lineHeight:`1.35`},children:e.title}),(0,H.jsx)(z,{style:{gap:`2.5px`},children:e.links.map(e=>(0,H.jsx)(a,{size:Z.small,color:X.mute,cursor:e.href?`pointer`:void 0,onPress:()=>window.location.assign(e.href),style:{lineHeight:`1.32`},children:e.label},e.href+e.label))})]},e.title))},t))})]}),(0,H.jsx)(y,{pt:DH.inset,borderTopWidth:1,borderColor:X.rule,items:`center`,flexWrap:`wrap`,style:{columnGap:`24px`,rowGap:`8px`},children:kse.map(e=>(0,H.jsxs)(a,{size:Z.small,color:X.mute,cursor:`pointer`,onPress:()=>window.location.assign(e.href),style:{lineHeight:`1.35`},children:[e.label,` ↗`]},e.label))}),(0,H.jsxs)(y,{pt:DH.inset,borderTopWidth:1,borderColor:X.rule,items:`center`,justify:`space-between`,flexWrap:`wrap`,gap:DH.tight,children:[(0,H.jsx)(a,{size:Z.chip,color:X.dim,children:`© 2026 Hanzo AI, Inc. All rights reserved.`}),(0,H.jsx)(y,{gap:DH.inset,flexWrap:`wrap`,children:[[`Terms`,`${$}/terms`],[`Privacy`,`${$}/privacy`],[`Usage policy`,`${$}/aup`],[`Privacy choices`,`${$}/privacy#choices`]].map(([e,t])=>(0,H.jsx)(a,{size:Z.chip,color:X.dim,cursor:`pointer`,onPress:()=>window.location.assign(t),children:e},e))})]})]})})]})},Y9=`team.enrol_tried`,Mse=({children:e})=>{let{standing:t,who:n,depart:r,leave:i}=dV(),{standing:o,refusal:s,enrolNow:c,enrolment:l}=eH(),[u,d]=(0,V.useState)(!1),[f,p]=(0,V.useState)(!1);if((0,V.useEffect)(()=>{if(o===`settled`){try{sessionStorage.removeItem(Y9)}catch{}p(!1)}},[o]),(0,V.useEffect)(()=>{if(t!==`in`||o!==`stranger`)return;let e=!1;try{e=sessionStorage.getItem(Y9)===`1`}catch{e=!0}if(e){p(!0);return}try{sessionStorage.setItem(Y9,`1`)}catch{}d(!0),c().then(e=>{e?d(!1):navigator.webdriver?(d(!1),p(!0)):window.location.replace(l)})},[t,o,c,l]),window.location.pathname===Sse)return(0,H.jsx)(sse,{});if(window.location.pathname===`/start`)return(0,H.jsx)(Nse,{to:xse(window.location.search,window.location.origin)});if(t===`unknown`)return(0,H.jsx)(Z9,{});if(t===`out`)return(0,H.jsx)(jse,{});let m=n?.email??n?.label??null,h=()=>{try{sessionStorage.removeItem(Y9)}catch{}d(!0),c().then(e=>{e?d(!1):window.location.assign(l)})};return o===`stranger`?f?(0,H.jsx)(Q9,{title:`Finish setting up Hanzo Team`,body:`Provision your Team workspace to open channels, issues, docs, and CRM.`,account:m,onLeave:i,onOpen:h,working:u,children:(0,H.jsxs)(y,{items:`center`,justify:`center`,gap:DH.tight,flexWrap:`wrap`,pt:DH.tight,children:[(0,H.jsx)(W,{disabled:u,rounded:Q.pill,bg:X.ink,onPress:h,children:(0,H.jsx)(a,{size:Z.small,color:X.ground,fontWeight:`600`,children:u?`Setting up…`:`Set up workspace`})}),(0,H.jsx)(W,{variant:`outline`,rounded:Q.pill,onPress:()=>{r(`another`)},children:(0,H.jsx)(a,{size:Z.small,color:X.ink,fontWeight:`500`,children:`Switch account`})})]})}):(0,H.jsx)(Z9,{account:m,onLeave:i}):o===`refused`?(0,H.jsx)(Q9,{title:`Your workspace is not answering`,body:s?.message??`Check your connection or try signing in again.`,account:m,onLeave:i,onOpen:()=>window.location.reload(),working:!1,children:(0,H.jsxs)(y,{items:`center`,justify:`center`,gap:DH.tight,flexWrap:`wrap`,pt:DH.tight,children:[(0,H.jsx)(W,{rounded:Q.pill,bg:X.ink,onPress:()=>window.location.reload(),children:(0,H.jsx)(a,{size:Z.small,color:X.ground,fontWeight:`600`,children:`Try again`})}),(0,H.jsx)(W,{variant:`outline`,rounded:Q.pill,onPress:()=>{r(`another`)},children:(0,H.jsx)(a,{size:Z.small,color:X.ink,fontWeight:`500`,children:`Switch account`})})]})}):o===`unknown`?(0,H.jsx)(Z9,{account:m,onLeave:i}):(0,H.jsx)(H.Fragment,{children:e})},Nse=({to:e})=>((0,V.useEffect)(()=>window.location.replace(e),[e]),(0,H.jsx)(Z9,{})),X9=({account:e,onLeave:t})=>{let n=`Hanzo ${PB.title}`;return(0,H.jsxs)(y,{width:`100%`,minH:68,px:DH.wide,py:DH.tight,items:`center`,justify:`space-between`,borderBottomWidth:1,borderColor:X.rule,bg:X.ground,style:{position:`sticky`,top:0,zIndex:40},children:[(0,H.jsx)(y,{items:`center`,gap:DH.tight,cursor:`pointer`,shrink:0,onPress:()=>window.location.assign(`/`),children:(0,H.jsx)(a,{size:Z.row,color:X.ink,fontWeight:`600`,children:n})}),(0,H.jsxs)(y,{items:`center`,gap:DH.tight,shrink:0,children:[e?(0,H.jsx)(a,{size:Z.small,color:X.mute,children:e}):null,(0,H.jsx)(W,{size:`sm`,variant:`outline`,rounded:Q.pill,onPress:()=>window.location.assign(`${$}/contact-sales`),children:(0,H.jsx)(a,{size:Z.small,color:X.ink,fontWeight:`500`,children:`Contact sales`})}),t?(0,H.jsx)(W,{size:`sm`,variant:`outline`,rounded:Q.pill,onPress:t,children:(0,H.jsx)(a,{size:Z.small,color:X.ink,fontWeight:`500`,children:`Sign out`})}):null]})]})},Z9=({account:e,onLeave:t})=>(0,H.jsxs)(z,{flex:1,minH:`100vh`,bg:X.ground,children:[(0,H.jsx)(X9,{account:e,onLeave:t}),(0,H.jsxs)(z,{flex:1,items:`center`,justify:`center`,gap:DH.tight,children:[(0,H.jsx)(tv,{}),(0,H.jsx)(a,{size:Z.body,color:X.ink,fontWeight:`500`,children:`Opening Hanzo ${PB.title}…`})]})]}),Q9=({title:e,body:t,account:n,onLeave:r,onOpen:i,working:o,children:s})=>(0,H.jsxs)(z,{flex:1,bg:X.ground,overflow:`scroll`,children:[(0,H.jsx)(X9,{account:n,onLeave:r}),(0,H.jsx)(z,{width:`100%`,minH:540,items:`center`,justify:`center`,px:DH.wide,py:DH.wide,children:(0,H.jsxs)(z,{width:`100%`,maxW:480,items:`center`,gap:DH.inset,p:DH.wide,rounded:Q.panel,bg:X.panel,borderWidth:1,borderColor:X.rule,children:[(0,H.jsx)(a,{size:Z.title,color:X.ink,fontWeight:`600`,style:{textAlign:`center`},children:e}),t?(0,H.jsx)(a,{size:Z.body,color:X.mute,style:{textAlign:`center`},children:t}):null,s]})}),(0,H.jsx)(K9,{onOpen:i,working:o})]}),Pse=()=>Ti(ose),Fse=200,Ise=()=>{let{effectiveTheme:e}=t7();return(0,V.useEffect)(()=>{$5(X5()),dae(UB().getAccessToken())},[]),(0,H.jsx)(Ay,{theme:e,position:`top-center`})},Lse=()=>(0,H.jsxs)(Qne,{children:[(0,H.jsx)(Zm,{delay:Fse,children:(0,H.jsx)(xV,{children:(0,H.jsxs)(rH,{children:[(0,H.jsx)(yoe,{}),(0,H.jsx)(Mse,{children:(0,H.jsx)(Aa,{children:(0,H.jsx)(Pse,{})})})]})})}),(0,H.jsx)(Ise,{}),(0,H.jsx)(lre,{floating:!1})]});Te({token:()=>UB().getAccessToken()??void 0});var $9=document.getElementById(`root`);if(!$9)throw Error(`no #root`);(0,Wn.createRoot)($9).render((0,H.jsx)(V.StrictMode,{children:(0,H.jsx)(Lse,{})}));export{dW as $,C3 as A,JG as B,p3 as C,v3 as D,g3 as E,YJ as F,gG as G,HG as H,CJ as I,TG as J,wG as K,vK as L,J0 as M,NZ as N,b3 as O,VY as P,lW as Q,cK as R,f3 as S,h3 as T,EG as U,WG as V,hG as W,hW as X,uG as Y,cW as Z,a3 as _,Fp as _t,I3 as a,rv as at,u3 as b,La as bt,K4 as c,F_ as ct,Z4 as d,Jg as dt,eH as et,$4 as f,u_ as ft,i3 as g,vm as gt,r3 as h,W as ht,R3 as i,eC as it,I2 as j,x3 as k,q4 as l,Rg as lt,n3 as m,Bg as mt,K3 as n,$S as nt,F3 as o,P_ as ot,t3 as p,d_ as pt,DG as q,L3 as r,nC as rt,G4 as s,I_ as st,T8 as t,HB as tt,Y4 as u,Wg as ut,o3 as v,wp as vt,m3 as w,d3 as x,c3 as y,U as yt,oK as z};
|
|
194
|
+
//# sourceMappingURL=index-un983StG.js.map
|