1import{E as tt,r as m,v as et,j as t,m as S,at as rt,au as st,X as ot,s as D}from"./index-IlT_z189.js";import{a as z}from"./sanitize-oXVpnajR.js";import{Z as it,o as at,R as nt,B as lt,m as ct,r as s,P as o,p as mt,t as pt,x as dt,E as ut}from"./style-BsBPs2KJ.js";import{B}from"./button-Cacew5Rp.js";import{L as O}from"./lock-ChhgusQM.js";import{L as H}from"./loader-circle-r0x63OV3.js";import{A as xt}from"./index-DvD6_anW.js";import{C as ht}from"./chevron-left-C4iJjG5w.js";import{C as gt}from"./chevron-right-_fSWH_QK.js";import{C as M}from"./circle-alert-Ccr-U55-.js";import{C as yt}from"./clock-BE9biMtd.js";import{S as ft}from"./star-DDjOK7Et.js";import"./sticky-note-DaWDJwmo.js";import"./qr-code-CQyQqeCU.js";import"./archive-restore-BJN2420f.js";import"./archive-DrUS27JR.js";import"./arrow-down-right-CLxRGxZJ.js";import"./thumbs-up-BrtxJpsj.js";import"./arrow-up-right-ColhwXy9.js";import"./shield-off-DHLB5094.js";import"./quote-DrG02YBI.js";import"./underline-BXCNwnJy.js";import"./book-open-D3cGTGbm.js";import"./youtube-Cq0Rw8M9.js";import"./message-square-CsUbldP6.js";import"./type-Cv4nDClX.js";import"./building-sDse_kp0.js";import"./key-round-Bg40lxJe.js";import"./calendar-lCDELclY.js";import"./chart-column-DdD_CjzH.js";import"./chevron-down-EYTpQ1VO.js";import"./chevron-up-BBr0wGAo.js";import"./circle-check-C2hNlqYa.js";import"./circle-check-big-Gyi1ljPN.js";import"./flag-D7fLCZoK.js";import"./cpu-CxznJYmC.js";import"./circle-x-BwUHSAcJ.js";import"./circle-_Gq_3_5j.js";import"./copy-DSy6NWVg.js";import"./dollar-sign-Bvl4E36x.js";import"./download-D6XFONh_.js";import"./ellipsis-CYbtHY6Q.js";import"./external-link-KG-eHllU.js";import"./eye-off-BmPtmgDr.js";import"./eye-Beh_IxMj.js";import"./file-text-BDxV-iEh.js";import"./flame-CQtO0bch.js";import"./funnel-CQBvgZJa.js";import"./layout-grid-CAkPepys.js";import"./grip-vertical-CGLZ6d9c.js";import"./headphones-D2Ki9Nuq.js";import"./house-BBouQcLX.js";import"./monitor-smartphone-D0fDcYnF.js";import"./lightbulb-c04Kfxaj.js";import"./link-2-UBx_DjGJ.js";import"./link-BOZwxLQ2.js";import"./phone-CzJSY0ct.js";import"./log-out-Z5CAULjL.js";import"./mail-CTJth66n.js";import"./rotate-ccw-Ch0V0G2x.js";import"./message-circle-_eHvWlHK.js";import"./minus-Dwz9Y7DB.js";import"./package-3RvwUYgq.js";import"./pen-DtsOYATK.js";import"./pencil-BNJXXPz_.js";import"./plus-DMsnw8Bk.js";import"./undo-2-CaAeRuFU.js";import"./refresh-cw-BIxaKeh-.js";import"./repeat-D5KP5edf.js";import"./save-DbFHu2J2.js";import"./send-Ww6Ojju7.js";import"./share-2-BG4kj0SF.js";import"./shield-check-DiygM8Dh.js";import"./shield-C0XEMOkG.js";import"./sparkles-Dv5KI7Cm.js";import"./square-check-big-CXdQzUCi.js";import"./square-pen-CkSc0SKw.js";import"./tag-DmbmXWyq.js";import"./target-B7m8WSLd.js";import"./toggle-right-C36h0xiS.js";import"./trash-2-DFOOjtAN.js";import"./trending-up-2n4WdKr3.js";import"./upload-zrFwSZqj.js";import"./user-plus-Bxkt4V60.js";import"./users-dgwnpk9R.js";import"./video-BtOzmwbc.js";import"./zap-B4KjehbX.js";import"./string-3NetaFjT.js";const bt=()=>t.jsx("svg",{style:{position:"absolute",width:0,height:0},children:t.jsxs("defs",{children:[t.jsx("marker",{id:"arrow-end",viewBox:"0 0 10 10",refX:"8",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:t.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",fill:"currentColor"})}),t.jsx("marker",{id:"arrow-start",viewBox:"0 0 10 10",refX:"2",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:t.jsx("path",{d:"M 10 0 L 0 5 L 10 10 z",fill:"currentColor"})}),t.jsx("marker",{id:"dot-end",viewBox:"0 0 10 10",refX:"5",refY:"5",markerWidth:"5",markerHeight:"5",orient:"auto",children:t.jsx("circle",{cx:"5",cy:"5",r:"4",fill:"currentColor"})}),t.jsx("marker",{id:"dot-start",viewBox:"0 0 10 10",refX:"5",refY:"5",markerWidth:"5",markerHeight:"5",orient:"auto",children:t.jsx("circle",{cx:"5",cy:"5",r:"4",fill:"currentColor"})}),t.jsx("marker",{id:"diamond-end",viewBox:"0 0 12 12",refX:"6",refY:"6",markerWidth:"6",markerHeight:"6",orient:"auto",children:t.jsx("path",{d:"M 6 0 L 12 6 L 6 12 L 0 6 Z",fill:"currentColor"})}),t.jsx("marker",{id:"diamond-start",viewBox:"0 0 12 12",refX:"6",refY:"6",markerWidth:"6",markerHeight:"6",orient:"auto",children:t.jsx("path",{d:"M 6 0 L 12 6 L 6 12 L 0 6 Z",fill:"currentColor"})})]})}),Nt=({data:a})=>{const x=a.iconName||"Star",p=a.iconSize||48,g=a.iconColor||"#1B1B1B",c=mt[x];return t.jsxs("div",{className:"flex items-center justify-center",children:[t.jsx(s,{type:"source",position:o.Top,id:"top-source",className:"opacity-0"}),t.jsx(s,{type:"target",position:o.Top,id:"top-target",className:"opacity-0"}),t.jsx(s,{type:"source",position:o.Right,id:"right-source",className:"opacity-0"}),t.jsx(s,{type:"target",position:o.Right,id:"right-target",className:"opacity-0"}),t.jsx(s,{type:"source",position:o.Bottom,id:"bottom-source",className:"opacity-0"}),t.jsx(s,{type:"target",position:o.Bottom,id:"bottom-target",className:"opacity-0"}),t.jsx(s,{type:"source",position:o.Left,id:"left-source",className:"opacity-0"}),t.jsx(s,{type:"target",position:o.Left,id:"left-target",className:"opacity-0"}),c?t.jsx(c,{size:p,color:g,strokeWidth:2}):t.jsx(ft,{size:p,color:g,strokeWidth:2})]})},jt=({data:a})=>{const x=a.imageUrl||"",p=a.imageWidth||200;return t.jsxs("div",{className:"relative",children:[t.jsx(s,{type:"source",position:o.Top,id:"top-source",className:"opacity-0"}),t.jsx(s,{type:"target",position:o.Top,id:"top-target",className:"opacity-0"}),t.jsx(s,{type:"source",position:o.Right,id:"right-source",className:"opacity-0"}),t.jsx(s,{type:"target",position:o.Right,id:"right-target",className:"opacity-0"}),t.jsx(s,{type:"source",position:o.Bottom,id:"bottom-source",className:"opacity-0"}),t.jsx(s,{type:"target",position:o.Bottom,id:"bottom-target",className:"opacity-0"}),t.jsx(s,{type:"source",position:o.Left,id:"left-source",className:"opacity-0"}),t.jsx(s,{type:"target",position:o.Left,id:"left-target",className:"opacity-0"}),x?t.jsx("img",{src:x,alt:"Mind map image",style:{width:p,height:"auto"},className:"rounded-lg object-contain",draggable:!1}):t.jsx("div",{className:"bg-neutral-100 rounded-lg flex items-center justify-center text-neutral-400",style:{width:p,height:p*.75},children:"No image"})]})},wt=({data:a})=>{const x=a.stickyColor||"#FEF3C7",p=a.rotation??-1;return t.jsxs("div",{className:"w-full h-full rounded-sm p-3 flex flex-col",style:{backgroundColor:x,boxSh
1adow:"2px 4px 8px rgba(0,0,0,0.1), 0 0 1px rgba(0,0,0,0.1)",transform:`rotate(${p}deg)`,minWidth:150,minHeight:150},children:[t.jsx(s,{type:"source",position:o.Top,id:"top-source",className:"opacity-0"}),t.jsx(s,{type:"target",position:o.Top,id:"top-target",className:"opacity-0"}),t.jsx(s,{type:"source",position:o.Right,id:"right-source",className:"opacity-0"}),t.jsx(s,{type:"target",position:o.Right,id:"right-target",className:"opacity-0"}),t.jsx(s,{type:"source",position:o.Bottom,id:"bottom-source",className:"opacity-0"}),t.jsx(s,{type:"target",position:o.Bottom,id:"bottom-target",className:"opacity-0"}),t.jsx(s,{type:"source",position:o.Left,id:"left-source",className:"opacity-0"}),t.jsx(s,{type:"target",position:o.Left,id:"left-target",className:"opacity-0"}),t.jsx("div",{className:"flex-1 font-[Inter] text-sm leading-relaxed text-[#1B1B1B] overflow-hidden [&_h1]:text-xl [&_h1]:font-bold [&_h1]:mb-2 [&_h2]:text-lg [&_h2]:font-semibold [&_h2]:mb-1 [&_h3]:text-base [&_h3]:font-medium [&_p]:mb-1 [&_ul]:list-disc [&_ul]:pl-4 [&_ol]:list-decimal [&_ol]:pl-4 [&_li]:mb-0.5",dangerouslySetInnerHTML:{__html:z(a.content)}})]})},I=({data:a})=>{const x=c=>{const u=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(c);return u?{r:parseInt(u[1],16),g:parseInt(u[2],16),b:parseInt(u[3],16)}:null},p=()=>{const c=a.backgroundColor||a.color;if(!c||c==="transparent")return"rgba(255, 255, 255, 0.9)";if(c.startsWith("#"))return c;const u={amber:"#FEF3C7",blue:"#DBEAFE",green:"#D1FAE5",red:"#FEE2E2",purple:"#EDE9FE",pink:"#FCE7F3",gray:"#F3F4F6",neutral:"#F5F5F5"};return u[c]?u[c]:"rgba(255, 255, 255, 0.9)"},g=()=>{const c=a.backgroundColor||a.color;if(!c||c==="transparent")return"#d4d4d4";if(c.startsWith("#")){const u=x(c);if(u)return`rgb(${Math.round(u.r*.8)}, ${Math.round(u.g*.8)}, ${Math.round(u.b*.8)})`}return"#d4d4d4"};return t.jsxs("div",{className:"px-4 py-3 rounded-xl backdrop-blur-sm",style:{minWidth:a.width||180,minHeight:a.height||48,backgroundColor:p(),borderWidth:"1px",borderStyle:"solid",borderColor:g()},children:[t.jsx(s,{type:"source",position:o.Top,id:"top-source",className:"opacity-0"}),t.jsx(s,{type:"target",position:o.Top,id:"top-target",className:"opacity-0"}),t.jsx(s,{type:"source",position:o.Right,id:"right-source",className:"opacity-0"}),t.jsx(s,{type:"target",position:o.Right,id:"right-target",className:"opacity-0"}),t.jsx(s,{type:"source",position:o.Bottom,id:"bottom-source",className:"opacity-0"}),t.jsx(s,{type:"target",position:o.Bottom,id:"bottom-target",className:"opacity-0"}),t.jsx(s,{type:"source",position:o.Left,id:"left-source",className:"opacity-0"}),t.jsx(s,{type:"target",position:o.Left,id:"left-target",className:"opacity-0"}),a.node_type&&a.node_type!=="note"&&t.jsx("div",{className:"text-[10px] uppercase font-semibold mb-1 text-neutral-500 opacity-60",children:a.node_type}),t.jsx("div",{className:"font-[Inter] text-sm leading-relaxed text-[#1B1B1B] [&_h1]:text-2xl [&_h1]:font-bold [&_h1]:mb-2 [&_h2]:text-xl [&_h2]:font-semibold [&_h2]:mb-2 [&_h3]:text-lg [&_h3]:font-medium [&_h3]:mb-1 [&_p]:mb-1 [&_ul]:list-disc [&_ul]:pl-4 [&_ul]:mb-1 [&_ol]:list-decimal [&_ol]:pl-4 [&_ol]:mb-1 [&_li]:mb-0.5 [&_strong]:font-semibold [&_em]:italic [&_u]:underline [&_br]:block",dangerouslySetInnerHTML:{__html:z(a.content)}})]})},_t=({data:a})=>t.jsxs("div",{className:"px-1",children:[t.jsx(s,{type:"source",position:o.Top,id:"top-source",className:"opacity-0"}),t.jsx(s,{type:"target",position:o.Top,id:"top-target",className:"opacity-0"}),t.jsx(s,{type:"source",position:o.Right,id:"right-source",className:"opacity-0"}),t.jsx(s,{type:"target",position:o.Right,id:"right-target",className:"opacity-0"}),t.jsx(s,{type:"source",position:o.Bottom,id:"bottom-source",className:"opacity-0"}),t.jsx(s,{type:"target",position:o.Bottom,id:"bottom-target",className:"opacity-0"}),t.jsx(s,{type:"source",position:o.Left,id:"left-source",className:"opacity-0"}),t.jsx(s,{type:"target",position:o.Left,id:"left-target",className:"opacity-0"}),t.jsx("div",{className:"font-[Inter] text-base leading-relaxed text-[#1B1B1B] [&_h1]:text-2xl [&_h1]:font-bold [&_h2]:text-xl [&_h2]:font-semibold [&_h3]:text-lg [&_h3]:font-medium [&_p]:mb-1 [&_ul]:list-disc [&_ul]:pl-4 [&_ol]:list-decimal [&_ol]:pl-4 [&_li]:mb-0.5 [&_strong]:font-semibold [&_em]:italic [&_u]:underline",dangerouslySetInnerHTML:{__html:z(a.content)}})]}),w=({sourceX:a,sourceY:x,targetX:p,targetY:g,sourcePosition:c,targetPosition:u,style:b={},markerStart:l,markerEnd:_,data:y})=>{const[F,k,v]=pt({sourceX:a,sourceY:x,sourcePosition:c,targetX:p,targetY:g,targetPosition:u});return t.jsxs(t.Fragment,{children:[t.jsx(dt,{path:F,markerStart:l,markerEnd:_,style:{...b,opacity:.7}}),(y==null?void 0:y.label)&&t.jsx(ut,{children:t.jsx("div",{style:{position:"absolute",transform:`translate(-50%, -50%) translate(${k}px,${v}px)`,pointerEvents:"none"},className:"px-2 py-1 text-xs rounded bg-white/90 border border-neutral-300 text-neutral-700 font-[Inter]",children:y.label})})]})},ir=()=>{const{token:a}=tt(),[x,p]=m.useState("loading"),[g,c]=m.useState(null),[u,b]=m.useState(""),[l,_]=m.useState(null),[y,F]=m.useState(""),[k,v]=m.useState(!1),[kt,$]=m.useState(null),j=m.useRef(null),[L,R]=m.useState(!1),[h,W]=m.useState(0),A=m.useMemo(()=>({text:I,sticky:I,heading:I,textNode:I,textLabelNode:_t,iconNode:Nt,imageNode:jt,stickyNode:wt}),[]),U=m.useMemo(()=>({default:w,smoothstep:w,straight:w,step:w,custom:w}),[]);m.useEffect(()=>{if(!a){p("error"),c("not_found"),b("Invalid share link");return}(async()=>{try{const{data:n,error:r}=await D.rpc("get_public_mindmap",{p_share_token:a});if(r)throw r;const i=n;
1if(!i.success){p("error"),c(i.error||"unknown"),b(i.message||"An error occurred");return}if(i.requires_password){p("password_required"),$(i.share_id||null);return}i.mindmap&&(_(i.mindmap),p("success"))}catch(n){p("error"),c("unknown"),b(n instanceof Error?n.message:"Failed to load mindmap")}})()},[a]);const Z=async e=>{if(e.preventDefault(),!(!a||!y)){v(!0);try{const{data:n,error:r}=await D.rpc("verify_mindmap_share_password",{p_share_token:a,p_password:y});if(r)throw r;const i=n;if(!i.success){c(i.error||"invalid_password"),b(i.message||"Incorrect password");return}i.mindmap&&(_(i.mindmap),p("success"))}catch(n){b(n instanceof Error?n.message:"Failed to verify password")}finally{v(!1)}}},C=m.useMemo(()=>l!=null&&l.nodes?l.nodes.map(e=>{const n=e.id.startsWith("icon-"),r=e.id.startsWith("image-"),i=e.id.startsWith("sticky-");if(n){let d={iconName:"Star",iconSize:48,iconColor:""};try{d=JSON.parse(e.content)}catch{d={iconName:"Star",iconSize:48,iconColor:""}}return{id:e.id,type:"iconNode",position:{x:Number(e.position_x),y:Number(e.position_y)},data:{iconName:d.iconName||"Star",iconSize:d.iconSize||48,iconColor:d.iconColor||""}}}if(r){let d={imageUrl:"",imageWidth:200};try{d=JSON.parse(e.content)}catch{d={imageUrl:e.content,imageWidth:200}}return{id:e.id,type:"imageNode",position:{x:Number(e.position_x),y:Number(e.position_y)},data:{imageUrl:d.imageUrl,imageWidth:d.imageWidth||200}}}if(i){let d={content:"",stickyColor:"#FEF3C7",stickySize:"medium"};try{d=JSON.parse(e.content)}catch{d={content:e.content||"",stickyColor:"#FEF3C7",stickySize:"medium"}}return{id:e.id,type:"stickyNode",position:{x:Number(e.position_x),y:Number(e.position_y)},style:{width:e.width||200,height:e.height||200},data:{content:d.content||"",stickyColor:d.stickyColor||"#FEF3C7",stickySize:d.stickySize||"medium"}}}return{id:e.id,type:e.is_label?"textLabelNode":"textNode",position:{x:Number(e.position_x),y:Number(e.position_y)},style:e.is_label?void 0:{width:e.width?Number(e.width):180,height:e.height?Number(e.height):void 0},data:{content:e.content,color:e.color||"transparent",node_type:e.node_type,width:e.width?Number(e.width):null,height:e.height?Number(e.height):null}}}):[],[l==null?void 0:l.nodes]),X=m.useMemo(()=>{if(!(l!=null&&l.edges))return[];const e=r=>!r||r==="transparent"?"#737373":r.startsWith("#")?r:{amber:"#FF6F0C",blue:"#3b82f6",green:"#22c55e",red:"#ef4444",purple:"#a855f7",pink:"#ec4899",gray:"#737373",neutral:"#737373"}[r]||"#737373",n=(r,i)=>{if(!(!r||r==="none"))return`url(#${r}-${i})`};return l.edges.map(r=>({id:r.id,source:r.source,target:r.target,type:r.type||"default",animated:r.animated||!1,style:{stroke:e(r.color),strokeWidth:2},data:{label:r.label},sourceHandle:r.sourceHandle,targetHandle:r.targetHandle,markerStart:n(r.start_marker,"start"),markerEnd:n(r.end_marker||"arrow","end")}))},[l==null?void 0:l.edges]),Y=()=>{var e;(e=j.current)==null||e.zoomIn()},V=()=>{var e;(e=j.current)==null||e.zoomOut()},q=()=>{var e;(e=j.current)==null||e.fitView({padding:.2})},f=m.useMemo(()=>{const e=C.filter(r=>r.type==="sectionNode");return e.length>0?e.sort((r,i)=>Math.abs(r.position.y-i.position.y)<100?r.position.x-i.position.x:r.position.y-i.position.y):C.filter(r=>r.type==="textNode").sort((r,i)=>Math.abs(r.position.y-i.position.y)<50?r.position.x-i.position.x:r.position.y-i.position.y)},[C]),N=m.useCallback(e=>{var P,T;if(!j.current||f.length===0)return;const n=f,r=Math.max(0,Math.min(e,n.length-1));W(r);const i=n[r],d=Number(((P=i.style)==null?void 0:P.width)||i.width||300),K=Number(((T
1=i.style)==null?void 0:T.height)||i.height||200),G=i.position.x+d/2,Q=i.position.y+K/2;j.current.setCenter(G,Q,{zoom:1.2,duration:500})},[f]),J=m.useCallback(()=>{if(f.length===0){et.error("No slides to present");return}R(!0),W(0),setTimeout(()=>N(0),100)},[f,N]),E=m.useCallback(()=>{R(!1)},[]);if(m.useEffect(()=>{const e=n=>{L&&(n.key==="Escape"?E():n.key==="ArrowRight"||n.key==="ArrowDown"?(n.preventDefault(),N(h+1)):(n.key==="ArrowLeft"||n.key==="ArrowUp")&&(n.preventDefault(),N(h-1)))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[L,h,N,E]),x==="error"){const n={not_found:{icon:t.jsx(M,{className:"h-12 w-12 text-neutral-400"}),title:"Link Not Found"},expired:{icon:t.jsx(yt,{className:"h-12 w-12 text-amber-500"}),title:"Link Expired"},inactive:{icon:t.jsx(M,{className:"h-12 w-12 text-neutral-400"}),title:"Sharing Disabled"},invalid_password:{icon:t.jsx(O,{className:"h-12 w-12 text-red-500"}),title:"Access Denied"},unknown:{icon:t.jsx(M,{className:"h-12 w-12 text-red-500"}),title:"Error"}}[g||"unknown"];return t.jsx("div",{className:"min-h-screen bg-neutral-50 flex items-center justify-center p-4",children:t.jsxs(S.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-center max-w-md",children:[t.jsx("div",{className:"mb-6 flex items-center justify-center",children:n.icon}),t.jsx("h1",{className:"text-2xl font-semibold text-neutral-900 mb-2 font-[Inter]",children:n.title}),t.jsx("p",{className:"text-neutral-600 font-[Inter]",children:u})]})})}return x==="password_required"?t.jsx("div",{className:"min-h-screen bg-neutral-50 flex items-center justify-center p-4",children:t.jsxs(S.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"w-full max-w-sm",children:[t.jsxs("div",{className:"bg-white rounded-2xl shadow-lg border border-neutral-200 p-8",children:[t.jsxs("div",{className:"text-center mb-6",children:[t.jsx("div",{className:"mx-auto w-16 h-16 rounded-2xl bg-amber-100 flex items-center justify-center mb-4",children:t.jsx(O,{className:"h-8 w-8 text-amber-600"})}),t.jsx("h1",{className:"text-xl font-semibold text-neutral-900 font-[Inter]",children:"Password Required"}),t.jsx("p",{className:"text-sm text-neutral-600 mt-1 font-[Inter]",children:"This mindmap is protected"})]}),t.jsxs("form",{onSubmit:Z,className:"space-y-4",children:[t.jsx("input",{type:"password",value:y,onChange:e=>F(e.target.value),placeholder:"Enter password",className:"w-full px-4 py-3 rounded-xl border border-neutral-200 text-sm font-[Inter] focus:outline-none focus:ring-2 focus:ring-amber-500 focus:border-amber-500",autoFocus:!0}),g==="invalid_password"&&t.jsx("p",{className:"text-sm text-red-600 font-[Inter]",children:u}),t.jsx(B,{type:"submit",disabled:k||!y,className:"w-full bg-amber-600 hover:bg-amber-700 text-white py-3",children:k?t.jsx(H,{className:"h-4 w-4 animate-spin"}):"Unlock"})]})]}),t.jsx("p",{className:"text-center text-xs text-neutral-500 mt-4 font-[Inter]",children:"Powered by OptiBee"})]})}):x==="loading"?t.jsx("div",{className:"min-h-screen bg-neutral-50 flex items-center justify-center",children:t.jsxs(S.div,{initial:{opacity:0}
1,animate:{opacity:1},className:"text-center",children:[t.jsx(H,{className:"h-8 w-8 animate-spin text-amber-600 mx-auto mb-4"}),t.jsx("p",{className:"text-neutral-600 font-[Inter]",children:"Loading mindmap..."})]})}):t.jsxs("div",{className:"h-screen bg-[#F4F4F2] flex flex-col overflow-hidden",children:[t.jsxs("div",{className:"bg-white border-b border-neutral-200 px-4 py-3 flex items-center justify-between",children:[t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("h1",{className:"text-base font-semibold text-neutral-900 truncate font-[Inter]",children:(l==null?void 0:l.title)||"Untitled Mind Map"}),(l==null?void 0:l.updated_at)&&t.jsxs("p",{className:"text-xs text-neutral-500 font-[Inter]",children:["Last updated: ",new Date(l.updated_at).toLocaleDateString()]})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("button",{onClick:J,className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg border transition-all font-[Inter] text-xs bg-white border-neutral-300 text-neutral-600 hover:border-amber-400 hover:text-amber-600",title:"Present mind map",children:[t.jsx(rt,{className:"h-3.5 w-3.5"}),t.jsx("span",{className:"font-medium",children:"Present"})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(B,{onClick:Y,variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-neutral-600 hover:text-neutral-900 hover:bg-neutral-100",children:t.jsx(it,{className:"h-4 w-4"})}),t.jsx(B,{onClick:V,variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-neutral-600 hover:text-neutral-900 hover:bg-neutral-100",children:t.jsx(at,{className:"h-4 w-4"})}),t.jsx(B,{onClick:q,variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-neutral-600 hover:text-neutral-900 hover:bg-neutral-100",children:t.jsx(st,{className:"h-4 w-4"})})]})]})]}),t.jsx("div",{className:"flex-1 w-full h-full",children:t.jsxs(nt,{nodes:C,edges:X,nodeTypes:A,edgeTypes:U,onInit:e=>j.current=e,panOnScroll:!0,zoomOnScroll:!0,zoomOnPinch:!0,panOnDrag:!0,minZoom:.1,maxZoom:4,defaultViewport:(l==null?void 0:l.viewport)||{x:0,y:0,zoom:1},className:"bg-[#F4F4F2]",nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,fitView:!0,children:[t.jsx(bt,{}),t.jsx(lt,{color:"#BFBFBD",gap:24,size:.4,variant:ct.Dots,className:"opacity-10"})]})}),t.jsx(xt,{children:L&&t.jsxs(S.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-40 pointer-events-none",children:[t.jsx("div",{className:"absolute top-4 left-1/2 -translate-x-1/2 pointer-events-auto",children:t.jsxs("div",{className:"flex items-center gap-4 px-4 py-2 rounded-full shadow-lg backdrop-blur-sm bg-white/90 border border-neutral-200",children:[t.jsx("button",{onClick:()=>N(h-1),disabled:h===0,className:`p-1.5 rounded-full transition-colors ${h===0?"opacity-30 cursor-not-allowed":"hover:bg-neutral-100 text-neutral-600"}`,children:t.jsx(ht,{className:"h-5 w-5"})}),t.jsxs("span",{className:"text-sm font-medium text-neutral-700",children:[h+1," / ",f.length]}),t.jsx("button",{onClick:()=>N(h+1),disabled:h>=f.length-1,className:`p-1.5 rounded-full transition-colors ${h>=f.length-1?"opacity-30 cursor-not-allowed":"hover:bg-neutral-100 text-neutral-600"}`,children:t.jsx(gt,{className:"h-5 w-5"})}),t.jsx("div",{className:"w-px h-5 bg-neutral-200"}),t.jsx("button",{onClick:E,className:"p-1.5 rounded-full transition-colors hover:bg-neutral-100 text-neutral-600",title:"Exit presentation (Esc)",children:t.jsx(ot,{className:"h-5 w-5"})})]})}),t.jsx("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2",children:t.jsx("div",{className:"text-xs px-3 py-1.5 rounded-full bg-neutral-100 text-neutral-500",children:"â â to navigate · Esc to exit"})})]})}),t.jsx("div",{className:"bg-white border-t border-neutral-200 px-4 py-2 text-center",children:t.jsx("a",{href:"https://optibee.ai",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-neutral-500 hover:text-amber-600 font-[Inter] transition-colors",children:"Powered by OptiBee"})})]})};export{ir as PublicMindmapViewer,ir as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.