PageSourceSearch

https://maasy.ai/assets/BrandBrainSheet-DBI9oAUg.js

js maasy.ai collected 2026-10-02 00:28:23 UTC 7,421 bytes, 2 lines download raw bytes

1import{u as O,b3 as M,g as _,r as n,j as e,l as f,Q as A}from"./index-BwaMfbd5.js";import{u as T,B as $,N as k,a as H,b as B,c as U,d as P}from"./useBrandBrainGraph-Bcu-wPOY.js";import{F as q}from"./filter-DFe8OT32.js";import"./zoom-B5hfJite.js";import"./string-krCEEwQa.js";import"./ordinal-CpWNcvad.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new o.Error().stack;i&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[i]="97e125a8-7b5f-4fd3-8198-e2e4022581ba",o._sentryDebugIdIdentifier="sentry-dbid-97e125a8-7b5f-4fd3-8198-e2e4022581ba")}catch{}})();const D=["dna","section","glossary","cultural","pillar","pattern","winner","approved","card"];function X({canonicalId:o}){const{activeBrand:i}=O(),{toast:g}=M(),[,C]=_(),h=o,E=t=>{const s=`Usa "${t.label}" (${B[t.type]}) como referencia para lo próximo que generemos.`;C(a=>{const l=new URLSearchParams(a);return l.set("prefill",s),l},{replace:!0}),g({title:"Referencia lista",description:"Lo añadimos al input de Maasy. Cierra este panel y envíalo."})},w=n.useRef(null),[d,I]=n.useState({w:0,h:0}),[c,x]=n.useState(null),[j,p]=n.useState(null),[R,v]=n.useState(null),[m,z]=n.useState(new Set(D)),{data:N,isLoading:y,error:b}=T(h),r=n.useMemo(()=>N??{nodes:[],links:[],clusters:[]},[N]),u=n.useMemo(()=>{const t=new Set(r.nodes.filter(s=>m.has(s.type)).map(s=>s.id));return{nodes:r.nodes.filter(s=>t.has(s.id)),links:r.links.filter(s=>{const a=typeof s.source=="string"?s.source:s.source.id,l=typeof s.target=="string"?s.target:s.target.id;return t.has(a)&&t.has(l)}),clusters:r.clusters}},[r,m]);n.useEffect(()=>{const t=w.current;if(!t)return;const s=()=>{const l=t.getBoundingClientRect();I({w:Math.floor(l.width),h:Math.floor(l.height)})};s();const a=new ResizeObserver(s);return a.observe(t),()=>a.disconnect()},[]);const F=t=>{z(s=>{const a=new Set(s);return a.has(t)?a.delete(t):a.add(t),a.size===0&&a.add(t),a})},L=n.useMemo(()=>{const t={dna:0,pattern:0,winner:0,approved:0,card:0,section:0,glossary:0,cultural:0,pillar:0};for(const s of r.nodes)t[s.type]+=1;return t},[r]),S=(i==null?void 0:i.name)??"Tu marca";return h?e.jsxs("div",{className:"relative flex h-full flex-col overflow-hidden bg-[#05040c]",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-white/10 bg-[#0d0b18]/85 px-5 py-3 backdrop-blur-xl",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-xl bg-gradient-to-br from-[#C428D4]/30 to-[#0099FF]/20",children:e.jsx(f,{className:"h-4.5 w-4.5 text-[#e69cf0]"})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-mono text-[10px] uppercase tracking-wider text-white/45",children:"Brand Brain"}),e.jsx("div",{className:"text-[14px] font-semibold text-white",children:S})]})]}),e.jsxs("div",{className:"rounded-xl border border-white/10 bg-white/5 px-3 py-1.5 font-mono text-[10.5px] text-white/60",children:[u.nodes.length," nodos · ",u.links.length," conexiones"]})]}),e.jsxs("div",{className:"relative flex-1 overflow-hidden",children:[e.jsx("div",{className:"pointer-events-none absolute inset-0",style:{background:"radial-gradient(1200px 800px at 15% 20%, rgba(196,40,212,0.12), transparent 60%), radial-gradient(900px 700px at 85% 80%, rgba(0,153,255,0.10), transparent 60%), radial-gradient(700px 500px at 60% 30%, rgba(52,211,153,0.06), transparent 60%)"}}),r.nodes.length>0&&e.jsx($,{data:u,onFocus:t=>{v({id:t,nonce:Date.now()}),p(t)},onOpen:x,hoveredId:j,onHover:p,activeId:(c==null?void 0:c.id)??null}),e.jsx("div",{className:"absolute right-4 top-4 z-20 flex flex-col gap-2",children:e.jsxs("div",{className:"rounded-2xl border border-white/10 bg-[#0d0b18]/85 p-3 backdrop-blur-xl",children:[e.jsxs("div",{className:"mb-2 flex items-center gap-1.5 font-mono text-[10px] uppercase tracking-wider text-white/45",children:[e.jsx(q,{className:"h-3 w-3"})," Capas"]}),e.jsx("div",{className:"flex flex-col gap-1",children:D.map(t=>{const s=m.has(t);return e.jsxs("button",{type:"button",onClick:()=>
1F(t),className:`flex items-center justify-between gap-3 rounded-lg border px-2.5 py-1.5 text-[11.5px] transition ${s?"border-white/15 bg-white/5 text-white":"border-white/5 bg-transparent text-white/35 hover:text-white/60"}`,children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"inline-block h-2 w-2 rounded-full",style:{backgroundColor:k[t].fill,boxShadow:s?`0 0 8px ${k[t].glow}`:"none"}}),e.jsx("span",{children:H[t]}),e.jsx("span",{className:"font-medium",children:B[t]})]}),e.jsx("span",{className:"font-mono text-[10px] text-white/45",children:L[t]})]},t)})})]})}),e.jsxs("div",{ref:w,className:`absolute bottom-0 right-0 top-0 ${r.nodes.length>0?"left-[300px]":"left-0"}`,children:[d.w>0&&d.h>0&&r.nodes.length>0&&e.jsx(U,{data:u,width:d.w,height:d.h,onSelect:x,hoveredId:j,onHover:p,focus:R}),y&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsxs("div",{className:"flex items-center gap-2 rounded-full border border-white/10 bg-[#0d0b18]/85 px-4 py-2 text-[12px] text-white/60 backdrop-blur-xl",children:[e.jsx(A,{className:"h-3.5 w-3.5 animate-spin text-[#e69cf0]"}),"Cargando el cerebro de ",S,"…"]})}),!y&&!b&&r.nodes.length===0&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center px-6",children:e.jsxs("div",{className:"max-w-md rounded-2xl border border-white/10 bg-[#0d0b18]/85 p-6 text-center backdrop-blur-xl",children:[e.jsx(f,{className:"mx-auto mb-3 h-9 w-9 text-[#C428D4]"}),e.jsx("h3",{className:"mb-1 text-[15px] font-semibold text-white",children:"Aún no hay cerebro para esta marca"}),e.jsx("p",{className:"text-[12.5px] leading-relaxed text-white/60",children:"Completa el ADN o genera tu documento estratégico desde la conversación con Maasy y aquí verás la constelación viva de la marca."})]})}),b&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center px-6",children:e.jsxs("div",{className:"max-w-md rounded-2xl border border-red-500/30 bg-[#0d0b18]/85 p-5 text-center backdrop-blur-xl",children:[e.jsx("div",{className:"mb-1 font-mono text-[12px] uppercase tracking-wider text-red-300/80",children:"Error"}),e.jsx("div",{className:"text-[12.5px] text-white/70",children:b.message})]})})]}),e.jsx("div",{className:"absolute bottom-4 left-1/2 z-10 -translate-x-1/2 rounded-full border border-white/10 bg-[#0d0b18]/85 px-4 py-2 font-mono text-[10.5px] text-white/50 backdrop-blur-xl",children:"Hover para conectar · Click para abrir · Scroll para zoom · Drag para mover"}),e.jsx(P,{node:c,brandId:h,data:r,onClose:()=>x(null),onUseAsReference:E,onFocusNode:t=>{const s=r.nodes.find(a=>a.id===t);s&&x(s),v({id:t,nonce:Date.now()}),p(t)}})]})]}):e.jsx("div",{className:"flex h-full items-center justify-center bg-[#05040c]",children:e.jsxs("div",{className:"max-w-md rounded-2xl border border-white/10 bg-[#0d0b18]/85 p-8 text-center backdrop-blur-xl",children:[e.jsx(f,{className:"mx-auto mb-3 h-10 w-10 text-[#C428D4]"}),e.jsx("h2",{className:"mb-1 text-lg font-semibold text-white",children:"Selecciona una marca"}),e.jsx("p",{className:"text-[13px] text-white/60",children:"Cada marca tiene su propio Brand Brain. Elige una desde el switcher para verla."})]})})}export{X as default};
2//# sourceMappingURL=BrandBrainSheet-DBI9oAUg.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.