PageSourceSearch

https://app.functionalmind.ai/_next/static/chunks/pages/chat/case-folders-7e67604934b266db.js

js functionalmind.ai collected 2026-10-05 12:00:03 UTC 5,404 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[134,4671],{83357:function(e,l,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/chat/case-folders",function(){return t(12702)}])},3791:function(e,l,t){"use strict";var s=t(52676),r=t(75271),a=t(63557),i=t(97873),n=t(80980),c=t(99839),o=t(72565);l.Z=e=>{let{caseFolder:l,isSelected:t=!1,onSelect:d}=e,{t:x}=(0,c.$G)("chat"),[u,f]=(0,r.useState)(!1),{handleDeleteCaseFolder:h}=(0,r.useContext)(n.E),m=async()=>{await h(l.id),f(!1)};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{onClick:d,className:"group bg-white rounded-2xl border p-5 hover:shadow-md transition-all cursor-pointer flex flex-col relative min-h-[160px] ".concat(t?"border-gray-900 shadow-md":"border-gray-200 hover:border-gray-400"),children:[(0,s.jsx)("button",{onClick:e=>{e.stopPropagation(),f(!0)},className:"absolute top-3 right-3 p-1.5 rounded-lg opacity-0 group-hover:opacity-100 hover:bg-gray-100 transition-all text-gray-400 hover:text-gray-700 focus:outline-none z-10","aria-label":"Delete folder",children:(0,s.jsx)(a.Z,{name:"delete",size:16})}),(0,s.jsx)("div",{className:"mb-3",children:l.icon?(0,s.jsx)("div",{className:"w-10 h-10 flex items-center justify-center rounded-xl bg-gray-100",children:(0,s.jsx)(a.Z,{name:l.icon,size:24,className:"text-gray-700"})}):(0,s.jsx)("div",{className:"w-10 h-10 flex items-center justify-center rounded-xl bg-gray-100",children:(0,s.jsx)(a.Z,{name:"folder",size:24,className:"text-gray-500"})})}),(0,s.jsxs)("div",{className:"flex-1 flex flex-col",children:[(0,s.jsx)("h3",{className:"text-base font-title font-semibold text-gray-900 line-clamp-2 leading-snug",children:l.title}),l.description&&(0,s.jsx)("p",{className:"text-xs text-gray-500 line-clamp-2 mt-1.5 leading-relaxed",children:l.description})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between mt-3 pt-3 border-t border-gray-100",children:[l.folderType&&(0,s.jsx)("span",{className:"text-xs font-medium px-2 py-0.5 rounded-full ".concat(o.g[l.folderType]||"bg-gray-100 text-gray-600"),children:x("caseFolders.".concat(l.folderType.toLowerCase()))}),l.updatedAt&&(0,s.jsx)("p",{className:"text-xs text-gray-400 ml-auto",children:new Date(l.updatedAt).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})})]})]}),(0,s.jsx)(i.Z,{showModal:u,setShowModal:f,handleDelete:m})]})}},72565:function(e,l,t){"use strict";t.d(l,{g:function(){return s}});let s={PATIENT:"bg-blue-50 text-blue-700",RESEARCH:"bg-purple-50 text-purple-700"}},12702:function(e,l,t){"use strict";t.r(l),t.d(l,{__N_SSG:function(){return j}});var s=t(52676),r=t(75271),a=t(63842),i=t(153),n=t(99839),c=t(80980),o=t(3791),d=t(63557),x=t(31101),u=t(48465),f=t(12118),h=t(63802),m=t(34547),g=t(24851);let p=()=>{let{t:e}=(0,n.$G)("chat"),{caseFolders:l,isLoadingCaseFolders:t,page:a,totalPages:i,setPage:p,selectedCaseFolder:j,setSelectedCaseFolder:y}=(0,r.useContext)(c.E),{chatMessages:v,followupQuestions:N}=(0,r.useContext)(m.p5),{handleRequestEdit:b}=(0,r.useContext)(g.g),w=(0,r.useRef)(null);return((0,r.useEffect)(()=>{},[]),(0,r.useEffect)(()=>{let e=w.current;if(e){let l=e.scrollHeight-e.scrollTop<=e.clientHeight+50,t=v[v.length-1];(l||(null==t?void 0:t.type)==="USER")&&e.scrollTo({top:e.scrollHeight,behavior:"smooth"})}},[v]),(0,r.useEffect)(()=>{if(N.length>1){let e=w.current;e&&e.scrollTo({top:e.scrollHeight,behavior:"smooth"})}},[N]),j)?(0,s.jsx)("div",{className:"relative",children:(0,s.jsxs)("div",{className:"flex flex-col h-app",children:[(0,s.jsx)(u.Z,{onRequestEdit:b}),(0,s.jsx)("div",{ref:w,className:"flex-grow overflow-y-auto",children:(0,s.jsx)("div",{className:"flex justify-center w-full",children:(0,s.jsx)("div",{className:"flex flex-col max-2xl:max-w-3xl max-w-3xl w-full p-5",children:(0,s.jsx)(h.Z,{disableOptions:!1})})})}),(0,s.jsx)("div",{className:"flex flex-row w-full",children:(0,s.jsx)("div",{className:"flex justify-center w-full",children:(0,s.jsx)("div",{className:"relative max-2xl:max-w-3xl max-w-3xl w-full px-5 py-3",children:(0,s.jsx)(f.Z,{})})})})]})}):(0,s.jsxs)("div",{className:"overflow-y-auto h-app p-11 pt-[85px]",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-8",children:[(0,s.jsx)("h1",{className:"text-3xl font-medium font-title",children:e("caseFolders.title")}),(0,s.jsx)(x.Z,{variant:"black",leftIcon:(0,s.jsx)(d.Z,{name:"add",size:20}),children:e("caseFolders.createProject")})]}),t?(0,s.jsx)("div",{className:"flex items-center justify-center py-20",children:(0,s.jsx)("div",{className:"text-gray-500",children:e("caseFolders.loading")})}):(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 max-w-4xl",children:l.map(e=>{let l=(j?j.id:void 0)===e.id;return(0,s.jsx)(o.Z,{caseFolder:e,isSelected:l,onSelect:()=>y(e)},e.id)})})}),a<i&&(0,s.jsx)("div",{className:"mt-8 text-center",children:(0,s.jsx)("button",{onClick:()=>p(a+1),className:"px-6 py-3 bg-gray-100 text-gray-700 rounded-lg hover:bg-gray-200 transition-colors font-medium",children:e("caseFolders.loadM
1ore")})})]})};p.getLayout=function(e){return(0,s.jsx)(a.Z,{children:e})};var j=!0;l.default=(0,i.Z)(p,{shouldBeAuth:!0,allowedRoles:["*"]})}},function(e){e.O(0,[7822,3980,4233,2220,206,413,137,5411,872,5864,4161,2360,69,6864,9886,949,1145,7957,5447,3802,2118,5257,2888,9774,179],function(){return e(e.s=83357)}),_N_E=e.O()}]);

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.