PageSourceSearch

https://www.xotic.ai/_next/static/chunks/375e4453ce3a6635.js?dpl=dpl_ExLkMDjAs4t7iRuZaQBZLYYR9Prt

js xotic.ai collected 2026-10-05 13:20:30 UTC 51,077 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,545546,e=>{"use strict";var t=e.i(260293),r=e.i(573817),a=e.i(809528),s=e.i(339918),i=e.i(24085),n=e.i(831160),l=e.i(356e3),o=e.i(807682),d=e.i(929467),c=e.i(144456),m=e.i(402364),u=e.i(273389),h=e.i(822388),x=e.i(707061),p=e.i(169512),f=e.i(377608),b=e.i(363636),g=e.i(975157),v=e.i(375679),j=e.i(474831),w=(0,j.createServerReference)("00305e21a66ff44cca307fabd10241e2672bd5f274",j.callServer,void 0,j.findSourceMapURL,"markVGFENotificationsRead"),y=(0,j.createServerReference)("40bb8dddc0e4068569179ae8ea75e5dac43aa1e703",j.callServer,void 0,j.findSourceMapURL,"getBellNotifications"),N=e.i(468447),k=e.i(101650),C=e.i(150701);function S({isAuthenticated:e}){let s=(0,x.useTranslations)("notifications"),i=(0,r.useRouter)(),[n,l]=(0,a.useState)(!1),[o,d]=(0,a.useState)(!1),[c,m]=(0,a.useState)([]),[u,j]=(0,a.useState)([]),S=(0,a.useRef)(null),A=(0,a.useCallback)(async()=>{if(!e)return;let{vgfe:t,general:r}=await y(30).catch(()=>({vgfe:null,general:null}));t?.success&&t.data&&m(t.data.map(e=>({kind:"vgfe",id:`vgfe:${e.id}`,relationshipId:e.relationshipId,characterName:e.characterName,characterAvatar:e.characterAvatar,body:e.body,readAt:e.readAt,createdAt:e.createdAt}))),r?.success&&r.data&&j(r.data.map(e=>({kind:"general",id:`gen:${e.id}`,rawId:e.id,type:e.type,title:e.title,body:e.body,href:e.href,readAt:e.readAt,createdAt:e.createdAt}))),d(!0)},[e]);(0,a.useEffect)(()=>{if(A(),!e)return;let t=window.setInterval(()=>void A(),12e4);return()=>window.clearInterval(t)},[A,e]);let E=(0,a.useMemo)(()=>[...c,...u].sort((e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime()),[c,u]),M=(0,a.useMemo)(()=>E.filter(e=>!e.readAt).length,[E]),I=(0,a.useCallback)(()=>{let e=new Date;m(t=>t.map(t=>({...t,readAt:t.readAt||e}))),j(t=>t.map(t=>({...t,readAt:t.readAt||e}))),w().catch(()=>{}),(0,N.markAllNotificationsRead)().catch(()=>{})},[]),R=(0,a.useCallback)(()=>{let e=!n;l(e),e&&A()},[n,A]);(0,a.useEffect)(()=>{function e(e){S.current&&!S.current.contains(e.target)&&l(!1)}return n&&document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[n]);let P=(0,a.useCallback)(e=>{l(!1),(0,v.trackEvent)("notif_open",{type:"vgfe"===e.kind?"VGFE":e.type});let t=new Date;if("vgfe"===e.kind){m(r=>r.map(r=>r.id===e.id?{...r,readAt:r.readAt||t}:r)),w().catch(()=>{}),i.push(`/girlfriend/${e.relationshipId}`);return}e.readAt||(j(r=>r.map(r=>r.id===e.id?{...r,readAt:t}:r)),(0,k.markNotificationRead)(e.rawId).catch(()=>{})),e.href&&i.push(e.href)},[i]);return e?(0,t.jsxs)("div",{className:"relative",ref:S,children:[(0,t.jsxs)("button",{onClick:R,className:(0,g.cn)("relative rounded-full p-2 transition-colors","hover:bg-muted/50 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",n&&"bg-muted/50"),"aria-label":M>0?s("ariaUnread",{count:M}):s("aria"),children:[(0,t.jsx)(b.Bell,{className:"h-5 w-5 text-muted-foreground"}),M>0&&(0,t.jsx)("span",{className:"absolute -right-0.5 -top-0.5 flex h-4 min-w-4 items-center justify-center rounded-full bg-red-500 px-1 text-[10px] font-bold leading-none text-white",children:M>99?"99+":M})]}),(0,t.jsx)(p.AnimatePresence,{children:n&&(0,t.jsxs)(f.motion.div,{initial:{opacity:0,y:-8,scale:.96},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-8,scale:.96},transition:{duration:.15,ease:"easeOut"},className:(0,g.cn)("absolute right-0 top-full z-50 mt-2","w-[300px] sm:w-[340px]","rounded-xl border border-border bg-background shadow-xl","overflow-hidden"),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-3",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:s("title")}),M>0&&(0,t.jsx)("button",{onClick:I,className:"text-xs text-muted-foreground transition-colors hover:text-foreground",children:s("markAllRead")})]}),(0,t.jsx)("div",{className:"no-scrollbar scrollbar-hide max-h-[420px] overflow-y-auto",children:o?0===E.length?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center px-4 py-10 text-center",children:[(0,t.jsx)(b.Bell,{className:"mb-2 h-8 w-8 text-muted-foreground
1/60"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:s("empty")})]}):E.map(e=>"vgfe"===e.kind?(0,t.jsx)(T,{item:e,onClick:()=>P(e),t:s},e.id):(0,t.jsx)(C.NotificationItem,{item:{id:e.rawId,type:e.type,title:e.title,body:e.body,href:e.href,readAt:e.readAt,createdAt:e.createdAt},onClick:()=>P(e),t:s},e.id)):(0,t.jsx)("div",{className:"px-4 py-10 text-center text-sm text-muted-foreground",children:s("loading")})}),(0,t.jsx)(h.default,{href:"/notifications",onClick:()=>l(!1),className:"block border-t border-border px-4 py-2.5 text-center text-xs font-medium text-primary hover:bg-muted/40",children:s("seeAll")})]})})]}):null}function T({item:e,onClick:r,t:a}){let s=!e.readAt;return(0,t.jsxs)("button",{onClick:r,className:(0,g.cn)("flex w-full items-start gap-3 px-4 py-3 text-left transition-colors","hover:bg-muted/50",s&&"bg-primary/[0.04]"),children:[(0,t.jsxs)("div",{className:"relative flex-shrink-0",children:[e.characterAvatar?(0,t.jsx)("img",{src:e.characterAvatar,alt:e.characterName,className:"h-9 w-9 rounded-full object-cover"}):(0,t.jsx)("div",{className:"flex h-9 w-9 items-center justify-center rounded-full bg-muted text-sm font-medium text-muted-foreground",children:e.characterName.charAt(0).toUpperCase()}),s&&(0,t.jsx)("span",{className:"absolute -right-0.5 -top-0.5 h-2.5 w-2.5 rounded-full border-2 border-background bg-red-500"})]}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("span",{className:(0,g.cn)("truncate text-sm",s?"font-semibold text-foreground":"text-muted-foreground"),children:e.characterName}),(0,t.jsx)("span",{className:"flex-shrink-0 text-[11px] text-muted-foreground",children:(0,C.formatRelativeTime)(e.createdAt,a)})]}),e.body&&(0,t.jsx)("p",{className:"mt-0.5 line-clamp-2 text-xs text-muted-foreground",children:e.body})]})]})}var A=e.i(804259),E=e.i(223156),M=e.i(227797),I=e.i(286796);let R=(0,I.default)("UserSearch",[["circle",{cx:"10",cy:"7",r:"4",key:"e45bow"}],["path",{d:"M10.3 15H7a4 4 0 0 0-4 4v2",key:"3bnktk"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}]]);var P=e.i(317056),L=(0,j.createServerReference)("60853bd2a511021b6c9eeb272ac70dd351372603e0",j.callServer,void 0,j.findSourceMapURL,"searchWorlds"),U=e.i(746513),z=e.i(644931);function D(){let e=(0,x.useTranslations)("mp.search"),s=(0,r.useRouter)(),i=(0,z.useMpEnabled)(),[n,o]=(0,a.useState)(!1),[d,c]=(0,a.useState)(""),[m,u]=(0,a.useState)({scenarios:[],rooms:[]}),[h,p]=(0,a.useState)(!1),f=(0,a.useRef)(null);(0,a.useEffect)(()=>{if(!i)return;let e=e=>{(e.metaKey||e.ctrlKey)&&"k"===e.key.toLowerCase()&&(e.preventDefault(),o(e=>!e))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[i]),(0,a.useEffect)(()=>{if(!n)return;f.current&&clearTimeout(f.current);let e=d.trim();return e.length<2?void u({scenarios:[],rooms:[]}):(f.current=setTimeout(async()=>{p(!0),u((await L(e)).data),p(!1)},250),()=>{f.current&&clearTimeout(f.current)})},[d,n]);let b=(0,a.useCallback)(e=>{o(!1),s.push(e)},[s]);return i?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",onClick:()=>o(!0),"aria-label":e("open"),title:`${e("open")} (⌘K)`,className:"inline-flex h-9 w-9 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:(0,t.jsx)(A.Search,{className:"h-[18px] w-[18px]"})}),(0,t.jsxs)(P.CommandDialog,{open:n,onOpenChange:o,commandProps:{shouldFilter:!1,label:e("title")},children:[(0,t.jsx)(P.CommandInput,{value:d,onValueChange:c,placeholder:e("placeholder")}),(0,t.jsxs)(P.CommandList,{className:"scrollbar-hide",children:[(0,t.jsx)(P.CommandEmpty,{children:h?e("searching"):d.trim().length>=2?e("noResults"):e("hint")}),m.scenarios.length?(0,t.jsx)(P.CommandGroup,{heading:e("stories"),children:m.scenarios.map(r=>(0,t.jsxs)(P.CommandItem,{value:`s-${r.id}`,onSelect:()=>b((0,U.scenarioPath)(r.slug)),children:[(0,t.jsx)(E.Globe2,{className:"mr-2 h-4 w-4 text-teal-600 dark:text-teal-400"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:r.title}),(0,t.jsx)("span",{className:"ml-2 shrink-0 font-mono text-[10px] text-muted-foreground",children:r.isAnime?e("anime"):e("realistic")})]},r.id))}):null,m.rooms.length?(0,t.jsx)(P.CommandGroup,{heading:e("myRooms"),children:m.rooms.map(e=>(0,t.jsxs)(P.CommandItem,{value:`r-${e.roomId}`,onSelect:()=>b((0,U.roomPath)(e.roomId)),children:[(0,t.jsx)(M.Play,{className:"mr-2 h-4 w-4 text-violet-600 dar
1k:text-violet-400"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e.title}),(0,t.jsx)("span",{className:"ml-2 shrink-0 font-mono text-[10px] text-muted-foreground",children:e.status})]},e.roomId))}):null,(0,t.jsx)(P.CommandSeparator,{}),(0,t.jsxs)(P.CommandGroup,{heading:e("go"),children:[(0,t.jsxs)(P.CommandItem,{value:"go-hub",onSelect:()=>b(U.MP_HUB_PATH),children:[(0,t.jsx)(E.Globe2,{className:"mr-2 h-4 w-4"})," ",e("goHub")]}),(0,t.jsxs)(P.CommandItem,{value:"go-player",onSelect:()=>b(`${U.MP_HUB_PATH}#find-player`),children:[(0,t.jsx)(R,{className:"mr-2 h-4 w-4"})," ",e("goFindPlayer")]}),(0,t.jsxs)(P.CommandItem,{value:"go-docs",onSelect:()=>window.location.href="/docs/worlds",children:[(0,t.jsx)(l.BookOpen,{className:"mr-2 h-4 w-4"})," ",e("goDocs")]})]})]})]})]}):null}var O=e.i(669414),$=e.i(519455),H=e.i(511795),B=e.i(799676),F=e.i(934631),_=e.i(755146),K=e.i(737149),W=e.i(316058),G=e.i(746798),X=e.i(170897);e.i(879388);var V=e.i(164068),Y=e.i(874179),q=e.i(276913),J=e.i(412093),Q=e.i(143244),Z=e.i(756914);let ee=(0,I.default)("Languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]),et=["en","it","fr","de","es","ja","zh","ko"],er="locale",ea="locale_locked";function es(e){return!!e&&et.includes(e)}let ei={en:"English",it:"Italiano",fr:"Français",de:"Deutsch",es:"Español",ja:"日本語",zh:"中文",ko:"한국어"};var en=(0,j.createServerReference)("40d680eb2453ac75de51a23e07cc4a6ff66659692a",j.callServer,void 0,j.findSourceMapURL,"setLanguagePreference");function el(){let e=(0,r.useRouter)(),{userData:t}=(0,q.useUserData)(),{isAuthenticated:s}=(0,W.useAuth)(),[i,n]=(0,a.useState)(null);(0,a.useEffect)(()=>{n(function(){if("undefined"==typeof document)return null;let e=document.cookie.match(RegExp(`(?:^|; )${er}=([^;]*)`)),t=e?.[1];return es(t)?t:null}())},[]);let l=es(t?.preferredLanguage)?t.preferredLanguage:null,o=l??i??"en",d=(0,a.useCallback)(async t=>{if("undefined"!=typeof document&&(document.cookie=`${er}=${t}; path=/; max-age=31536000; SameSite=Lax`,document.cookie=`${ea}=1; path=/; max-age=31536000; SameSite=Lax`),n(t),s)try{await en(t)}catch(e){console.error("Failed to save language preference:",e)}e.refresh()},[s,e]),c=(0,a.useRef)(!1);return(0,a.useEffect)(()=>{s&&null===l&&null!==i&&!c.current&&(c.current=!0,en(i).catch(()=>{}))},[s,l,i]),{locale:o,setLocale:d}}let eo=({variant:e="navbar"})=>{let r=(0,x.useTranslations)("language"),{locale:s,setLocale:i}=el(),[n,l]=(0,a.useState)(!1);(0,a.useEffect)(()=>{"undefined"!=typeof document&&l(!/(?:^|; )lang_switcher_seen=/.test(document.cookie))},[]);let o=(0,t.jsxs)(_.DropdownMenuContent,{align:"navbar"===e?"end":"start",className:"z-[80] min-w-[12rem] rounded-xl border-border/30 bg-popover/95 shadow-lg backdrop-blur-xl",children:[(0,t.jsx)(_.DropdownMenuLabel,{className:"text-xs text-muted-foreground",children:r("label")}),(0,t.jsx)(_.DropdownMenuSeparator,{}),et.map(e=>(0,t.jsxs)(_.DropdownMenuItem,{onSelect:()=>{e!==s&&i(e)},className:"cursor-pointer justify-between gap-3",children:[(0,t.jsx)("span",{className:(0,g.cn)(e===s&&"font-medium text-primary"),children:ei[e]}),e===s&&(0,t.jsx)(Z.Check,{className:"h-4 w-4 text-primary"})]},e))]});return"menu-item"===e?(0,t.jsxs)(_.DropdownMenu,{children:[(0,t.jsx)(_.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsxs)("button",{className:"flex w-full items-center gap-3 rounded-xl px-3 py-3 text-sm transition-colors hover:bg-muted/50",children:[(0,t.jsx)(ee,{className:"h-5 w-5 text-muted-foreground"}),(0,t.jsx)("span",{className:"flex-1 text-left font-medium",children:r("label")}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:ei[s]})]})}),o]}):(0,t.jsxs)(_.DropdownMenu,{onOpenChange:e=>e&&void(n&&(document.cookie="lang_switcher_seen=1; path=/; max-age=31536000; SameSite=Lax",l(!1))),children:[(0,t.jsx)(_.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsxs)("button",{"aria-label":r("label"),className:"relative flex h-9 items-center gap-1.5 rounded-full bg-primary/10 px-3 text-sm font-medium transition-colors hover:bg-primary/20",children:[(0,t.jsx)(ee,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"uppercase",children:s}),n&&(0,t.jsx)("span",{className:"absolute -right-0.5 -top-0.5 h-2 w-2 rounded-full bg-pink-500 ring-2 ring-background"})]})}),o]})};var ed=e.i(438038),ec=e.i(904646);let em={FREE:{card:"bg-card/40",shimmer:"bg-gradient-to-r from-transparent via-amber-300/20 to-transparent",icon:"bg-gradient-to-br from-primary to-amber-500",star:!1},PREMIUM:{card:"border-blue-500/30 bg-gradient-to-br from-blue-500/15 via-blue-400/10 to-blue-600/15 shadow-lg shadow-blue-500/10",shimmer:"bg-gradient-to-r from-transparent via-blue-300/20 to-transparent",icon:"bg-gradient-to-br from-blue-500 to-blue-600 shadow-blue-500/25",star:!0},PRO:{card:"border-purple-500/30 bg-gradient-to-br from-purple-500/15 via-purple-400/10 to-purple-600/15 shadow-lg shadow-purple-500/10",shimmer:"bg-gradient-to-r from-transparent via-purple-300/20 to-transparent",icon:"bg-gradient-to-br from-purple-500 to-purple-600 shadow-purple-500/25",star:!1},ELITE:{card:"border-fuchsia-500/40 bg-gradient-to-br from-violet-600/20 via-fuchsia-500/10 to-violet-700/20 shadow-lg shadow-fuchsia-500/15",shimmer:"bg-gradient-to-r from-transparent via-fuchsia-300/25 to-transparent",icon:"bg-gradient-to-br from-violet-600 to-fuchsia-500 shadow-fuchsia-500/30",star:!0},ULTIMATE:{card:"border-amber-500/30 bg-gradient-to-br from-amber-500/15 via-yellow-400/10 to-amber-600/15 shadow-lg shadow-amber-500/10",shimmer:"bg-gradient-to-r from-transparent via-amber-300/20 to-transparent",icon:"bg-gradient-to-br from-amber-500 to-yellow-500 shadow-amber-500/25",star:!1}},eu=()=>{let{isAuthenticated:e,isLoading:h,user:x}=(0,W.useAuth)(),{openModal:p}=(0,W.useAuthModal)(),b=(0,r.useRouter)(),g=(0,r.usePathname)(),[v,j]=(0,a.useState)(!1),[w,y]=(0,a.useState)(void 0),[N,k]=(0,a.useState)("profile"),{userData:C,isLoading:T,error:A}=(0,q.useUserData)(),E=em[C?.effectiveStatus??"FREE"]??em.FREE,M=(0,ec.nextSellableTier)(C?.effectiveStatus??"FREE"),I=(0,ec.tierAtLeast)(M,"ELITE"),R=I?{button:"border-fuchsia-400/70 bg-gradient-to-br from-violet-600/95 via-fuchsia-500/95 to-violet-700/95 hover:border-fuchsia-300 hover:shadow-fuchsia-500/30",inner:"from-violet-700/15 to-fuchsia-600/15",glow:"from-violet-400/25 via-fuchsia-400/35 to-violet-500/25",frames:["linear-gradient(90deg, rgba(167, 139, 250, 0.25) 0%, rgba(232, 121, 249, 0.35) 50%, rgba(139, 92, 246, 0.25) 100%)","linear-gradient(90deg, rgba(139, 92, 246, 0.25) 0%, rgba(167, 139, 250, 0.35) 50%, rgba(232, 121, 249, 0.25) 100%)","linear-gradient(90deg, rgba(232, 121, 249, 0.25) 0%, rgba(139, 92, 246, 0.35) 50%, rgba(167, 139, 250, 0.25) 100%)"],sparkles:{first:"#c084fc",second:"#e879f9"}}:{button:"border-yellow-400/70 bg-gradient-to-br from-yellow-500/95 via-amber-500/95 to-yellow-600/95 hover:border-yellow-300 hover:shadow-yellow-500/30",inner:"from-yellow-600/15 to-amber-600/15",glow:"from-yellow-400/25 via-amber-400/35 to-yellow-500/25",frames:["linear-gradient(90deg, rgba(250, 204, 21, 0.25) 0%, rgba(245, 158, 11, 0.35) 50%, rgba(234, 179, 8, 0.25) 100%)","linear-gradient(90deg, rgba(234, 179, 8, 0.25) 0%, rgba(250, 204, 21, 0.35) 50%, rgba(245, 158, 11, 0.25) 100%)","linear-gradient(90deg, rgba(245, 158, 11, 0.25) 0%, rgba(234, 179, 8, 0.35) 50%, rgba(250, 204, 21, 0.25) 100%)"],sparkles:{first:"#f59e0b",second:"#d97706"}},{tokenBalance:P,refreshBalance:L,refreshBalanceSilently:U,hasUserData:z,forceRefresh:Z,error:ee}=(0,Y.useTokens)(),et=h||e&&T&&!C,er=A&&e&&!T;a.default.useEffect(()=>{let t;return!e||h||T||z||ee||(t=setTimeout(()=>{!z&&e&&Z()},2e3)),()=>{t&&clearTimeout(t)}},[e,h,T,z,ee,Z]);let ea=x?.email||"",es=C?.username||"",[ei,en]=(0,a.useState)(null),el=C?.avatarSeed||null,{isSupported:eu,permission:eh,isSubscribed:ex,requestPermission:ep}=(0,J.usePushNotifications)();(0,a.useEffect)(()=>{(async()=>
1{if(C?.avatarUrl)try{let e=await (0,V.getAvatarSignedUrl)(C.avatarUrl);e.success&&e.data&&en(e.data.signedUrl)}catch(e){console.error("Error getting signed URL:",e)}else en(null)})()},[C?.avatarUrl]),(0,a.useEffect)(()=>{let e=e=>{let{initialTab:t}=e.detail;j(!0),t&&setTimeout(()=>{let e=document.getElementById(`${t}-tab`);e&&e.click()},100)};return window.addEventListener("openSettingsModal",e),()=>{window.removeEventListener("openSettingsModal",e)}},[]),(0,a.useEffect)(()=>{let e=null;try{(e=sessionStorage.getItem("xotPurchaseIntent"))&&sessionStorage.removeItem("xotPurchaseIntent")}catch{e=null}e&&(y(e),k("xot"),j(!0))},[]);let ef=async()=>{try{let e=(0,H.createClient)();await e.auth.signOut(),window.location.href="/explore"}catch(e){console.error("Error during sign out:",e)}};return g.startsWith("/chat"),(0,t.jsxs)(G.TooltipProvider,{children:[(0,t.jsx)("div",{className:"fixed left-0 right-0 top-0 z-50 flex h-16 items-center justify-end border-b border-primary/20 bg-background/90 px-4 shadow-md backdrop-blur-md dark:bg-stone-950/90 md:left-24",children:(0,t.jsxs)("div",{className:"flex flex-shrink-0 items-center gap-0.5 pr-0 sm:gap-2 md:gap-3 md:pr-3",children:[e&&(0,t.jsx)(f.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1 rounded-full border border-primary/20 bg-gradient-to-r from-primary/10 to-amber-500/10 px-1 py-0.5 backdrop-blur-sm transition-colors hover:from-primary/15 hover:to-amber-500/15 sm:gap-2 sm:px-3 sm:py-2",onClick:async()=>{j(!0),await L(),setTimeout(()=>{let e=document.getElementById("xot-tab");e&&e.click()},100)},children:[(0,t.jsx)("div",{className:"flex h-6 w-6 items-center justify-center rounded-full bg-gradient-to-br from-primary to-amber-500 text-white shadow-sm",children:(0,t.jsx)(m.Coins,{className:"h-3 w-3"})}),(0,t.jsx)("span",{className:"text-xs font-medium",children:et||null===P?(0,t.jsx)("div",{className:"h-4 w-12 animate-pulse rounded bg-muted"}):er?(0,t.jsx)("span",{className:"cursor-pointer text-xs text-red-400",onClick:Z,title:"Click to retry loading user data",children:"Error"}):(0,t.jsxs)(f.motion.span,{initial:{scale:1.2,color:"#10b981"},animate:{scale:1,color:"inherit"},transition:{duration:.3},className:"whitespace-nowrap",children:[P.toLocaleString(),(0,t.jsx)("span",{className:"xs:inline hidden",children:" XOT"})]},P)}),(0,t.jsx)($.Button,{variant:"ghost",size:"sm",className:"pointer-events-none h-5 w-5 rounded-full bg-primary/10 px-0 py-0 text-xs font-medium text-primary hover:bg-primary/20 dark:bg-primary/5 sm:h-6 sm:w-6",children:"+"})]})}),e&&(0,t.jsx)(f.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},className:"hidden md:block",children:(0,t.jsx)($.Button,{onClick:()=>window.open("https://discord.gg/6YYqgkZnQn","_blank"),className:"relative overflow-hidden rounded-xl border-2 border-blue-500/50 bg-gradient-to-br from-blue-600/90 via-indigo-600/90 to-blue-700/90 px-1 py-0.5 shadow-lg transition-all duration-300 hover:border-blue-400 hover:shadow-xl hover:shadow-blue-500/25 active:scale-95 sm:px-4 sm:py-2",children:(0,t.jsxs)("div",{className:"relative flex items-center justify-center gap-1 bg-gradient-to-r from-blue-700/10 to-indigo-700/10 backdrop-blur-sm sm:gap-2",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-gradient-to-r from-blue-500/20 via-indigo-500/20 to-blue-600/20 opacity-60"}),(0,t.jsx)("span",{className:"text-xs font-bold text-white",children:"Join"}),(0,t.jsx)(f.motion.div,{animate:{rotate:[0,-3,3,-3,0],scale:[1,1.05,1]},transition:{duration:2,repeat:1/0,repeatType:"reverse",ease:"easeInOut"},className:"flex-shrink-0",children:(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"white",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 
11.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"})})}),(0,t.jsx)(f.motion.div,{className:"absolute inset-0 bg-gradient-to-r from-transparent via-white/20 to-transparent",animate:{x:["-100%","100%"]},transition:{duration:2,repeat:1/0,repeatType:"loop",ease:"linear"}})]})})}),e&&!et&&null!==M&&!g.startsWith("/subscription/success")&&(0,t.jsx)(f.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},children:(0,t.jsx)($.Button,{onClick:()=>{b.push(M?`/plans?src=navbar&tier=${M}`:"/plans?src=navbar")},className:`relative overflow-hidden rounded-xl border-2 px-1.5 py-1 shadow-lg transition-all duration-300 hover:shadow-xl active:scale-95 sm:px-3 sm:py-1.5 ${R.button}`,children:(0,t.jsxs)("div",{className:`relative flex items-center justify-center gap-0.5 bg-gradient-to-r backdrop-blur-sm sm:gap-1.5 ${R.inner}`,children:[(0,t.jsx)(f.motion.div,{className:`absolute inset-0 bg-gradient-to-r opacity-70 ${R.glow}`,animate:{background:R.frames},transition:{duration:4,repeat:1/0,repeatType:"reverse",ease:"easeInOut"}}),(0,t.jsx)(f.motion.div,{animate:{rotate:[0,-3,3,-3,0],scale:[1,1.05,1]},transition:{duration:2,repeat:1/0,repeatType:"reverse",ease:"easeInOut"},className:"flex-shrink-0",children:I?(0,t.jsx)(u.Gem,{className:"h-3 w-3 text-white sm:h-3.5 sm:w-3.5"}):(0,t.jsx)(c.Crown,{className:"h-3 w-3 text-white sm:h-3.5 sm:w-3.5"})}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5 sm:gap-1",children:[(0,t.jsx)(Q.SparklesText,{className:"text-[10px] font-semibold text-white sm:text-xs",colors:R.sparkles,sparklesCount:5,children:I?"Go Elite":"Upgrade"}),(0,t.jsx)("span",{className:"text-sm font-black text-white sm:text-base",children:"-72%"})]}),(0,t.jsx)(f.motion.div,{className:"absolute inset-0 bg-gradient-to-r from-transparent via-white/30 to-transparent",animate:{x:["-100%","100%"]},transition:{duration:2,repeat:1/0,repeatType:"loop",ease:"linear"}})]})})}),(0,t.jsx)(D,{}),(0,t.jsx)(S,{isAuthenticated:e}),(0,t.jsx)(f.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.9},className:"relative",children:(0,t.jsx)(O.ThemeToggle,{})}),(0,t.jsx)(f.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},className:"relative hidden md:block",children:(0,t.jsx)(eo,{variant:"navbar"})}),(0,t.jsxs)(G.Tooltip,{children:[(0,t.jsx)(G.TooltipTrigger,{asChild:!0,children:(0,t.jsx)(f.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.9},className:"relative hidden md:block",children:(0,t.jsxs)($.Button,{variant:"ghost",size:"icon",className:"rounded-full bg-blue-500/10 transition-colors hover:bg-blue-500/20",onClick:()=>{if(window.location.pathname.startsWith("/chat/"))b.push("/explore"),setTimeout(()=>{let e=document.querySelector("footer");e&&e.scrollIntoView({behavior:"smooth"})},500);else{let e=document.querySelector("footer");e&&e.scrollIntoView({behavior:"smooth"})}},children:[(0,t.jsx)(o.Info,{className:"h-5 w-5 text-blue-400"}),(0,t.jsx)("span",{className:"sr-only",children:"Information"})]})})}),(0,t.jsx)(G.TooltipContent,{side:"bottom",className:"bg-blue-500 text-white",children:(0,t.jsx)("p",{children:"Company Information"})})]}),(0,t.jsxs)(G.Tooltip,{children:[(0,t.jsx)(G.TooltipTrigger,{asChild:!0,children:(0,t.jsx)(f.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.9},className:"relative hidden md:block",children:(0,t.jsxs)($.Button,{variant:"ghost",size:"sm",className:"gap-1.5 rounded-full bg-amber-500/30 px-3 text-amber-700 transition-colors hover:bg-amber-500/40 dark:bg-amber-500/10 dark:text-amber-400 dark:hover:bg-amber-500/20",onClick:()=>window.location.assign("/docs"),children:[(0,t.jsx)(l.BookOpen,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"text-sm font-medium",children:"Guide"})]})})}),(0,t.jsx)(G.TooltipContent,{side:"bottom",className:"bg-amber-500 text-white",children:(0,t.jsx)("p",{children:"Platform Guide"})})]}),(0,t.jsx)("div",{className:"hidden h-9 w-9 flex-shrink-0 sm:block md:h-11 md:w-11",children:et?(0,t.jsx)("div",{className:"h-9 w-9 animate-pulse rounded-full border-2 border-primary/30 bg-primary/10 md:h-11 md:w-11"}):e?(0,t.jsxs)(_.DropdownMenu,{children:[(0,t.jsx)(_.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsx)(f.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},className:"relative cursor-pointer",children:(0,t.jsx)(F.UserAvatar,{avatarUrl:ei,avatarSeed:el,email:ea,size:"md",className:"md:size-lg border-2 border-primary bg-background"})})}),(0,t.jsx)(_.DropdownMenuContent,{align:"end",className:"no-scrollbar w-64 overflow-hidden rounded-xl border border-border/30 bg-background shadow-lg backdrop-blur-xl dark:bg-black/80 dark:shadow-black/10",sideOffset:8,children:(0,t.jsxs)(f.motion.div,{initial:{opacity:0,y:-10}
1,animate:{opacity:1,y:0},transition:{duration:.2},className:"overflow-hidden",children:[(0,t.jsx)("div",{className:"mb-2 p-4",children:(0,t.jsx)("div",{className:"mb-2 flex items-center gap-3",children:(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("p",{className:"truncate text-sm font-medium",children:es}),(0,t.jsx)("p",{className:"truncate text-xs text-muted-foreground",children:ea})]})})}),(0,t.jsx)("div",{className:"px-3 pb-2",children:C?C?.isSubscriptionActive?(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsxs)("div",{className:`relative flex items-center justify-between overflow-hidden rounded-xl border p-3 backdrop-blur-sm ${E.card}`,children:[C?.effectiveStatus!=="FREE"&&(0,t.jsx)("div",{className:"pointer-events-none absolute inset-0 bg-gradient-to-br from-white/10 via-transparent to-transparent"}),C?.effectiveStatus!=="FREE"&&(0,t.jsx)("div",{className:`absolute inset-0 opacity-30 ${E.shimmer} animate-pulse`}),(0,t.jsxs)("div",{className:"relative z-10 flex items-center gap-2",children:[(0,t.jsx)("div",{className:`flex h-7 w-7 items-center justify-center rounded-full text-white shadow-lg ${E.icon}`,children:E.star?(0,t.jsx)(d.Star,{className:"h-3.5 w-3.5"}):(0,t.jsx)(c.Crown,{className:"h-3.5 w-3.5"})}),(0,t.jsx)("div",{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-xs font-medium",children:ed.TIER_CONFIG[C?.effectiveStatus??"FREE"]?.name??"Member"}),(0,t.jsx)("span",{className:"inline-flex h-4 items-center rounded-full bg-green-100 px-1.5 text-xxs font-medium text-green-800 dark:bg-green-900/30 dark:text-green-400",children:"Active"})]})})]})]})}):(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsx)("div",{className:"flex items-center justify-between rounded-xl border border-border/20 bg-card/40 p-3 backdrop-blur-sm",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"flex h-7 w-7 items-center justify-center rounded-full bg-gray-500/20 text-gray-600 dark:bg-gray-400/20 dark:text-gray-400",children:(0,t.jsx)(d.Star,{className:"h-3.5 w-3.5"})}),(0,t.jsx)("div",{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-xs font-medium",children:"Free Plan"}),(0,t.jsx)("span",{className:"inline-flex h-4 items-center rounded-full bg-gray-100 px-1.5 text-xxs font-medium text-gray-600 dark:bg-gray-800/50 dark:text-gray-400",children:"Active"})]})})]})})}):(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsxs)("div",{className:"relative flex animate-pulse items-center justify-between rounded-xl border bg-card/40 p-3 backdrop-blur-sm",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"h-7 w-7 animate-pulse rounded-full bg-gray-300/70"}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("div",{className:"h-4 w-20 animate-pulse rounded bg-gray-300/70"}),(0,t.jsx)("div",{className:"h-3 w-12 animate-pulse rounded bg-gray-300/70"})]})]}),(0,t.jsx)("div",{className:"h-6 w-16 animate-pulse rounded bg-gray-300/70"})]})})}),(0,t.jsxs)("div",{className:"border-t border-border/30 p-1",children:[(0,t.jsx)(_.DropdownMenuItem,{asChild:!0,children:(0,t.jsxs)("button",{onClick:()=>{j(!0);let e=document.querySelector("[data-radix-dropdown-menu-trigger]");e instanceof HTMLElement&&e.click()},className:"flex w-full cursor-pointer items-center rounded-md px-2 py-1.5 text-sm transition-colors hover:bg-primary/10 focus:bg-primary/10 focus:outline-none",children:[(0,t.jsx)(n.Settings,{className:"mr-2.5 h-4 w-4 text-muted-foreground"}),(0,t.jsx)("span",{children:"Settings"})]})}),(0,t.jsx)(_.DropdownMenuItem,{asChild:!0,children:(0,t.jsxs)("button",{onClick:ef,className:"flex w-full cursor-pointer items-center rounded-md px-2 py-1.5 text-sm transition-colors hover:bg-destructive/10 focus:bg-destructive/10 focus:outline-none",children:[(0,t.jsx)(i.LogOut,{className:"mr-2.5 h-4 w-4 text-muted-foreground"}),(0,t.jsx)("span",{children:"Sign Out"})]})})]})]})})]}):(0,t.jsxs)(G.Tooltip,{children:[(0,t.jsx)(G.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)(f.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>p(),className:"relative cursor-pointer",children:[(0,t.jsx)(B.Avatar,{className:"h-9 w-9 border-2 border-primary bg-background md:h-11 md:w-11",children:(0,t.jsx)(B.AvatarFallback,{className:"bg-primary text-primary-foreground",children:(0,t.jsx)(s.LogIn,{className:"h-5 w-5"})})}),(0,t.jsx)(K.ShineBorder,{borderWidth:1,duration:5,shineColor:["#ffd700","#ffc107","#f0b400","#ffe57f"],className:"rounded-full"})]})}),(0,t.jsx)(G.TooltipContent,{side:"bottom",className:"bg-primary text-white",children:(0,t.jsx)("p",{children:"Login"})})]})})]})}),(0,t.jsx)(X.SettingsModal,{open:v,onOpenChange:e=>{j(e),e||(y(void 0),k("profile"))},initialTab:N,tokenContext:w})]})};var eh=e.i(388760),ex=e.i(180431),ep=e.i(867428),ef=e.i(215350),eb=e.i(618915),eg=e.i(317877),ev=e.i(653287),ej=e.i(753422),ew=e.i(123145),ey=e.i(136725),eN=e.i(6
153789);let ek=[{title:"Explore",titleKey:"explore",href:"/explore",Icon:ep.Compass},{title:"Create",titleKey:"create",href:"/create",Icon:ew.Clapperboard,badge:"New"},{title:"Reels",titleKey:"reels",href:"/feed",Icon:eb.Activity},{title:"Private Content",titleKey:"privateContent",href:"/collections",Icon:ey.Video},{title:"New Character",titleKey:"newCharacter",href:"/create-character",Icon:ef.UserPlus},{title:"My Characters",titleKey:"myCharacters",href:"/my-characters",Icon:eg.Users},{title:"Chat",titleKey:"chat",href:"/chat",Icon:ex.MessageCircleMore},{title:"Profile",titleKey:"profile",href:"/profile",Icon:ev.User},{title:"Affiliate",titleKey:"affiliate",href:"/partners",Icon:ej.DollarSign},{title:"Settings",titleKey:"settings",href:"#",Icon:n.Settings,isModal:!0}];function eC(e){let t=ek.map(e=>"/feed"===e.href?{title:"Feed",titleKey:"feed",href:"/feed",Icon:eN.Newspaper,badge:"New"}:e);return e.mpEnabled&&(t=[t[0],{title:"Worlds",titleKey:"worlds",href:U.MP_HUB_PATH,Icon:E.Globe2,badge:"New"},...t.slice(1)]),t}var eS=e.i(796337);let eT=({Icon:e,title:r,isSelected:s,onSelect:i,open:n,setPosition:l,href:o,badge:d,external:c,isModal:m,onModalOpen:u})=>{let x=(0,a.useRef)(null),{isAuthenticated:p}=(0,W.useAuth)(),{openModal:f}=(0,W.useAuthModal)(),b=(0,g.cn)("relative flex h-16 w-full items-center cursor-pointer select-none",s&&"border-r-4 border-primary",!n&&"justify-center"),v=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"relative grid h-full w-16 place-content-center",children:(0,t.jsx)(e,{strokeWidth:1,size:24})}),n&&(0,t.jsxs)("div",{className:"flex flex-1 items-center justify-between pr-2",children:[(0,t.jsx)("span",{className:"font-mono text-lg tracking-tighter leading-tight",children:r}),d&&(0,t.jsx)(eS.span,{className:(0,g.cn)("ml-2 flex-shrink-0 rounded-full px-2 py-1 text-xs font-medium","New"===d?"bg-green-500 text-white":"Hot"===d?"bg-pink-400 text-white animate-pulse":"bg-primary text-primary-foreground"),initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{delay:.3,duration:.2},children:d})]})]}),j=e=>{if(i(),"/my-characters"===o&&!p){e.preventDefault(),f();return}m&&u&&u()},w=m?(0,t.jsx)("button",{type:"button",onClick:j,className:b,children:v}):(0,t.jsx)(h.default,{href:o,onClick:j,className:b,...c?{target:"_blank",rel:"noopener noreferrer"}:{},children:v});return(0,t.jsx)("li",{className:"relative z-10 text-foreground",ref:x,onMouseEnter:()=>{if(!x.current)return;let{height:e}=x.current.getBoundingClientRect();l({top:x.current.offsetTop,height:e,opacity:1})},children:(0,t.jsx)(G.TooltipProvider,{children:(0,t.jsxs)(G.Tooltip,{delayDuration:0,children:[(0,t.jsx)(G.TooltipTrigger,{asChild:!0,children:w}),!n&&(0,t.jsx)(G.TooltipContent,{side:"right",className:"bg-primary text-white",children:(0,t.jsx)("p",{children:r})})]})})})};var eA=e.i(593718),eA=eA;let eE=({position:e})=>(0,t.jsx)(eA.MotionLi,{className:"absolute z-0 w-full bg-primary",animate:e});var eM=e.i(617029),eI=e.i(42435),eR=e.i(367886);let eP=()=>{let{isOpen:e,toggleSidebar:r}=(0,eM.useSidebar)(),[s,i]=(0,a.useState)(!1),{isAuthenticated:n}=(0,W.useAuth)(),{openModal:l}=(0,W.useAuthModal)(),[o,d]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{let e=setTimeout(()=>d(!0),450);return()=>clearTimeout(e)},[]),(0,t.jsxs)("div",{className:`fixed left-0 top-0 z-[60] hidden h-full max-h-screen min-h-screen items-center border-r border-r-primary/20 bg-background/95 bg-gradient-to-r from-background/95 to-background/90 shadow-xl shadow-primary/20 dark:bg-stone-950 dark:bg-gradient-to-r dark:from-neutral-950 dark:to-primary/5 dark:shadow-2xl dark:shadow-primary/40 md:flex ${o?"transition-[width] duration-300 ease-in-out":""}`,style:{width:e?"13rem":"5rem"},children:[(0,t.jsxs)("div",{className:"flex h-full w-full flex-col",children:[(0,t.jsx)("div",{className:"pb-3 flex-shrink-0",children:(0,t.jsx)("div",{className:"flex cursor-pointer items-center justify-between",children:(0,t.jsx)(eh.Logo,{collapsed:!e,homeHref:!0})})}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto overflow-x-hidden no-scrollbar",children:(0,t.jsx)(eL,{open:e,onOpenSettingsModal:()=>{n?i(!0):l()}})}),(0,t.jsx)("div",{className:"pb-4 px-4 flex-shrink-0",children:(0,t.jsx)("button",{onClick:r,className:"ml-auto flex w-10 h-10 items-center justify-center rounded-full bg-primary/10 text-primary transition-all hover:bg-primary/20 hover:scale-105","aria-label":e?"Collapse sidebar":"Expand sidebar",children:e?(0,t.jsx)(eI.ChevronLeft,{className:"h-5 w-5"}):(0,t.jsx)(eR.ChevronRight,{className:"h-5 w-5"})})})]}),(0,t.jsx)(X.SettingsModal,{open:s,onOpenChange:i,initialTab:"subscription"})]})},eL=({open:e,onOpenSettingsModal:r})=>{let s=eC({mpEnabled:(0,z.useMpEnabled)()}),[i,n]=(0,a.useState)("Home"),[l,o]=(0,a.useState)({top:0,height:0,opacity:0}
1),d=(0,x.useTranslations)("nav");return(0,t.jsxs)("ul",{className:"relative flex w-full flex-col",onMouseLeave:()=>o(e=>({...e,opacity:0})),children:[s.map(({titleKey:a,href:s,Icon:l,badge:c,external:m,isModal:u})=>(0,t.jsx)(eT,{Icon:l,title:d(a),href:s,badge:c,external:m,isModal:u,onModalOpen:u?r:void 0,open:e,isSelected:i===a,onSelect:()=>n(a),setPosition:o},a)),(0,t.jsx)(eE,{position:l})]})},eU=[{key:"explore",href:"/explore",Icon:ep.Compass},{key:"chat",href:"/chat",Icon:ex.MessageCircleMore},{key:"create",href:"/create",Icon:ew.Clapperboard},{key:"myCharacters",href:"/my-characters",Icon:eg.Users}];function ez(){let e=(0,r.usePathname)(),s=(0,x.useTranslations)("nav"),{isAuthenticated:i}=(0,W.useAuth)(),{openModal:l}=(0,W.useAuthModal)(),[o,d]=(0,a.useState)(!1),c=(0,z.useMpEnabled)(),m=[eU[0],{key:"feed",href:"/feed",Icon:eN.Newspaper},eU[1],eU[2]],u=c?[m[0],m[1],{key:"worlds",href:U.MP_HUB_PATH,Icon:E.Globe2},...m.slice(2)]:m;if("/explore"!==e&&"/feed"!==e)return null;let p=e=>`flex flex-1 flex-col items-center justify-center gap-1 pt-2 pb-[calc(0.5rem+env(safe-area-inset-bottom))] text-[9px] font-medium leading-none transition-colors ${e?"text-primary":"text-muted-foreground hover:text-foreground"}`;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("nav",{className:"fixed inset-x-0 bottom-0 z-50 flex items-stretch border-t border-border/60 bg-background/95 backdrop-blur-lg md:hidden",children:[u.map(({key:r,href:a,Icon:i})=>{let n=e===a||e.startsWith(`${a}/`);return(0,t.jsxs)(h.default,{href:a,"aria-current":n?"page":void 0,className:p(n),children:[(0,t.jsx)(i,{className:"h-[22px] w-[22px]",strokeWidth:n?2.5:2}),(0,t.jsx)("span",{className:"max-w-full truncate whitespace-nowrap",children:s(r)})]},r)}),(0,t.jsxs)("button",{type:"button",onClick:()=>{i?d(!0):l()},className:p(!1),children:[(0,t.jsx)(n.Settings,{className:"h-[22px] w-[22px]",strokeWidth:2}),(0,t.jsx)("span",{className:"max-w-full truncate whitespace-nowrap",children:s("settings")})]})]}),(0,t.jsx)(X.SettingsModal,{open:o,onOpenChange:d,initialTab:"subscription"})]})}var eD=e.i(676163),eO=e.i(477272),e$=e.i(250623);let eH=()=>{let e=(0,r.usePathname)(),o=eC({mpEnabled:(0,z.useMpEnabled)()}),d=(0,x.useTranslations)(),{isAuthenticated:c,isLoading:m,user:u}=(0,W.useAuth)(),{openModal:b}=(0,W.useAuthModal)(),{isActive:v}=(0,e$.useSubscription)(),{userData:j}=(0,q.useUserData)(),[w,y]=(0,a.useState)(!1),[N,k]=(0,a.useState)(!1),C=u?.email||"",S=j?.username??"",T=j?.avatarSeed??null,A=j?.avatarUrl,[E,M]=(0,a.useState)(null);(0,a.useEffect)(()=>{y(!1)},[e]),(0,a.useEffect)(()=>{if(!A)return void M(null);let e=!1;return(async()=>{try{let t=await (0,V.getAvatarSignedUrl)(A);!e&&t.success&&t.data&&M(t.data.signedUrl)}catch(e){console.error("Error getting signed URL:",e)}})(),()=>{e=!0}},[A]);let I=async()=>{try{let e=(0,H.createClient)();await e.auth.signOut(),window.location.href="/explore"}catch(e){console.error("Error during sign out:",e)}},R=()=>{k(!0)};return e.startsWith("/preview")?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.motion.button,{initial:{opacity:0}
1,animate:{opacity:1},onClick:()=>y(!w),className:"fixed left-4 top-4 z-50 flex h-10 w-10 items-center justify-center rounded-full border border-primary/20 bg-background/95 shadow-lg backdrop-blur-md transition-colors hover:bg-muted/50 dark:bg-stone-950/95 md:hidden","aria-label":"Toggle menu",children:(0,t.jsx)(p.AnimatePresence,{mode:"wait",children:w?(0,t.jsx)(f.motion.div,{initial:{rotate:-90,opacity:0},animate:{rotate:0,opacity:1},exit:{rotate:90,opacity:0},transition:{duration:.2},children:(0,t.jsx)(eO.X,{className:"h-5 w-5"})},"close"):(0,t.jsx)(f.motion.div,{initial:{rotate:90,opacity:0},animate:{rotate:0,opacity:1},exit:{rotate:-90,opacity:0},transition:{duration:.2},children:(0,t.jsx)(eD.Menu,{className:"h-5 w-5"})},"menu")})}),(0,t.jsx)(p.AnimatePresence,{children:w&&(0,t.jsx)(f.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"fixed inset-0 z-40 bg-black/50 backdrop-blur-sm md:hidden",onClick:()=>y(!1)})}),(0,t.jsx)(p.AnimatePresence,{children:w&&(0,t.jsx)(f.motion.div,{initial:{x:"-100%"},animate:{x:0},exit:{x:"-100%"},transition:{type:"spring",damping:25,stiffness:200},className:"no-scrollbar fixed left-0 top-0 z-50 h-full w-72 overflow-y-auto border-r border-primary/20 bg-background shadow-2xl dark:bg-stone-950 md:hidden",children:(0,t.jsxs)("div",{className:"flex h-full flex-col",children:[(0,t.jsx)("div",{className:"border-b border-primary/20 p-4",children:(0,t.jsx)(eh.Logo,{collapsed:!1,homeHref:!0})}),m?(0,t.jsx)("div",{className:"border-b border-primary/20 p-4",children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"h-12 w-12 animate-pulse rounded-full border-2 border-primary/30 bg-primary/10"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("div",{className:"mb-2 h-4 w-24 animate-pulse rounded bg-primary/10"}),(0,t.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-primary/10"})]})]})}):c?(0,t.jsx)("div",{className:"border-b border-primary/20 p-4",children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(F.UserAvatar,{avatarUrl:E,avatarSeed:T,email:C,size:"lg",className:"h-12 w-12 border-2 border-primary"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("p",{className:"truncate text-sm font-medium",children:S}),(0,t.jsx)("p",{className:"truncate text-xs text-muted-foreground",children:C}),v&&(0,t.jsxs)("span",{className:"mt-1 inline-flex items-center gap-1 rounded-full border border-amber-400/40 bg-gradient-to-r from-amber-400/20 to-yellow-500/20 px-2 py-0.5 text-[11px] font-semibold text-amber-600 dark:text-amber-300",children:[(0,t.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"currentColor",children:(0,t.jsx)("path",{d:"M5 16L3 5l5.5 5L12 4l3.5 6L21 5l-2 11H5zm0 2h14v2H5v-2z"})}),"Ultimate"]})]})]})}):(0,t.jsx)("div",{className:"border-b border-primary/20 p-4",children:(0,t.jsxs)("button",{onClick:()=>{y(!1),b()},className:"flex w-full items-center gap-3 rounded-lg border border-primary bg-primary/10 p-3 transition-colors hover:bg-primary/20",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full border-2 border-primary bg-background",children:(0,t.jsx)(s.LogIn,{className:"h-5 w-5 text-primary"})}),(0,t.jsx)(K.ShineBorder,{borderWidth:1,duration:5,shineColor:["#ffd700","#ffc107","#f0b400","#ffe57f"],className:"rounded-full"})]}),(0,t.jsx)("span",{className:"font-medium",children:d("common.signIn")})]})}),(0,t.jsxs)("nav",{className:"no-scrollbar flex-1 overflow-y-auto p-2",children:[(0,t.jsxs)("a",{href:"/docs",onClick:()=>y(!1),className:"mb-1 flex items-center gap-3 rounded-xl border border-amber-500/25 bg-amber-500/10 px-3 py-3 text-sm font-medium text-foreground transition-all duration-200 hover:bg-amber-500/15",children:[(0,t.jsx)(l.BookOpen,{className:"h-5 w-5 text-amber-600 dark:text-amber-400"}),(0,t.jsx)("span",{className:"flex-1",children:"Platform Guide"}),(0,t.jsx)(eR.ChevronRight,{className:"h-4 w-4 text-muted-foreground"})]}),(0,t.jsx)("div",{className:"space-y-1",children:o.map(({title:r,titleKey:a,href:s,Icon:i,isModal:n,badge:l})=>{let o=e===s;return n?(0,t.jsxs)("button",{onClick:R,className:"flex w-full items-center gap-3 rounded-xl px-3 py-3 text-sm transition-colors hover:bg-muted/50",children:[(0,t.jsx)(i,{className:"h-5 w-5 text-muted-foreground"}),(0,t.jsx)("span",{className:"font-medium",children:d(`nav.${a}`)})]},a):(0,t.jsxs)(h.default,{href:s,prefetch:!1,className:(0,g.cn)("flex items-center gap-3 rounded-xl px-3 py-3 text-sm transition-all duration-200",o?"bg-primary/15 text-primary shadow-sm font-medium":"text-muted-foreground hover:text-foreground hover:bg-muted/50"),children:[(0,t.jsx)(i,{className:(0,g.cn)("h-5 w-5 transition-all duration-200",o?"scale-110":"")}
1),(0,t.jsx)("span",{className:"flex-1",children:d(`nav.${a}`)}),l&&(0,t.jsx)("span",{className:(0,g.cn)("rounded-full px-2 py-0.5 text-xs font-medium","New"===l&&"bg-blue-500/10 text-blue-500","Hot"===l&&"bg-red-500/10 text-red-500"),children:l})]},a)})})]}),(0,t.jsx)("div",{className:"border-t border-primary/20 p-2",children:(0,t.jsx)(eo,{variant:"menu-item"})}),c&&(0,t.jsxs)("div",{className:"border-t border-primary/20 p-2",children:[(0,t.jsxs)("button",{onClick:()=>{window.open("https://discord.gg/6YYqgkZnQn","_blank"),y(!1)},className:"mb-2 flex w-full items-center gap-3 rounded-full bg-gradient-to-br from-blue-600/90 via-indigo-600/90 to-blue-700/90 px-4 py-3 text-sm shadow-md transition-all hover:shadow-lg hover:shadow-blue-500/25",children:[(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"white",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"})}),(0,t.jsx)("span",{className:"font-bold text-white",children:d("common.joinDiscord")})]}),(0,t.jsxs)("button",{onClick:()=>{y(!1),R()},className:"flex w-full items-center gap-3 rounded-xl px-3 py-3 text-sm transition-colors hover:bg-muted/50",children:[(0,t.jsx)(n.Settings,{className:"h-5 w-5 text-muted-foreground"}),(0,t.jsx)("span",{className:"font-medium",children:d("nav.settings")})]}),(0,t.jsxs)("button",{onClick:I,className:"flex w-full items-center gap-3 rounded-xl px-3 py-3 text-sm transition-colors hover:bg-destructive/10",children:[(0,t.jsx)(i.LogOut,{className:"h-5 w-5 text-muted-foreground"}),(0,t.jsx)("span",{className:"font-medium",children:d("common.signOut")})]})]})]})})}),(0,t.jsx)(X.SettingsModal,{open:N,onOpenChange:k})]})};function eB({children:e,isFullscreen:a=!1}){let s=(0,r.usePathname)(),i=s.startsWith("/chat"),n=s.startsWith("/preview"),l=s.startsWith("/girlfriend/"),o="/feed"===s,d="/create-character"===s;if(a)return(0,t.jsx)("div",{className:"h-dvh w-full overflow-auto no-scrollbar",children:e});let c=i||n||l||(0,U.isMpRoomPath)(s);return(0,t.jsx)("div",{"data-main-scroll":o?"":void 0,className:`${c||o?"h-[calc(100dvh-4rem)]":"h-full"} ${c||o?"mt-16":""} w-full ${c?"overflow-hidden":"overflow-auto no-scrollbar scrollbar-hide"} ${c||o?"":d?"pb-24 md:pb-0":"pb-16 md:pb-0"}`,children:e})}e.i(680909);let eF={IT:"it",FR:"fr",DE:"de",ES:"es",JP:"ja",KR:"ko",CN:"zh",SG:"zh",TW:"zh",HK:"zh",MO:"zh",MX:"es",AR:"es",CO:"es",CL:"es",PE:"es",VE:"es",EC:"es",BO:"es",PY:"es",UY:"es",GT:"es",HN:"es",SV:"es",NI:"es",CR:"es",PA:"es",DO:"es",CU:"es",PR:"es"},e_="lang_suggest_seen",eK={it:{title:"Xotic è ora disponibile in italiano.",cta:"Passa all'italiano",dismiss:"Chiudi"},fr:{title:"Xotic est maintenant disponible en français.",cta:"Passer au français",dismiss:"Fermer"},de:{title:"Xotic ist jetzt auf Deutsch verfügbar.",cta:"Auf Deutsch wechseln",dismiss:"Schließen"},es:{title:"Xotic ya está disponible en español.",cta:"Cambiar a español",dismiss:"Cerrar"},ja:{title:"Xoticが日本語でご利用いただけるようになりました。",cta:"日本語に切り替える",dismiss:"閉じる"},zh:{title:"Xotic 现已支持中文。",cta:"切换到中文",dismiss:"关闭"},ko:{title:"Xotic을 이제 한국어로 이용하실 수 있습니다.",cta:"한국어로 전환",dismiss:"닫기"}};function eW(e){if("undefined"==typeof document)return null;let t=document.cookie.match(RegExp(`(?:^|; )${e}=([^;]*)`));return t?decodeURIComponent(t[1]):null}function eG(e,t){document.cookie=`${e}=${t}; path=/; max-age=31536000; SameSite=Lax`}function eX(){let{locale:e,setLocale:r}=el(),[s,i]=(0,a.useState)(null);if((0,a.useEffect)(()=>{var t;let r=(t=eW("geo_country"))?eF[t.toUpperCase()]??null:null;if(!r||"en"===r||"1"===eW(ea))return;let a=eW(er);a&&"en"!==a||"en"!==e||eW(e_)||i(r)},[e]),!s)return null;let n=eK[s];return(0,t.jsx)("div",{className:"fixed inset-x-0 bottom-4 z-[60] flex justify-center px-4",children:(0,t.jsxs)("div",{className:"flex w-full max-w-md items-center gap-3 rounded-2xl border border-primary/20 bg-background/95 p-3 pl-4 shadow-xl shadow-primary/10 backdrop-blur-xl dark:bg-stone-950/95",children:[(0,t.jsx)(ee,{className:"h-5 w-5 shrink-0 text-primary"}),(0,t.jsx)("p",{className:"flex-1 text-sm font-medium leading-snug",children:n.title}),(0,t.jsx)("button",{onClick:()=>{eG(e_,"1"),r(s),i(null)},className:"shrink-0 rounded-full bg-primary px-3 py-1.5 text-xs font-semibold text-primary-foreground transition-colors hover:bg-primary/90",children:n.cta}),(0,t.jsx)("button",{onClick:()=>{eG(e_,"1"),i(null)},"aria-label":n.dismiss,className:"shrink-0 rounded-full p-1 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:(0,t.jsx)(eO.X,{className:"h-4 w-4"})})]})})}function eV({children:e}){let a=function(){let e=(0,r.usePathname)(),t="/create-character"===e,a="/try-xotic-ai"===e||"/start"===e||"/start/unlock"===e||e.startsWith("/avatars/");if(!t)return a;let s="true"===(0,r.useSearchParams)().get("fullscreen");return t&&s||a}();return(0,t.jsx)(t.Fragment,{children:e(a)})}function eY({children:e}){let s=(0,r.usePathname)(),i="/create-character"===s,n="/try-xotic-ai"===s||"/start"===s||"/start/unlock"===s||s.startsWith("/avatars/");return i?(0,t.jsx)(a.Suspense,{fallback:(0,t.jsxs)("div",{className:"min-h-dvh overflow-hidden",children:[(0,t.jsx)(eP,{}),(0,t.jsx)(eu,{}),(0,t.jsx)(eH,{}),(0,t.jsx)(eB,{children:e})]}),children:(0,t.jsx)(eV,{children:r=>(0,t.jsxs)("div",{className:"min-h-dvh overflow-hidden",children:[!r&&(0,t.jsx)(eP,{}),!r&&(0,t.jsx)(eu,{}),!r&&(0,t.jsx)(eH,{}),!r&&(0,t.jsx)(ez,{}),(0,t.jsx)(eB,{isFullscreen:r,children:e})]})})}):(0,t.jsxs)("div",{className:"min-h-dvh overflow-hidden",children:[!n&&(0,t.jsx)(eP,{}),!n&&(0,t.jsx)(eu,{}),!n&&(0,t.jsx)(eH,{}),!n&&(0,t.jsx)(ez,{}),!n&&(0,t.jsx)(eX,{}),(0,t.jsx)(eB,{isFullscreen:n,children:e})]})}e.s(["ConditionalLayout",()=>eY],545546)}]);

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.