1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[439,97328],{439:(e,t,a)=>{"use strict";a.r(t),a.d(t,{teamsApi:()=>s,useCreateTeamMutation:()=>n,useGetTeamsQuery:()=>i});var r=a(61321),l=a(49973);let s=(0,r.xP)({reducerPath:"teamsApi",baseQuery:l.W,tagTypes:["Team"],endpoints:e=>({createTeam:e.mutation({query:e=>({url:"/teams",method:"POST",body:e}),invalidatesTags:["Team"],async onQueryStarted(e,t){let{dispatch:r,queryFulfilled:l}=t;try{await l,r((await Promise.resolve().then(a.bind(a,47089))).authSliceProxy.util.invalidateTags(["Me"]))}catch(e){}}}),getTeams:e.query({query:()=>({url:"/teams"}),providesTags:["Team"]})})}),{useCreateTeamMutation:n,useGetTeamsQuery:i}=s},32107:(e,t,a)=>{"use strict";a.d(t,{n:()=>i});var r=a(12115),l=a(77317),s=a(23083),n=a(47089);function i(){var e;let t=(0,l.wA)(),a=(0,l.d4)(s.mB),[i]=(0,n.useUpdateMeMutation)();return{isDismissed:!!(null==a||null==(e=a.custom_settings)?void 0:e.getting_started_dismissed),dismiss:(0,r.useCallback)(async()=>{if(!a)return;let e=a.custom_settings||{};try{let r=await i({user:{custom_settings:{...e,getting_started_dismissed:!0}}}).unwrap();r.user&&t((0,s.gV)({...a,...r.user,id:String(r.user.id)}))}catch(e){console.error("Failed to dismiss getting started:",e)}},[a,i,t])}}},36951:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var r=a(95155),l=a(12115);let s=e=>{let{src:t,alt:a="",className:s="",color:n,width:i,height:o}=e,[d,c]=l.useState(""),u=e=>{n&&e.setAttribute("fill",n),Array.from(e.children).forEach(e=>{u(e)})};return l.useEffect(()=>{(async()=>{try{let e=await fetch(t),a=await e.text(),r=new DOMParser().parseFromString(a,"image/svg+xml").documentElement;u(r),i&&r.setAttribute("width",i.toString()),o&&r.setAttribute("height",o.toString());let l=new XMLSerializer().serializeToString(r);c(l)}catch(e){console.error("Error loading SVG:",e)}})()},[t,n,i,o]),(0,r.jsx)("span",{className:s,dangerouslySetInnerHTML:{__html:d},role:"img","aria-label":a})}},59078:(e,t,a)=>{"use strict";a.d(t,{Y:()=>o,V:()=>i});var r=a(95155);a(12115);var l=a(91285),s=a(63892);let n=[{id:"view",label:"Can View",description:"View only, can't edit"},{id:"edit",label:"Can Edit",description:"Can view, comment and edit resources"}],i=e=>{let{selectedPermission:t,onPermissionChange:a,permissions:i=n,className:o="",triggerClassName:d="",contentClassName:c="",showDescription:u=!1,buttonStyle:m=!1,disabled:h=!1}=e,x=i.find(e=>e.id===t)||i[0],g=m?(0,r.jsxs)("button",{className:"flex items-center bg-gray-50 rounded-lg px-4 py-2 text-gray-700 ".concat(h?"cursor-not-allowed opacity-50":"cursor-pointer"," ").concat(d),disabled:h,children:[(0,r.jsx)("span",{className:"mr-2 text-sm font-medium",children:x.label}),(0,r.jsx)(s.A,{name:"ArrowDown",width:16,height:16,color:"#5D5D5D"})]}):(0,r.jsxs)("div",{className:"flex h-full items-center justify-between rounded-lg bg-gray-50 px-4 ".concat(d),children:[(0,r.jsx)("span",{className:"text-[#5D5D5D] text-sm font-medium",children:x.label}),(0,r.jsx)(s.A,{name:"ArrowDown",width:16,height:16,className:"ml-1",color:"#5D5D5D"})]});return h?(0,r.jsx)("div",{className:"".concat(m?"":"h-full w-[120px]"," ").concat(o),children:g}):(0,r.jsx)(l.Ay,{trigger:g,align:"end",contentClassName:"".concat(u?"w-48":"w-40"," ").concat(c),className:"".concat(m?"":"h-full w-[120px]"," ").concat(o),children:i.map(e=>(0,r.jsx)(l._2,{onClick:()=>a(e.id),selected:t===e.id,children:(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"font-medium",children:e.label}),u&&e.description&&(0,r.jsx)("div",{className:"text-xs text-gray-500",children:e.description})]})},e.id))})},o=e=>{let{id:t,value:a,onChange:l,placeholder:s="",label:n,className:o="",permissions:d,selectedPermission:c,onPermissionChange:u,disabled:m=!1,required:h=!1}=e;return(0,r.jsxs)("div",{className:"space-y-2",children:[n&&(0,r.jsx)("label",{htmlFor:t,className:"block text-sm font-medium text-gray-800",children:n}),(0,r.jsxs)("div",{className:"relative w-full",children:[(0,r.jsx)("input",{id:t,type:"text",placeholder:s,value:a,onChange:e=>l(e.target.value),disabled:m,required:h,className:"w-full h-10 rounded-lg border border-gray-200 bg-white px-3 py-2 pr-[130px] text-sm placeholder:text-gray-400 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 ".concat(o)}),(0,r.jsx)("div",{className:"absolute right-1 top-0 bottom-0 my-auto flex h-[calc(100%-4px)] items-center",children:(0,r.jsx)(i,{selectedPermission:c,onPermissionChange:u,permissions:d,disabled:m})})]})]})}},70760:()=>{},90854:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var r=a(77317),l=a(20063),s=a(23083);let n=()=>{let e=(0,r.wA)(),t=(0,l.useRouter)(),n=(0,r.d4)(s.mB);return{user:n,isAuthenticated:(0,r.d4)(s.Kc),login:a=>{e((0,s.gV)(a)),t.push("/")},logout:async()=>{try{if((await fetch("/api/auth/logout",{method:"POST",credentials:"include"})).ok){try{window.localStorage.removeItem("shelfy_last_user")}catch(e){}e((0,s.setCurrentCollection)(null));try{let{authSliceProxy:t}=await Promise.resolve().then(a.bind(a,47089));e(t.util.resetApiState())}catch(e){console.error("\uD83D\uDD34 LOGOUT: Failed to reset auth cache:",e)}e((0,s.ri)()),e((0,s.xW)(!0)),t.push("/"),t.refresh();try{e((await a.e(16105).then(a.bind(a,16105))).collectionsApi.util.invalidateTags(["Collections","Collection","CollectionResources"])),e((await a.e(42138).then(a.bind(a,42138))).linksApi.util.invalidateTags(["Link","SimilarTopic","Collection","Collections","Unsorted","AllResources","Favorites","ReadLater","MarkRead","Trash","Tag","Tags"])),e((await a.e(54232).then(a.bind(a,54232))).activitiesApi.util.invalidateTags(["AllActivities"])),e((await a.e(82992).then(a.bind(a,82992))).tagsApi.util.invalidateTags(["Tags","Tag"])),e((await a.e(72163).then(a.bind(a,72163))).searchApi.util.resetApiState()),e((await a.e(88846).then(a.bind(a,88846))).collaboratorsApi.util.invalidateTags(["Collection"])),e((await a.e(45532).then(a.bind(a,45532))).statsApi.util.invalidateTags(["Stats","Feedbacks"])),e((await a.e(439).then(a.bind(a,439))).teamsApi.util.invalidateTags(["Team"])),e((await a.e(36613).then(a.bind(a,36613))).commentsApi.util.invalidateTags(["Collection"])),e((await a.e(52773).then(a.bind(a,52773))).assistantApi.util.invalidateTags(["Chat","ChatMessage"])),e((await Promise.resolve().then(a.bind(a,35569))).apiSliceProxy.util.invalidateTags(["Resources"]))}
1catch(e){console.error("\uD83D\uDD34 LOGOUT: Failed to invalidate caches:",e)}}}catch(a){console.error("\uD83D\uDD34 LOGOUT: Logout failed:",a),e((0,s.setCurrentCollection)(null)),e((0,s.ri)()),e((0,s.xW)(!0)),t.push("/"),t.refresh()}}}}},97328:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>eP,t0:()=>eE,cL:()=>e_});var r=a(95155),l=a(12115),s=a(20063),n=a(67909),i=a(47089),o=a(52619),d=a.n(o),c=a(63892),u=a(26617),m=a(39068);let h=(0,l.memo)(function(e){var t,a,n,o;let{onToggle:h}=e,x=(0,s.usePathname)();(0,s.useRouter)();let{data:g}=(0,i.useGetMeQuery)(),p=null==g||null==(t=g.current_account)?void 0:t.plan,b=!p||"free"===p,f=Number(null==g||null==(a=g.user)?void 0:a.used_ai_credits)||0,v=Math.max(0,Math.round(Math.max(0,(Number(null==g||null==(n=g.user)?void 0:n.ai_plan_limit)||0)-f)+(Number(null==g||null==(o=g.user)?void 0:o.topup_credits_remaining)||0))),[y,j]=(0,l.useState)(!1),{toggleSidebar:w}=e_();(0,l.useEffect)(()=>{let e=()=>{j(window.innerWidth<1024)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);let k=null==x?void 0:x.startsWith("/collections/"),N=e=>{y&&h&&h()};return(0,r.jsxs)("div",{className:"bg-[#f9f9f9] dark:bg-gray-750 select-none pb-2 flex-shrink-0 border-t border-gray-200/50 dark:border-gray-700/50",children:[(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)(d(),{href:"/import-integrations",onClick:N,className:"h-[32px] sidebar-item select-none mx-[12px] rounded-[8px] py-1 hover:bg-[#ececec] dark:hover:bg-gray-600 flex justify-between ".concat("/import-integrations"!==x||k?"":"bg-[#ececec] dark:bg-gray-600"),children:(0,r.jsxs)("div",{className:"flex items-center px-[12px]",children:[(0,r.jsx)(u.A,{className:"text-[#5d5d5d] dark:text-gray-200",size:16}),(0,r.jsx)("span",{className:"text-gray-800 dark:text-gray-200 ml-[12px] font-medium text-sm",children:"Import & Integrations"})]})})}),(0,r.jsx)("div",{className:"mx-[12px] my-2 border-t border-gray-200/50 dark:border-gray-700/50"}),(0,r.jsxs)("div",{className:"flex items-center justify-between gap-1 mx-[12px] mt-2",children:[(0,r.jsx)(d(),{href:"/pricing-plans","aria-label":b?"Upgrade Plan":"Manage Plan",title:b?"Upgrade Plan":"Manage Plan",className:"h-[28px] px-3 flex items-center rounded-[6px] hover:bg-[#ececec] dark:hover:bg-gray-600 transition-colors flex-1",children:b?(0,r.jsx)("span",{className:"font-medium text-[13px] text-[#0D99FF]",children:"\uD83D\uDE80 Upgrade Plan"}):(0,r.jsxs)("span",{className:"font-medium text-[13px] text-[#0D99FF]",children:[(0,r.jsx)("span",{className:"capitalize",children:null==p?void 0:p.replace("_"," ")})," \xb7 ",(0,r.jsxs)("span",{children:[v," credits left"]})]})}),(0,r.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0",children:[(0,r.jsx)("a",{href:"https://chromewebstore.google.com/detail/fldjjikpamfnfleoleonpjglapbmemam?utm_source=item-share-cb",target:"_blank",rel:"noopener noreferrer","aria-label":"Chrome Extension",title:"Chrome Extension",className:"h-[28px] w-[28px] flex items-center justify-center rounded-[6px] hover:bg-[#ececec] dark:hover:bg-gray-600 transition-colors",children:(0,r.jsx)(m.A,{size:15,className:"text-[#5d5d5d] dark:text-gray-200"})}),(0,r.jsx)(d(),{href:"/archive","aria-label":"Archive",title:"Archive",onClick:N,className:"h-[28px] w-[28px] flex items-center justify-center rounded-[6px] hover:bg-[#ececec] dark:hover:bg-gray-600 transition-colors",children:(0,r.jsx)(c.A,{name:"Archive",width:16,height:16,className:"text-[#5d5d5d] dark:text-gray-200"})}),(0,r.jsx)("button",{onClick:w,"aria-label":"Toggle sidebar layout",title:"Toggle sidebar layout",className:"hidden lg:flex h-[28px] w-[28px] items-center justify-center rounded-[6px] hover:bg-[#ececec] dark:hover:bg-gray-600 transition-colors cursor-pointer",children:(0,r.jsx)(c.A,{name:"SidebarToggle",width:18,height:18,className:"text-[#5d5d5d] dark:text-gray-200"})})]})]})]})}),x=[{id:"home",label:"Home",iconName:"Home",iconOnly:!0},{id:"wiki",label:"Wiki",iconName:"Note"},{id:"ai-chats",label:"AI Chats",iconName:"Spark"},{id:"filters",label:"Filters",iconName:"Filters",iconOnly:!0}],g=(0,l.memo)(function(){let{activeSidebarTab:e,setActiveSidebarTab:t}=e_();return(0,r.jsx)("div",{className:"flex items-center gap-1 px-[12px] mt-[12px] mb-[20px]",role:"tablist","aria-label":"Sidebar sections",children:x.map(a=>{let l=e===a.id;return(0,r.jsxs)("button",{type:"button",role:"tab","aria-selected":l,"aria-label":a.iconOnly?a.label:void 0,title:a.iconOnly?a.label:void 0,onClick:()=>t(a.id),className:"h-[32px] flex items-center justify-center gap-2 rounded-[8px] curs
1or-pointer select-none focus:outline-none transition-colors\n ".concat(a.iconOnly?"px-2.5 flex-shrink-0":"flex-1 min-w-0 px-2","\n ").concat(l?"bg-[#ececec] dark:bg-gray-600":"hover:bg-[#ececec] dark:hover:bg-gray-600"),children:[(0,r.jsx)(c.A,{name:a.iconName,width:16,height:16,className:"text-[#5d5d5d] dark:text-gray-200 flex-shrink-0"}),!a.iconOnly&&(0,r.jsx)("span",{className:"text-gray-800 dark:text-gray-200 font-medium text-sm min-w-0 truncate",children:a.label})]},a.id)})})});var p=a(97545),b=a(32107);let f=[{key:"addResource",category:"Getting Started",title:"Adding Resources",description:"Save links, notes, files and images to your Shelfy"},{key:"collection",category:"Collections",title:"Using Collections",description:"Organize your resources into focused collections"},{key:"shuffles",category:"Feature",title:"What are Shuffles?",description:"Let AI auto-organize your resources into smart groups"},{key:"reminders",category:"Feature",title:"Reminders",description:"Set reminders on any resource so you never forget"},{key:"readingList",category:"Feature",title:"Reading List",description:"Track articles and long-form content to read later"},{key:"duplicates",category:"Feature",title:"Duplicates Finder",description:"Find and clean up duplicate resources automatically"},{key:"pinned",category:"Tips",title:"Pinned Resources",description:"Pin your most important resources to the top"}];function v(){var e,t;let[a,s]=(0,l.useState)(0),[n,i]=(0,l.useState)(null),{isDismissed:o,dismiss:d}=(0,b.n)(),c=f[a],u=f.length,m=null!=(t=null==(e=p.m[c.key].split("/embed/")[1])?void 0:e.split("?")[0])?t:null;return o?null:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"mx-3 mb-3 pb-1 select-none",children:[(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("div",{className:"absolute inset-x-3 top-2 bottom-0 rounded-xl bg-gray-200 dark:bg-gray-600 opacity-60"}),(0,r.jsx)("div",{className:"absolute inset-x-1.5 top-1 bottom-0 rounded-xl bg-gray-300 dark:bg-gray-500 opacity-40"}),(0,r.jsxs)("div",{className:"relative rounded-xl overflow-hidden cursor-pointer border border-gray-200 dark:border-gray-700/60 bg-white dark:bg-[#1A1A1A] shadow-xs",onClick:()=>i(c.key),children:[(0,r.jsxs)("div",{className:"px-3 pt-3 pb-1 flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("svg",{className:"w-3 h-3 text-yellow-500 dark:text-yellow-400 flex-shrink-0",fill:"currentColor",viewBox:"0 0 20 20",children:(0,r.jsx)("path",{d:"M10 1a.75.75 0 01.75.75V3a.75.75 0 01-1.5 0V1.75A.75.75 0 0110 1zM5.05 3.05a.75.75 0 011.06 0l.707.707a.75.75 0 01-1.06 1.06L5.05 4.11a.75.75 0 010-1.06zm9.9 0a.75.75 0 010 1.06l-.707.707a.75.75 0 01-1.06-1.06l.707-.707a.75.75 0 011.06 0zM10 5a5 5 0 100 10A5 5 0 0010 5zm-7 5a.75.75 0 000 1.5h1.25a.75.75 0 000-1.5H3zm13.75 0a.75.75 0 000 1.5H18a.75.75 0 000-1.5h-1.25zM5.757 14.243a.75.75 0 010 1.06l-.707.707a.75.75 0 01-1.06-1.06l.707-.707a.75.75 0 011.06 0zm9.9 1.06a.75.75 0 010-1.06l.707-.707a.75.75 0 011.06 1.06l-.707.707a.75.75 0 01-1.06 0zM10 15a.75.75 0 01.75.75V17a.75.75 0 01-1.5 0v-1.25A.75.75 0 0110 15z"})}),(0,r.jsx)("span",{className:"text-[10px] font-semibold text-gray-400 dark:text-gray-400 uppercase tracking-wider",children:c.category})]}),(0,r.jsx)("button",{onClick:e=>{e.stopPropagation(),d()},className:"flex-shrink-0 p-1 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors cursor-pointer rounded","aria-label":"Dismiss tutorials",children:(0,r.jsx)("svg",{width:"11",height:"11",viewBox:"0 0 14 14",fill:"none",children:(0,r.jsx)("path",{d:"M1 1l12 12M13 1L1 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),(0,r.jsx)("div",{className:"px-3 pb-2",children:(0,r.jsx)("h3",{className:"text-sm font-bold text-gray-900 dark:text-white leading-tight",children:c.title})}),(0,r.jsxs)("div",{className:"relative mx-3 mb-3 rounded-lg overflow-hidden aspect-video bg-gray-100 dark:bg-gray-800",children:[m&&(0,r.jsx)("img",{src:"https://img.youtube.com/vi/".concat(m,"/mqdefault.jpg"),alt:c.title,className:"w-full h-full object-cover"}),(0,r.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-black/25 hover:bg-black/15 transition-colors",children:(0,r.jsx)("div",{className:"w-9 h-9 rounded-full bg-white/90 flex items-center justify-center shadow-lg",children:(0,r.jsx)("svg",{className:"w-4 h-4 text-gray-900 ml-0.5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M8 5v14l11-7z"})})})})]}),(0,r.jsxs)("div",{className:"px-3 pb-3",children:[(0,r.jsx)("p",{className:"text-[11px] text-gray-500 dark:text-gray-400 leading-relaxed mb-2",children:c.description}),(0,r.jsx)("span",{className:"text-[11px] font-semibold text-[#0D99FF] hover:text-[#0B8AE0] transition-colors",children:"Watch Tutorial â"})]})]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between mt-2.5 px-0.5",children:[(0,r.jsx)("button",{onClick:e=>{e.stopPropagation(),s(e=>(e-1+u)%u)},className:"h-7 w-7 rounded-full bg-white dark:bg-gray-700 border border-gray-200 dark:border-gray-600 flex items-center justify-center hover:bg-gray-100 dark:hover:bg-gray-600 transition-colors cursor-pointer shadow-xs",children:(0,r.jsx)("svg",{className:"w-3.5 h-3.5 text-gray-600 dark:text-gray-300",fill:"none",stroke:"currentColor",strokeWidth:"2.5",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"})})}),(0,r.jsx)("div",{className:"flex items-center gap-1",children:f.map((e,t)=>(0,r.jsx)("button",{onClick:()=>s(t),className:"rounded-full transition-all duration-200 cursor-pointer ".concat(t===a?"w-4 h-1.5 bg-[#0D99FF]":"w-1.5 h-1.5 bg-gray-300 dark:bg-gray-600 hover:bg-gray-400 dark:hover:bg-gray-500")},t))}),(0,r.jsx)("button",{onClick:e=>{e.stopPropagation(),s(e=>(e+1)%u)},className:"h-7 w-7 rounded-full bg-white dark:bg-gray-700 border border-gray-200 dark:border-gray-600 flex items-center justify-center hover:bg-gray-100 dark:hover:bg-gray-600 transition-colors cursor-pointer shadow-xs",children:(0,r.jsx)("svg",{className:"w-3.5 h-3.5 text-gray-600 dark:text-gray-300",fill:"none",stroke:"currentColor",strokeWidth:"2.5",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})})]})]}),(0,r.jsx)(p.A,{isOpen:!!n,onClose:()=>i(null),videoUrl:n?p.m[n]:void 0})]})}var y=a(63958),j=a(65229),w=a(91285);let k=e=>{var t,a,s,n,i,o;let{user:d,size:c="sm"}=e,u="",m="";"sm"===c?(u="h-[30px] w-[30px]",m="text-md"):"md"===c?(u="w-[40px] h-[40p
1x]",m="text-2xl"):"lg"===c&&(u="w-20 h-20",m="text-4xl font-bold");let h=(null==d?void 0:d.name)?null==d||null==(s=d.name)||null==(a=s.trim())||null==(t=a.charAt(0))?void 0:t.toUpperCase():null==d||null==(o=d.email)||null==(i=o.trim())||null==(n=i.charAt(0))?void 0:n.toUpperCase(),[x,g]=l.useState(!1);return(0,r.jsx)("div",{className:"cursor-pointer ".concat(u," overflow-hidden items-center justify-center flex relative rounded-lg"),children:(null==d?void 0:d.avatar_url)?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"absolute inset-0 ".concat(x?"hidden":"block"),children:(0,r.jsx)("div",{className:"rounded-full h-full w-full justify-center items-center flex",style:{backgroundColor:"#fd6f8e"},children:(0,r.jsx)("h3",{className:"".concat(m," text-white font-bold"),children:h})})}),(0,r.jsx)("img",{className:"h-full w-full object-cover ".concat(x?"opacity-100":"opacity-0"," transition-opacity duration-200"),src:null==d?void 0:d.avatar_url,alt:(null==d?void 0:d.name)||(null==d?void 0:d.email),loading:"lazy",onLoad:()=>g(!0)})]}):(0,r.jsx)("div",{className:"rounded-lg h-full w-full justify-center items-center flex",style:{backgroundColor:"#0D99FF"},children:(0,r.jsx)("h3",{className:"".concat(m," text-white font-bold"),children:h})})})},N=e=>{var t,a,l,s,n,i,o,d,c;let{user:u,size:m=20}=e,h="".concat(m,"px"),x=(null==u||null==(l=u.name)||null==(a=l.trim())||null==(t=a.charAt(0))?void 0:t.toUpperCase())||(null==u||null==(i=u.first_name)||null==(n=i.trim())||null==(s=n.charAt(0))?void 0:s.toUpperCase())||(null==u||null==(c=u.email)||null==(d=c.trim())||null==(o=d.charAt(0))?void 0:o.toUpperCase())||"S";return(0,r.jsx)("div",{className:"flex-shrink-0 flex items-center justify-center overflow-hidden",style:{width:h,height:h,borderRadius:"2px"},children:(null==u?void 0:u.avatar_url)?(0,r.jsx)("img",{className:"w-full h-full object-cover transition-opacity duration-200",style:{borderRadius:"2px"},src:u.avatar_url,alt:u.name||u.email||"User Avatar",loading:"lazy"}):(0,r.jsx)("div",{className:"w-full h-full flex items-center justify-center text-white font-medium bg-gradient-to-br from-purple-400 to-blue-500",style:{fontSize:"".concat(.6*m,"px"),borderRadius:"2px"},children:x})})};var C=a(94994),A=a(20781),S=a(36951),T=a(59078),_=a(439),E=a(79933);let P=[{id:"view",label:"Can View"},{id:"edit",label:"Can Edit"}],D=e=>{let{isOpen:t,onClose:a,onSuccess:s}=e,[n,i]=(0,l.useState)(""),[o,d]=(0,l.useState)(""),[c,u]=(0,l.useState)(P[0].id),[m,h]=(0,l.useState)(null),[x,g]=(0,l.useState)(""),[p,b]=(0,l.useState)(!1);(0,l.useRef)(null);let[f]=(0,_.useCreateTeamMutation)(),{toast:v}=(0,E.dj)(),y=async()=>{if(!n.trim())return void v({variant:"destructive",title:"Team name required",description:"Please enter a team name."});let e=o.split(",").map(e=>e.trim()).filter(e=>e.length>0);if(e.length>0){let t=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,a=e.filter(e=>!t.test(e));if(a.length>0)return void v({variant:"destructive",title:"Invalid email addresses",description:"Please check: ".concat(a.join(", "))})}b(!0);try{let t={name:n.trim(),emails:e};if(m){let e=await new Promise((e,t)=>{let a=new FileReader;a.readAsDataURL(m),a.onload=()=>e(a.result),a.onerror=e=>t(e)});t.logo_name=m.name,t.logo_data=e}await f(t).unwrap(),v({title:"Team created successfully",description:e.length>0?'Team "'.concat(n,'" has been created with ').concat(e.length," member(s)."):'Team "'.concat(n,'" has been created.')}),i(""),d(""),h(null),g(""),u(P[0].id),null==s||s(),a()}catch(e){var t;console.error("Failed to create team:",e),v({variant:"destructive",title:"Error creating team",description:(null==e||null==(t=e.data)?void 0:t.message)||"Failed to create team. Please try again."})}finally{b(!1)}};P.find(e=>e.id===c)||P[0];let j=(0,r.jsxs)("div",{className:"flex items-center justify-between space-x-3",children:[(0,r.jsx)(A.$,{onClick:a,size:"md",variant:"dark",disabled:p,className:"min-w-[100px] min-w-[66] h-[40p
1x]",children:"Cancel"}),(0,r.jsx)(A.$,{variant:"black",onClick:y,className:"min-w-[100px] min-w-[66] h-[40px]",disabled:!0,size:"md",children:p?"Creating...":"Create Team"})]});return S.A,(0,r.jsx)(C.A,{isOpen:t,onClose:a,title:"Create a new team (Coming Soon)",footerContent:j,size:"xl",className:"p-6",children:(0,r.jsx)("form",{onSubmit:e=>{e.preventDefault(),y()},children:(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("label",{htmlFor:"team-name",className:"block text-sm font-medium text-gray-800",children:"Team Name"}),(0,r.jsx)("input",{id:"team-name",type:"text",placeholder:"OpenAI, Anthropic, Google, etc...",value:n,onChange:e=>i(e.target.value),required:!0,className:"flex h-10 w-full rounded-lg border border-gray-200 bg-white px-3 py-2 text-sm placeholder:text-gray-400 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50"})]}),(0,r.jsx)(T.Y,{id:"team-members",label:"Team Members",placeholder:"Add member emails, comma separated...",value:o,onChange:d,permissions:P,selectedPermission:c,onPermissionChange:u})]})})})};var R=a(90854),F=a(77317),M=a(23083);let L=()=>console.log("Get Apps"),O=e=>{var t,a,n,o,d;let{user:u}=e,m=(0,s.useRouter)(),h=(0,F.wA)(),{logout:x}=(0,R.A)(),{openSettings:g}=eE(),{toast:p}=(0,E.dj)(),[b,{isLoading:f}]=(0,i.useSwitchAccountMutation)(),{data:v,isLoading:y,isFetching:j}=(0,i.useGetMeQuery)(),C=(null==v?void 0:v.teams)||[],A=null==v?void 0:v.current_account,S=j||f,[T,_]=(0,l.useState)(!1),P=async e=>{try{if("personal"===e)await b({account:"personal",team_id:null}).unwrap(),h((0,M.ci)("personal")),m.push("/"),p({title:"Switched to Personal Account",description:"You are now using your personal account. Collections and data are being refreshed..."});else{await b({account:"team",team_id:Number(e)}).unwrap(),h((0,M.ci)("team")),m.push("/");let t=C.find(t=>t.id===Number(e));p({title:"Switched to Team Account",description:"You are now using ".concat((null==t?void 0:t.name)||"the team"," account. Collections and data are being refreshed...")})}}catch(e){var t;console.error("Failed to switch account:",e),p({variant:"destructive",title:"Error switching account",description:(null==e||null==(t=e.data)?void 0:t.message)||"Failed to switch account. Please try again."})}},O=(null==A?void 0:A.account_type)==="team"&&(null==A?void 0:A.team)?A.team.name:u.first_name?"".concat(u.first_name," ").concat(u.last_name):u.email;(null==A?void 0:A.account_type)==="team"&&(null==A||null==(t=A.team)?void 0:t.logo_data)&&(A.team.logo_data,A.team.name);let U=(0,r.jsxs)("div",{className:"flex items-center select-none cursor-pointer min-w-0 max flex-1 overflow-hidden p-1.5 hover:bg-[#ECECEC] dark:hover:bg-gray-600 data-[state=open]:bg-[#ECECEC] dark:data-[state=open]:bg-gray-700 rounded-md",children:[(0,r.jsx)("div",{className:"user-thumb flex-shrink-0",children:(null==A?void 0:A.account_type)==="team"&&(null==A||null==(a=A.team)?void 0:a.logo_data)?(0,r.jsx)("img",{src:A.team.logo_data,alt:A.team.name,className:"w-8 h-8 rounded object-cover"}):(0,r.jsx)(k,{user:u,size:"sm"})}),(0,r.jsxs)("div",{className:"flex items-center min-w-0 flex-1 overflow-hidden ml-3",children:[(0,r.jsx)("span",{className:"text-sm font-semibold text-gray-900 dark:text-gray-200 truncate block",children:O}),(0,r.jsx)("div",{className:"ml-2 text-[#6B7280] dark:text-gray-400",children:(0,r.jsx)(c.A,{name:"ArrowDown",width:16,height:16})})]})]});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(w.Ay,{trigger:U,align:"start",contentClassName:"w-[270px]",children:[(0,r.jsxs)("div",{className:"px-3 py-2.5 flex items-center gap-3",children:[(null==A?void 0:A.account_type)==="team"&&(null==A||null==(n=A.team)?void 0:n.logo_data)?(0,r.jsx)("img",{src:A.team.logo_data,alt:A.team.name,className:"w-10 h-10 rounded object-cover"}):(0,r.jsx)(k,{user:u,size:"md"}),(0,r.jsxs)("div",{className:"overflow-hidden",children:[(0,r.jsx)("div",{className:"text-sm font-semibold text-gray-900 dark:text-gray-200 truncate",children:(null==A?void 0:A.account_type)==="team"&&(null==A?void 0:A.team)?A.team.name:"Personal - ".concat(u.first_name," ").concat(u.last_name)}),(0,r.jsx)("div",{className:"text-xs font-medium text-[#5D5D5D] dark:text-gray-400 truncate",children:(null==A?void 0:A.account_type)==="team"?(null==A?void 0:A.plan)==="pro_agent"?"Team Account - Pro Agent":(null==A?void 0:A.plan)==="pro"?"Team Account - Pro":"Team Account - Free":(null==A?void 0:A.plan)==="pro_agent"?"Personal Account - Pro Agent":(null==A?void 0:A.plan)==="pro"?"Personal Account - Pro":"Personal Account - Free"})]})]}),(0,r.jsx)("div",{className:"px-3 pb-2 text-sm font-semibold text-[#5D5D5D] dark:text-gray-400 truncate",children:u.email}),(0,r.jsxs)("div",{className:"px-1 py-1",children:[S&&(0,r.jsx)("div",{className:"px-3 py-2 text-center border-b border-gray-100 mb-2",children:(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,r.jsx)("div",{className:"w-3 h-3 border border-gray-300 border-t-blue-500 rounded-full animate-spin"}),(0,r.jsx)("span",{className:"text-xs text-gray-600",children:f?"
1Switching account...":"Refreshing data..."})]})}),(0,r.jsxs)(w._2,{selected:(null==A?void 0:A.account_type)==="personal",onClick:()=>P("personal"),disabled:f,className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 overflow-hidden",children:[(0,r.jsx)(N,{user:u,size:20}),(0,r.jsxs)("span",{className:"truncate",children:["Personal - ",u.first_name||(null==(o=u.email)?void 0:o.split("@")[0])||"User"]})]}),(null==A?void 0:A.account_type)==="personal"&&(0,r.jsx)(c.A,{name:"Check",width:12,height:12,color:"#4B5563"})]}),C.map(e=>{var t,a;return(0,r.jsxs)(w._2,{selected:(null==A||null==(t=A.team)?void 0:t.id)===e.id,onClick:()=>P(e.id),disabled:f,className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 overflow-hidden",children:[e.logo_data?(0,r.jsx)("img",{src:e.logo_data,alt:e.name,className:"w-5 h-5 rounded object-cover"}):(0,r.jsx)(N,{user:{},size:20}),(0,r.jsx)("span",{className:"truncate",children:e.name})]}),(null==A||null==(a=A.team)?void 0:a.id)===e.id&&(0,r.jsx)(c.A,{name:"Check",width:12,height:12,color:"#4B5563"})]},e.id)}),(0,r.jsxs)(w._2,{onClick:()=>_(!0),className:"flex items-center gap-2 hover:bg-gray-50 rounded-lg",children:[(0,r.jsx)(c.A,{name:"PlusSmall",width:16,height:16,color:"#4B5563"}),(0,r.jsx)("span",{className:"truncate",children:"Create New Team"})]})]}),(0,r.jsx)("div",{className:"border-t border-gray-100 dark:border-gray-700 my-1 mx-1"})," ",(0,r.jsx)("div",{className:"px-1 py-1",children:(0,r.jsxs)(w._2,{onClick:()=>{g((null==A?void 0:A.account_type)==="team"?"general":"profile")},className:"flex items-center gap-2",children:[(0,r.jsx)(c.A,{name:"Settings",width:16,height:16,color:"#4B5563"}),(0,r.jsx)("span",{className:"truncate",children:"Settings"})]})}),(0,r.jsx)("div",{className:"border-t border-gray-100 dark:border-gray-700 my-1 mx-1"})," ",(0,r.jsxs)("div",{className:"px-1 py-1",children:[(0,r.jsx)(w._2,{onClick:()=>m.push("/import-integrations"),className:"text-gray-800",children:(0,r.jsx)("span",{className:"truncate",children:"Import & Integrations"})}),(0,r.jsx)(w._2,{onClick:()=>window.open("https://chromewebstore.google.com/detail/fldjjikpamfnfleoleonpjglapbmemam?utm_source=item-share-cb","_blank"),className:"text-gray-800",children:(0,r.jsx)("span",{className:"truncate",children:"Get Chrome Extension"})}),(0,r.jsx)(w._2,{onClick:L,className:"text-gray-800",children:(0,r.jsx)("span",{className:"truncate",children:"Get Mobile Apps (Soon)"})}),(0,r.jsxs)(w._2,{onClick:()=>m.push("/pricing-plans"),className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"truncate font-medium bg-gradient-to-r from-cyan-500 to-blue-600 bg-clip-text text-transparent",children:(null==v||null==(d=v.current_account)?void 0:d.plan)==="pro_agent"?"Change Plan":"Upgrade Plan"}),(0,r.jsx)("span",{className:"flex-shrink-0",children:"\uD83D\uDE80"})]})]}),(0,r.jsx)("div",{className:"border-t border-gray-100 dark:border-gray-700 my-1 mx-1"})," ",(0,r.jsx)("div",{className:"px-1 py-1",children:(0,r.jsx)(w._2,{onClick:x,className:"text-red-600",children:(0,r.jsx)("span",{className:"truncate",children:"Log Out"})})})]}),(0,r.jsx)(D,{isOpen:T,onClose:()=>{_(!1)},onSuccess:()=>{}})]})};var U=a(6191),z=a(83242),W=a(74729),G=a(71405),V=a(34633),I=a(92095),B=a(42138),H=a(16105),q=a(12279),Y=a(86389),Q=a(2225),K=a(77963),$=a(94254);function J(e){let{onToggle:t}=e,[a,n]=(0,l.useState)(!1),[i,o]=(0,l.useState)(!1),[d,u]=(0,l.useState)(!1),[m,h]=(0,l.useState)(!1),[x,g]=(0,l.useState)(!1),[p,b]=(0,l.useState)(null),[f,v]=(0,l.useState)(null),[y,j]=(0,l.useState)([]),[k,N]=(0,l.useState)(!1),C=(0,s.useRouter)(),A=(0,F.wA)(),[S]=(0,B.useAddLinkMutation)(),{subscribeToResource:T}=(0,q.h)(),{toast:_}=(0,E.dj)(),{storageLimitMB:P,isFreePlan:D}=(0,Q.r)(),[R,M]=(0,l.useState)("voice_note"),{uploadFiles:L,showUpgradeModal:O,setShowUpgradeModal:J}=(0,K.l)(null),X=()=>{window.innerWidth<1024&&t&&t()},Z=async(e,t,a)=>{try{var r,l;let s=null;a&&"unsorted"!==a&&(s=parseInt(a,10));let n=await S({url:e,comment:t,collection_id:s,kind:"url"}).unwrap();(null==n||null==(r=n.data)?void 0:r.id)&&T(n.data.id);let i=(null==n||null==(l=n.data)?void 0:l.collection_id)||s;
1A(H.collectionsApi.util.invalidateTags([{type:"CollectionResources",id:String(i)},{type:"Collection",id:String(i)},"CollectionResources","AllResources","Unsorted"])),_({title:"Resource added",description:"Your link has been added successfully"}),X()}catch(e){console.error("Failed to add link:",e),_({variant:"destructive",title:"Error",description:"Failed to add link. Please try again."})}},ee=async e=>{let t=(0,$.AL)(e);if(t)return void _({variant:"destructive",title:"Voice note rejected",description:t});b(e),o(!1),u(!0),v(new Promise((t,a)=>{let r=new FileReader;r.onload=async e=>{var r,l;let s=null==(r=e.target)?void 0:r.result;if(s)try{let e=(0,$.ot)(s);if(e)return void a(Error(e));let r="voice-note-".concat(Date.now(),".webm"),n=await S({file_data:s,file_name:r,collection_id:null,kind:"voice_note"}).unwrap();(null==n||null==(l=n.data)?void 0:l.id)&&setTimeout(()=>{T(n.data.id)},100),A(H.collectionsApi.util.invalidateTags(["CollectionResources","AllResources","Unsorted"])),_({title:"Voice note saved",description:"Your voice note has been saved successfully"}),X(),t()}catch(e){console.error("Voice note upload failed:",e),_({variant:"destructive",title:"Upload failed",description:"Failed to save voice note. Please try again."}),a(e)}else a(Error("Failed to read audio data"))},r.onerror=()=>a(Error("Failed to read audio file")),r.readAsDataURL(e)}))},et=()=>{u(!1),b(null)},ea=[{label:"URL",icon:"Link",onClick:()=>{n(!0)},shortcut:"undefined"!=typeof navigator&&navigator.platform.toUpperCase().includes("MAC")?"âJ":"Ctrl+J"},{label:"Upload",icon:"Upload",onClick:()=>{let e=document.getElementById("sidebar-add-resource-file-input");e&&e.click()}},{label:"Text Note",icon:"Note",onClick:()=>{C.push("/notes/new"),X()}},{label:"Voice Note",icon:"VoiceNote",onClick:()=>{D?(M("voice_note"),g(!0)):o(!0)}}];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(w.Ay,{trigger:(0,r.jsx)("div",{role:"button",tabIndex:0,"aria-label":"Add Resource",title:"Add Resource",className:"cursor-pointer rounded-md hover:bg-[#ECECEC] dark:hover:bg-gray-600 transition-colors h-[42px] w-[42px] flex items-center justify-center",children:(0,r.jsx)("span",{className:"text-[#5D5D5D] dark:text-gray-400",children:(0,r.jsx)(U.A,{size:22,strokeWidth:1.5})})}),children:[ea.map(e=>(0,r.jsxs)(w._2,{onClick:e.onClick,className:"flex items-center gap-3",children:[(0,r.jsx)("span",{className:"text-[#5D5D5D] dark:text-gray-200",children:(0,r.jsx)(c.A,{name:e.icon,width:20,height:20})}),(0,r.jsx)("span",{className:"font-medium text-sm flex-1",children:e.label}),e.shortcut&&(0,r.jsx)("span",{className:"text-xs text-gray-400 dark:text-gray-500 ml-auto",children:e.shortcut})]},e.label)),(0,r.jsxs)(w._2,{onClick:()=>{h(!0)},className:"flex items-center gap-3",children:[(0,r.jsx)("span",{className:"text-[#5D5D5D] dark:text-gray-200",children:(0,r.jsx)(c.A,{name:"Folderblue",width:20,height:20})}),(0,r.jsx)("span",{className:"font-medium text-sm",children:"Add Collection"})]}),(0,r.jsx)(w.mB,{className:"bg-gray-100 dark:bg-gray-600"}),(0,r.jsxs)(w._2,{onClick:()=>C.push("/ai-chats"),className:"flex items-center gap-3",children:[(0,r.jsx)("span",{className:"text-[#5D5D5D] dark:text-gray-200",children:(0,r.jsx)(c.A,{name:"Spark",width:20,height:20})}),(0,r.jsx)("span",{className:"font-medium text-sm",children:"New AI Chat"})]})]}),(0,r.jsx)(z.default,{isOpen:a,onClose:()=>n(!1),onSave:Z,currentCollectionId:void 0}),(0,r.jsx)("input",{type:"file",id:"sidebar-add-resource-file-input",className:"hidden",onChange:e=>{let t=Array.from(e.target.files||[]);0!==t.length&&(j(t),N(!0),e.target.value="")},multiple:!0}),(0,r.jsx)(W.default,{isOpen:i,onClose:()=>{o(!1)},onSave:ee}),(0,r.jsx)(G.default,{isOpen:d,onClose:et,onComplete:et,audioBlob:p,uploadPromise:f}),(0,r.jsx)(I.n,{isOpen:k,onClose:()=>{N(!1),j([])},onSelect:e=>{N(!1),0!==y.length&&(L(y,e.id),_({title:1===y.length?"Uploading file":"Uploading ".concat(y.length," files"),description:"Adding to ".concat(e.title||e.name||"Unsorted")}),j([]),X())}}),(0,r.jsx)(Y.UpgradeModal,{isOpen:O,onClose:()=>J(!1),featureName:"More Storage",featureDescription:"Upgrade your plan to get more storage space for file uploads."}),(0,r.jsx)(V.A,{isOpen:m,onClose:()=>h(!1)}),(0,r.jsx)(Y.UpgradeModal,{isOpen:x,onClose:()=>g(!1),featureName:"storage"===R?"More Storage":"Voice Note",featureDescription:"storage"===R?"You've used ".concat(P,"MB of storage on your free plan. Upgrade to get more space."):"Available in Pro. Please upgrade to access voice notes"})]})}let X=l.memo(e=>{let{user:t,isLoading:a,onToggle:l,onSidebarToggle:n,showBorder:i=!1}=e,o=(0,s.useRouter)();return(0,r.jsx)("div",{className:"sidebar-header select-none ".concat(i?"border-b border-gray-200/50 dark:border-gray-700/50 shadow-xs":""),children:(0,r.jsx)("div",{className:"flex items-center pb-1 -left-1.5 relative",children:(e=>null!==e&&!!(e.first_name||e.email))(t)?(0,r.jsxs)("div",{className:"flex justify-between w-full min-w-0",children:[(0,r.jsx)("div",{className:"flex items-center min-w-0 flex-1 overflow-hidden",children:a?(0,r.jsxs)("div",{className:"flex items-center w-full",children:[(0,r.jsx)(y.A,{circle:!0,className:"w-[24px] h-[24px] flex-shrink-0"}),(0,r.jsx)("div",{className:"ml-2.5 flex-1",children:(0,r.jsx)(y.A,{className:"h-[20px]"})})]}):(0,r.jsx)(O,{user:t})}),(0,r.jsxs)("div",{className:"flex items-center ml-auto relative left-2",children:[(0,r.jsx)("button",{className:"cursor-pointer rounded-md hover:bg-[#
1ECECEC] dark:hover:bg-gray-600 transition-colors h-[42px] w-[42px] flex items-center justify-center","aria-label":"Search",onClick:()=>{o.push("/search")},children:(0,r.jsx)("span",{className:"text-[#5D5D5D] dark:text-gray-400",children:(0,r.jsx)(c.A,{name:"Search",width:18,height:18})})}),(0,r.jsx)(J,{onToggle:l}),(0,r.jsx)("button",{onClick:l,className:"lg:hidden hover:bg-[#ECECEC] dark:hover:bg-gray-600 rounded-md transition-colors flex-shrink-0 h-[42px] w-[42px] flex items-center justify-center",children:(0,r.jsx)(j.A,{size:"1em",className:"text-gray-500 dark:text-gray-400"})})]})]}):(0,r.jsxs)("div",{className:"flex justify-between w-full",children:[(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("div",{className:"flex items-center select-none",children:(0,r.jsxs)("a",{href:"/",className:"text-black-900 dark:text-white font-bold text-sm flex",children:[(0,r.jsx)("div",{className:"shelfy-logo-filled w-[25px] h-[25px]"}),(0,r.jsx)("p",{className:"text-blue-600 dark:text-blue-400 ml-2 mt-0.5 font-lg",children:"Shelfy.so"})]})})}),(0,r.jsx)("div",{className:"flex items-center ml-auto relative left-2",children:(0,r.jsx)("button",{className:"cursor-pointer rounded-md hover:bg-[#ECECEC] dark:hover:bg-gray-600 transition-colors h-[42px] w-[42px] flex items-center justify-center","aria-label":"Search",onClick:()=>{null==l||l(),o.push("/search")},children:(0,r.jsx)("span",{className:"text-[#5D5D5D] dark:text-gray-400",children:(0,r.jsx)(c.A,{name:"Search",width:18,height:18})})})})]})})})});a(70760);let Z=(0,n.default)(()=>Promise.all([a.e(30863),a.e(70595),a.e(16119),a.e(3324)]).then(a.bind(a,3324)),{loadableGenerated:{webpack:()=>[3324]},ssr:!1}),ee=(0,n.default)(()=>a.e(66616).then(a.bind(a,66616)).then(e=>e.FiltersSection),{loadableGenerated:{webpack:()=>[66616]},ssr:!1}),et=(0,n.default)(()=>a.e(8806).then(a.bind(a,8806)).then(e=>e.CustomFiltersSection),{loadableGenerated:{webpack:()=>[8806]},ssr:!1}),ea=(0,n.default)(()=>a.e(8710).then(a.bind(a,8710)).then(e=>e.TagsSection),{loadableGenerated:{webpack:()=>[8710]},ssr:!1}),er=(0,n.default)(()=>a.e(9003).then(a.bind(a,9003)).then(e=>e.TopicsSection),{loadableGenerated:{webpack:()=>[9003]},ssr:!1}),el=(0,n.default)(()=>a.e(94419).then(a.bind(a,94419)).then(e=>e.WikiSection),{loadableGenerated:{webpack:()=>[94419]},ssr:!1}),es=(0,n.default)(()=>a.e(93600).then(a.bind(a,93600)).then(e=>e.ChatHistorySection),{loadableGenerated:{webpack:()=>[93600]},ssr:!1}),en=["/login","/register","/privacy","/terms","/landing","/reset-password","/invitations"],ei=(0,l.memo)(function(e){let{onToggle:t,onSidebarToggle:a}=e,{user:n,isLoading:o}=(()=>{let e,t=(e=(0,s.usePathname)(),en.some(t=>e===t||e.startsWith("".concat(t,"/")))),{data:a,isLoading:r}=(0,i.useGetMeQuery)(void 0,{skip:t});return{user:(null==a?void 0:a.user)||null,isLoading:r}})(),{activeSidebarTab:d}=e_(),[u,m]=(0,l.useState)({[d]:!0}),x=(0,l.useRef)(null),p=(0,l.useRef)(null),b=(0,l.useRef)(null),f=(0,l.useRef)(null),[y,j]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{m(e=>e[d]?e:{...e,[d]:!0})},[d]),(0,l.useEffect)(()=>{let e={home:x,wiki:p,"ai-chats":b,filters:f}[d].current;if(!e)return;let t=()=>j(e.scrollTop>10);return t(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)},[d]),(0,r.jsxs)("aside",{className:"sidebar h-[100dvh] w-full flex flex-col z-200 cursor-default select-none border-r border-gray-200/50 dark:border-gray-700/50 bg-[#f9f9f9] dark:bg-gray-750",style:{WebkitTapHighlightColor:"transparent"},"aria-label":"Main navigation",children:[(0,r.jsx)(X,{user:n,isLoading:o,onToggle:t,onSidebarToggle:a,showBorder:y}),(0,r.jsx)(g,{}),(0,r.jsxs)("div",{className:"flex flex-col flex-1 relative min-h-0",children:[(0,r.jsx)("nav",{ref:x,hidden:"home"!==d,className:"flex-1 overflow-y-auto overflow-x-hidden","aria-label":"Home sidebar panel",children:u.home&&(0,r.jsx)(Z,{onToggle:t,scrollRef:x})}),u.wiki&&(0,r.jsxs)("nav",{ref:p,hidden:"wiki"!==d,className:"flex-1 overflow-y-auto overflow-x-hidden","aria-label":"Wiki sidebar panel",children:[(0,r.jsxs)("div",{className:"sidebar-top flex-shrink-0",children:[(0,r.jsxs)("div",{"aria-disabled":"true",className:"h-[32px] sidebar-item select-none mx-[12px] rounded-[8px] py-1 flex justify-between opacity-70 cursor-not-allowed",title:"Coming soon",children:[(0,r.jsxs)("div",{className:"flex items-center px-[12px]",children:[(0,r.jsx)(c.A,{name:"Shuffle",width:16,height:16,className:"text-[#5d5d5d] dark:text-gray-200"}),(0,r.jsx)("span",{className:"text-gray-800 dark:text-gray-200 ml-[12px] font-medium text-sm",children:"Graph"})]}),(0,r.jsx)("div",{className:"flex items-center pr-[12px]",children:(0,r.jsx)("span",{className:"bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-300 text-xs px-1.5 py-0.5 rounded-[6px] font-medium",children:"Soon"})})]}),(0,r.jsx)("div",{className:"mx-5 mt-2.5 mb-2"})]}),(0,r.jsxs)("div",{className:"pb-4",children:[(0,r.jsx)(er,{onToggle:t}),(0,r.jsx)(el,{onToggle:t})]})]}),u["ai-chats"]&&(0,r.jsx)("nav",{ref:b,hidden:"ai-chats"!==d,className:"flex-1 overflow-y-auto overflow-x-hidden","aria-label":"AI Chats sidebar panel",children:(0,r.jsx)(es,{onToggle:t})}),u.filters&&(0,r.jsxs)("nav",{ref:f,hidden:"filters"!==d,className:"flex-1 overflow-y-auto overflow-x-hidden","aria-label":"Filters sidebar panel",children:[(0,r.jsx)(ee,{onToggle:t}),(0,r.jsxs)("div",{className:"pb-4",children:[(0,r.jsx)(ea,{onToggle:t}),(0,r.jsx)(et,{onToggle:t})]})]}),(0,r.jsx)(v,{}),(0,r.jsx)(h,{onToggle:t})]})]})});function eo(e){let{isOpen:t,onToggle:a,width:s,onWidthChange:n,isModalOpen:i}=e,o=(0,l.useRef)(null),{isSettingsOpen:d}=eE(),[c,u]=(0,l.useState)(!1),[m,h]=(0,l.useState)(!1),[x,g]=(0,l.useState)(!1),{handleResizeStart:p,localW
1idth:b}=(e=>{let{onWidthChange:t,minWidth:a=230,maxWidth:r=500}=e,s=(0,l.useRef)(!1),n=(0,l.useRef)(null),i=(0,l.useRef)(0),o=(0,l.useRef)(null),[d,c]=(0,l.useState)(null),u=(0,l.useCallback)(e=>{if(!s.current)return;let l=e.clientX;if(l>=a&&l<=r){o.current=l,c(l),n.current&&cancelAnimationFrame(n.current);let e=Date.now();e-i.current>=16?(i.current=e,t(l)):n.current=requestAnimationFrame(()=>{null!==o.current&&(t(o.current),i.current=Date.now())})}},[t,a,r]),m=(0,l.useCallback)(()=>{s.current=!1,document.body.style.cursor="default",null!==o.current&&(t(o.current),o.current=null),c(null),n.current&&(cancelAnimationFrame(n.current),n.current=null)},[t]),h=(0,l.useCallback)(e=>{e.preventDefault(),s.current=!0,document.body.style.cursor="ew-resize"},[]);return(0,l.useEffect)(()=>(document.addEventListener("mousemove",u),document.addEventListener("mouseup",m),()=>{document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",m)}),[u,m]),{handleResizeStart:h,isResizing:s.current,localWidth:d}})({onWidthChange:n,minWidth:230,maxWidth:500});(0,l.useEffect)(()=>{h(!0);let e=()=>{u(window.innerWidth<1024)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),(0,l.useEffect)(()=>{if(c&&t){let e=window.scrollY;return document.body.style.position="fixed",document.body.style.top="-".concat(e,"px"),document.body.style.width="100%",document.body.style.overflow="hidden",()=>{document.body.style.position="",document.body.style.top="",document.body.style.width="",document.body.style.overflow="",window.scrollTo(0,e)}}},[c,t]);let f=(0,l.useCallback)(()=>{a()},[a]),v=(t||x)&&!d&&!i;return m&&c?(0,r.jsxs)(r.Fragment,{children:[t&&(0,r.jsx)("div",{className:"fixed inset-0 bg-black/30 backdrop-blur-sm z-[60] transition-all duration-300 ease-in-out",onClick:a}),(0,r.jsx)("div",{ref:o,className:"fixed top-0 left-0 h-full z-[70] bg-white/95 dark:bg-gray-900/95 backdrop-blur-xl border-r border-gray-200/50 dark:border-gray-700/50 shadow-xl transition-all duration-300 ease-in-out ".concat(t?"transform translate-x-0 opacity-100":"transform -translate-x-full opacity-0"),style:{width:"88vw",maxWidth:"360px"},children:(0,r.jsx)("div",{className:"h-full bg-[#f9f9f9]/95 dark:bg-gray-900/95 backdrop-blur-xl",children:(0,r.jsx)(ei,{onToggle:a,onSidebarToggle:f})})})]}):(0,r.jsxs)("div",{ref:o,className:"h-full flex-shrink-0 relative bg-[#f9f9f9] dark:bg-gray-750 ".concat(x?"":"transition-all duration-300 ease-in-out"," ").concat(t?"w-[320px]":"w-0"),style:{width:t?null!==b?b:s:0,overflow:"visible",pointerEvents:x?"none":"auto"},children:[(0,r.jsx)("div",{className:"h-full overflow-hidden",style:{width:"100%",pointerEvents:"auto"},children:(0,r.jsx)(ei,{onToggle:a,onSidebarToggle:f})}),v&&(0,r.jsx)("div",{className:"absolute -right-1 top-0 h-full w-2 cursor-ew-resize group",style:{zIndex:10},onMouseDown:e=>{g(!0),p(e);let t=()=>{g(!1),document.removeEventListener("mouseup",t)};document.addEventListener("mouseup",t)},children:(0,r.jsx)("div",{className:"absolute left-0 top-0 h-full w-1 bg-transparent group-hover:bg-[#0D99FF] group-hover:opacity-50 transition-all duration-200"})})]})}function ed(e){let{onMenuClick:t,onSearchClick:a,onAddClick:l,onAssistantClick:n,onNotificationsClick:i,onProfileClick:o,isHidden:d=!1}=e,u=(0,s.useRouter)();return(0,r.jsx)("div",{className:"fixed bottom-0 left-0 right-0 bg-white dark:bg-gray-600 border-t border-gray-200 dark:border-gray-700 lg:hidden z-50 transition-transform duration-300 ".concat(d?"translate-y-full":"translate-y-0"),children:(0,r.jsxs)("div",{className:"flex items-center justify-around h-12 px-4",children:[(0,r.jsx)("button",{onClick:t,className:"flex flex-col items-center justify-center p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors","aria-label":"Menu",children:(0,r.jsx)(c.A,{name:"Menu",width:22,height:22,className:"text-gray-700 dark:text-gray-100"})}),(0,r.jsx)("button",{onClick:l,className:"flex flex-col items-center justify-center p-1.5 rounded-lg bg-gray-200 dark:bg-gray-700 hover:bg-gray-300 dark:hover:bg-gray-800 transition-colors","aria-label":"Add",children:(0,r.jsx)(c.A,{name:"PlusSmall",width:22,height:22,className:"text-gray-700 dark:text-gray-100"})}),(0,r.jsx)("button",{onClick:()=>{null==a||a(),u.push("/search")},className:"flex flex-col items-center justify-center p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors","aria-label":"Search",children:(0,r.jsx)(c.A,{name:"Search",width:22,height:22,className:"text-gray-700 dark:text-gray-100"})}),(0,r.jsx)("button",{onClick:n,className:"flex flex-col items-center justify-center p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors cursor-pointer","aria-label":"Shelfy Assistant",children:(0,r.jsx)(S.A,{src:"/images/Spark.svg",alt:"Assistant",width:22,height:22,className:"dark:brightness-0 dark:invert"})}),(0,r.jsx)("button",{onClick:o,className:"flex flex-col items-center justify-center p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors","aria-label":"Profile",children:(0,r.jsx)(c.A,{name:"Settings",width:22,height:22,className:"text-gray-700 dark:text-gray-100"})})]})})}let ec=(0,l.memo)(function(e){let{children:t,modal:a,showSidebar:l,isSidebarOpen:s,sidebarWidth:n,hideMobileTabBar:i,onToggleSidebar:o,onSidebarWidthChange:d,onOpenAddResource:c,onToggleAssistant:u,onOpenProfileSettings:m}=e;return(0,r.jsxs)("div",{className:"flex h-screen bg-white dark:bg-gray-700 overflow-hidden",children:[l&&(0,r.jsx)(eo,{isOpen:s,onToggle:o,width:n,onWidthChange:d}),(0,r.jsx)("main",{className:"flex-1 transition-all duration-300 ease-in-out overflow-y-auto pb-16 lg:pb-0 relative z-20 ".concat(l?"lg:ml-0":""),children:t}),a,(0,r.jsx)(ed,{onMenuClick:o,onSearchClick:()=>{},onAddClick:c,onAssistantClick:u,onNotificationsClick:()=>{},onProfileClick:m,isHidden:i})]})}),eu=(0,n.default)(()=>a.e(39655).then(a.bind(a,62036)),{loadableGenerated:{webpack:()=>[62036]},ssr:!1}),em=(0,n.default)(()=>Promise.all([a.e(1733),a.e(91120),a.e(99534),a.e(3840),a.e(31399)]).then(a.bind(a,3840)),{loadableGenerated:{webpack:()=>[3840]},ssr:!1}),eh=(0,n.default)(()=>a.e(35643).then(a.bind(a,35643)),{loadableGenerated:{webpack:()=>[35643]},ssr:!1}),ex=(0,n.default)(()=>a.e(44516).then(a.bind(a,44516)),{loadableGenerated:{webpack:()=>[44516]},ssr:!1}),eg=(0,n.default)(()=>Promise.resolve().then(a.bind(a,74729)),{loadableGenerated:{webpack:()=>[74729]},ssr:!1}),ep=(0,n.default)(()=>Promise.resolve().then(a.bind(a,71405)),{loadableGenerated:{webpack:()=>[71405]},ssr:!1}),eb=(0,n.default)(()=>a.e(1974).then(a.bind(a,1974)),{loadableGenerated:{webpack:()=>[1974]},ssr:!1}),ef=(0,n.default)(()=>Promise.resolve().then(a.bind(a,86389)).then(e=>e.UpgradeModal),{loadableGenerated:{webpack:()=>[86389]},ssr:!1}),ev=(0,n.default)(()=>Promise.resolve().then(a.bind(a,83242)),{loadableGenerated:{webpack:()=>[83242]},ssr:!1}),ey=(0,l.memo)(function(e){let{showFloatingAssistant:t,isAssistantOpen:a,isSettingsOpen:s,initialTab:n,isAddResourceSheetOpen:i,isAddResourceDropdownOpen:o,isVoiceRecorderOpen:d,isVoiceUploaderOpen:c,isUpgradeModalOpen:u,currentCollectionId:m,currentCollection:h,recordedAudio:x,voiceUploadPromise:g,onOpenAssistant:p,onMinimizeAssistant:b,onCloseSettings:f,onCloseAddResourceSheet:v,onAddLink:y,onCreateCollection:j,onUploadFile:w,onVoiceNote:k,onAddPhoto:N,onCreateNote:C,onOpenAddResourceDropdown:A,onCloseVoiceRecorder:S,onSaveVoiceRecorder:T,onCloseVoiceUploader:_,onCloseUpgradeModal:E,isAddUrlModalOpen:P,onCloseAddUrlModal:D,onSaveAddUrlLink:R}=e,[F,M]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{o&&!F&&M(!0)},[F,o]),(0,r.jsxs)(r.Fragment,{children:[s&&(0,r.jsx)(eb,{isOpen:s,onClose:f,initialTab:n}),t&&!a&&(0,r.jsx)(eu,{onClick:p}),t&&a&&(0,r.jsx)(em,{isOpen:!0,onMinimize:b,variant:"floating"}),i&&(0,r.jsx)(eh,{isOpen:i,onClose:v,currentCollectionId:m,onCreateCollection:j,onAddLink:y,onUploadFile:w,onVoiceNote:k,onAddPhoto:N,onCreateNote:C}),F&&(0,r.jsx)(ex,{open:o,onOpenChange:A,currentCollectionId:m,currentCollection:h}),d&&(0,r.jsx)(eg,{isOpen:d,onClose:S,onSave:T}),c&&(0,r.jsx)(ep,{isOpen:c,onClose:_,onComplete:_,audioBlob:x,uploadPromise:g}),P&&(0,r.jsx)(ev,{isOpen:P,onClose:D,onSave:R,currentCollectionId:m}),u&&(0,r.jsx)(ef,{isOpen:u,onClose:E,featureName:"Voice Notes",featureDescription:"Available in Pro. Please upgrade to access voice notes."})]})});var ej=a(7793);let ew="sidebar-tab",ek=["home","wiki","ai-chats","filters"],eN=new Set(["/duplicates","/reminders","/links","/notes","/images","/files"]);function eC(e){return e?e.startsWith("/wiki")?"wiki":e.startsWith("/ai-chats")?"ai-chats":e.startsWith("/tags")||e.startsWith("/custom-filters")||eN.has(e)?"filters":null:null}let eA=(0,l.createContext)(void 0),eS=(0,l.createContext)(void 0),eT=(0,l.createContext)(void 0),e_=()=>{let e=(0,l.useContext)(eA);if(void 0===e)throw Error("useSidebar must be used within a SidebarProvider");return e},eE=()=>{let e=(0,l.useContext)(eS);if(void 0===e)throw Error("useSettings must be used within a SettingsProvi
1der");return e},eP=(0,l.memo)(function(e){let{children:t,modal:a}=e,[n,i]=(0,l.useState)(!0),[o,d]=(0,l.useState)(!1),[c,u]=(0,l.useState)("general"),[m,h]=(0,l.useState)(320),[x,g]=(0,l.useState)(!1),[p,b]=(0,l.useState)(!1),[f,v]=(0,l.useState)(!1),[y,j]=(0,l.useState)(!1),[w,k]=(0,l.useState)(!1),[N,C]=(0,l.useState)(!1),[A,S]=(0,l.useState)(null),[T,_]=(0,l.useState)(null),[P,D]=(0,l.useState)(!1),[R,L]=(0,l.useState)(!1),O=(0,l.useRef)(!1),U=(0,l.useRef)(!0),z=(0,s.usePathname)(),[W,G]=(0,l.useState)(()=>{let e=eC(z);if(e)return e;try{let e=localStorage.getItem(ew);if(e&&ek.includes(e))return e}catch(e){}return"home"}),V=(0,l.useCallback)(e=>{G(e);try{localStorage.setItem(ew,e)}catch(e){}},[]);(0,l.useEffect)(()=>{let e=eC(z);e&&V(e)},[z,V]);let I=(0,F.wA)(),{toast:Y}=(0,E.dj)(),[Q]=(0,B.useAddLinkMutation)(),K=(0,F.d4)(M.mh),J=(0,F.d4)(M.NE);(0,F.d4)(M.mB);let{subscribeToResource:X}=(0,q.h)(),Z="free"===(J||"free").toLowerCase(),ee=(0,l.useCallback)(e=>e&&"unsorted"!==e?"string"==typeof e?parseInt(e,10):e:null,[]),et=(0,l.useCallback)(()=>i(e=>!e),[]),ea=(0,l.useCallback)(()=>D(!0),[]),er=(0,l.useCallback)(()=>D(!1),[]),el=(0,l.useCallback)(()=>D(e=>!e),[]),es=(0,l.useCallback)(()=>v(!0),[]),en=(0,l.useCallback)(()=>C(!1),[]),ei=(0,l.useCallback)(()=>b(!1),[]),eo=(0,l.useCallback)(()=>L(!1),[]),ed=(0,l.useCallback)(()=>{},[]),eu=(0,l.useCallback)(()=>{},[]),em=(0,l.useCallback)(()=>{},[]),eh=(0,l.useCallback)(()=>{},[]),ex=(0,l.useCallback)(()=>{Z?C(!0):(b(!1),j(!0))},[Z]),eg=(0,l.useCallback)(()=>{j(!1)},[]),ep=(0,l.useCallback)(async e=>{let t=(0,$.AL)(e);if(t)return void Y({variant:"destructive",title:"Voice note rejected",description:t});S(e),j(!1),k(!0),_(new Promise((t,a)=>{let r=new FileReader;r.onload=async e=>{var r,l,s;let n=null==(r=e.target)?void 0:r.result;if(n)try{let e=(0,$.ot)(n);if(e)return void a(Error(e));let r=ee(null==K?void 0:K.id),i="voice-note-".concat(Date.now(),".webm"),o=await Q({file_data:n,file_name:i,collection_id:r,kind:"voice_note"}).unwrap();(null==o||null==(l=o.data)?void 0:l.id)&&setTimeout(()=>{X(o.data.id)},100);let d=(null==o||null==(s=o.data)?void 0:s.collection_id)||r;I(H.collectionsApi.util.invalidateTags([{type:"CollectionResources",id:String(d)},{type:"Collection",id:String(d)},"CollectionResources","AllResources"])),t()}catch(e){console.error("Voice note upload failed:",e),a(e)}else a(Error("Failed to read audio data"))},r.onerror=()=>a(Error("Failed to read audio file")),r.readAsDataURL(e)}))},[Q,null==K?void 0:K.id,I,ee,X,Y]),eb=(0,l.useCallback)(async(e,t,a)=>{try{let r=a||(null==K?void 0:K.id),l=ee(r);g(!0),await Q({url:e,comment:t,collection_id:l,kind:"url"}).unwrap(),I(H.collectionsApi.util.invalidateTags([{type:"CollectionResources",id:String(l)},{type:"Collection",id:String(l)},"CollectionResources","AllResources"]))}catch(e){console.error("AddResourceSheet - Failed to add link:",e)}finally{g(!1)}},[Q,null==K?void 0:K.id,I,ee]),ef=(0,l.useCallback)(()=>{k(!1),S(null)},[]);(0,l.useEffect)(()=>{let e,t=()=>{e&&window.clearTimeout(e),e=window.setTimeout(()=>{let e=window.innerWidth<1024;e!==O.current&&(e?i(e=>(U.current=e,!1)):i(U.current),O.current=e)},250)};{let e=window.innerWidth<1024;O.current=e,e&&i(!1)}return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t),e&&window.clearTimeout(e)}},[]),(0,l.useEffect)(()=>{let e=e=>{if(!(navigator.platform.toUpperCase().includes("MAC")?e.metaKey:e.ctrlKey)||e.shiftKey||e.altKey||"j"!==e.key.toLowerCase())return;let t=document.activeElement;t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||(null==t?void 0:t.getAttribute("contenteditable"))==="true"||(null==t?void 0:t.closest('[contenteditable="true"]'))||(e.preventDefault(),(null==z?void 0:z.startsWith("/collections/"))||"/"===z?L(!0):v(!0))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[z]);let ev=(0,l.useCallback)(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"general";u(e),d(!0)},[]),eN=(0,l.useCallback)(()=>{d(!1)},[]),e_=(0,l.useMemo)(()=>!z||!["/login","/register","/auth","/signup","/onboarding","/landing","/privacy","/terms","/reset-password"].some(e=>z.startsWith(e)),[z]),eE=(0,l.useMemo)(()=>
1{if(!z)return!1;let e=z.includes("/resources/")&&z.endsWith("/details"),t=z.includes("/resources/")&&/\/resources\/\d+/.test(z),a=z.endsWith("/notes/new");return!["/settings","/auth","/login","/register","/signup","/onboarding","/landing","/privacy","/terms","/reset-password","/ai-chats"].some(e=>z.startsWith(e))&&!e&&!t&&!a},[z]),eP=(0,l.useMemo)(()=>{if(!z)return!1;let e=z.includes("/resources/")&&/\/resources\/\d+/.test(z),t=z.includes("/notes/new");return e||t||p},[z,p]),eD=(0,l.useMemo)(()=>({isSidebarOpen:n,toggleSidebar:et,sidebarWidth:m,setSidebarWidth:h,openAddResourceDropdown:es,activeSidebarTab:W,setActiveSidebarTab:V}),[n,m,es,W,V]),eR=(0,l.useMemo)(()=>({isSettingsOpen:o,openSettings:ev,closeSettings:eN}),[o,ev,eN]),eF=(0,l.useMemo)(()=>({isAddingResource:x,setIsAddingResource:g}),[x]);return(0,r.jsx)(ej.j,{children:(0,r.jsx)(eA.Provider,{value:eD,children:(0,r.jsx)(eS.Provider,{value:eR,children:(0,r.jsxs)(eT.Provider,{value:eF,children:[(0,r.jsx)(ec,{showSidebar:e_,isSidebarOpen:n,sidebarWidth:m,hideMobileTabBar:eP,onToggleSidebar:et,onSidebarWidthChange:h,onOpenAddResource:es,onToggleAssistant:el,onOpenProfileSettings:()=>ev("profile"),modal:a,children:t}),(0,r.jsx)(ey,{showFloatingAssistant:eE,isAssistantOpen:P,isSettingsOpen:o,initialTab:c,isAddResourceSheetOpen:p,isAddResourceDropdownOpen:f,isVoiceRecorderOpen:y,isVoiceUploaderOpen:w,isUpgradeModalOpen:N,currentCollectionId:null==K?void 0:K.id,currentCollection:K,recordedAudio:A,voiceUploadPromise:T,onOpenAssistant:ea,onMinimizeAssistant:er,onCloseSettings:eN,onCloseAddResourceSheet:ei,onAddLink:eb,onCreateCollection:ed,onUploadFile:eu,onVoiceNote:ex,onAddPhoto:em,onCreateNote:eh,onOpenAddResourceDropdown:v,onCloseVoiceRecorder:eg,onSaveVoiceRecorder:ep,onCloseVoiceUploader:ef,onCloseUpgradeModal:en,isAddUrlModalOpen:R,onCloseAddUrlModal:eo,onSaveAddUrlLink:eb})]})})})})})}}]);
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.