@hanzo/ui 5.6.1 → 5.7.1
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/3d/carousel.js +1 -1
- package/dist/3d/carousel.mjs +1 -1
- package/dist/animation/animated-background.js +1 -1
- package/dist/animation/animated-background.mjs +1 -1
- package/dist/animation/animated-icon.js +2 -2
- package/dist/animation/animated-icon.mjs +2 -2
- package/dist/animation/animated-list.js +1 -1
- package/dist/animation/animated-list.mjs +1 -1
- package/dist/animation/animated-number.js +1 -1
- package/dist/animation/animated-number.mjs +1 -1
- package/dist/animation/index.js +2 -2
- package/dist/animation/index.mjs +2 -2
- package/dist/auth/index.js +2 -2
- package/dist/auth/index.mjs +2 -2
- package/dist/billing/index.js +2 -2
- package/dist/billing/index.mjs +2 -2
- package/dist/drawer.js +1 -1
- package/dist/drawer.mjs +1 -1
- package/dist/models/index.js +1 -1
- package/dist/models/index.mjs +1 -1
- package/dist/navigation/hanzo-shell.js +1 -1
- package/dist/navigation/hanzo-shell.mjs +1 -1
- package/dist/navigation/index.js +2 -2
- package/dist/navigation/index.mjs +2 -2
- package/dist/primitives/drawer.d.ts +2 -2
- package/dist/primitives/drawer.d.ts.map +1 -1
- package/dist/primitives/form.d.ts +1 -1
- package/dist/primitives/form.d.ts.map +1 -1
- package/dist/src/auth/AuthGuard.d.ts.map +1 -1
- package/dist/src/auth/AuthGuard.js +3 -7
- package/dist/src/auth/IAMLoginButton.d.ts +10 -3
- package/dist/src/auth/IAMLoginButton.d.ts.map +1 -1
- package/dist/src/auth/IAMLoginButton.js +14 -19
- package/dist/src/auth/PasswordForm.d.ts +22 -0
- package/dist/src/auth/PasswordForm.d.ts.map +1 -0
- package/dist/src/auth/PasswordForm.js +28 -0
- package/dist/src/auth/SignIn.d.ts +37 -0
- package/dist/src/auth/SignIn.d.ts.map +1 -0
- package/dist/src/auth/SignIn.js +26 -0
- package/dist/src/auth/SocialButton.d.ts +27 -0
- package/dist/src/auth/SocialButton.d.ts.map +1 -0
- package/dist/src/auth/SocialButton.js +37 -0
- package/dist/src/auth/Web3Connect.d.ts +9 -0
- package/dist/src/auth/Web3Connect.d.ts.map +1 -0
- package/dist/src/auth/Web3Connect.js +11 -0
- package/dist/src/auth/iam.d.ts +56 -0
- package/dist/src/auth/iam.d.ts.map +1 -0
- package/dist/src/auth/iam.js +78 -0
- package/dist/src/auth/index.d.ts +11 -0
- package/dist/src/auth/index.d.ts.map +1 -1
- package/dist/src/auth/index.js +9 -0
- package/dist/src/auth/types.d.ts +43 -0
- package/dist/src/auth/types.d.ts.map +1 -0
- package/dist/src/auth/types.js +8 -0
- package/dist/src/billing/components/payment-manager.d.ts.map +1 -1
- package/dist/src/billing/components/payment-manager.js +13 -1
- package/dist/src/form/form.d.ts +4 -2
- package/dist/src/form/form.d.ts.map +1 -1
- package/dist/src/models/ModelCard.js +2 -2
- package/dist/src/navigation/hanzo-shell/AppSwitcher.js +1 -1
- package/dist/src/navigation/hanzo-shell/types.d.ts +1 -0
- package/dist/src/navigation/hanzo-shell/types.d.ts.map +1 -1
- package/dist/src/navigation/hanzo-shell/types.js +11 -0
- package/dist/src/navigation/hanzo-shell/useHanzoAuth.js +2 -2
- package/dist/util/index.mjs +1 -1
- package/package.json +7 -15
package/dist/navigation/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
'use strict';var react=require('react'),jsxRuntime=require('react/jsx-runtime');var Xe=Object.defineProperty;var t=(o,e)=>Xe(o,"name",{value:e,configurable:true});function ot({x:o,y:e,onClose:a}){let r=react.useRef(null);react.useEffect(()=>{let p=t(c=>{r.current&&!r.current.contains(c.target)&&a();},"handler"),s=t(c=>{c.key==="Escape"&&a();},"escape");return document.addEventListener("mousedown",p),document.addEventListener("keydown",s),()=>{document.removeEventListener("mousedown",p),document.removeEventListener("keydown",s);}},[a]);let d=[{label:"Brand Guidelines",href:"https://hanzo.ai/brand"},{label:"Press Kit",href:"https://hanzo.ai/press"},{label:"Download Logo",href:"https://hanzo.ai/brand#download"},{label:"Copy SVG",action:"copy-svg"},{label:"hanzo.ai \u2192",href:"https://hanzo.ai"}],i='<svg viewBox="0 0 67 67" xmlns="http://www.w3.org/2000/svg"><path d="M22.21 67V44.6369H0V67H22.21Z" fill="#ffffff"/><path d="M0 44.6369L22.21 46.8285V44.6369H0Z" fill="#DDDDDD"/><path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z" fill="#ffffff"/><path d="M22.21 0H0V22.3184H22.21V0Z" fill="#ffffff"/><path d="M66.7198 0H44.5098V22.3184H66.7198V0Z" fill="#ffffff"/><path d="M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z" fill="#DDDDDD"/><path d="M66.7198 67V44.6369H44.5098V67H66.7198Z" fill="#ffffff"/></svg>';return jsxRuntime.jsxs("div",{ref:r,role:"menu",className:"fixed z-[9999] min-w-[180px] rounded-xl border border-white/[0.08] bg-[#111113] py-1.5 shadow-2xl shadow-black/60",style:{top:e,left:o},children:[jsxRuntime.jsx("div",{className:"border-b border-white/[0.06] px-3 pb-2 pt-1",children:jsxRuntime.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-white/30",children:"Hanzo Brand"})}),d.map(p=>p.action==="copy-svg"?jsxRuntime.jsx("button",{type:"button",role:"menuitem",onClick:()=>{navigator.clipboard.writeText(i).catch(()=>{}),a();},className:"flex w-full items-center px-3 py-2 text-[13px] text-white/60 hover:bg-white/[0.05] hover:text-white/90 transition-colors text-left",children:"Copy SVG"},"copy"):jsxRuntime.jsx("a",{href:p.href,role:"menuitem",target:p.href?.startsWith("https")?"_blank":void 0,rel:"noopener noreferrer",onClick:a,className:"flex items-center px-3 py-2 text-[13px] text-white/60 hover:bg-white/[0.05] hover:text-white/90 transition-colors",children:p.label},p.label))]})}t(ot,"BrandContextMenu");function ne({size:o=22,className:e="",brandMenu:a=true,animate:r=true}){let[d,i]=react.useState(null),[p,s]=react.useState(false),c=react.useCallback(m=>{a&&(m.preventDefault(),i({x:m.clientX,y:m.clientY}));},[a]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("svg",{width:o,height:o,viewBox:"0 0 67 67",xmlns:"http://www.w3.org/2000/svg","aria-label":"Hanzo",className:e,style:r?{transition:"transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease",transform:p?"scale(1.12) perspective(80px) rotateY(-6deg)":"scale(1) perspective(80px) rotateY(0deg)",transformOrigin:"center center"}:{},onMouseEnter:()=>s(true),onMouseLeave:()=>s(false),onContextMenu:c,children:[jsxRuntime.jsx("path",{d:"M22.21 67V44.6369H0V67H22.21Z",fill:"#ffffff"}),jsxRuntime.jsx("path",{d:"M0 44.6369L22.21 46.8285V44.6369H0Z",fill:"#DDDDDD"}),jsxRuntime.jsx("path",{d:"M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z",fill:"#ffffff"}),jsxRuntime.jsx("path",{d:"M22.21 0H0V22.3184H22.21V0Z",fill:"#ffffff"}),jsxRuntime.jsx("path",{d:"M66.7198 0H44.5098V22.3184H66.7198V0Z",fill:"#ffffff"}),jsxRuntime.jsx("path",{d:"M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z",fill:"#DDDDDD"}),jsxRuntime.jsx("path",{d:"M66.7198 67V44.6369H44.5098V67H66.7198Z",fill:"#ffffff"})]}),d&&jsxRuntime.jsx(ot,{x:d.x,y:d.y,onClose:()=>i(null)})]})}t(ne,"HanzoMark");var R=[{id:"account",label:"Account",href:"https://hanzo.id/account",description:"Profile, orgs & referrals"},{id:"billing",label:"Billing",href:"https://billing.hanzo.ai",description:"Subscriptions & usage"},{id:"console",label:"Console",href:"https://console.hanzo.ai",description:"API keys & projects"},{id:"chat",label:"Chat",href:"https://hanzo.chat",description:"AI chat & models"},{id:"flow",label:"Flow",href:"https://flow.hanzo.ai",description:"Visual workflow builder"},{id:"bot",label:"Bot",href:"https://hanzo.bot",description:"AI bot platform"},{id:"o11y",label:"O11y",href:"https://o11y.hanzo.ai",description:"Traces, logs & metrics"},{id:"sentry",label:"Sentry",href:"https://sentry.hanzo.ai",description:"Error & crash tracking"},{id:"insights",label:"Insights",href:"https://insights.hanzo.ai",description:"Product analytics & flags"},{id:"analytics",label:"Analytics",href:"https://analytics.hanzo.ai",description:"Web analytics"},{id:"platform",label:"Platform",href:"https://platform.hanzo.ai",description:"Deploy & scale services"},{id:"cloud",label:"Cloud",href:"https://cloud.hanzo.ai",description:"Cloud infrastructure"},{id:"storage",label:"Storage",href:"https://s3.hanzo.ai",description:"S3 object storage"},{id:"kms",label:"KMS",href:"https://kms.hanzo.ai",description:"Secrets & key management"},{id:"dns",label:"DNS",href:"https://dns.hanzo.ai",description:"DNS management"},{id:"registry",label:"Registry",href:"https://registry.hanzo.ai",description:"Container registry"},{id:"commerce",label:"Commerce",href:"https://commerce.hanzo.ai",description:"Payments & storefront"},{id:"base",label:"Base",href:"https://base.hanzo.ai",description:"Backend-as-a-Service"},{id:"search",label:"Search",href:"https://search.hanzo.ai",description:"Full-text search"},{id:"auto",label:"Auto",href:"https://auto.hanzo.ai",description:"Workflow automation"},{id:"team",label:"Team",href:"https://hanzo.team",description:"Team collaboration"},{id:"sign",label:"Sign",href:"https://sign.hanzo.ai",description:"Document signing"},{id:"dataroom",label:"Dataroom",href:"https://dataroom.hanzo.ai",description:"Secure deal rooms"},{id:"captable",label:"Cap Table",href:"https://captable.hanzo.ai",description:"Equity management"},{id:"docs",label:"Docs",href:"https://docs.hanzo.ai",description:"Documentation"},{id:"status",label:"Status",href:"https://status.hanzo.ai",description:"System status"}],H={hanzo:{id:"hanzo",iam:"https://hanzo.id",billing:"https://billing.hanzo.ai",console:"https://console.hanzo.ai",cloud:"https://cloud.hanzo.ai",chat:"https://hanzo.chat",flow:"https://flow.hanzo.ai",bot:"https://hanzo.bot",o11y:"https://o11y.hanzo.ai",sentry:"https://sentry.hanzo.ai",insights:"https://insights.hanzo.ai",analytics:"https://analytics.hanzo.ai",platform:"https://platform.hanzo.ai",storage:"https://s3.hanzo.ai",s3:"https://s3.hanzo.ai",kms:"https://kms.hanzo.ai",dns:"https://dns.hanzo.ai",registry:"https://registry.hanzo.ai",commerce:"https://commerce.hanzo.ai",base:"https://base.hanzo.ai",search:"https://search.hanzo.ai",auto:"https://auto.hanzo.ai",team:"https://hanzo.team",sign:"https://sign.hanzo.ai",dataroom:"https://dataroom.hanzo.ai",captable:"https://captable.hanzo.ai",docs:"https://docs.hanzo.ai",status:"https://status.hanzo.ai"},lux:{id:"lux",iam:"https://lux.id",billing:"https://billing.lux.network",console:"https://console.lux.network",cloud:"https://cloud.lux.network",chat:"https://lux.chat",flow:"https://flow.lux.network",bot:"https://bot.lux.network",o11y:"https://o11y.lux.network",sentry:"https://sentry.lux.network",insights:"https://insights.lux.network",analytics:"https://analytics.lux.network",platform:"https://platform.lux.network",storage:"https://s3.lux.network",s3:"https://s3.lux.network",kms:"https://kms.lux.network",dns:"https://dns.lux.network",registry:"https://registry.lux.network",commerce:"https://commerce.lux.network",base:"https://base.lux.network",search:"https://search.lux.network",auto:"https://auto.lux.network",team:"https://team.lux.network",sign:"https://sign.lux.network",dataroom:"https://dataroom.lux.network",captable:"https://captable.lux.network",docs:"https://docs.lux.network",status:"https://status.lux.network"},zoo:{id:"zoo",iam:"https://zoo.id",billing:"https://billing.zoo.ngo",console:"https://console.zoo.ngo",cloud:"https://cloud.zoo.network",chat:"https://chat.zoo.ngo",flow:"https://flow.zoo.ngo",bot:"https://bot.zoo.ngo",o11y:"https://o11y.zoo.network",sentry:"https://sentry.zoo.network",insights:"https://insights.zoo.ngo",analytics:"https://analytics.zoo.ngo",platform:"https://platform.zoo.ngo",storage:"https://s3.zoo.ngo",s3:"https://s3.zoo.ngo",kms:"https://kms.zoo.network",dns:"https://dns.zoo.ngo",registry:"https://registry.zoo.ngo",commerce:"https://commerce.zoo.ngo",base:"https://base.zoo.ngo",search:"https://search.zoo.ngo",auto:"https://auto.zoo.ngo",team:"https://team.zoo.ngo",sign:"https://sign.zoo.ngo",dataroom:"https://dataroom.zoo.ngo",captable:"https://captable.zoo.ngo",docs:"https://docs.zoo.ngo",status:"https://status.zoo.network"},pars:{id:"pars",iam:"https://pars.id",billing:"https://billing.pars.network",console:"https://console.pars.network",cloud:"https://cloud.pars.network",chat:"https://chat.pars.network",flow:"https://flow.pars.network",bot:"https://bot.pars.network",o11y:"https://o11y.pars.network",sentry:"https://sentry.pars.network",insights:"https://insights.pars.network",analytics:"https://analytics.pars.network",platform:"https://platform.pars.network",storage:"https://s3.pars.network",s3:"https://s3.pars.network",kms:"https://kms.pars.network",dns:"https://dns.pars.network",registry:"https://registry.pars.network",commerce:"https://commerce.pars.network",base:"https://base.pars.network",search:"https://search.pars.network",auto:"https://auto.pars.network",team:"https://team.pars.network",sign:"https://sign.pars.network",dataroom:"https://dataroom.pars.network",captable:"https://captable.pars.network",docs:"https://docs.pars.network",status:"https://status.pars.network"}};function W(o){let e=H[o]||H.hanzo;return [{id:"account",label:"Account",href:`${e.iam}/account`,description:"Profile, orgs & referrals"},{id:"billing",label:"Billing",href:e.billing,description:"Subscriptions & usage"},{id:"console",label:"Console",href:e.console,description:"API keys & projects"},{id:"chat",label:"Chat",href:e.chat,description:"AI chat & models"},{id:"flow",label:"Flow",href:e.flow,description:"Visual workflow builder"},{id:"bot",label:"Bot",href:e.bot,description:"AI bot platform"},{id:"o11y",label:"O11y",href:e.o11y,description:"Traces, logs & metrics"},{id:"sentry",label:"Sentry",href:e.sentry,description:"Error & crash tracking"},{id:"insights",label:"Insights",href:e.insights,description:"Product analytics & flags"},{id:"analytics",label:"Analytics",href:e.analytics,description:"Web analytics"},{id:"platform",label:"Platform",href:e.platform,description:"Deploy & scale services"},{id:"cloud",label:"Cloud",href:e.cloud,description:"Cloud infrastructure"},{id:"storage",label:"Storage",href:e.storage,description:"S3 object storage"},{id:"kms",label:"KMS",href:e.kms,description:"Secrets & key management"},{id:"dns",label:"DNS",href:e.dns,description:"DNS management"},{id:"registry",label:"Registry",href:e.registry,description:"Container registry"},{id:"commerce",label:"Commerce",href:e.commerce,description:"Payments & storefront"},{id:"base",label:"Base",href:e.base,description:"Backend-as-a-Service"},{id:"search",label:"Search",href:e.search,description:"Full-text search"},{id:"auto",label:"Auto",href:e.auto,description:"Workflow automation"},{id:"team",label:"Team",href:e.team,description:"Team collaboration"},{id:"sign",label:"Sign",href:e.sign,description:"Document signing"},{id:"dataroom",label:"Dataroom",href:e.dataroom,description:"Secure deal rooms"},{id:"captable",label:"Cap Table",href:e.captable,description:"Equity management"},{id:"docs",label:"Docs",href:e.docs,description:"Documentation"},{id:"status",label:"Status",href:e.status,description:"System status"}]}t(W,"getAppsForOrg");var se=[{label:"Core",ids:["account","billing","console"]},{label:"AI",ids:["chat","flow","bot"]},{label:"Observability",ids:["o11y","sentry","insights","analytics"]},{label:"Infrastructure",ids:["platform","cloud","storage","kms","dns","registry"]},{label:"Apps",ids:["commerce","base","search","auto"]},{label:"Business",ids:["team","sign","dataroom","captable"]},{label:"Resources",ids:["docs","status"]}];function F({apps:o=R,currentAppId:e}){let[a,r]=react.useState(false),d=react.useRef(null);react.useEffect(()=>{let s=t(c=>{d.current&&!d.current.contains(c.target)&&r(false);},"handler");return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[]);let i=o.filter(s=>s.id!==e),p=new Map(i.map(s=>[s.id,s]));return jsxRuntime.jsxs("div",{ref:d,className:"relative",children:[jsxRuntime.jsx("button",{type:"button",onClick:()=>r(s=>!s),className:"flex h-8 w-8 items-center justify-center rounded-lg text-white/40 hover:bg-white/[0.06] hover:text-white/70 transition-colors","aria-label":"Switch app",title:"Switch app",children:jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:[jsxRuntime.jsx("rect",{x:"1",y:"1",width:"4",height:"4",rx:"1"}),jsxRuntime.jsx("rect",{x:"6",y:"1",width:"4",height:"4",rx:"1"}),jsxRuntime.jsx("rect",{x:"11",y:"1",width:"4",height:"4",rx:"1"}),jsxRuntime.jsx("rect",{x:"1",y:"6",width:"4",height:"4",rx:"1"}),jsxRuntime.jsx("rect",{x:"6",y:"6",width:"4",height:"4",rx:"1"}),jsxRuntime.jsx("rect",{x:"11",y:"6",width:"4",height:"4",rx:"1"}),jsxRuntime.jsx("rect",{x:"1",y:"11",width:"4",height:"4",rx:"1"}),jsxRuntime.jsx("rect",{x:"6",y:"11",width:"4",height:"4",rx:"1"}),jsxRuntime.jsx("rect",{x:"11",y:"11",width:"4",height:"4",rx:"1"})]})}),a&&jsxRuntime.jsxs("div",{className:"absolute left-0 top-10 z-50 w-72 max-h-[80vh] overflow-y-auto rounded-xl border border-white/[0.08] bg-[#0e0e13] p-2 shadow-2xl",children:[se.map(s=>{let c=s.ids.map(n=>p.get(n)).filter(Boolean);return c.length===0?null:jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"px-2 pb-1 pt-2 text-[10px] font-medium uppercase tracking-wider text-white/30",children:s.label}),jsxRuntime.jsx("div",{className:"grid grid-cols-2 gap-0.5",children:c.map(n=>jsxRuntime.jsxs("a",{href:n.href,className:"flex flex-col gap-0.5 rounded-lg px-3 py-2 hover:bg-white/[0.06] transition-colors",onClick:()=>r(false),children:[jsxRuntime.jsx("span",{className:"text-[13px] font-medium text-white/80",children:n.label}),n.description&&jsxRuntime.jsx("span",{className:"text-[11px] leading-tight text-white/30",children:n.description})]},n.id))})]},s.label)}),(()=>{let s=new Set(se.flatMap(n=>n.ids)),c=i.filter(n=>!s.has(n.id));return c.length===0?null:jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"px-2 pb-1 pt-2 text-[10px] font-medium uppercase tracking-wider text-white/30",children:"Other"}),jsxRuntime.jsx("div",{className:"grid grid-cols-2 gap-0.5",children:c.map(n=>jsxRuntime.jsxs("a",{href:n.href,className:"flex flex-col gap-0.5 rounded-lg px-3 py-2 hover:bg-white/[0.06] transition-colors",onClick:()=>r(false),children:[jsxRuntime.jsx("span",{className:"text-[13px] font-medium text-white/80",children:n.label}),n.description&&jsxRuntime.jsx("span",{className:"text-[11px] leading-tight text-white/30",children:n.description})]},n.id))})]})})()]})]})}t(F,"AppSwitcher");var it=["#0A0310","#49007E","#FF005B","#FF7D10","#FFB238"];function lt(o){let e=0;for(let a=0;a<o.length;a++)e=(e<<5)-e+o.charCodeAt(a)|0;return Math.abs(e)}t(lt,"hashStr");function P(o,e,a){return o%(e*(a+1))%e}t(P,"getUnit");function ct(o,e){return P(o,2,e)===0}t(ct,"getBoolean");function re(o,e,a){return a[P(o,a.length,e)]}t(re,"getRandomColor");function pt(o){let e=parseInt(o.slice(1,3),16),a=parseInt(o.slice(3,5),16),r=parseInt(o.slice(5,7),16);return e*.299+a*.587+r*.114>128?"#000":"#fff"}t(pt,"getContrast");function ie({name:o,size:e=40,colors:a=it,className:r,square:d=false}){let i=lt(o),p=re(i,0,a),s=pt(p),c=ct(i,2),n=P(i,3,7),m=P(i,5,8),h=P(i,10,9),u=h>6?h-10:h,x=P(i,5,10)>3?P(i,5,10)-5:P(i,5,10);return jsxRuntime.jsxs("svg",{viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:e,height:e,className:r,style:d?void 0:{borderRadius:"50%"},children:[jsxRuntime.jsx("mask",{id:`beam-${i}`,maskUnits:"userSpaceOnUse",x:0,y:0,width:36,height:36,children:jsxRuntime.jsx("rect",{width:36,height:36,rx:d?void 0:72,fill:"#fff"})}),jsxRuntime.jsxs("g",{mask:`url(#beam-${i})`,children:[jsxRuntime.jsx("rect",{width:36,height:36,fill:p}),jsxRuntime.jsx("rect",{x:0,y:0,width:36,height:36,transform:`translate(${u} ${x}) rotate(${h} 18 18)`,fill:re(i,1,a),rx:6}),jsxRuntime.jsxs("g",{transform:`translate(${u} ${x}) rotate(${h} 18 18)`,children:[c?jsxRuntime.jsx("path",{d:`M15 ${19+n}c2 1 4 1 6 0`,stroke:s,fill:"none",strokeLinecap:"round"}):jsxRuntime.jsx("path",{d:`M13 ${19+n}a1 .75 0 0 0 10 0`,fill:s}),jsxRuntime.jsx("rect",{x:14-m,y:14,width:1.5,height:2,rx:1,fill:s}),jsxRuntime.jsx("rect",{x:20+m,y:14,width:1.5,height:2,rx:1,fill:s})]})]})]})}t(ie,"BeamAvatar");async function ht(o){let a=new TextEncoder().encode(o),r=await crypto.subtle.digest("SHA-256",a);return Array.from(new Uint8Array(r)).map(d=>d.toString(16).padStart(2,"0")).join("")}t(ht,"sha256");function mt(o,e){let[a,r]=react.useState(null);return react.useMemo(()=>{if(!o){r(null);return}let d=o.trim().toLowerCase();ht(d).then(i=>{r(`https://www.gravatar.com/avatar/${i}?s=${e||80}&d=404`);});},[o,e]),a}t(mt,"useGravatarUrl");function le({src:o,email:e,name:a,size:r=40,colors:d,className:i}){let[p,s]=react.useState(false),[c,n]=react.useState(false),m=mt(e,r*2),h=`rounded-full object-cover ${i||""}`,u={width:r,height:r};return o&&!p?jsxRuntime.jsx("img",{src:o,alt:a||e||"avatar",className:h,style:u,onError:()=>s(true)}):m&&!c?jsxRuntime.jsx("img",{src:m,alt:a||e||"avatar",className:h,style:u,onError:()=>n(true)}):jsxRuntime.jsx(ie,{name:a||e||"user",size:r,colors:d,className:i})}t(le,"UserAvatar");function _({user:o,organizations:e=[],currentOrgId:a,onOrgSwitch:r,onSignOut:d}){let[i,p]=react.useState(false),s=react.useRef(null);if(react.useEffect(()=>{let h=t(u=>{s.current&&!s.current.contains(u.target)&&p(false);},"handler");return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[]),!o)return null;let c=e.find(h=>h.id===a),n=c?.slug||"hanzo",m=H[n]||H.hanzo;return jsxRuntime.jsxs("div",{ref:s,className:"relative",children:[jsxRuntime.jsxs("button",{type:"button",onClick:()=>p(h=>!h),className:"flex items-center gap-2 rounded-lg px-2 py-1.5 hover:bg-white/[0.06] transition-colors",children:[jsxRuntime.jsx(le,{src:o.avatar,email:o.email,name:o.name,size:28}),jsxRuntime.jsxs("div",{className:"hidden flex-col items-start sm:flex",children:[o.name&&jsxRuntime.jsx("span",{className:"text-[12px] font-medium text-white/70 leading-none",children:o.name}),jsxRuntime.jsx("span",{className:"text-[11px] text-white/30 leading-none mt-0.5",children:o.email})]}),jsxRuntime.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-white/30 hidden sm:block",children:jsxRuntime.jsx("path",{d:"M6 9l6 6 6-6"})})]}),i&&jsxRuntime.jsxs("div",{className:"absolute right-0 top-10 z-50 w-64 rounded-xl border border-white/[0.08] bg-[#0e0e13] shadow-2xl",children:[jsxRuntime.jsxs("div",{className:"border-b border-white/[0.06] px-4 py-3",children:[jsxRuntime.jsx("p",{className:"text-[13px] font-medium text-white/80",children:o.name||"User"}),jsxRuntime.jsx("p",{className:"text-[11px] text-white/40",children:o.email}),c&&jsxRuntime.jsx("p",{className:"mt-0.5 text-[10px] font-medium text-white/25 uppercase tracking-wider",children:c.name})]}),e.length>0&&jsxRuntime.jsxs("div",{className:"border-b border-white/[0.06] p-2",children:[jsxRuntime.jsx("p",{className:"px-2 pb-1 pt-0.5 text-[10px] font-medium uppercase tracking-wider text-white/30",children:"Organizations"}),e.map(h=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>{r?.(h.id),p(false);},className:"flex w-full items-center justify-between rounded-lg px-3 py-2 text-left hover:bg-white/[0.06] transition-colors",children:[jsxRuntime.jsxs("div",{className:"flex flex-col",children:[jsxRuntime.jsx("span",{className:"text-[13px] text-white/70",children:h.name}),h.role&&jsxRuntime.jsx("span",{className:"text-[10px] text-white/25 capitalize",children:h.role})]}),h.id===a&&jsxRuntime.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:"text-white/50",children:jsxRuntime.jsx("polyline",{points:"20 6 9 17 4 12"})})]},h.id))]}),jsxRuntime.jsxs("div",{className:"p-2",children:[jsxRuntime.jsx("a",{href:`${m.iam}/account`,className:"flex items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] text-white/60 hover:bg-white/[0.06] hover:text-white/80 transition-colors",onClick:()=>p(false),children:"Account settings"}),jsxRuntime.jsx("a",{href:m.billing,className:"flex items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] text-white/60 hover:bg-white/[0.06] hover:text-white/80 transition-colors",onClick:()=>p(false),children:"Billing"}),jsxRuntime.jsx("button",{type:"button",onClick:()=>{p(false),d?.();},className:"flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] text-white/40 hover:bg-white/[0.06] hover:text-red-400/70 transition-colors",children:"Sign out"})]})]})]})}t(_,"UserOrgDropdown");function bt({className:o}){return jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:o,children:[jsxRuntime.jsx("path",{d:"M21 2v6h-6"}),jsxRuntime.jsx("path",{d:"M3 12a9 9 0 0 1 15-6.7L21 8"}),jsxRuntime.jsx("path",{d:"M3 22v-6h6"}),jsxRuntime.jsx("path",{d:"M21 12a9 9 0 0 1-15 6.7L3 16"})]})}t(bt,"HardRefreshIcon");function wt({className:o}){return jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:o,children:[jsxRuntime.jsx("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}t(wt,"SettingsIcon");async function vt(){try{if(localStorage.clear(),sessionStorage.clear(),document.cookie.split(";").forEach(o=>{let e=o.split("=")[0].trim();if(e){document.cookie=`${e}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`,document.cookie=`${e}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;domain=${location.hostname}`;let a=location.hostname.split(".");if(a.length>2){let r="."+a.slice(-2).join(".");document.cookie=`${e}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;domain=${r}`;}}}),"caches"in window){let o=await caches.keys();await Promise.all(o.map(e=>caches.delete(e)));}if("serviceWorker"in navigator){let o=await navigator.serviceWorker.getRegistrations();await Promise.all(o.map(e=>e.unregister()));}if("indexedDB"in window&&indexedDB.databases)try{(await indexedDB.databases()).forEach(e=>{e.name&&indexedDB.deleteDatabase(e.name);});}catch{}}catch{}location.reload();}t(vt,"hardRefresh");function pe({currentApp:o,currentAppId:e,user:a,organizations:r,currentOrgId:d,onOrgSwitch:i,onSignOut:p,apps:s,headerRight:c,settingsHref:n,onSettingsClick:m,hideHardRefresh:h,hideSettings:u}){let[x,M]=react.useState(false),B=r?.find(k=>k.id===d)?.slug||"hanzo",f=s||W(B),C=H[B]||H.hanzo,$=react.useCallback(()=>{M(true),vt();},[]),y=react.useCallback(()=>{m?m():window.location.href=n||`${C.iam}/account`;},[m,n,C.iam]);return jsxRuntime.jsxs("header",{className:"sticky top-0 z-50 flex h-14 w-full items-center justify-between border-b border-white/[0.07] bg-[#09090b]/90 px-4 backdrop-blur-xl",role:"banner",children:[jsxRuntime.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[jsxRuntime.jsx("a",{href:`${C.iam}/account`,className:"flex-shrink-0 rounded focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20","aria-label":"Account",children:jsxRuntime.jsx(ne,{size:22,brandMenu:true,animate:true})}),jsxRuntime.jsx("span",{className:"select-none text-white/[0.15]",children:"/"}),jsxRuntime.jsx("span",{className:"truncate text-[13px] font-medium text-white/50",children:o}),jsxRuntime.jsx(F,{apps:f,currentAppId:e})]}),jsxRuntime.jsxs("div",{className:"flex flex-shrink-0 items-center gap-1",children:[c,!h&&jsxRuntime.jsx("button",{type:"button",onClick:$,className:"flex items-center justify-center rounded-lg p-2 text-white/30 hover:bg-white/[0.06] hover:text-white/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20","aria-label":"Hard refresh \u2014 clear all storage, cookies, cache and reload",title:"Hard refresh",children:jsxRuntime.jsx(bt,{className:x?"animate-spin":""})}),!u&&jsxRuntime.jsx("button",{type:"button",onClick:y,className:"flex items-center justify-center rounded-lg p-2 text-white/30 hover:bg-white/[0.06] hover:text-white/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20","aria-label":"Settings",title:"Settings",children:jsxRuntime.jsx(wt,{})}),jsxRuntime.jsx(_,{user:a,organizations:r,currentOrgId:d,onOrgSwitch:i,onSignOut:p})]})]})}t(pe,"HanzoHeader");var de="hanzo-auth-token",Q="hanzo-user",he="hanzo-auth-expires",kt="https://iam.hanzo.ai",zt={hanzo:{name:"Hanzo AI",slug:"hanzo"},lux:{name:"Lux Network",slug:"lux"},zoo:{name:"Zoo Labs",slug:"zoo"},pars:{name:"Pars",slug:"pars"}};function me(){let[o,e]=react.useState(void 0),[a,r]=react.useState([]),[d,i]=react.useState(void 0),[p,s]=react.useState(null),[c,n]=react.useState(true),m=react.useCallback(async()=>{try{let x=localStorage.getItem(de),M=localStorage.getItem(he);if(!x||M&&Date.now()>Number(M)){n(!1);return}s(x);let L=localStorage.getItem(Q);if(L)try{let f=JSON.parse(L);f?.email&&e({id:f.id,name:f.displayName||f.name,email:f.email,avatar:f.avatar});}catch{}let B=await fetch(`${kt}/api/userinfo`,{headers:{Authorization:`Bearer ${x}`}});if(B.ok){let f=await B.json(),C={id:f.sub||f.id,name:f.name||f.displayName,email:f.email,avatar:f.picture||f.avatar};e(C),localStorage.setItem(Q,JSON.stringify(f));let y=(f.groups||[]).map(k=>{let I=k.toLowerCase().replace(/^\//,""),U=zt[I];return U?{id:I,name:U.name,slug:U.slug}:null}).filter(Boolean);y.length===0&&C.email&&y.push({id:"personal",name:"Personal",slug:"personal"}),r(y),i(y[0]?.id);}}catch{}finally{n(false);}},[]);react.useEffect(()=>{m();},[m]);let h=react.useCallback(()=>{localStorage.removeItem(de),localStorage.removeItem(Q),localStorage.removeItem(he),window.location.href="https://hanzo.id";},[]),u=react.useCallback(x=>{i(x);},[]);return {user:o,organizations:a,currentOrgId:d,token:p,loading:c,signOut:h,switchOrg:u}}t(me,"useHanzoAuth");function Nt(o,e){return o.filter(a=>a.id!==e).map(a=>({id:`app-${a.id}`,title:a.label,description:a.description,href:a.href,category:"Hanzo Apps",external:true,keywords:[a.id,a.label.toLowerCase()]}))}t(Nt,"buildCrossAppCommands");function ue({commands:o=[],apps:e,currentAppId:a,open:r,onOpenChange:d,onNavigate:i}){var oe;let[p,s]=react.useState(false),c=r??p,n=react.useCallback(l=>{d?d(l):s(l);},[d]),[m,h]=react.useState(""),[u,x]=react.useState(0),M=react.useRef(null),L=react.useRef(null),B=Nt(e??R,a),f=[...o,...B],C=m.toLowerCase(),$=C?f.filter(l=>l.title.toLowerCase().includes(C)||l.description?.toLowerCase().includes(C)||l.keywords?.some(z=>z.includes(C))):f,y={};for(let l of $)(y[oe=l.category]??(y[oe]=[])).push(l);let k=Object.values(y).flat();react.useEffect(()=>x(0),[m]),react.useEffect(()=>{c&&(h(""),x(0),requestAnimationFrame(()=>M.current?.focus()));},[c]),react.useEffect(()=>{let l=t(z=>{(z.metaKey||z.ctrlKey)&&z.key==="k"&&(z.preventDefault(),n(!c));},"handler");return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[c,n]);let I=react.useCallback(l=>{l.action?l.action():l.href&&(i?i(l.href,l.external):l.external?window.open(l.href,"_blank"):window.location.href=l.href),n(false);},[i,n]),U=react.useCallback(l=>{l.key==="ArrowDown"?(l.preventDefault(),x(z=>(z+1)%(k.length||1))):l.key==="ArrowUp"?(l.preventDefault(),x(z=>(z-1+(k.length||1))%(k.length||1))):l.key==="Enter"&&k[u]?(l.preventDefault(),I(k[u])):l.key==="Escape"&&n(false);},[k,u,I,n]);return react.useEffect(()=>{L.current?.querySelector(`[data-idx="${u}"]`)?.scrollIntoView({block:"nearest"});},[u]),c?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-[100]",onClick:()=>n(false)}),jsxRuntime.jsx("div",{className:"fixed top-[15%] left-1/2 -translate-x-1/2 w-full max-w-xl z-[101]",children:jsxRuntime.jsxs("div",{className:"bg-[#111113] border border-white/[0.08] rounded-xl shadow-2xl overflow-hidden",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-white/[0.07]",children:[jsxRuntime.jsx("svg",{className:"w-4 h-4 text-white/30",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),jsxRuntime.jsx("input",{ref:M,type:"text",value:m,onChange:l=>h(l.target.value),onKeyDown:U,placeholder:"Search commands...",className:"flex-1 bg-transparent text-white text-[13px] placeholder-white/30 outline-none"}),jsxRuntime.jsx("kbd",{className:"px-1.5 py-0.5 text-[10px] font-mono bg-white/[0.06] rounded text-white/30",children:"ESC"})]}),jsxRuntime.jsx("div",{ref:L,className:"max-h-[400px] overflow-y-auto py-1",children:k.length===0?jsxRuntime.jsxs("div",{className:"px-4 py-8 text-center text-white/30 text-[13px]",children:["No results for \u201C",m,"\u201D"]}):Object.entries(y).map(([l,z])=>jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"px-4 py-2 text-[10px] font-semibold text-white/25 uppercase tracking-widest",children:l}),z.map(D=>{let G=k.indexOf(D),j=G===u;return jsxRuntime.jsxs("button",{"data-idx":G,onClick:()=>I(D),onMouseEnter:()=>x(G),className:`w-full flex items-center gap-3 px-4 py-2 text-left transition-colors ${j?"bg-white/[0.06] text-white":"text-white/50 hover:bg-white/[0.03]"}`,children:[D.icon&&jsxRuntime.jsx("span",{className:`w-5 h-5 flex items-center justify-center ${j?"text-white/70":"text-white/25"}`,children:D.icon}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("span",{className:"text-[13px] font-medium truncate block",children:D.title}),D.description&&jsxRuntime.jsx("span",{className:"text-[11px] text-white/25 truncate block",children:D.description})]}),j&&jsxRuntime.jsx("span",{className:"text-white/25 text-[11px]",children:"\u21B5"})]},D.id)})]},l))}),jsxRuntime.jsxs("div",{className:"px-4 py-2 border-t border-white/[0.07] flex items-center justify-between",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-4 text-[10px] text-white/20",children:[jsxRuntime.jsxs("span",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("kbd",{className:"px-1 py-0.5 bg-white/[0.06] rounded text-[9px]",children:"\u2191"}),jsxRuntime.jsx("kbd",{className:"px-1 py-0.5 bg-white/[0.06] rounded text-[9px]",children:"\u2193"}),"navigate"]}),jsxRuntime.jsxs("span",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("kbd",{className:"px-1 py-0.5 bg-white/[0.06] rounded text-[9px]",children:"\u21B5"}),"select"]})]}),jsxRuntime.jsx("span",{className:"text-[10px] text-white/20",children:"\u2318K"})]})]})})]}):null}t(ue,"HanzoCommandPalette");function xe(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(xe,"Component");function we(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(we,"Component");function ye(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(ye,"Component");function ze(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(ze,"Component");function Ce(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Ce,"Component");function He(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(He,"Component");function De(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(De,"Component");function Pe(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Pe,"Component");function Be(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Be,"Component");function Le(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Le,"Component");function Re(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Re,"Component");function Te(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Te,"Component");function $e(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t($e,"Component");function _e(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(_e,"Component");function Ge(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Ge,"Component");function Ke(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Ke,"Component");function qe(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(qe,"Component");function Je(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Je,"Component");
|
|
3
|
-
exports.AIModelSelectorNavigationBar=we;exports.AdvancedNavigationBar=xe;exports.AppSwitcher=F;exports.AppSwitcherNavigationBar=ye;exports.BreadcrumbAndFiltersNavigationBar=ze;exports.BreadcrumbNavigationBar=Ce;exports.CenteredLogoNavigationBar=He;exports.CollaborationNavigationBar=De;exports.CommunicationNavigationBar=Pe;exports.ContextSwitcherNavigationBar=Be;exports.DEFAULT_HANZO_APPS=R;exports.DashboardNavigationBar=
|
|
2
|
+
'use strict';var react=require('react'),jsxRuntime=require('react/jsx-runtime');var Xe=Object.defineProperty;var t=(o,e)=>Xe(o,"name",{value:e,configurable:true});function ot({x:o,y:e,onClose:a}){let r=react.useRef(null);react.useEffect(()=>{let p=t(c=>{r.current&&!r.current.contains(c.target)&&a();},"handler"),s=t(c=>{c.key==="Escape"&&a();},"escape");return document.addEventListener("mousedown",p),document.addEventListener("keydown",s),()=>{document.removeEventListener("mousedown",p),document.removeEventListener("keydown",s);}},[a]);let d=[{label:"Brand Guidelines",href:"https://hanzo.ai/brand"},{label:"Press Kit",href:"https://hanzo.ai/press"},{label:"Download Logo",href:"https://hanzo.ai/brand#download"},{label:"Copy SVG",action:"copy-svg"},{label:"hanzo.ai \u2192",href:"https://hanzo.ai"}],i='<svg viewBox="0 0 67 67" xmlns="http://www.w3.org/2000/svg"><path d="M22.21 67V44.6369H0V67H22.21Z" fill="#ffffff"/><path d="M0 44.6369L22.21 46.8285V44.6369H0Z" fill="#DDDDDD"/><path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z" fill="#ffffff"/><path d="M22.21 0H0V22.3184H22.21V0Z" fill="#ffffff"/><path d="M66.7198 0H44.5098V22.3184H66.7198V0Z" fill="#ffffff"/><path d="M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z" fill="#DDDDDD"/><path d="M66.7198 67V44.6369H44.5098V67H66.7198Z" fill="#ffffff"/></svg>';return jsxRuntime.jsxs("div",{ref:r,role:"menu",className:"fixed z-[9999] min-w-[180px] rounded-xl border border-white/[0.08] bg-[#111113] py-1.5 shadow-2xl shadow-black/60",style:{top:e,left:o},children:[jsxRuntime.jsx("div",{className:"border-b border-white/[0.06] px-3 pb-2 pt-1",children:jsxRuntime.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-white/30",children:"Hanzo Brand"})}),d.map(p=>p.action==="copy-svg"?jsxRuntime.jsx("button",{type:"button",role:"menuitem",onClick:()=>{navigator.clipboard.writeText(i).catch(()=>{}),a();},className:"flex w-full items-center px-3 py-2 text-[13px] text-white/60 hover:bg-white/[0.05] hover:text-white/90 transition-colors text-left",children:"Copy SVG"},"copy"):jsxRuntime.jsx("a",{href:p.href,role:"menuitem",target:p.href?.startsWith("https")?"_blank":void 0,rel:"noopener noreferrer",onClick:a,className:"flex items-center px-3 py-2 text-[13px] text-white/60 hover:bg-white/[0.05] hover:text-white/90 transition-colors",children:p.label},p.label))]})}t(ot,"BrandContextMenu");function ne({size:o=22,className:e="",brandMenu:a=true,animate:r=true}){let[d,i]=react.useState(null),[p,s]=react.useState(false),c=react.useCallback(m=>{a&&(m.preventDefault(),i({x:m.clientX,y:m.clientY}));},[a]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("svg",{width:o,height:o,viewBox:"0 0 67 67",xmlns:"http://www.w3.org/2000/svg","aria-label":"Hanzo",className:e,style:r?{transition:"transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease",transform:p?"scale(1.12) perspective(80px) rotateY(-6deg)":"scale(1) perspective(80px) rotateY(0deg)",transformOrigin:"center center"}:{},onMouseEnter:()=>s(true),onMouseLeave:()=>s(false),onContextMenu:c,children:[jsxRuntime.jsx("path",{d:"M22.21 67V44.6369H0V67H22.21Z",fill:"#ffffff"}),jsxRuntime.jsx("path",{d:"M0 44.6369L22.21 46.8285V44.6369H0Z",fill:"#DDDDDD"}),jsxRuntime.jsx("path",{d:"M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z",fill:"#ffffff"}),jsxRuntime.jsx("path",{d:"M22.21 0H0V22.3184H22.21V0Z",fill:"#ffffff"}),jsxRuntime.jsx("path",{d:"M66.7198 0H44.5098V22.3184H66.7198V0Z",fill:"#ffffff"}),jsxRuntime.jsx("path",{d:"M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z",fill:"#DDDDDD"}),jsxRuntime.jsx("path",{d:"M66.7198 67V44.6369H44.5098V67H66.7198Z",fill:"#ffffff"})]}),d&&jsxRuntime.jsx(ot,{x:d.x,y:d.y,onClose:()=>i(null)})]})}t(ne,"HanzoMark");var R=[{id:"account",label:"Account",href:"https://hanzo.id/account",description:"Profile, orgs & referrals"},{id:"billing",label:"Billing",href:"https://billing.hanzo.ai",description:"Subscriptions & usage"},{id:"console",label:"Console",href:"https://console.hanzo.ai",description:"API keys & projects"},{id:"chat",label:"Chat",href:"https://hanzo.chat",description:"AI chat & models"},{id:"flow",label:"Flow",href:"https://flow.hanzo.ai",description:"Visual workflow builder"},{id:"bot",label:"Bot",href:"https://hanzo.bot",description:"AI bot platform"},{id:"o11y",label:"O11y",href:"https://o11y.hanzo.ai",description:"Traces, logs & metrics"},{id:"sentry",label:"Sentry",href:"https://sentry.hanzo.ai",description:"Error & crash tracking"},{id:"insights",label:"Insights",href:"https://insights.hanzo.ai",description:"Product analytics & flags"},{id:"analytics",label:"Analytics",href:"https://analytics.hanzo.ai",description:"Web analytics"},{id:"platform",label:"Platform",href:"https://platform.hanzo.ai",description:"Deploy & scale services"},{id:"cloud",label:"Cloud",href:"https://cloud.hanzo.ai",description:"Cloud infrastructure"},{id:"web3",label:"Web3",href:"https://web3.hanzo.ai",description:"Deploy & manage blockchain validators across Bitcoin, Ethereum, Solana, Lux, and any Lux-derived L1"},{id:"storage",label:"Storage",href:"https://s3.hanzo.ai",description:"S3 object storage"},{id:"kms",label:"KMS",href:"https://kms.hanzo.ai",description:"Secrets & key management"},{id:"dns",label:"DNS",href:"https://dns.hanzo.ai",description:"DNS management"},{id:"registry",label:"Registry",href:"https://registry.hanzo.ai",description:"Container registry"},{id:"commerce",label:"Commerce",href:"https://commerce.hanzo.ai",description:"Payments & storefront"},{id:"base",label:"Base",href:"https://base.hanzo.ai",description:"Backend-as-a-Service"},{id:"search",label:"Search",href:"https://search.hanzo.ai",description:"Full-text search"},{id:"auto",label:"Auto",href:"https://auto.hanzo.ai",description:"Workflow automation"},{id:"team",label:"Team",href:"https://hanzo.team",description:"Team collaboration"},{id:"sign",label:"Sign",href:"https://sign.hanzo.ai",description:"Document signing"},{id:"dataroom",label:"Dataroom",href:"https://dataroom.hanzo.ai",description:"Secure deal rooms"},{id:"captable",label:"Cap Table",href:"https://captable.hanzo.ai",description:"Equity management"},{id:"docs",label:"Docs",href:"https://docs.hanzo.ai",description:"Documentation"},{id:"status",label:"Status",href:"https://status.hanzo.ai",description:"System status"}],H={hanzo:{id:"hanzo",iam:"https://hanzo.id",billing:"https://billing.hanzo.ai",console:"https://console.hanzo.ai",cloud:"https://cloud.hanzo.ai",web3:"https://web3.hanzo.ai",chat:"https://hanzo.chat",flow:"https://flow.hanzo.ai",bot:"https://hanzo.bot",o11y:"https://o11y.hanzo.ai",sentry:"https://sentry.hanzo.ai",insights:"https://insights.hanzo.ai",analytics:"https://analytics.hanzo.ai",platform:"https://platform.hanzo.ai",storage:"https://s3.hanzo.ai",s3:"https://s3.hanzo.ai",kms:"https://kms.hanzo.ai",dns:"https://dns.hanzo.ai",registry:"https://registry.hanzo.ai",commerce:"https://commerce.hanzo.ai",base:"https://base.hanzo.ai",search:"https://search.hanzo.ai",auto:"https://auto.hanzo.ai",team:"https://hanzo.team",sign:"https://sign.hanzo.ai",dataroom:"https://dataroom.hanzo.ai",captable:"https://captable.hanzo.ai",docs:"https://docs.hanzo.ai",status:"https://status.hanzo.ai"},lux:{id:"lux",iam:"https://lux.id",billing:"https://billing.lux.network",console:"https://console.lux.network",cloud:"https://cloud.lux.network",web3:"https://web3.lux.network",chat:"https://lux.chat",flow:"https://flow.lux.network",bot:"https://bot.lux.network",o11y:"https://o11y.lux.network",sentry:"https://sentry.lux.network",insights:"https://insights.lux.network",analytics:"https://analytics.lux.network",platform:"https://platform.lux.network",storage:"https://s3.lux.network",s3:"https://s3.lux.network",kms:"https://kms.lux.network",dns:"https://dns.lux.network",registry:"https://registry.lux.network",commerce:"https://commerce.lux.network",base:"https://base.lux.network",search:"https://search.lux.network",auto:"https://auto.lux.network",team:"https://team.lux.network",sign:"https://sign.lux.network",dataroom:"https://dataroom.lux.network",captable:"https://captable.lux.network",docs:"https://docs.lux.network",status:"https://status.lux.network"},zoo:{id:"zoo",iam:"https://zoo.id",billing:"https://billing.zoo.ngo",console:"https://console.zoo.ngo",cloud:"https://cloud.zoo.network",web3:"https://web3.zoo.ngo",chat:"https://chat.zoo.ngo",flow:"https://flow.zoo.ngo",bot:"https://bot.zoo.ngo",o11y:"https://o11y.zoo.network",sentry:"https://sentry.zoo.network",insights:"https://insights.zoo.ngo",analytics:"https://analytics.zoo.ngo",platform:"https://platform.zoo.ngo",storage:"https://s3.zoo.ngo",s3:"https://s3.zoo.ngo",kms:"https://kms.zoo.network",dns:"https://dns.zoo.ngo",registry:"https://registry.zoo.ngo",commerce:"https://commerce.zoo.ngo",base:"https://base.zoo.ngo",search:"https://search.zoo.ngo",auto:"https://auto.zoo.ngo",team:"https://team.zoo.ngo",sign:"https://sign.zoo.ngo",dataroom:"https://dataroom.zoo.ngo",captable:"https://captable.zoo.ngo",docs:"https://docs.zoo.ngo",status:"https://status.zoo.network"},pars:{id:"pars",iam:"https://pars.id",billing:"https://billing.pars.network",console:"https://console.pars.network",cloud:"https://cloud.pars.network",web3:"https://web3.pars.network",chat:"https://chat.pars.network",flow:"https://flow.pars.network",bot:"https://bot.pars.network",o11y:"https://o11y.pars.network",sentry:"https://sentry.pars.network",insights:"https://insights.pars.network",analytics:"https://analytics.pars.network",platform:"https://platform.pars.network",storage:"https://s3.pars.network",s3:"https://s3.pars.network",kms:"https://kms.pars.network",dns:"https://dns.pars.network",registry:"https://registry.pars.network",commerce:"https://commerce.pars.network",base:"https://base.pars.network",search:"https://search.pars.network",auto:"https://auto.pars.network",team:"https://team.pars.network",sign:"https://sign.pars.network",dataroom:"https://dataroom.pars.network",captable:"https://captable.pars.network",docs:"https://docs.pars.network",status:"https://status.pars.network"}};function W(o){let e=H[o]||H.hanzo;return [{id:"account",label:"Account",href:`${e.iam}/account`,description:"Profile, orgs & referrals"},{id:"billing",label:"Billing",href:e.billing,description:"Subscriptions & usage"},{id:"console",label:"Console",href:e.console,description:"API keys & projects"},{id:"chat",label:"Chat",href:e.chat,description:"AI chat & models"},{id:"flow",label:"Flow",href:e.flow,description:"Visual workflow builder"},{id:"bot",label:"Bot",href:e.bot,description:"AI bot platform"},{id:"o11y",label:"O11y",href:e.o11y,description:"Traces, logs & metrics"},{id:"sentry",label:"Sentry",href:e.sentry,description:"Error & crash tracking"},{id:"insights",label:"Insights",href:e.insights,description:"Product analytics & flags"},{id:"analytics",label:"Analytics",href:e.analytics,description:"Web analytics"},{id:"platform",label:"Platform",href:e.platform,description:"Deploy & scale services"},{id:"cloud",label:"Cloud",href:e.cloud,description:"Cloud infrastructure"},{id:"web3",label:"Web3",href:e.web3,description:"Deploy & manage blockchain validators across Bitcoin, Ethereum, Solana, Lux, and any Lux-derived L1"},{id:"storage",label:"Storage",href:e.storage,description:"S3 object storage"},{id:"kms",label:"KMS",href:e.kms,description:"Secrets & key management"},{id:"dns",label:"DNS",href:e.dns,description:"DNS management"},{id:"registry",label:"Registry",href:e.registry,description:"Container registry"},{id:"commerce",label:"Commerce",href:e.commerce,description:"Payments & storefront"},{id:"base",label:"Base",href:e.base,description:"Backend-as-a-Service"},{id:"search",label:"Search",href:e.search,description:"Full-text search"},{id:"auto",label:"Auto",href:e.auto,description:"Workflow automation"},{id:"team",label:"Team",href:e.team,description:"Team collaboration"},{id:"sign",label:"Sign",href:e.sign,description:"Document signing"},{id:"dataroom",label:"Dataroom",href:e.dataroom,description:"Secure deal rooms"},{id:"captable",label:"Cap Table",href:e.captable,description:"Equity management"},{id:"docs",label:"Docs",href:e.docs,description:"Documentation"},{id:"status",label:"Status",href:e.status,description:"System status"}]}t(W,"getAppsForOrg");var se=[{label:"Core",ids:["account","billing","console"]},{label:"AI",ids:["chat","flow","bot"]},{label:"Observability",ids:["o11y","sentry","insights","analytics"]},{label:"Infrastructure",ids:["platform","cloud","web3","storage","kms","dns","registry"]},{label:"Apps",ids:["commerce","base","search","auto"]},{label:"Business",ids:["team","sign","dataroom","captable"]},{label:"Resources",ids:["docs","status"]}];function F({apps:o=R,currentAppId:e}){let[a,r]=react.useState(false),d=react.useRef(null);react.useEffect(()=>{let s=t(c=>{d.current&&!d.current.contains(c.target)&&r(false);},"handler");return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[]);let i=o.filter(s=>s.id!==e),p=new Map(i.map(s=>[s.id,s]));return jsxRuntime.jsxs("div",{ref:d,className:"relative",children:[jsxRuntime.jsx("button",{type:"button",onClick:()=>r(s=>!s),className:"flex h-8 w-8 items-center justify-center rounded-lg text-white/40 hover:bg-white/[0.06] hover:text-white/70 transition-colors","aria-label":"Switch app",title:"Switch app",children:jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:[jsxRuntime.jsx("rect",{x:"1",y:"1",width:"4",height:"4",rx:"1"}),jsxRuntime.jsx("rect",{x:"6",y:"1",width:"4",height:"4",rx:"1"}),jsxRuntime.jsx("rect",{x:"11",y:"1",width:"4",height:"4",rx:"1"}),jsxRuntime.jsx("rect",{x:"1",y:"6",width:"4",height:"4",rx:"1"}),jsxRuntime.jsx("rect",{x:"6",y:"6",width:"4",height:"4",rx:"1"}),jsxRuntime.jsx("rect",{x:"11",y:"6",width:"4",height:"4",rx:"1"}),jsxRuntime.jsx("rect",{x:"1",y:"11",width:"4",height:"4",rx:"1"}),jsxRuntime.jsx("rect",{x:"6",y:"11",width:"4",height:"4",rx:"1"}),jsxRuntime.jsx("rect",{x:"11",y:"11",width:"4",height:"4",rx:"1"})]})}),a&&jsxRuntime.jsxs("div",{className:"absolute left-0 top-10 z-50 w-72 max-h-[80vh] overflow-y-auto rounded-xl border border-white/[0.08] bg-[#0e0e13] p-2 shadow-2xl",children:[se.map(s=>{let c=s.ids.map(n=>p.get(n)).filter(Boolean);return c.length===0?null:jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"px-2 pb-1 pt-2 text-[10px] font-medium uppercase tracking-wider text-white/30",children:s.label}),jsxRuntime.jsx("div",{className:"grid grid-cols-2 gap-0.5",children:c.map(n=>jsxRuntime.jsxs("a",{href:n.href,className:"flex flex-col gap-0.5 rounded-lg px-3 py-2 hover:bg-white/[0.06] transition-colors",onClick:()=>r(false),children:[jsxRuntime.jsx("span",{className:"text-[13px] font-medium text-white/80",children:n.label}),n.description&&jsxRuntime.jsx("span",{className:"text-[11px] leading-tight text-white/30",children:n.description})]},n.id))})]},s.label)}),(()=>{let s=new Set(se.flatMap(n=>n.ids)),c=i.filter(n=>!s.has(n.id));return c.length===0?null:jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"px-2 pb-1 pt-2 text-[10px] font-medium uppercase tracking-wider text-white/30",children:"Other"}),jsxRuntime.jsx("div",{className:"grid grid-cols-2 gap-0.5",children:c.map(n=>jsxRuntime.jsxs("a",{href:n.href,className:"flex flex-col gap-0.5 rounded-lg px-3 py-2 hover:bg-white/[0.06] transition-colors",onClick:()=>r(false),children:[jsxRuntime.jsx("span",{className:"text-[13px] font-medium text-white/80",children:n.label}),n.description&&jsxRuntime.jsx("span",{className:"text-[11px] leading-tight text-white/30",children:n.description})]},n.id))})]})})()]})]})}t(F,"AppSwitcher");var it=["#0A0310","#49007E","#FF005B","#FF7D10","#FFB238"];function lt(o){let e=0;for(let a=0;a<o.length;a++)e=(e<<5)-e+o.charCodeAt(a)|0;return Math.abs(e)}t(lt,"hashStr");function P(o,e,a){return o%(e*(a+1))%e}t(P,"getUnit");function ct(o,e){return P(o,2,e)===0}t(ct,"getBoolean");function re(o,e,a){return a[P(o,a.length,e)]}t(re,"getRandomColor");function pt(o){let e=parseInt(o.slice(1,3),16),a=parseInt(o.slice(3,5),16),r=parseInt(o.slice(5,7),16);return e*.299+a*.587+r*.114>128?"#000":"#fff"}t(pt,"getContrast");function ie({name:o,size:e=40,colors:a=it,className:r,square:d=false}){let i=lt(o),p=re(i,0,a),s=pt(p),c=ct(i,2),n=P(i,3,7),m=P(i,5,8),h=P(i,10,9),u=h>6?h-10:h,x=P(i,5,10)>3?P(i,5,10)-5:P(i,5,10);return jsxRuntime.jsxs("svg",{viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:e,height:e,className:r,style:d?void 0:{borderRadius:"50%"},children:[jsxRuntime.jsx("mask",{id:`beam-${i}`,maskUnits:"userSpaceOnUse",x:0,y:0,width:36,height:36,children:jsxRuntime.jsx("rect",{width:36,height:36,rx:d?void 0:72,fill:"#fff"})}),jsxRuntime.jsxs("g",{mask:`url(#beam-${i})`,children:[jsxRuntime.jsx("rect",{width:36,height:36,fill:p}),jsxRuntime.jsx("rect",{x:0,y:0,width:36,height:36,transform:`translate(${u} ${x}) rotate(${h} 18 18)`,fill:re(i,1,a),rx:6}),jsxRuntime.jsxs("g",{transform:`translate(${u} ${x}) rotate(${h} 18 18)`,children:[c?jsxRuntime.jsx("path",{d:`M15 ${19+n}c2 1 4 1 6 0`,stroke:s,fill:"none",strokeLinecap:"round"}):jsxRuntime.jsx("path",{d:`M13 ${19+n}a1 .75 0 0 0 10 0`,fill:s}),jsxRuntime.jsx("rect",{x:14-m,y:14,width:1.5,height:2,rx:1,fill:s}),jsxRuntime.jsx("rect",{x:20+m,y:14,width:1.5,height:2,rx:1,fill:s})]})]})]})}t(ie,"BeamAvatar");async function ht(o){let a=new TextEncoder().encode(o),r=await crypto.subtle.digest("SHA-256",a);return Array.from(new Uint8Array(r)).map(d=>d.toString(16).padStart(2,"0")).join("")}t(ht,"sha256");function mt(o,e){let[a,r]=react.useState(null);return react.useMemo(()=>{if(!o){r(null);return}let d=o.trim().toLowerCase();ht(d).then(i=>{r(`https://www.gravatar.com/avatar/${i}?s=${e||80}&d=404`);});},[o,e]),a}t(mt,"useGravatarUrl");function le({src:o,email:e,name:a,size:r=40,colors:d,className:i}){let[p,s]=react.useState(false),[c,n]=react.useState(false),m=mt(e,r*2),h=`rounded-full object-cover ${i||""}`,u={width:r,height:r};return o&&!p?jsxRuntime.jsx("img",{src:o,alt:a||e||"avatar",className:h,style:u,onError:()=>s(true)}):m&&!c?jsxRuntime.jsx("img",{src:m,alt:a||e||"avatar",className:h,style:u,onError:()=>n(true)}):jsxRuntime.jsx(ie,{name:a||e||"user",size:r,colors:d,className:i})}t(le,"UserAvatar");function _({user:o,organizations:e=[],currentOrgId:a,onOrgSwitch:r,onSignOut:d}){let[i,p]=react.useState(false),s=react.useRef(null);if(react.useEffect(()=>{let h=t(u=>{s.current&&!s.current.contains(u.target)&&p(false);},"handler");return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[]),!o)return null;let c=e.find(h=>h.id===a),n=c?.slug||"hanzo",m=H[n]||H.hanzo;return jsxRuntime.jsxs("div",{ref:s,className:"relative",children:[jsxRuntime.jsxs("button",{type:"button",onClick:()=>p(h=>!h),className:"flex items-center gap-2 rounded-lg px-2 py-1.5 hover:bg-white/[0.06] transition-colors",children:[jsxRuntime.jsx(le,{src:o.avatar,email:o.email,name:o.name,size:28}),jsxRuntime.jsxs("div",{className:"hidden flex-col items-start sm:flex",children:[o.name&&jsxRuntime.jsx("span",{className:"text-[12px] font-medium text-white/70 leading-none",children:o.name}),jsxRuntime.jsx("span",{className:"text-[11px] text-white/30 leading-none mt-0.5",children:o.email})]}),jsxRuntime.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-white/30 hidden sm:block",children:jsxRuntime.jsx("path",{d:"M6 9l6 6 6-6"})})]}),i&&jsxRuntime.jsxs("div",{className:"absolute right-0 top-10 z-50 w-64 rounded-xl border border-white/[0.08] bg-[#0e0e13] shadow-2xl",children:[jsxRuntime.jsxs("div",{className:"border-b border-white/[0.06] px-4 py-3",children:[jsxRuntime.jsx("p",{className:"text-[13px] font-medium text-white/80",children:o.name||"User"}),jsxRuntime.jsx("p",{className:"text-[11px] text-white/40",children:o.email}),c&&jsxRuntime.jsx("p",{className:"mt-0.5 text-[10px] font-medium text-white/25 uppercase tracking-wider",children:c.name})]}),e.length>0&&jsxRuntime.jsxs("div",{className:"border-b border-white/[0.06] p-2",children:[jsxRuntime.jsx("p",{className:"px-2 pb-1 pt-0.5 text-[10px] font-medium uppercase tracking-wider text-white/30",children:"Organizations"}),e.map(h=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>{r?.(h.id),p(false);},className:"flex w-full items-center justify-between rounded-lg px-3 py-2 text-left hover:bg-white/[0.06] transition-colors",children:[jsxRuntime.jsxs("div",{className:"flex flex-col",children:[jsxRuntime.jsx("span",{className:"text-[13px] text-white/70",children:h.name}),h.role&&jsxRuntime.jsx("span",{className:"text-[10px] text-white/25 capitalize",children:h.role})]}),h.id===a&&jsxRuntime.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:"text-white/50",children:jsxRuntime.jsx("polyline",{points:"20 6 9 17 4 12"})})]},h.id))]}),jsxRuntime.jsxs("div",{className:"p-2",children:[jsxRuntime.jsx("a",{href:`${m.iam}/account`,className:"flex items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] text-white/60 hover:bg-white/[0.06] hover:text-white/80 transition-colors",onClick:()=>p(false),children:"Account settings"}),jsxRuntime.jsx("a",{href:m.billing,className:"flex items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] text-white/60 hover:bg-white/[0.06] hover:text-white/80 transition-colors",onClick:()=>p(false),children:"Billing"}),jsxRuntime.jsx("button",{type:"button",onClick:()=>{p(false),d?.();},className:"flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] text-white/40 hover:bg-white/[0.06] hover:text-red-400/70 transition-colors",children:"Sign out"})]})]})]})}t(_,"UserOrgDropdown");function bt({className:o}){return jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:o,children:[jsxRuntime.jsx("path",{d:"M21 2v6h-6"}),jsxRuntime.jsx("path",{d:"M3 12a9 9 0 0 1 15-6.7L21 8"}),jsxRuntime.jsx("path",{d:"M3 22v-6h6"}),jsxRuntime.jsx("path",{d:"M21 12a9 9 0 0 1-15 6.7L3 16"})]})}t(bt,"HardRefreshIcon");function wt({className:o}){return jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:o,children:[jsxRuntime.jsx("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}t(wt,"SettingsIcon");async function vt(){try{if(localStorage.clear(),sessionStorage.clear(),document.cookie.split(";").forEach(o=>{let e=o.split("=")[0].trim();if(e){document.cookie=`${e}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`,document.cookie=`${e}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;domain=${location.hostname}`;let a=location.hostname.split(".");if(a.length>2){let r="."+a.slice(-2).join(".");document.cookie=`${e}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;domain=${r}`;}}}),"caches"in window){let o=await caches.keys();await Promise.all(o.map(e=>caches.delete(e)));}if("serviceWorker"in navigator){let o=await navigator.serviceWorker.getRegistrations();await Promise.all(o.map(e=>e.unregister()));}if("indexedDB"in window&&indexedDB.databases)try{(await indexedDB.databases()).forEach(e=>{e.name&&indexedDB.deleteDatabase(e.name);});}catch{}}catch{}location.reload();}t(vt,"hardRefresh");function pe({currentApp:o,currentAppId:e,user:a,organizations:r,currentOrgId:d,onOrgSwitch:i,onSignOut:p,apps:s,headerRight:c,settingsHref:n,onSettingsClick:m,hideHardRefresh:h,hideSettings:u}){let[x,M]=react.useState(false),B=r?.find(k=>k.id===d)?.slug||"hanzo",f=s||W(B),C=H[B]||H.hanzo,$=react.useCallback(()=>{M(true),vt();},[]),y=react.useCallback(()=>{m?m():window.location.href=n||`${C.iam}/account`;},[m,n,C.iam]);return jsxRuntime.jsxs("header",{className:"sticky top-0 z-50 flex h-14 w-full items-center justify-between border-b border-white/[0.07] bg-[#09090b]/90 px-4 backdrop-blur-xl",role:"banner",children:[jsxRuntime.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[jsxRuntime.jsx("a",{href:`${C.iam}/account`,className:"flex-shrink-0 rounded focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20","aria-label":"Account",children:jsxRuntime.jsx(ne,{size:22,brandMenu:true,animate:true})}),jsxRuntime.jsx("span",{className:"select-none text-white/[0.15]",children:"/"}),jsxRuntime.jsx("span",{className:"truncate text-[13px] font-medium text-white/50",children:o}),jsxRuntime.jsx(F,{apps:f,currentAppId:e})]}),jsxRuntime.jsxs("div",{className:"flex flex-shrink-0 items-center gap-1",children:[c,!h&&jsxRuntime.jsx("button",{type:"button",onClick:$,className:"flex items-center justify-center rounded-lg p-2 text-white/30 hover:bg-white/[0.06] hover:text-white/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20","aria-label":"Hard refresh \u2014 clear all storage, cookies, cache and reload",title:"Hard refresh",children:jsxRuntime.jsx(bt,{className:x?"animate-spin":""})}),!u&&jsxRuntime.jsx("button",{type:"button",onClick:y,className:"flex items-center justify-center rounded-lg p-2 text-white/30 hover:bg-white/[0.06] hover:text-white/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20","aria-label":"Settings",title:"Settings",children:jsxRuntime.jsx(wt,{})}),jsxRuntime.jsx(_,{user:a,organizations:r,currentOrgId:d,onOrgSwitch:i,onSignOut:p})]})]})}t(pe,"HanzoHeader");var de="hanzo-auth-token",Q="hanzo-user",he="hanzo-auth-expires",kt="https://iam.hanzo.ai",zt={hanzo:{name:"Hanzo AI",slug:"hanzo"},lux:{name:"Lux Network",slug:"lux"},zoo:{name:"Zoo Labs",slug:"zoo"},pars:{name:"Pars",slug:"pars"}};function me(){let[o,e]=react.useState(void 0),[a,r]=react.useState([]),[d,i]=react.useState(void 0),[p,s]=react.useState(null),[c,n]=react.useState(true),m=react.useCallback(async()=>{try{let x=localStorage.getItem(de),M=localStorage.getItem(he);if(!x||M&&Date.now()>Number(M)){n(!1);return}s(x);let E=localStorage.getItem(Q);if(E)try{let f=JSON.parse(E);f?.email&&e({id:f.id,name:f.displayName||f.name,email:f.email,avatar:f.avatar});}catch{}let B=await fetch(`${kt}/v1/iam/oauth/userinfo`,{headers:{Authorization:`Bearer ${x}`}});if(B.ok){let f=await B.json(),C={id:f.sub||f.id,name:f.name||f.displayName,email:f.email,avatar:f.picture||f.avatar};e(C),localStorage.setItem(Q,JSON.stringify(f));let y=(f.groups||[]).map(k=>{let I=k.toLowerCase().replace(/^\//,""),U=zt[I];return U?{id:I,name:U.name,slug:U.slug}:null}).filter(Boolean);y.length===0&&C.email&&y.push({id:"personal",name:"Personal",slug:"personal"}),r(y),i(y[0]?.id);}}catch{}finally{n(false);}},[]);react.useEffect(()=>{m();},[m]);let h=react.useCallback(()=>{localStorage.removeItem(de),localStorage.removeItem(Q),localStorage.removeItem(he),window.location.href="https://hanzo.id";},[]),u=react.useCallback(x=>{i(x);},[]);return {user:o,organizations:a,currentOrgId:d,token:p,loading:c,signOut:h,switchOrg:u}}t(me,"useHanzoAuth");function Nt(o,e){return o.filter(a=>a.id!==e).map(a=>({id:`app-${a.id}`,title:a.label,description:a.description,href:a.href,category:"Hanzo Apps",external:true,keywords:[a.id,a.label.toLowerCase()]}))}t(Nt,"buildCrossAppCommands");function ue({commands:o=[],apps:e,currentAppId:a,open:r,onOpenChange:d,onNavigate:i}){var oe;let[p,s]=react.useState(false),c=r??p,n=react.useCallback(l=>{d?d(l):s(l);},[d]),[m,h]=react.useState(""),[u,x]=react.useState(0),M=react.useRef(null),E=react.useRef(null),B=Nt(e??R,a),f=[...o,...B],C=m.toLowerCase(),$=C?f.filter(l=>l.title.toLowerCase().includes(C)||l.description?.toLowerCase().includes(C)||l.keywords?.some(z=>z.includes(C))):f,y={};for(let l of $)(y[oe=l.category]??(y[oe]=[])).push(l);let k=Object.values(y).flat();react.useEffect(()=>x(0),[m]),react.useEffect(()=>{c&&(h(""),x(0),requestAnimationFrame(()=>M.current?.focus()));},[c]),react.useEffect(()=>{let l=t(z=>{(z.metaKey||z.ctrlKey)&&z.key==="k"&&(z.preventDefault(),n(!c));},"handler");return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[c,n]);let I=react.useCallback(l=>{l.action?l.action():l.href&&(i?i(l.href,l.external):l.external?window.open(l.href,"_blank"):window.location.href=l.href),n(false);},[i,n]),U=react.useCallback(l=>{l.key==="ArrowDown"?(l.preventDefault(),x(z=>(z+1)%(k.length||1))):l.key==="ArrowUp"?(l.preventDefault(),x(z=>(z-1+(k.length||1))%(k.length||1))):l.key==="Enter"&&k[u]?(l.preventDefault(),I(k[u])):l.key==="Escape"&&n(false);},[k,u,I,n]);return react.useEffect(()=>{E.current?.querySelector(`[data-idx="${u}"]`)?.scrollIntoView({block:"nearest"});},[u]),c?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-[100]",onClick:()=>n(false)}),jsxRuntime.jsx("div",{className:"fixed top-[15%] left-1/2 -translate-x-1/2 w-full max-w-xl z-[101]",children:jsxRuntime.jsxs("div",{className:"bg-[#111113] border border-white/[0.08] rounded-xl shadow-2xl overflow-hidden",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-white/[0.07]",children:[jsxRuntime.jsx("svg",{className:"w-4 h-4 text-white/30",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),jsxRuntime.jsx("input",{ref:M,type:"text",value:m,onChange:l=>h(l.target.value),onKeyDown:U,placeholder:"Search commands...",className:"flex-1 bg-transparent text-white text-[13px] placeholder-white/30 outline-none"}),jsxRuntime.jsx("kbd",{className:"px-1.5 py-0.5 text-[10px] font-mono bg-white/[0.06] rounded text-white/30",children:"ESC"})]}),jsxRuntime.jsx("div",{ref:E,className:"max-h-[400px] overflow-y-auto py-1",children:k.length===0?jsxRuntime.jsxs("div",{className:"px-4 py-8 text-center text-white/30 text-[13px]",children:["No results for \u201C",m,"\u201D"]}):Object.entries(y).map(([l,z])=>jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"px-4 py-2 text-[10px] font-semibold text-white/25 uppercase tracking-widest",children:l}),z.map(D=>{let G=k.indexOf(D),j=G===u;return jsxRuntime.jsxs("button",{"data-idx":G,onClick:()=>I(D),onMouseEnter:()=>x(G),className:`w-full flex items-center gap-3 px-4 py-2 text-left transition-colors ${j?"bg-white/[0.06] text-white":"text-white/50 hover:bg-white/[0.03]"}`,children:[D.icon&&jsxRuntime.jsx("span",{className:`w-5 h-5 flex items-center justify-center ${j?"text-white/70":"text-white/25"}`,children:D.icon}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("span",{className:"text-[13px] font-medium truncate block",children:D.title}),D.description&&jsxRuntime.jsx("span",{className:"text-[11px] text-white/25 truncate block",children:D.description})]}),j&&jsxRuntime.jsx("span",{className:"text-white/25 text-[11px]",children:"\u21B5"})]},D.id)})]},l))}),jsxRuntime.jsxs("div",{className:"px-4 py-2 border-t border-white/[0.07] flex items-center justify-between",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-4 text-[10px] text-white/20",children:[jsxRuntime.jsxs("span",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("kbd",{className:"px-1 py-0.5 bg-white/[0.06] rounded text-[9px]",children:"\u2191"}),jsxRuntime.jsx("kbd",{className:"px-1 py-0.5 bg-white/[0.06] rounded text-[9px]",children:"\u2193"}),"navigate"]}),jsxRuntime.jsxs("span",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("kbd",{className:"px-1 py-0.5 bg-white/[0.06] rounded text-[9px]",children:"\u21B5"}),"select"]})]}),jsxRuntime.jsx("span",{className:"text-[10px] text-white/20",children:"\u2318K"})]})]})})]}):null}t(ue,"HanzoCommandPalette");function xe(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(xe,"Component");function we(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(we,"Component");function ye(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(ye,"Component");function ze(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(ze,"Component");function Ce(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Ce,"Component");function He(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(He,"Component");function De(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(De,"Component");function Pe(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Pe,"Component");function Be(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Be,"Component");function Ee(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Ee,"Component");function Re(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Re,"Component");function Te(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Te,"Component");function $e(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t($e,"Component");function _e(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(_e,"Component");function Ge(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Ge,"Component");function Ke(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Ke,"Component");function qe(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(qe,"Component");function Je(){return jsxRuntime.jsx("div",{className:"flex items-center justify-center p-8",children:jsxRuntime.jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Je,"Component");
|
|
3
|
+
exports.AIModelSelectorNavigationBar=we;exports.AdvancedNavigationBar=xe;exports.AppSwitcher=F;exports.AppSwitcherNavigationBar=ye;exports.BreadcrumbAndFiltersNavigationBar=ze;exports.BreadcrumbNavigationBar=Ce;exports.CenteredLogoNavigationBar=He;exports.CollaborationNavigationBar=De;exports.CommunicationNavigationBar=Pe;exports.ContextSwitcherNavigationBar=Be;exports.DEFAULT_HANZO_APPS=R;exports.DashboardNavigationBar=Ee;exports.ECommerceNavigationBar=Re;exports.HanzoCommandPalette=ue;exports.HanzoHeader=pe;exports.IconNavigationBar=Te;exports.SearchAndToggleNavigationBar=$e;exports.SimpleNavigationBar=_e;exports.StatusDashboardNavigationBar=Ge;exports.TeamSwitcherNavigationBar=Ke;exports.TwoTierNavigationBar=qe;exports.UnderlineNavigationBar=Je;exports.UserOrgDropdown=_;exports.useHanzoAuth=me;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {useState,useRef,useEffect,useCallback,useMemo}from'react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var Xe=Object.defineProperty;var t=(o,e)=>Xe(o,"name",{value:e,configurable:true});function ot({x:o,y:e,onClose:a}){let r=useRef(null);useEffect(()=>{let p=t(c=>{r.current&&!r.current.contains(c.target)&&a();},"handler"),s=t(c=>{c.key==="Escape"&&a();},"escape");return document.addEventListener("mousedown",p),document.addEventListener("keydown",s),()=>{document.removeEventListener("mousedown",p),document.removeEventListener("keydown",s);}},[a]);let d=[{label:"Brand Guidelines",href:"https://hanzo.ai/brand"},{label:"Press Kit",href:"https://hanzo.ai/press"},{label:"Download Logo",href:"https://hanzo.ai/brand#download"},{label:"Copy SVG",action:"copy-svg"},{label:"hanzo.ai \u2192",href:"https://hanzo.ai"}],i='<svg viewBox="0 0 67 67" xmlns="http://www.w3.org/2000/svg"><path d="M22.21 67V44.6369H0V67H22.21Z" fill="#ffffff"/><path d="M0 44.6369L22.21 46.8285V44.6369H0Z" fill="#DDDDDD"/><path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z" fill="#ffffff"/><path d="M22.21 0H0V22.3184H22.21V0Z" fill="#ffffff"/><path d="M66.7198 0H44.5098V22.3184H66.7198V0Z" fill="#ffffff"/><path d="M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z" fill="#DDDDDD"/><path d="M66.7198 67V44.6369H44.5098V67H66.7198Z" fill="#ffffff"/></svg>';return jsxs("div",{ref:r,role:"menu",className:"fixed z-[9999] min-w-[180px] rounded-xl border border-white/[0.08] bg-[#111113] py-1.5 shadow-2xl shadow-black/60",style:{top:e,left:o},children:[jsx("div",{className:"border-b border-white/[0.06] px-3 pb-2 pt-1",children:jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-white/30",children:"Hanzo Brand"})}),d.map(p=>p.action==="copy-svg"?jsx("button",{type:"button",role:"menuitem",onClick:()=>{navigator.clipboard.writeText(i).catch(()=>{}),a();},className:"flex w-full items-center px-3 py-2 text-[13px] text-white/60 hover:bg-white/[0.05] hover:text-white/90 transition-colors text-left",children:"Copy SVG"},"copy"):jsx("a",{href:p.href,role:"menuitem",target:p.href?.startsWith("https")?"_blank":void 0,rel:"noopener noreferrer",onClick:a,className:"flex items-center px-3 py-2 text-[13px] text-white/60 hover:bg-white/[0.05] hover:text-white/90 transition-colors",children:p.label},p.label))]})}t(ot,"BrandContextMenu");function ne({size:o=22,className:e="",brandMenu:a=true,animate:r=true}){let[d,i]=useState(null),[p,s]=useState(false),c=useCallback(m=>{a&&(m.preventDefault(),i({x:m.clientX,y:m.clientY}));},[a]);return jsxs(Fragment,{children:[jsxs("svg",{width:o,height:o,viewBox:"0 0 67 67",xmlns:"http://www.w3.org/2000/svg","aria-label":"Hanzo",className:e,style:r?{transition:"transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease",transform:p?"scale(1.12) perspective(80px) rotateY(-6deg)":"scale(1) perspective(80px) rotateY(0deg)",transformOrigin:"center center"}:{},onMouseEnter:()=>s(true),onMouseLeave:()=>s(false),onContextMenu:c,children:[jsx("path",{d:"M22.21 67V44.6369H0V67H22.21Z",fill:"#ffffff"}),jsx("path",{d:"M0 44.6369L22.21 46.8285V44.6369H0Z",fill:"#DDDDDD"}),jsx("path",{d:"M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z",fill:"#ffffff"}),jsx("path",{d:"M22.21 0H0V22.3184H22.21V0Z",fill:"#ffffff"}),jsx("path",{d:"M66.7198 0H44.5098V22.3184H66.7198V0Z",fill:"#ffffff"}),jsx("path",{d:"M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z",fill:"#DDDDDD"}),jsx("path",{d:"M66.7198 67V44.6369H44.5098V67H66.7198Z",fill:"#ffffff"})]}),d&&jsx(ot,{x:d.x,y:d.y,onClose:()=>i(null)})]})}t(ne,"HanzoMark");var R=[{id:"account",label:"Account",href:"https://hanzo.id/account",description:"Profile, orgs & referrals"},{id:"billing",label:"Billing",href:"https://billing.hanzo.ai",description:"Subscriptions & usage"},{id:"console",label:"Console",href:"https://console.hanzo.ai",description:"API keys & projects"},{id:"chat",label:"Chat",href:"https://hanzo.chat",description:"AI chat & models"},{id:"flow",label:"Flow",href:"https://flow.hanzo.ai",description:"Visual workflow builder"},{id:"bot",label:"Bot",href:"https://hanzo.bot",description:"AI bot platform"},{id:"o11y",label:"O11y",href:"https://o11y.hanzo.ai",description:"Traces, logs & metrics"},{id:"sentry",label:"Sentry",href:"https://sentry.hanzo.ai",description:"Error & crash tracking"},{id:"insights",label:"Insights",href:"https://insights.hanzo.ai",description:"Product analytics & flags"},{id:"analytics",label:"Analytics",href:"https://analytics.hanzo.ai",description:"Web analytics"},{id:"platform",label:"Platform",href:"https://platform.hanzo.ai",description:"Deploy & scale services"},{id:"cloud",label:"Cloud",href:"https://cloud.hanzo.ai",description:"Cloud infrastructure"},{id:"storage",label:"Storage",href:"https://s3.hanzo.ai",description:"S3 object storage"},{id:"kms",label:"KMS",href:"https://kms.hanzo.ai",description:"Secrets & key management"},{id:"dns",label:"DNS",href:"https://dns.hanzo.ai",description:"DNS management"},{id:"registry",label:"Registry",href:"https://registry.hanzo.ai",description:"Container registry"},{id:"commerce",label:"Commerce",href:"https://commerce.hanzo.ai",description:"Payments & storefront"},{id:"base",label:"Base",href:"https://base.hanzo.ai",description:"Backend-as-a-Service"},{id:"search",label:"Search",href:"https://search.hanzo.ai",description:"Full-text search"},{id:"auto",label:"Auto",href:"https://auto.hanzo.ai",description:"Workflow automation"},{id:"team",label:"Team",href:"https://hanzo.team",description:"Team collaboration"},{id:"sign",label:"Sign",href:"https://sign.hanzo.ai",description:"Document signing"},{id:"dataroom",label:"Dataroom",href:"https://dataroom.hanzo.ai",description:"Secure deal rooms"},{id:"captable",label:"Cap Table",href:"https://captable.hanzo.ai",description:"Equity management"},{id:"docs",label:"Docs",href:"https://docs.hanzo.ai",description:"Documentation"},{id:"status",label:"Status",href:"https://status.hanzo.ai",description:"System status"}],H={hanzo:{id:"hanzo",iam:"https://hanzo.id",billing:"https://billing.hanzo.ai",console:"https://console.hanzo.ai",cloud:"https://cloud.hanzo.ai",chat:"https://hanzo.chat",flow:"https://flow.hanzo.ai",bot:"https://hanzo.bot",o11y:"https://o11y.hanzo.ai",sentry:"https://sentry.hanzo.ai",insights:"https://insights.hanzo.ai",analytics:"https://analytics.hanzo.ai",platform:"https://platform.hanzo.ai",storage:"https://s3.hanzo.ai",s3:"https://s3.hanzo.ai",kms:"https://kms.hanzo.ai",dns:"https://dns.hanzo.ai",registry:"https://registry.hanzo.ai",commerce:"https://commerce.hanzo.ai",base:"https://base.hanzo.ai",search:"https://search.hanzo.ai",auto:"https://auto.hanzo.ai",team:"https://hanzo.team",sign:"https://sign.hanzo.ai",dataroom:"https://dataroom.hanzo.ai",captable:"https://captable.hanzo.ai",docs:"https://docs.hanzo.ai",status:"https://status.hanzo.ai"},lux:{id:"lux",iam:"https://lux.id",billing:"https://billing.lux.network",console:"https://console.lux.network",cloud:"https://cloud.lux.network",chat:"https://lux.chat",flow:"https://flow.lux.network",bot:"https://bot.lux.network",o11y:"https://o11y.lux.network",sentry:"https://sentry.lux.network",insights:"https://insights.lux.network",analytics:"https://analytics.lux.network",platform:"https://platform.lux.network",storage:"https://s3.lux.network",s3:"https://s3.lux.network",kms:"https://kms.lux.network",dns:"https://dns.lux.network",registry:"https://registry.lux.network",commerce:"https://commerce.lux.network",base:"https://base.lux.network",search:"https://search.lux.network",auto:"https://auto.lux.network",team:"https://team.lux.network",sign:"https://sign.lux.network",dataroom:"https://dataroom.lux.network",captable:"https://captable.lux.network",docs:"https://docs.lux.network",status:"https://status.lux.network"},zoo:{id:"zoo",iam:"https://zoo.id",billing:"https://billing.zoo.ngo",console:"https://console.zoo.ngo",cloud:"https://cloud.zoo.network",chat:"https://chat.zoo.ngo",flow:"https://flow.zoo.ngo",bot:"https://bot.zoo.ngo",o11y:"https://o11y.zoo.network",sentry:"https://sentry.zoo.network",insights:"https://insights.zoo.ngo",analytics:"https://analytics.zoo.ngo",platform:"https://platform.zoo.ngo",storage:"https://s3.zoo.ngo",s3:"https://s3.zoo.ngo",kms:"https://kms.zoo.network",dns:"https://dns.zoo.ngo",registry:"https://registry.zoo.ngo",commerce:"https://commerce.zoo.ngo",base:"https://base.zoo.ngo",search:"https://search.zoo.ngo",auto:"https://auto.zoo.ngo",team:"https://team.zoo.ngo",sign:"https://sign.zoo.ngo",dataroom:"https://dataroom.zoo.ngo",captable:"https://captable.zoo.ngo",docs:"https://docs.zoo.ngo",status:"https://status.zoo.network"},pars:{id:"pars",iam:"https://pars.id",billing:"https://billing.pars.network",console:"https://console.pars.network",cloud:"https://cloud.pars.network",chat:"https://chat.pars.network",flow:"https://flow.pars.network",bot:"https://bot.pars.network",o11y:"https://o11y.pars.network",sentry:"https://sentry.pars.network",insights:"https://insights.pars.network",analytics:"https://analytics.pars.network",platform:"https://platform.pars.network",storage:"https://s3.pars.network",s3:"https://s3.pars.network",kms:"https://kms.pars.network",dns:"https://dns.pars.network",registry:"https://registry.pars.network",commerce:"https://commerce.pars.network",base:"https://base.pars.network",search:"https://search.pars.network",auto:"https://auto.pars.network",team:"https://team.pars.network",sign:"https://sign.pars.network",dataroom:"https://dataroom.pars.network",captable:"https://captable.pars.network",docs:"https://docs.pars.network",status:"https://status.pars.network"}};function W(o){let e=H[o]||H.hanzo;return [{id:"account",label:"Account",href:`${e.iam}/account`,description:"Profile, orgs & referrals"},{id:"billing",label:"Billing",href:e.billing,description:"Subscriptions & usage"},{id:"console",label:"Console",href:e.console,description:"API keys & projects"},{id:"chat",label:"Chat",href:e.chat,description:"AI chat & models"},{id:"flow",label:"Flow",href:e.flow,description:"Visual workflow builder"},{id:"bot",label:"Bot",href:e.bot,description:"AI bot platform"},{id:"o11y",label:"O11y",href:e.o11y,description:"Traces, logs & metrics"},{id:"sentry",label:"Sentry",href:e.sentry,description:"Error & crash tracking"},{id:"insights",label:"Insights",href:e.insights,description:"Product analytics & flags"},{id:"analytics",label:"Analytics",href:e.analytics,description:"Web analytics"},{id:"platform",label:"Platform",href:e.platform,description:"Deploy & scale services"},{id:"cloud",label:"Cloud",href:e.cloud,description:"Cloud infrastructure"},{id:"storage",label:"Storage",href:e.storage,description:"S3 object storage"},{id:"kms",label:"KMS",href:e.kms,description:"Secrets & key management"},{id:"dns",label:"DNS",href:e.dns,description:"DNS management"},{id:"registry",label:"Registry",href:e.registry,description:"Container registry"},{id:"commerce",label:"Commerce",href:e.commerce,description:"Payments & storefront"},{id:"base",label:"Base",href:e.base,description:"Backend-as-a-Service"},{id:"search",label:"Search",href:e.search,description:"Full-text search"},{id:"auto",label:"Auto",href:e.auto,description:"Workflow automation"},{id:"team",label:"Team",href:e.team,description:"Team collaboration"},{id:"sign",label:"Sign",href:e.sign,description:"Document signing"},{id:"dataroom",label:"Dataroom",href:e.dataroom,description:"Secure deal rooms"},{id:"captable",label:"Cap Table",href:e.captable,description:"Equity management"},{id:"docs",label:"Docs",href:e.docs,description:"Documentation"},{id:"status",label:"Status",href:e.status,description:"System status"}]}t(W,"getAppsForOrg");var se=[{label:"Core",ids:["account","billing","console"]},{label:"AI",ids:["chat","flow","bot"]},{label:"Observability",ids:["o11y","sentry","insights","analytics"]},{label:"Infrastructure",ids:["platform","cloud","storage","kms","dns","registry"]},{label:"Apps",ids:["commerce","base","search","auto"]},{label:"Business",ids:["team","sign","dataroom","captable"]},{label:"Resources",ids:["docs","status"]}];function F({apps:o=R,currentAppId:e}){let[a,r]=useState(false),d=useRef(null);useEffect(()=>{let s=t(c=>{d.current&&!d.current.contains(c.target)&&r(false);},"handler");return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[]);let i=o.filter(s=>s.id!==e),p=new Map(i.map(s=>[s.id,s]));return jsxs("div",{ref:d,className:"relative",children:[jsx("button",{type:"button",onClick:()=>r(s=>!s),className:"flex h-8 w-8 items-center justify-center rounded-lg text-white/40 hover:bg-white/[0.06] hover:text-white/70 transition-colors","aria-label":"Switch app",title:"Switch app",children:jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:[jsx("rect",{x:"1",y:"1",width:"4",height:"4",rx:"1"}),jsx("rect",{x:"6",y:"1",width:"4",height:"4",rx:"1"}),jsx("rect",{x:"11",y:"1",width:"4",height:"4",rx:"1"}),jsx("rect",{x:"1",y:"6",width:"4",height:"4",rx:"1"}),jsx("rect",{x:"6",y:"6",width:"4",height:"4",rx:"1"}),jsx("rect",{x:"11",y:"6",width:"4",height:"4",rx:"1"}),jsx("rect",{x:"1",y:"11",width:"4",height:"4",rx:"1"}),jsx("rect",{x:"6",y:"11",width:"4",height:"4",rx:"1"}),jsx("rect",{x:"11",y:"11",width:"4",height:"4",rx:"1"})]})}),a&&jsxs("div",{className:"absolute left-0 top-10 z-50 w-72 max-h-[80vh] overflow-y-auto rounded-xl border border-white/[0.08] bg-[#0e0e13] p-2 shadow-2xl",children:[se.map(s=>{let c=s.ids.map(n=>p.get(n)).filter(Boolean);return c.length===0?null:jsxs("div",{children:[jsx("p",{className:"px-2 pb-1 pt-2 text-[10px] font-medium uppercase tracking-wider text-white/30",children:s.label}),jsx("div",{className:"grid grid-cols-2 gap-0.5",children:c.map(n=>jsxs("a",{href:n.href,className:"flex flex-col gap-0.5 rounded-lg px-3 py-2 hover:bg-white/[0.06] transition-colors",onClick:()=>r(false),children:[jsx("span",{className:"text-[13px] font-medium text-white/80",children:n.label}),n.description&&jsx("span",{className:"text-[11px] leading-tight text-white/30",children:n.description})]},n.id))})]},s.label)}),(()=>{let s=new Set(se.flatMap(n=>n.ids)),c=i.filter(n=>!s.has(n.id));return c.length===0?null:jsxs("div",{children:[jsx("p",{className:"px-2 pb-1 pt-2 text-[10px] font-medium uppercase tracking-wider text-white/30",children:"Other"}),jsx("div",{className:"grid grid-cols-2 gap-0.5",children:c.map(n=>jsxs("a",{href:n.href,className:"flex flex-col gap-0.5 rounded-lg px-3 py-2 hover:bg-white/[0.06] transition-colors",onClick:()=>r(false),children:[jsx("span",{className:"text-[13px] font-medium text-white/80",children:n.label}),n.description&&jsx("span",{className:"text-[11px] leading-tight text-white/30",children:n.description})]},n.id))})]})})()]})]})}t(F,"AppSwitcher");var it=["#0A0310","#49007E","#FF005B","#FF7D10","#FFB238"];function lt(o){let e=0;for(let a=0;a<o.length;a++)e=(e<<5)-e+o.charCodeAt(a)|0;return Math.abs(e)}t(lt,"hashStr");function P(o,e,a){return o%(e*(a+1))%e}t(P,"getUnit");function ct(o,e){return P(o,2,e)===0}t(ct,"getBoolean");function re(o,e,a){return a[P(o,a.length,e)]}t(re,"getRandomColor");function pt(o){let e=parseInt(o.slice(1,3),16),a=parseInt(o.slice(3,5),16),r=parseInt(o.slice(5,7),16);return e*.299+a*.587+r*.114>128?"#000":"#fff"}t(pt,"getContrast");function ie({name:o,size:e=40,colors:a=it,className:r,square:d=false}){let i=lt(o),p=re(i,0,a),s=pt(p),c=ct(i,2),n=P(i,3,7),m=P(i,5,8),h=P(i,10,9),u=h>6?h-10:h,x=P(i,5,10)>3?P(i,5,10)-5:P(i,5,10);return jsxs("svg",{viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:e,height:e,className:r,style:d?void 0:{borderRadius:"50%"},children:[jsx("mask",{id:`beam-${i}`,maskUnits:"userSpaceOnUse",x:0,y:0,width:36,height:36,children:jsx("rect",{width:36,height:36,rx:d?void 0:72,fill:"#fff"})}),jsxs("g",{mask:`url(#beam-${i})`,children:[jsx("rect",{width:36,height:36,fill:p}),jsx("rect",{x:0,y:0,width:36,height:36,transform:`translate(${u} ${x}) rotate(${h} 18 18)`,fill:re(i,1,a),rx:6}),jsxs("g",{transform:`translate(${u} ${x}) rotate(${h} 18 18)`,children:[c?jsx("path",{d:`M15 ${19+n}c2 1 4 1 6 0`,stroke:s,fill:"none",strokeLinecap:"round"}):jsx("path",{d:`M13 ${19+n}a1 .75 0 0 0 10 0`,fill:s}),jsx("rect",{x:14-m,y:14,width:1.5,height:2,rx:1,fill:s}),jsx("rect",{x:20+m,y:14,width:1.5,height:2,rx:1,fill:s})]})]})]})}t(ie,"BeamAvatar");async function ht(o){let a=new TextEncoder().encode(o),r=await crypto.subtle.digest("SHA-256",a);return Array.from(new Uint8Array(r)).map(d=>d.toString(16).padStart(2,"0")).join("")}t(ht,"sha256");function mt(o,e){let[a,r]=useState(null);return useMemo(()=>{if(!o){r(null);return}let d=o.trim().toLowerCase();ht(d).then(i=>{r(`https://www.gravatar.com/avatar/${i}?s=${e||80}&d=404`);});},[o,e]),a}t(mt,"useGravatarUrl");function le({src:o,email:e,name:a,size:r=40,colors:d,className:i}){let[p,s]=useState(false),[c,n]=useState(false),m=mt(e,r*2),h=`rounded-full object-cover ${i||""}`,u={width:r,height:r};return o&&!p?jsx("img",{src:o,alt:a||e||"avatar",className:h,style:u,onError:()=>s(true)}):m&&!c?jsx("img",{src:m,alt:a||e||"avatar",className:h,style:u,onError:()=>n(true)}):jsx(ie,{name:a||e||"user",size:r,colors:d,className:i})}t(le,"UserAvatar");function _({user:o,organizations:e=[],currentOrgId:a,onOrgSwitch:r,onSignOut:d}){let[i,p]=useState(false),s=useRef(null);if(useEffect(()=>{let h=t(u=>{s.current&&!s.current.contains(u.target)&&p(false);},"handler");return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[]),!o)return null;let c=e.find(h=>h.id===a),n=c?.slug||"hanzo",m=H[n]||H.hanzo;return jsxs("div",{ref:s,className:"relative",children:[jsxs("button",{type:"button",onClick:()=>p(h=>!h),className:"flex items-center gap-2 rounded-lg px-2 py-1.5 hover:bg-white/[0.06] transition-colors",children:[jsx(le,{src:o.avatar,email:o.email,name:o.name,size:28}),jsxs("div",{className:"hidden flex-col items-start sm:flex",children:[o.name&&jsx("span",{className:"text-[12px] font-medium text-white/70 leading-none",children:o.name}),jsx("span",{className:"text-[11px] text-white/30 leading-none mt-0.5",children:o.email})]}),jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-white/30 hidden sm:block",children:jsx("path",{d:"M6 9l6 6 6-6"})})]}),i&&jsxs("div",{className:"absolute right-0 top-10 z-50 w-64 rounded-xl border border-white/[0.08] bg-[#0e0e13] shadow-2xl",children:[jsxs("div",{className:"border-b border-white/[0.06] px-4 py-3",children:[jsx("p",{className:"text-[13px] font-medium text-white/80",children:o.name||"User"}),jsx("p",{className:"text-[11px] text-white/40",children:o.email}),c&&jsx("p",{className:"mt-0.5 text-[10px] font-medium text-white/25 uppercase tracking-wider",children:c.name})]}),e.length>0&&jsxs("div",{className:"border-b border-white/[0.06] p-2",children:[jsx("p",{className:"px-2 pb-1 pt-0.5 text-[10px] font-medium uppercase tracking-wider text-white/30",children:"Organizations"}),e.map(h=>jsxs("button",{type:"button",onClick:()=>{r?.(h.id),p(false);},className:"flex w-full items-center justify-between rounded-lg px-3 py-2 text-left hover:bg-white/[0.06] transition-colors",children:[jsxs("div",{className:"flex flex-col",children:[jsx("span",{className:"text-[13px] text-white/70",children:h.name}),h.role&&jsx("span",{className:"text-[10px] text-white/25 capitalize",children:h.role})]}),h.id===a&&jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:"text-white/50",children:jsx("polyline",{points:"20 6 9 17 4 12"})})]},h.id))]}),jsxs("div",{className:"p-2",children:[jsx("a",{href:`${m.iam}/account`,className:"flex items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] text-white/60 hover:bg-white/[0.06] hover:text-white/80 transition-colors",onClick:()=>p(false),children:"Account settings"}),jsx("a",{href:m.billing,className:"flex items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] text-white/60 hover:bg-white/[0.06] hover:text-white/80 transition-colors",onClick:()=>p(false),children:"Billing"}),jsx("button",{type:"button",onClick:()=>{p(false),d?.();},className:"flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] text-white/40 hover:bg-white/[0.06] hover:text-red-400/70 transition-colors",children:"Sign out"})]})]})]})}t(_,"UserOrgDropdown");function bt({className:o}){return jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:o,children:[jsx("path",{d:"M21 2v6h-6"}),jsx("path",{d:"M3 12a9 9 0 0 1 15-6.7L21 8"}),jsx("path",{d:"M3 22v-6h6"}),jsx("path",{d:"M21 12a9 9 0 0 1-15 6.7L3 16"})]})}t(bt,"HardRefreshIcon");function wt({className:o}){return jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:o,children:[jsx("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),jsx("circle",{cx:"12",cy:"12",r:"3"})]})}t(wt,"SettingsIcon");async function vt(){try{if(localStorage.clear(),sessionStorage.clear(),document.cookie.split(";").forEach(o=>{let e=o.split("=")[0].trim();if(e){document.cookie=`${e}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`,document.cookie=`${e}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;domain=${location.hostname}`;let a=location.hostname.split(".");if(a.length>2){let r="."+a.slice(-2).join(".");document.cookie=`${e}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;domain=${r}`;}}}),"caches"in window){let o=await caches.keys();await Promise.all(o.map(e=>caches.delete(e)));}if("serviceWorker"in navigator){let o=await navigator.serviceWorker.getRegistrations();await Promise.all(o.map(e=>e.unregister()));}if("indexedDB"in window&&indexedDB.databases)try{(await indexedDB.databases()).forEach(e=>{e.name&&indexedDB.deleteDatabase(e.name);});}catch{}}catch{}location.reload();}t(vt,"hardRefresh");function pe({currentApp:o,currentAppId:e,user:a,organizations:r,currentOrgId:d,onOrgSwitch:i,onSignOut:p,apps:s,headerRight:c,settingsHref:n,onSettingsClick:m,hideHardRefresh:h,hideSettings:u}){let[x,M]=useState(false),B=r?.find(k=>k.id===d)?.slug||"hanzo",f=s||W(B),C=H[B]||H.hanzo,$=useCallback(()=>{M(true),vt();},[]),y=useCallback(()=>{m?m():window.location.href=n||`${C.iam}/account`;},[m,n,C.iam]);return jsxs("header",{className:"sticky top-0 z-50 flex h-14 w-full items-center justify-between border-b border-white/[0.07] bg-[#09090b]/90 px-4 backdrop-blur-xl",role:"banner",children:[jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[jsx("a",{href:`${C.iam}/account`,className:"flex-shrink-0 rounded focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20","aria-label":"Account",children:jsx(ne,{size:22,brandMenu:true,animate:true})}),jsx("span",{className:"select-none text-white/[0.15]",children:"/"}),jsx("span",{className:"truncate text-[13px] font-medium text-white/50",children:o}),jsx(F,{apps:f,currentAppId:e})]}),jsxs("div",{className:"flex flex-shrink-0 items-center gap-1",children:[c,!h&&jsx("button",{type:"button",onClick:$,className:"flex items-center justify-center rounded-lg p-2 text-white/30 hover:bg-white/[0.06] hover:text-white/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20","aria-label":"Hard refresh \u2014 clear all storage, cookies, cache and reload",title:"Hard refresh",children:jsx(bt,{className:x?"animate-spin":""})}),!u&&jsx("button",{type:"button",onClick:y,className:"flex items-center justify-center rounded-lg p-2 text-white/30 hover:bg-white/[0.06] hover:text-white/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20","aria-label":"Settings",title:"Settings",children:jsx(wt,{})}),jsx(_,{user:a,organizations:r,currentOrgId:d,onOrgSwitch:i,onSignOut:p})]})]})}t(pe,"HanzoHeader");var de="hanzo-auth-token",Q="hanzo-user",he="hanzo-auth-expires",kt="https://iam.hanzo.ai",zt={hanzo:{name:"Hanzo AI",slug:"hanzo"},lux:{name:"Lux Network",slug:"lux"},zoo:{name:"Zoo Labs",slug:"zoo"},pars:{name:"Pars",slug:"pars"}};function me(){let[o,e]=useState(void 0),[a,r]=useState([]),[d,i]=useState(void 0),[p,s]=useState(null),[c,n]=useState(true),m=useCallback(async()=>{try{let x=localStorage.getItem(de),M=localStorage.getItem(he);if(!x||M&&Date.now()>Number(M)){n(!1);return}s(x);let L=localStorage.getItem(Q);if(L)try{let f=JSON.parse(L);f?.email&&e({id:f.id,name:f.displayName||f.name,email:f.email,avatar:f.avatar});}catch{}let B=await fetch(`${kt}/api/userinfo`,{headers:{Authorization:`Bearer ${x}`}});if(B.ok){let f=await B.json(),C={id:f.sub||f.id,name:f.name||f.displayName,email:f.email,avatar:f.picture||f.avatar};e(C),localStorage.setItem(Q,JSON.stringify(f));let y=(f.groups||[]).map(k=>{let I=k.toLowerCase().replace(/^\//,""),U=zt[I];return U?{id:I,name:U.name,slug:U.slug}:null}).filter(Boolean);y.length===0&&C.email&&y.push({id:"personal",name:"Personal",slug:"personal"}),r(y),i(y[0]?.id);}}catch{}finally{n(false);}},[]);useEffect(()=>{m();},[m]);let h=useCallback(()=>{localStorage.removeItem(de),localStorage.removeItem(Q),localStorage.removeItem(he),window.location.href="https://hanzo.id";},[]),u=useCallback(x=>{i(x);},[]);return {user:o,organizations:a,currentOrgId:d,token:p,loading:c,signOut:h,switchOrg:u}}t(me,"useHanzoAuth");function Nt(o,e){return o.filter(a=>a.id!==e).map(a=>({id:`app-${a.id}`,title:a.label,description:a.description,href:a.href,category:"Hanzo Apps",external:true,keywords:[a.id,a.label.toLowerCase()]}))}t(Nt,"buildCrossAppCommands");function ue({commands:o=[],apps:e,currentAppId:a,open:r,onOpenChange:d,onNavigate:i}){var oe;let[p,s]=useState(false),c=r??p,n=useCallback(l=>{d?d(l):s(l);},[d]),[m,h]=useState(""),[u,x]=useState(0),M=useRef(null),L=useRef(null),B=Nt(e??R,a),f=[...o,...B],C=m.toLowerCase(),$=C?f.filter(l=>l.title.toLowerCase().includes(C)||l.description?.toLowerCase().includes(C)||l.keywords?.some(z=>z.includes(C))):f,y={};for(let l of $)(y[oe=l.category]??(y[oe]=[])).push(l);let k=Object.values(y).flat();useEffect(()=>x(0),[m]),useEffect(()=>{c&&(h(""),x(0),requestAnimationFrame(()=>M.current?.focus()));},[c]),useEffect(()=>{let l=t(z=>{(z.metaKey||z.ctrlKey)&&z.key==="k"&&(z.preventDefault(),n(!c));},"handler");return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[c,n]);let I=useCallback(l=>{l.action?l.action():l.href&&(i?i(l.href,l.external):l.external?window.open(l.href,"_blank"):window.location.href=l.href),n(false);},[i,n]),U=useCallback(l=>{l.key==="ArrowDown"?(l.preventDefault(),x(z=>(z+1)%(k.length||1))):l.key==="ArrowUp"?(l.preventDefault(),x(z=>(z-1+(k.length||1))%(k.length||1))):l.key==="Enter"&&k[u]?(l.preventDefault(),I(k[u])):l.key==="Escape"&&n(false);},[k,u,I,n]);return useEffect(()=>{L.current?.querySelector(`[data-idx="${u}"]`)?.scrollIntoView({block:"nearest"});},[u]),c?jsxs(Fragment,{children:[jsx("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-[100]",onClick:()=>n(false)}),jsx("div",{className:"fixed top-[15%] left-1/2 -translate-x-1/2 w-full max-w-xl z-[101]",children:jsxs("div",{className:"bg-[#111113] border border-white/[0.08] rounded-xl shadow-2xl overflow-hidden",children:[jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-white/[0.07]",children:[jsx("svg",{className:"w-4 h-4 text-white/30",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),jsx("input",{ref:M,type:"text",value:m,onChange:l=>h(l.target.value),onKeyDown:U,placeholder:"Search commands...",className:"flex-1 bg-transparent text-white text-[13px] placeholder-white/30 outline-none"}),jsx("kbd",{className:"px-1.5 py-0.5 text-[10px] font-mono bg-white/[0.06] rounded text-white/30",children:"ESC"})]}),jsx("div",{ref:L,className:"max-h-[400px] overflow-y-auto py-1",children:k.length===0?jsxs("div",{className:"px-4 py-8 text-center text-white/30 text-[13px]",children:["No results for \u201C",m,"\u201D"]}):Object.entries(y).map(([l,z])=>jsxs("div",{children:[jsx("div",{className:"px-4 py-2 text-[10px] font-semibold text-white/25 uppercase tracking-widest",children:l}),z.map(D=>{let G=k.indexOf(D),j=G===u;return jsxs("button",{"data-idx":G,onClick:()=>I(D),onMouseEnter:()=>x(G),className:`w-full flex items-center gap-3 px-4 py-2 text-left transition-colors ${j?"bg-white/[0.06] text-white":"text-white/50 hover:bg-white/[0.03]"}`,children:[D.icon&&jsx("span",{className:`w-5 h-5 flex items-center justify-center ${j?"text-white/70":"text-white/25"}`,children:D.icon}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("span",{className:"text-[13px] font-medium truncate block",children:D.title}),D.description&&jsx("span",{className:"text-[11px] text-white/25 truncate block",children:D.description})]}),j&&jsx("span",{className:"text-white/25 text-[11px]",children:"\u21B5"})]},D.id)})]},l))}),jsxs("div",{className:"px-4 py-2 border-t border-white/[0.07] flex items-center justify-between",children:[jsxs("div",{className:"flex items-center gap-4 text-[10px] text-white/20",children:[jsxs("span",{className:"flex items-center gap-1",children:[jsx("kbd",{className:"px-1 py-0.5 bg-white/[0.06] rounded text-[9px]",children:"\u2191"}),jsx("kbd",{className:"px-1 py-0.5 bg-white/[0.06] rounded text-[9px]",children:"\u2193"}),"navigate"]}),jsxs("span",{className:"flex items-center gap-1",children:[jsx("kbd",{className:"px-1 py-0.5 bg-white/[0.06] rounded text-[9px]",children:"\u21B5"}),"select"]})]}),jsx("span",{className:"text-[10px] text-white/20",children:"\u2318K"})]})]})})]}):null}t(ue,"HanzoCommandPalette");function xe(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(xe,"Component");function we(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(we,"Component");function ye(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(ye,"Component");function ze(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(ze,"Component");function Ce(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Ce,"Component");function He(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(He,"Component");function De(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(De,"Component");function Pe(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Pe,"Component");function Be(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Be,"Component");function Le(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Le,"Component");function Re(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Re,"Component");function Te(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Te,"Component");function $e(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t($e,"Component");function _e(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(_e,"Component");function Ge(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Ge,"Component");function Ke(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Ke,"Component");function qe(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(qe,"Component");function Je(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Je,"Component");
|
|
3
|
-
export{we as AIModelSelectorNavigationBar,xe as AdvancedNavigationBar,F as AppSwitcher,ye as AppSwitcherNavigationBar,ze as BreadcrumbAndFiltersNavigationBar,Ce as BreadcrumbNavigationBar,He as CenteredLogoNavigationBar,De as CollaborationNavigationBar,Pe as CommunicationNavigationBar,Be as ContextSwitcherNavigationBar,R as DEFAULT_HANZO_APPS,
|
|
2
|
+
import {useState,useRef,useEffect,useCallback,useMemo}from'react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var Xe=Object.defineProperty;var t=(o,e)=>Xe(o,"name",{value:e,configurable:true});function ot({x:o,y:e,onClose:a}){let r=useRef(null);useEffect(()=>{let p=t(c=>{r.current&&!r.current.contains(c.target)&&a();},"handler"),s=t(c=>{c.key==="Escape"&&a();},"escape");return document.addEventListener("mousedown",p),document.addEventListener("keydown",s),()=>{document.removeEventListener("mousedown",p),document.removeEventListener("keydown",s);}},[a]);let d=[{label:"Brand Guidelines",href:"https://hanzo.ai/brand"},{label:"Press Kit",href:"https://hanzo.ai/press"},{label:"Download Logo",href:"https://hanzo.ai/brand#download"},{label:"Copy SVG",action:"copy-svg"},{label:"hanzo.ai \u2192",href:"https://hanzo.ai"}],i='<svg viewBox="0 0 67 67" xmlns="http://www.w3.org/2000/svg"><path d="M22.21 67V44.6369H0V67H22.21Z" fill="#ffffff"/><path d="M0 44.6369L22.21 46.8285V44.6369H0Z" fill="#DDDDDD"/><path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z" fill="#ffffff"/><path d="M22.21 0H0V22.3184H22.21V0Z" fill="#ffffff"/><path d="M66.7198 0H44.5098V22.3184H66.7198V0Z" fill="#ffffff"/><path d="M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z" fill="#DDDDDD"/><path d="M66.7198 67V44.6369H44.5098V67H66.7198Z" fill="#ffffff"/></svg>';return jsxs("div",{ref:r,role:"menu",className:"fixed z-[9999] min-w-[180px] rounded-xl border border-white/[0.08] bg-[#111113] py-1.5 shadow-2xl shadow-black/60",style:{top:e,left:o},children:[jsx("div",{className:"border-b border-white/[0.06] px-3 pb-2 pt-1",children:jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-white/30",children:"Hanzo Brand"})}),d.map(p=>p.action==="copy-svg"?jsx("button",{type:"button",role:"menuitem",onClick:()=>{navigator.clipboard.writeText(i).catch(()=>{}),a();},className:"flex w-full items-center px-3 py-2 text-[13px] text-white/60 hover:bg-white/[0.05] hover:text-white/90 transition-colors text-left",children:"Copy SVG"},"copy"):jsx("a",{href:p.href,role:"menuitem",target:p.href?.startsWith("https")?"_blank":void 0,rel:"noopener noreferrer",onClick:a,className:"flex items-center px-3 py-2 text-[13px] text-white/60 hover:bg-white/[0.05] hover:text-white/90 transition-colors",children:p.label},p.label))]})}t(ot,"BrandContextMenu");function ne({size:o=22,className:e="",brandMenu:a=true,animate:r=true}){let[d,i]=useState(null),[p,s]=useState(false),c=useCallback(m=>{a&&(m.preventDefault(),i({x:m.clientX,y:m.clientY}));},[a]);return jsxs(Fragment,{children:[jsxs("svg",{width:o,height:o,viewBox:"0 0 67 67",xmlns:"http://www.w3.org/2000/svg","aria-label":"Hanzo",className:e,style:r?{transition:"transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease",transform:p?"scale(1.12) perspective(80px) rotateY(-6deg)":"scale(1) perspective(80px) rotateY(0deg)",transformOrigin:"center center"}:{},onMouseEnter:()=>s(true),onMouseLeave:()=>s(false),onContextMenu:c,children:[jsx("path",{d:"M22.21 67V44.6369H0V67H22.21Z",fill:"#ffffff"}),jsx("path",{d:"M0 44.6369L22.21 46.8285V44.6369H0Z",fill:"#DDDDDD"}),jsx("path",{d:"M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z",fill:"#ffffff"}),jsx("path",{d:"M22.21 0H0V22.3184H22.21V0Z",fill:"#ffffff"}),jsx("path",{d:"M66.7198 0H44.5098V22.3184H66.7198V0Z",fill:"#ffffff"}),jsx("path",{d:"M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z",fill:"#DDDDDD"}),jsx("path",{d:"M66.7198 67V44.6369H44.5098V67H66.7198Z",fill:"#ffffff"})]}),d&&jsx(ot,{x:d.x,y:d.y,onClose:()=>i(null)})]})}t(ne,"HanzoMark");var R=[{id:"account",label:"Account",href:"https://hanzo.id/account",description:"Profile, orgs & referrals"},{id:"billing",label:"Billing",href:"https://billing.hanzo.ai",description:"Subscriptions & usage"},{id:"console",label:"Console",href:"https://console.hanzo.ai",description:"API keys & projects"},{id:"chat",label:"Chat",href:"https://hanzo.chat",description:"AI chat & models"},{id:"flow",label:"Flow",href:"https://flow.hanzo.ai",description:"Visual workflow builder"},{id:"bot",label:"Bot",href:"https://hanzo.bot",description:"AI bot platform"},{id:"o11y",label:"O11y",href:"https://o11y.hanzo.ai",description:"Traces, logs & metrics"},{id:"sentry",label:"Sentry",href:"https://sentry.hanzo.ai",description:"Error & crash tracking"},{id:"insights",label:"Insights",href:"https://insights.hanzo.ai",description:"Product analytics & flags"},{id:"analytics",label:"Analytics",href:"https://analytics.hanzo.ai",description:"Web analytics"},{id:"platform",label:"Platform",href:"https://platform.hanzo.ai",description:"Deploy & scale services"},{id:"cloud",label:"Cloud",href:"https://cloud.hanzo.ai",description:"Cloud infrastructure"},{id:"web3",label:"Web3",href:"https://web3.hanzo.ai",description:"Deploy & manage blockchain validators across Bitcoin, Ethereum, Solana, Lux, and any Lux-derived L1"},{id:"storage",label:"Storage",href:"https://s3.hanzo.ai",description:"S3 object storage"},{id:"kms",label:"KMS",href:"https://kms.hanzo.ai",description:"Secrets & key management"},{id:"dns",label:"DNS",href:"https://dns.hanzo.ai",description:"DNS management"},{id:"registry",label:"Registry",href:"https://registry.hanzo.ai",description:"Container registry"},{id:"commerce",label:"Commerce",href:"https://commerce.hanzo.ai",description:"Payments & storefront"},{id:"base",label:"Base",href:"https://base.hanzo.ai",description:"Backend-as-a-Service"},{id:"search",label:"Search",href:"https://search.hanzo.ai",description:"Full-text search"},{id:"auto",label:"Auto",href:"https://auto.hanzo.ai",description:"Workflow automation"},{id:"team",label:"Team",href:"https://hanzo.team",description:"Team collaboration"},{id:"sign",label:"Sign",href:"https://sign.hanzo.ai",description:"Document signing"},{id:"dataroom",label:"Dataroom",href:"https://dataroom.hanzo.ai",description:"Secure deal rooms"},{id:"captable",label:"Cap Table",href:"https://captable.hanzo.ai",description:"Equity management"},{id:"docs",label:"Docs",href:"https://docs.hanzo.ai",description:"Documentation"},{id:"status",label:"Status",href:"https://status.hanzo.ai",description:"System status"}],H={hanzo:{id:"hanzo",iam:"https://hanzo.id",billing:"https://billing.hanzo.ai",console:"https://console.hanzo.ai",cloud:"https://cloud.hanzo.ai",web3:"https://web3.hanzo.ai",chat:"https://hanzo.chat",flow:"https://flow.hanzo.ai",bot:"https://hanzo.bot",o11y:"https://o11y.hanzo.ai",sentry:"https://sentry.hanzo.ai",insights:"https://insights.hanzo.ai",analytics:"https://analytics.hanzo.ai",platform:"https://platform.hanzo.ai",storage:"https://s3.hanzo.ai",s3:"https://s3.hanzo.ai",kms:"https://kms.hanzo.ai",dns:"https://dns.hanzo.ai",registry:"https://registry.hanzo.ai",commerce:"https://commerce.hanzo.ai",base:"https://base.hanzo.ai",search:"https://search.hanzo.ai",auto:"https://auto.hanzo.ai",team:"https://hanzo.team",sign:"https://sign.hanzo.ai",dataroom:"https://dataroom.hanzo.ai",captable:"https://captable.hanzo.ai",docs:"https://docs.hanzo.ai",status:"https://status.hanzo.ai"},lux:{id:"lux",iam:"https://lux.id",billing:"https://billing.lux.network",console:"https://console.lux.network",cloud:"https://cloud.lux.network",web3:"https://web3.lux.network",chat:"https://lux.chat",flow:"https://flow.lux.network",bot:"https://bot.lux.network",o11y:"https://o11y.lux.network",sentry:"https://sentry.lux.network",insights:"https://insights.lux.network",analytics:"https://analytics.lux.network",platform:"https://platform.lux.network",storage:"https://s3.lux.network",s3:"https://s3.lux.network",kms:"https://kms.lux.network",dns:"https://dns.lux.network",registry:"https://registry.lux.network",commerce:"https://commerce.lux.network",base:"https://base.lux.network",search:"https://search.lux.network",auto:"https://auto.lux.network",team:"https://team.lux.network",sign:"https://sign.lux.network",dataroom:"https://dataroom.lux.network",captable:"https://captable.lux.network",docs:"https://docs.lux.network",status:"https://status.lux.network"},zoo:{id:"zoo",iam:"https://zoo.id",billing:"https://billing.zoo.ngo",console:"https://console.zoo.ngo",cloud:"https://cloud.zoo.network",web3:"https://web3.zoo.ngo",chat:"https://chat.zoo.ngo",flow:"https://flow.zoo.ngo",bot:"https://bot.zoo.ngo",o11y:"https://o11y.zoo.network",sentry:"https://sentry.zoo.network",insights:"https://insights.zoo.ngo",analytics:"https://analytics.zoo.ngo",platform:"https://platform.zoo.ngo",storage:"https://s3.zoo.ngo",s3:"https://s3.zoo.ngo",kms:"https://kms.zoo.network",dns:"https://dns.zoo.ngo",registry:"https://registry.zoo.ngo",commerce:"https://commerce.zoo.ngo",base:"https://base.zoo.ngo",search:"https://search.zoo.ngo",auto:"https://auto.zoo.ngo",team:"https://team.zoo.ngo",sign:"https://sign.zoo.ngo",dataroom:"https://dataroom.zoo.ngo",captable:"https://captable.zoo.ngo",docs:"https://docs.zoo.ngo",status:"https://status.zoo.network"},pars:{id:"pars",iam:"https://pars.id",billing:"https://billing.pars.network",console:"https://console.pars.network",cloud:"https://cloud.pars.network",web3:"https://web3.pars.network",chat:"https://chat.pars.network",flow:"https://flow.pars.network",bot:"https://bot.pars.network",o11y:"https://o11y.pars.network",sentry:"https://sentry.pars.network",insights:"https://insights.pars.network",analytics:"https://analytics.pars.network",platform:"https://platform.pars.network",storage:"https://s3.pars.network",s3:"https://s3.pars.network",kms:"https://kms.pars.network",dns:"https://dns.pars.network",registry:"https://registry.pars.network",commerce:"https://commerce.pars.network",base:"https://base.pars.network",search:"https://search.pars.network",auto:"https://auto.pars.network",team:"https://team.pars.network",sign:"https://sign.pars.network",dataroom:"https://dataroom.pars.network",captable:"https://captable.pars.network",docs:"https://docs.pars.network",status:"https://status.pars.network"}};function W(o){let e=H[o]||H.hanzo;return [{id:"account",label:"Account",href:`${e.iam}/account`,description:"Profile, orgs & referrals"},{id:"billing",label:"Billing",href:e.billing,description:"Subscriptions & usage"},{id:"console",label:"Console",href:e.console,description:"API keys & projects"},{id:"chat",label:"Chat",href:e.chat,description:"AI chat & models"},{id:"flow",label:"Flow",href:e.flow,description:"Visual workflow builder"},{id:"bot",label:"Bot",href:e.bot,description:"AI bot platform"},{id:"o11y",label:"O11y",href:e.o11y,description:"Traces, logs & metrics"},{id:"sentry",label:"Sentry",href:e.sentry,description:"Error & crash tracking"},{id:"insights",label:"Insights",href:e.insights,description:"Product analytics & flags"},{id:"analytics",label:"Analytics",href:e.analytics,description:"Web analytics"},{id:"platform",label:"Platform",href:e.platform,description:"Deploy & scale services"},{id:"cloud",label:"Cloud",href:e.cloud,description:"Cloud infrastructure"},{id:"web3",label:"Web3",href:e.web3,description:"Deploy & manage blockchain validators across Bitcoin, Ethereum, Solana, Lux, and any Lux-derived L1"},{id:"storage",label:"Storage",href:e.storage,description:"S3 object storage"},{id:"kms",label:"KMS",href:e.kms,description:"Secrets & key management"},{id:"dns",label:"DNS",href:e.dns,description:"DNS management"},{id:"registry",label:"Registry",href:e.registry,description:"Container registry"},{id:"commerce",label:"Commerce",href:e.commerce,description:"Payments & storefront"},{id:"base",label:"Base",href:e.base,description:"Backend-as-a-Service"},{id:"search",label:"Search",href:e.search,description:"Full-text search"},{id:"auto",label:"Auto",href:e.auto,description:"Workflow automation"},{id:"team",label:"Team",href:e.team,description:"Team collaboration"},{id:"sign",label:"Sign",href:e.sign,description:"Document signing"},{id:"dataroom",label:"Dataroom",href:e.dataroom,description:"Secure deal rooms"},{id:"captable",label:"Cap Table",href:e.captable,description:"Equity management"},{id:"docs",label:"Docs",href:e.docs,description:"Documentation"},{id:"status",label:"Status",href:e.status,description:"System status"}]}t(W,"getAppsForOrg");var se=[{label:"Core",ids:["account","billing","console"]},{label:"AI",ids:["chat","flow","bot"]},{label:"Observability",ids:["o11y","sentry","insights","analytics"]},{label:"Infrastructure",ids:["platform","cloud","web3","storage","kms","dns","registry"]},{label:"Apps",ids:["commerce","base","search","auto"]},{label:"Business",ids:["team","sign","dataroom","captable"]},{label:"Resources",ids:["docs","status"]}];function F({apps:o=R,currentAppId:e}){let[a,r]=useState(false),d=useRef(null);useEffect(()=>{let s=t(c=>{d.current&&!d.current.contains(c.target)&&r(false);},"handler");return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[]);let i=o.filter(s=>s.id!==e),p=new Map(i.map(s=>[s.id,s]));return jsxs("div",{ref:d,className:"relative",children:[jsx("button",{type:"button",onClick:()=>r(s=>!s),className:"flex h-8 w-8 items-center justify-center rounded-lg text-white/40 hover:bg-white/[0.06] hover:text-white/70 transition-colors","aria-label":"Switch app",title:"Switch app",children:jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:[jsx("rect",{x:"1",y:"1",width:"4",height:"4",rx:"1"}),jsx("rect",{x:"6",y:"1",width:"4",height:"4",rx:"1"}),jsx("rect",{x:"11",y:"1",width:"4",height:"4",rx:"1"}),jsx("rect",{x:"1",y:"6",width:"4",height:"4",rx:"1"}),jsx("rect",{x:"6",y:"6",width:"4",height:"4",rx:"1"}),jsx("rect",{x:"11",y:"6",width:"4",height:"4",rx:"1"}),jsx("rect",{x:"1",y:"11",width:"4",height:"4",rx:"1"}),jsx("rect",{x:"6",y:"11",width:"4",height:"4",rx:"1"}),jsx("rect",{x:"11",y:"11",width:"4",height:"4",rx:"1"})]})}),a&&jsxs("div",{className:"absolute left-0 top-10 z-50 w-72 max-h-[80vh] overflow-y-auto rounded-xl border border-white/[0.08] bg-[#0e0e13] p-2 shadow-2xl",children:[se.map(s=>{let c=s.ids.map(n=>p.get(n)).filter(Boolean);return c.length===0?null:jsxs("div",{children:[jsx("p",{className:"px-2 pb-1 pt-2 text-[10px] font-medium uppercase tracking-wider text-white/30",children:s.label}),jsx("div",{className:"grid grid-cols-2 gap-0.5",children:c.map(n=>jsxs("a",{href:n.href,className:"flex flex-col gap-0.5 rounded-lg px-3 py-2 hover:bg-white/[0.06] transition-colors",onClick:()=>r(false),children:[jsx("span",{className:"text-[13px] font-medium text-white/80",children:n.label}),n.description&&jsx("span",{className:"text-[11px] leading-tight text-white/30",children:n.description})]},n.id))})]},s.label)}),(()=>{let s=new Set(se.flatMap(n=>n.ids)),c=i.filter(n=>!s.has(n.id));return c.length===0?null:jsxs("div",{children:[jsx("p",{className:"px-2 pb-1 pt-2 text-[10px] font-medium uppercase tracking-wider text-white/30",children:"Other"}),jsx("div",{className:"grid grid-cols-2 gap-0.5",children:c.map(n=>jsxs("a",{href:n.href,className:"flex flex-col gap-0.5 rounded-lg px-3 py-2 hover:bg-white/[0.06] transition-colors",onClick:()=>r(false),children:[jsx("span",{className:"text-[13px] font-medium text-white/80",children:n.label}),n.description&&jsx("span",{className:"text-[11px] leading-tight text-white/30",children:n.description})]},n.id))})]})})()]})]})}t(F,"AppSwitcher");var it=["#0A0310","#49007E","#FF005B","#FF7D10","#FFB238"];function lt(o){let e=0;for(let a=0;a<o.length;a++)e=(e<<5)-e+o.charCodeAt(a)|0;return Math.abs(e)}t(lt,"hashStr");function P(o,e,a){return o%(e*(a+1))%e}t(P,"getUnit");function ct(o,e){return P(o,2,e)===0}t(ct,"getBoolean");function re(o,e,a){return a[P(o,a.length,e)]}t(re,"getRandomColor");function pt(o){let e=parseInt(o.slice(1,3),16),a=parseInt(o.slice(3,5),16),r=parseInt(o.slice(5,7),16);return e*.299+a*.587+r*.114>128?"#000":"#fff"}t(pt,"getContrast");function ie({name:o,size:e=40,colors:a=it,className:r,square:d=false}){let i=lt(o),p=re(i,0,a),s=pt(p),c=ct(i,2),n=P(i,3,7),m=P(i,5,8),h=P(i,10,9),u=h>6?h-10:h,x=P(i,5,10)>3?P(i,5,10)-5:P(i,5,10);return jsxs("svg",{viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:e,height:e,className:r,style:d?void 0:{borderRadius:"50%"},children:[jsx("mask",{id:`beam-${i}`,maskUnits:"userSpaceOnUse",x:0,y:0,width:36,height:36,children:jsx("rect",{width:36,height:36,rx:d?void 0:72,fill:"#fff"})}),jsxs("g",{mask:`url(#beam-${i})`,children:[jsx("rect",{width:36,height:36,fill:p}),jsx("rect",{x:0,y:0,width:36,height:36,transform:`translate(${u} ${x}) rotate(${h} 18 18)`,fill:re(i,1,a),rx:6}),jsxs("g",{transform:`translate(${u} ${x}) rotate(${h} 18 18)`,children:[c?jsx("path",{d:`M15 ${19+n}c2 1 4 1 6 0`,stroke:s,fill:"none",strokeLinecap:"round"}):jsx("path",{d:`M13 ${19+n}a1 .75 0 0 0 10 0`,fill:s}),jsx("rect",{x:14-m,y:14,width:1.5,height:2,rx:1,fill:s}),jsx("rect",{x:20+m,y:14,width:1.5,height:2,rx:1,fill:s})]})]})]})}t(ie,"BeamAvatar");async function ht(o){let a=new TextEncoder().encode(o),r=await crypto.subtle.digest("SHA-256",a);return Array.from(new Uint8Array(r)).map(d=>d.toString(16).padStart(2,"0")).join("")}t(ht,"sha256");function mt(o,e){let[a,r]=useState(null);return useMemo(()=>{if(!o){r(null);return}let d=o.trim().toLowerCase();ht(d).then(i=>{r(`https://www.gravatar.com/avatar/${i}?s=${e||80}&d=404`);});},[o,e]),a}t(mt,"useGravatarUrl");function le({src:o,email:e,name:a,size:r=40,colors:d,className:i}){let[p,s]=useState(false),[c,n]=useState(false),m=mt(e,r*2),h=`rounded-full object-cover ${i||""}`,u={width:r,height:r};return o&&!p?jsx("img",{src:o,alt:a||e||"avatar",className:h,style:u,onError:()=>s(true)}):m&&!c?jsx("img",{src:m,alt:a||e||"avatar",className:h,style:u,onError:()=>n(true)}):jsx(ie,{name:a||e||"user",size:r,colors:d,className:i})}t(le,"UserAvatar");function _({user:o,organizations:e=[],currentOrgId:a,onOrgSwitch:r,onSignOut:d}){let[i,p]=useState(false),s=useRef(null);if(useEffect(()=>{let h=t(u=>{s.current&&!s.current.contains(u.target)&&p(false);},"handler");return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[]),!o)return null;let c=e.find(h=>h.id===a),n=c?.slug||"hanzo",m=H[n]||H.hanzo;return jsxs("div",{ref:s,className:"relative",children:[jsxs("button",{type:"button",onClick:()=>p(h=>!h),className:"flex items-center gap-2 rounded-lg px-2 py-1.5 hover:bg-white/[0.06] transition-colors",children:[jsx(le,{src:o.avatar,email:o.email,name:o.name,size:28}),jsxs("div",{className:"hidden flex-col items-start sm:flex",children:[o.name&&jsx("span",{className:"text-[12px] font-medium text-white/70 leading-none",children:o.name}),jsx("span",{className:"text-[11px] text-white/30 leading-none mt-0.5",children:o.email})]}),jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-white/30 hidden sm:block",children:jsx("path",{d:"M6 9l6 6 6-6"})})]}),i&&jsxs("div",{className:"absolute right-0 top-10 z-50 w-64 rounded-xl border border-white/[0.08] bg-[#0e0e13] shadow-2xl",children:[jsxs("div",{className:"border-b border-white/[0.06] px-4 py-3",children:[jsx("p",{className:"text-[13px] font-medium text-white/80",children:o.name||"User"}),jsx("p",{className:"text-[11px] text-white/40",children:o.email}),c&&jsx("p",{className:"mt-0.5 text-[10px] font-medium text-white/25 uppercase tracking-wider",children:c.name})]}),e.length>0&&jsxs("div",{className:"border-b border-white/[0.06] p-2",children:[jsx("p",{className:"px-2 pb-1 pt-0.5 text-[10px] font-medium uppercase tracking-wider text-white/30",children:"Organizations"}),e.map(h=>jsxs("button",{type:"button",onClick:()=>{r?.(h.id),p(false);},className:"flex w-full items-center justify-between rounded-lg px-3 py-2 text-left hover:bg-white/[0.06] transition-colors",children:[jsxs("div",{className:"flex flex-col",children:[jsx("span",{className:"text-[13px] text-white/70",children:h.name}),h.role&&jsx("span",{className:"text-[10px] text-white/25 capitalize",children:h.role})]}),h.id===a&&jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:"text-white/50",children:jsx("polyline",{points:"20 6 9 17 4 12"})})]},h.id))]}),jsxs("div",{className:"p-2",children:[jsx("a",{href:`${m.iam}/account`,className:"flex items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] text-white/60 hover:bg-white/[0.06] hover:text-white/80 transition-colors",onClick:()=>p(false),children:"Account settings"}),jsx("a",{href:m.billing,className:"flex items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] text-white/60 hover:bg-white/[0.06] hover:text-white/80 transition-colors",onClick:()=>p(false),children:"Billing"}),jsx("button",{type:"button",onClick:()=>{p(false),d?.();},className:"flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] text-white/40 hover:bg-white/[0.06] hover:text-red-400/70 transition-colors",children:"Sign out"})]})]})]})}t(_,"UserOrgDropdown");function bt({className:o}){return jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:o,children:[jsx("path",{d:"M21 2v6h-6"}),jsx("path",{d:"M3 12a9 9 0 0 1 15-6.7L21 8"}),jsx("path",{d:"M3 22v-6h6"}),jsx("path",{d:"M21 12a9 9 0 0 1-15 6.7L3 16"})]})}t(bt,"HardRefreshIcon");function wt({className:o}){return jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:o,children:[jsx("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),jsx("circle",{cx:"12",cy:"12",r:"3"})]})}t(wt,"SettingsIcon");async function vt(){try{if(localStorage.clear(),sessionStorage.clear(),document.cookie.split(";").forEach(o=>{let e=o.split("=")[0].trim();if(e){document.cookie=`${e}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`,document.cookie=`${e}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;domain=${location.hostname}`;let a=location.hostname.split(".");if(a.length>2){let r="."+a.slice(-2).join(".");document.cookie=`${e}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;domain=${r}`;}}}),"caches"in window){let o=await caches.keys();await Promise.all(o.map(e=>caches.delete(e)));}if("serviceWorker"in navigator){let o=await navigator.serviceWorker.getRegistrations();await Promise.all(o.map(e=>e.unregister()));}if("indexedDB"in window&&indexedDB.databases)try{(await indexedDB.databases()).forEach(e=>{e.name&&indexedDB.deleteDatabase(e.name);});}catch{}}catch{}location.reload();}t(vt,"hardRefresh");function pe({currentApp:o,currentAppId:e,user:a,organizations:r,currentOrgId:d,onOrgSwitch:i,onSignOut:p,apps:s,headerRight:c,settingsHref:n,onSettingsClick:m,hideHardRefresh:h,hideSettings:u}){let[x,M]=useState(false),B=r?.find(k=>k.id===d)?.slug||"hanzo",f=s||W(B),C=H[B]||H.hanzo,$=useCallback(()=>{M(true),vt();},[]),y=useCallback(()=>{m?m():window.location.href=n||`${C.iam}/account`;},[m,n,C.iam]);return jsxs("header",{className:"sticky top-0 z-50 flex h-14 w-full items-center justify-between border-b border-white/[0.07] bg-[#09090b]/90 px-4 backdrop-blur-xl",role:"banner",children:[jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[jsx("a",{href:`${C.iam}/account`,className:"flex-shrink-0 rounded focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20","aria-label":"Account",children:jsx(ne,{size:22,brandMenu:true,animate:true})}),jsx("span",{className:"select-none text-white/[0.15]",children:"/"}),jsx("span",{className:"truncate text-[13px] font-medium text-white/50",children:o}),jsx(F,{apps:f,currentAppId:e})]}),jsxs("div",{className:"flex flex-shrink-0 items-center gap-1",children:[c,!h&&jsx("button",{type:"button",onClick:$,className:"flex items-center justify-center rounded-lg p-2 text-white/30 hover:bg-white/[0.06] hover:text-white/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20","aria-label":"Hard refresh \u2014 clear all storage, cookies, cache and reload",title:"Hard refresh",children:jsx(bt,{className:x?"animate-spin":""})}),!u&&jsx("button",{type:"button",onClick:y,className:"flex items-center justify-center rounded-lg p-2 text-white/30 hover:bg-white/[0.06] hover:text-white/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20","aria-label":"Settings",title:"Settings",children:jsx(wt,{})}),jsx(_,{user:a,organizations:r,currentOrgId:d,onOrgSwitch:i,onSignOut:p})]})]})}t(pe,"HanzoHeader");var de="hanzo-auth-token",Q="hanzo-user",he="hanzo-auth-expires",kt="https://iam.hanzo.ai",zt={hanzo:{name:"Hanzo AI",slug:"hanzo"},lux:{name:"Lux Network",slug:"lux"},zoo:{name:"Zoo Labs",slug:"zoo"},pars:{name:"Pars",slug:"pars"}};function me(){let[o,e]=useState(void 0),[a,r]=useState([]),[d,i]=useState(void 0),[p,s]=useState(null),[c,n]=useState(true),m=useCallback(async()=>{try{let x=localStorage.getItem(de),M=localStorage.getItem(he);if(!x||M&&Date.now()>Number(M)){n(!1);return}s(x);let E=localStorage.getItem(Q);if(E)try{let f=JSON.parse(E);f?.email&&e({id:f.id,name:f.displayName||f.name,email:f.email,avatar:f.avatar});}catch{}let B=await fetch(`${kt}/v1/iam/oauth/userinfo`,{headers:{Authorization:`Bearer ${x}`}});if(B.ok){let f=await B.json(),C={id:f.sub||f.id,name:f.name||f.displayName,email:f.email,avatar:f.picture||f.avatar};e(C),localStorage.setItem(Q,JSON.stringify(f));let y=(f.groups||[]).map(k=>{let I=k.toLowerCase().replace(/^\//,""),U=zt[I];return U?{id:I,name:U.name,slug:U.slug}:null}).filter(Boolean);y.length===0&&C.email&&y.push({id:"personal",name:"Personal",slug:"personal"}),r(y),i(y[0]?.id);}}catch{}finally{n(false);}},[]);useEffect(()=>{m();},[m]);let h=useCallback(()=>{localStorage.removeItem(de),localStorage.removeItem(Q),localStorage.removeItem(he),window.location.href="https://hanzo.id";},[]),u=useCallback(x=>{i(x);},[]);return {user:o,organizations:a,currentOrgId:d,token:p,loading:c,signOut:h,switchOrg:u}}t(me,"useHanzoAuth");function Nt(o,e){return o.filter(a=>a.id!==e).map(a=>({id:`app-${a.id}`,title:a.label,description:a.description,href:a.href,category:"Hanzo Apps",external:true,keywords:[a.id,a.label.toLowerCase()]}))}t(Nt,"buildCrossAppCommands");function ue({commands:o=[],apps:e,currentAppId:a,open:r,onOpenChange:d,onNavigate:i}){var oe;let[p,s]=useState(false),c=r??p,n=useCallback(l=>{d?d(l):s(l);},[d]),[m,h]=useState(""),[u,x]=useState(0),M=useRef(null),E=useRef(null),B=Nt(e??R,a),f=[...o,...B],C=m.toLowerCase(),$=C?f.filter(l=>l.title.toLowerCase().includes(C)||l.description?.toLowerCase().includes(C)||l.keywords?.some(z=>z.includes(C))):f,y={};for(let l of $)(y[oe=l.category]??(y[oe]=[])).push(l);let k=Object.values(y).flat();useEffect(()=>x(0),[m]),useEffect(()=>{c&&(h(""),x(0),requestAnimationFrame(()=>M.current?.focus()));},[c]),useEffect(()=>{let l=t(z=>{(z.metaKey||z.ctrlKey)&&z.key==="k"&&(z.preventDefault(),n(!c));},"handler");return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[c,n]);let I=useCallback(l=>{l.action?l.action():l.href&&(i?i(l.href,l.external):l.external?window.open(l.href,"_blank"):window.location.href=l.href),n(false);},[i,n]),U=useCallback(l=>{l.key==="ArrowDown"?(l.preventDefault(),x(z=>(z+1)%(k.length||1))):l.key==="ArrowUp"?(l.preventDefault(),x(z=>(z-1+(k.length||1))%(k.length||1))):l.key==="Enter"&&k[u]?(l.preventDefault(),I(k[u])):l.key==="Escape"&&n(false);},[k,u,I,n]);return useEffect(()=>{E.current?.querySelector(`[data-idx="${u}"]`)?.scrollIntoView({block:"nearest"});},[u]),c?jsxs(Fragment,{children:[jsx("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-[100]",onClick:()=>n(false)}),jsx("div",{className:"fixed top-[15%] left-1/2 -translate-x-1/2 w-full max-w-xl z-[101]",children:jsxs("div",{className:"bg-[#111113] border border-white/[0.08] rounded-xl shadow-2xl overflow-hidden",children:[jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-white/[0.07]",children:[jsx("svg",{className:"w-4 h-4 text-white/30",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),jsx("input",{ref:M,type:"text",value:m,onChange:l=>h(l.target.value),onKeyDown:U,placeholder:"Search commands...",className:"flex-1 bg-transparent text-white text-[13px] placeholder-white/30 outline-none"}),jsx("kbd",{className:"px-1.5 py-0.5 text-[10px] font-mono bg-white/[0.06] rounded text-white/30",children:"ESC"})]}),jsx("div",{ref:E,className:"max-h-[400px] overflow-y-auto py-1",children:k.length===0?jsxs("div",{className:"px-4 py-8 text-center text-white/30 text-[13px]",children:["No results for \u201C",m,"\u201D"]}):Object.entries(y).map(([l,z])=>jsxs("div",{children:[jsx("div",{className:"px-4 py-2 text-[10px] font-semibold text-white/25 uppercase tracking-widest",children:l}),z.map(D=>{let G=k.indexOf(D),j=G===u;return jsxs("button",{"data-idx":G,onClick:()=>I(D),onMouseEnter:()=>x(G),className:`w-full flex items-center gap-3 px-4 py-2 text-left transition-colors ${j?"bg-white/[0.06] text-white":"text-white/50 hover:bg-white/[0.03]"}`,children:[D.icon&&jsx("span",{className:`w-5 h-5 flex items-center justify-center ${j?"text-white/70":"text-white/25"}`,children:D.icon}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("span",{className:"text-[13px] font-medium truncate block",children:D.title}),D.description&&jsx("span",{className:"text-[11px] text-white/25 truncate block",children:D.description})]}),j&&jsx("span",{className:"text-white/25 text-[11px]",children:"\u21B5"})]},D.id)})]},l))}),jsxs("div",{className:"px-4 py-2 border-t border-white/[0.07] flex items-center justify-between",children:[jsxs("div",{className:"flex items-center gap-4 text-[10px] text-white/20",children:[jsxs("span",{className:"flex items-center gap-1",children:[jsx("kbd",{className:"px-1 py-0.5 bg-white/[0.06] rounded text-[9px]",children:"\u2191"}),jsx("kbd",{className:"px-1 py-0.5 bg-white/[0.06] rounded text-[9px]",children:"\u2193"}),"navigate"]}),jsxs("span",{className:"flex items-center gap-1",children:[jsx("kbd",{className:"px-1 py-0.5 bg-white/[0.06] rounded text-[9px]",children:"\u21B5"}),"select"]})]}),jsx("span",{className:"text-[10px] text-white/20",children:"\u2318K"})]})]})})]}):null}t(ue,"HanzoCommandPalette");function xe(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(xe,"Component");function we(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(we,"Component");function ye(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(ye,"Component");function ze(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(ze,"Component");function Ce(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Ce,"Component");function He(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(He,"Component");function De(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(De,"Component");function Pe(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Pe,"Component");function Be(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Be,"Component");function Ee(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Ee,"Component");function Re(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Re,"Component");function Te(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Te,"Component");function $e(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t($e,"Component");function _e(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(_e,"Component");function Ge(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Ge,"Component");function Ke(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Ke,"Component");function qe(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(qe,"Component");function Je(){return jsx("div",{className:"flex items-center justify-center p-8",children:jsx("p",{className:"text-muted-foreground",children:"Component coming soon"})})}t(Je,"Component");
|
|
3
|
+
export{we as AIModelSelectorNavigationBar,xe as AdvancedNavigationBar,F as AppSwitcher,ye as AppSwitcherNavigationBar,ze as BreadcrumbAndFiltersNavigationBar,Ce as BreadcrumbNavigationBar,He as CenteredLogoNavigationBar,De as CollaborationNavigationBar,Pe as CommunicationNavigationBar,Be as ContextSwitcherNavigationBar,R as DEFAULT_HANZO_APPS,Ee as DashboardNavigationBar,Re as ECommerceNavigationBar,ue as HanzoCommandPalette,pe as HanzoHeader,Te as IconNavigationBar,$e as SearchAndToggleNavigationBar,_e as SimpleNavigationBar,Ge as StatusDashboardNavigationBar,Ke as TeamSwitcherNavigationBar,qe as TwoTierNavigationBar,Je as UnderlineNavigationBar,_ as UserOrgDropdown,me as useHanzoAuth};
|
|
@@ -4,9 +4,9 @@ declare const Drawer: {
|
|
|
4
4
|
({ shouldScaleBackground, ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
|
7
|
-
declare const DrawerTrigger:
|
|
7
|
+
declare const DrawerTrigger: typeof DrawerPrimitive.Trigger;
|
|
8
8
|
declare const DrawerPortal: typeof import("vaul").Portal;
|
|
9
|
-
declare const DrawerClose:
|
|
9
|
+
declare const DrawerClose: typeof DrawerPrimitive.Close;
|
|
10
10
|
declare const DrawerHandle: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
11
11
|
preventCycle?: boolean | undefined;
|
|
12
12
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../primitives/drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,MAAM,CAAC;AAIjD,QAAA,MAAM,MAAM;0CAGT,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC;;CAKnD,CAAC;AAGF,QAAA,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../primitives/drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,MAAM,CAAC;AAIjD,QAAA,MAAM,MAAM;0CAGT,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC;;CAKnD,CAAC;AAGF,QAAA,MAAM,aAAa,EAAE,OAAO,eAAe,CAAC,OAAiC,CAAC;AAE9E,QAAA,MAAM,YAAY,8BAAyB,CAAC;AAE5C,QAAA,MAAM,WAAW,EAAE,OAAO,eAAe,CAAC,KAA6B,CAAC;AAExE,QAAA,MAAM,YAAY;;wCAAyB,CAAC;AAE5C,QAAA,MAAM,aAAa;8BAGhB,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC;;CAKtD,CAAC;AAGF,QAAA,MAAM,aAAa;wCAIhB,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC;;CActD,CAAC;AAGF,QAAA,MAAM,YAAY;8BAGf,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAEtC,CAAC;AAGF,QAAA,MAAM,YAAY;8BAGf,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAKtC,CAAC;AAGF,QAAA,MAAM,WAAW;8BAGd,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC;;CAQpD,CAAC;AAGF,QAAA,MAAM,iBAAiB;8BAGpB,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,WAAW,CAAC;;CAK1D,CAAC;AAGF,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,aAAa,EACb,WAAW,EACX,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,CAAC"}
|
|
@@ -2,7 +2,7 @@ import type * as LabelPrimitive from '@radix-ui/react-label';
|
|
|
2
2
|
import { Slot } from '@radix-ui/react-slot';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { type ControllerProps, type FieldPath, type FieldValues } from 'react-hook-form';
|
|
5
|
-
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(
|
|
5
|
+
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>({ children, watch, getValues, getFieldState, setError, clearErrors, setValue, setValues, trigger, formState, resetField, reset, handleSubmit, unregister, control, register, setFocus, subscribe, }: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
6
6
|
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
declare const useFormField: () => {
|
|
8
8
|
invalid: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../primitives/form.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,cAAc,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,WAAW,EAGjB,MAAM,iBAAiB,CAAC;AAKzB,QAAA,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../primitives/form.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,cAAc,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,WAAW,EAGjB,MAAM,iBAAiB,CAAC;AAKzB,QAAA,MAAM,IAAI,0YAAe,CAAC;AAa1B,QAAA,MAAM,SAAS,GACb,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,KAAK,SAAS,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,YAAY,CAAC,EAC/D,cAEC,eAAe,CAAC,YAAY,EAAE,KAAK,CAAC,4CAMtC,CAAC;AAEF,QAAA,MAAM,YAAY;;;;;;;;;;;CAqBjB,CAAC;AAUF,QAAA,MAAM,QAAQ;8BAGX,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAQtC,CAAC;AAGF,QAAA,MAAM,SAAS;8BAGZ,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC;;CAqBlD,CAAC;AAGF,QAAA,MAAM,WAAW;mBAAkB,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC;;CAcnE,CAAC;AAGF,QAAA,MAAM,eAAe;8BAGlB,KAAK,CAAC,cAAc,CAAC,oBAAoB,CAAC;;CAU5C,CAAC;AAGF,QAAA,MAAM,WAAW;wCAId,KAAK,CAAC,cAAc,CAAC,oBAAoB,CAAC;;CAoB5C,CAAC;AAGF,OAAO,EACL,YAAY,EACZ,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,WAAW,EACX,eAAe,EACf,WAAW,EACX,SAAS,GACV,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthGuard.d.ts","sourceRoot":"","sources":["../../../src/auth/AuthGuard.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoB,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"AuthGuard.d.ts","sourceRoot":"","sources":["../../../src/auth/AuthGuard.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoB,MAAM,OAAO,CAAA;AAIxC,MAAM,WAAW,cAAc;IAC7B,uEAAuE;IACvE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,uCAAuC;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,EACxB,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,GACT,EAAE,cAAc,kDA+BhB"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { useEffect } from 'react';
|
|
4
4
|
import { useHanzoAuth } from '../navigation/hanzo-shell/useHanzoAuth';
|
|
5
|
+
import { startIamLogin } from './iam';
|
|
5
6
|
/**
|
|
6
7
|
* Wrapper component that redirects to IAM login if user is not authenticated.
|
|
7
8
|
* Uses useHanzoAuth to check localStorage token.
|
|
@@ -14,13 +15,8 @@ export function AuthGuard({ loginUrl, clientId, fallback, children, }) {
|
|
|
14
15
|
window.location.href = loginUrl;
|
|
15
16
|
}
|
|
16
17
|
else if (clientId) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
url.searchParams.set('client_id', clientId);
|
|
20
|
-
url.searchParams.set('response_type', 'code');
|
|
21
|
-
url.searchParams.set('redirect_uri', redirect);
|
|
22
|
-
url.searchParams.set('scope', 'openid profile email');
|
|
23
|
-
window.location.href = url.toString();
|
|
18
|
+
// Canonical IAM authorization-code + PKCE-S256 flow (HIP-0111).
|
|
19
|
+
void startIamLogin({ serverUrl: 'https://hanzo.id', clientId });
|
|
24
20
|
}
|
|
25
21
|
else {
|
|
26
22
|
window.location.href = 'https://hanzo.id';
|
|
@@ -5,6 +5,12 @@ export interface IAMLoginButtonProps {
|
|
|
5
5
|
clientId: string;
|
|
6
6
|
/** OAuth redirect URI (defaults to current origin + /auth/callback) */
|
|
7
7
|
redirectUri?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Provider hint. Omit for the IAM login page (the default "Sign in" button);
|
|
10
|
+
* pass `'google'`/`'github'`/… to jump straight to a provider. Prefer
|
|
11
|
+
* `<SignIn providers>` / `<SocialButton>` for multi-method surfaces.
|
|
12
|
+
*/
|
|
13
|
+
provider?: string;
|
|
8
14
|
/** Button label */
|
|
9
15
|
label?: string;
|
|
10
16
|
/** Additional CSS classes */
|
|
@@ -13,8 +19,9 @@ export interface IAMLoginButtonProps {
|
|
|
13
19
|
variant?: 'default' | 'outline';
|
|
14
20
|
}
|
|
15
21
|
/**
|
|
16
|
-
* "Sign in
|
|
17
|
-
*
|
|
22
|
+
* Single "Sign in" button that initiates the canonical IAM authorization-code +
|
|
23
|
+
* PKCE-S256 flow (HIP-0111). Brand-neutral — colors come from CSS tokens
|
|
24
|
+
* (`bg-primary`, `border-input`, `bg-background`), never literals.
|
|
18
25
|
*/
|
|
19
|
-
export declare function IAMLoginButton({ iamUrl, clientId, redirectUri, label, className, variant, }: IAMLoginButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare function IAMLoginButton({ iamUrl, clientId, redirectUri, provider, label, className, variant, }: IAMLoginButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
20
27
|
//# sourceMappingURL=IAMLoginButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAMLoginButton.d.ts","sourceRoot":"","sources":["../../../src/auth/IAMLoginButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IAMLoginButton.d.ts","sourceRoot":"","sources":["../../../src/auth/IAMLoginButton.tsx"],"names":[],"mappings":"AAMA,MAAM,WAAW,mBAAmB;IAClC,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,sBAAsB;IACtB,QAAQ,EAAE,MAAM,CAAA;IAChB,uEAAuE;IACvE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,mBAAmB;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,sDAAsD;IACtD,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;CAChC;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAC7B,MAA2B,EAC3B,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,KAAiB,EACjB,SAAS,EACT,OAAmB,GACpB,EAAE,mBAAmB,2CA4BrB"}
|