1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c5f7df30-1e36-558d-84ca-5952154ce06b")}catch(e){}}(); 3import{o as e}from"./rolldown-runtime-CMxvf4Kt.js";import{t}from"./link-DQ79ieAZ.js";import{Bt as n,Ca as r,Ft as i,Xi as a,at as o,rt as s,wa as c,zt as l}from"./frosted-ui-C-IlupeO.js";import{y as u}from"./env-hqZPCsXO.js";import{t as d}from"./StorePictogram-mzJ8ow-2.js";import{t as f}from"./RadioTowerPictogram-COI9AXYP.js";import{n as p}from"./react-client-b8-F7YdI.js";import{t as m}from"./cn-CIC46yv0.js";import{Mc as h}from"./hooks-BvQLve-N.js";import{t as g}from"./not-empty-pWtdodt7.js";import{t as _}from"./dayjs.min-drdlMfEL.js";import{t as v}from"./infinite-scroll-fetcher-OcS_rC2n.js";import{t as y}from"./app-empty-state-vbBxuAcN.js";import{n as b,t as x}from"./isSameOrBefore-BZG0nXdy.js";import{t as S}from"./web-hide-entry-point-cRjGc8qy.js";import"./discover-entry-point-Du1Broek.js";import{i as C}from"./use-notification-counts-cX34EuTd.js";var w=e(c(),1),T=e(_(),1),E=e(b(),1),D=e(x(),1);function O(e){return e.toLowerCase().normalize(`NFKD`).replace(/[Ì-ͯ]/g,``).replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``).slice(0,48)}function k({name:e,id:t,prefix:n}){let r=t.replace(n,``);return[O(e),r].join(`-`)}function A(e){if(!e)return`/`;let t=new URL(e,u);return t.pathname.startsWith(`/`)||(t.pathname=`/${t.pathname}`),t.pathname.endsWith(`/`)||(t.pathname=`${t.pathname}/`),`${t.pathname}${t.search}`}function j(e){let t=e.experience,n=e.company;if(e.subject===`New waitlist entry ðï¸`&&e.company?.id)return`/dashboard/${e.company.id}/waitlists`;if(t&&n){let r=new URL(`/${n.route}/${k({name:t.name,id:t.id,prefix:`exp_`})}/app${A(e.restPath)}`,u);return r.searchParams.set(`auto-open`,`true`),`${r.pathname}${r.search}`}return e.link?.replace(`https://whop.com`,``)??`#`}var M=r();T.default.extend(E.default),T.default.extend(D.default);var N=e=>{let t=(0,T.default)(e*1e3),n=(0,T.default)(),r=n.subtract(7,`day`);return t.isSame(n,`day`)?t.format(`h:mma`):t.isSameOrAfter(r,`day`)&&t.isSameOrBefore(n,`day`)?t.format(`ddd`):t.format(`M/D`)},P=e=>(0,T.default)(e*1e3).format(`MM/DD/YYYY hh:mm A`);function F({notification:e,badges:r,onItemClick:o}){let{markExperienceAsRead:s}=C(),c=e.experience?Number(r[e.experience.id]?.lastViewedAt)<e.createdAt:!1,l=(0,w.useCallback)(()=>{e.experience&&s(e.experience.id),o?.()},[s,e.experience,o]),u=j(e);return(0,M.jsxs)(t,{className:m(`fui-reset group relative isolate mx-[10px] flex w-auto min-w-0 max-w-full shrink-0 items-start gap-3 rounded-xl px-[10px] py-3 transition duration-75`,`hover:bg-gray-a3 focus-visible:bg-gray-a3`,`before:bg-stroke before:absolute before:top-0 before:right-[10px] before:left-[62px] before:h-px`,`first-of-type:before:hidden [[data-divider]+&]:before:hidden`,`hover:before:bg-transparent hover:[&+:not([data-divider])]:before:bg-transparent`,`focus-visible:before:bg-transparent focus-visible:[&+:not([data-divider])]:before:bg-transparent`),to:u,onClick:l,preload:!1,children:[(0,M.jsxs)(`div`,{className:`relative mt-0.5 size-10 shrink-0`,children:[c?(0,M.jsx)(`span`,{className:`bg-gray-a12 absolute top-1/2 -left-5 z-10 h-[9px] w-[4.5px] -translate-y-1/2 rounded-r-full`}):null,(0,M.jsx)(i,{size:`3`,fallback:e.senderUser?.name??e.senderUser?.username??``,src:e.primaryAttachment?.source?.url??void 0,shape:`circle`})]}),(0,M.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,M.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3`,children:[(0,M.jsx)(a,{className:m(`min-w-0 flex-1 truncate`,c?`text-gray-12`:`text-gray-11`),size:`3`,weight:`medium`,children:e.subject}),(0,M.jsx)(n,{content:P(e.createdAt),delay:100,children:(0,M.jsx)(a,{className:`text-gray-a9 shrink-0 whitespace-nowrap`,size:`1`,trim:`both`,weight:`medium`,children:N(e.createdAt)})})]}),(0,M.jsx)(a,{className:m(`line-clamp-3 min-w-0 pr-2 break-words whitespace-pre-wrap [overflow-wrap:anywhere]`,c?`text-gray-12`:`text-gray-10`),size:`2`,
3weight:c?`medium`:`regular`,children:e.content})]})]})}function I({notifications:e,badges:t,title:n,onItemClick:r}){return(0,M.jsxs)(M.Fragment,{children:[n?(0,M.jsx)(`div`,{className:`before:bg-gray-a2 after:bg-gray-a2 my-1 flex items-center justify-center gap-4 before:h-0.5 before:flex-1 after:h-0.5 after:flex-1`,"data-divider":!0,children:(0,M.jsx)(a,{className:`text-gray-11 block h-max uppercase`,size:`1`,weight:`medium`,children:n})}):null,e.map(e=>(0,M.jsx)(F,{badges:t,notification:e,onItemClick:r},e.id))]})}function L({noBorder:e}){return(0,M.jsxs)(`div`,{className:m(`relative mx-[10px] flex w-auto min-w-0 max-w-full shrink-0 items-start gap-3 rounded-xl px-[10px] py-3`,!e&&`before:bg-stroke before:absolute before:top-0 before:right-[10px] before:left-[62px] before:h-px`),"aria-hidden":!0,children:[(0,M.jsx)(`div`,{className:`mt-0.5 size-10 shrink-0`,children:(0,M.jsx)(s,{size:`3`,className:`rounded-full`})}),(0,M.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,M.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3`,children:[(0,M.jsx)(o,{size:`3`,className:`w-[25%]`}),(0,M.jsx)(o,{size:`1`,className:`w-[10%] shrink-0`})]}),(0,M.jsx)(o,{size:`2`,className:`w-[50%]`})]})]})}function R(e){let t={today:[],yesterday:[],thisWeek:[],earlier:[]},n=(0,T.default)().startOf(`day`).unix(),r=(0,T.default)().subtract(1,`day`).startOf(`day`).unix(),i=(0,T.default)().startOf(`week`).unix();return e.reduce((e,t)=>{let a=t.createdAt,o;return o=a>=n?`today`:a>=r&&a<n?`yesterday`:a>=i&&a<r?`thisWeek`:`earlier`,e[o].push(t),e},t)}function z({initialData:e,isMention:t}){let n=h({isMention:t},{staleTime:1e4,initialData:e?{pageParams:[{limit:20}],pages:[e]}:void 0,getNextPageParam:e=>{let t=e.viewer.user.notificationsV4.nodes??[];if(t.length)return{before:t[t.length-1]?.id,limit:20}}}),r=n.data?.pages.flatMap(e=>e.viewer.user.notificationsV4.nodes?.filter(g)??[])??[];return{notifications:r,groupedNotifications:R(r),...n}}var B=[{title:`Today`,key:`today`},{title:`Yesterday`,key:`yesterday`},{title:`This week`,key:`thisWeek`},{title:`Earlier`,key:`earlier`}],V=[],H=(0,w.memo)(({isMention:e,initialData:t=null,variant:n=`page`,onItemClick:r})=>{let i=p(),{hasNextPage:a,groupedNotifications:o,notifications:s,fetchNextPage:c,isFetchingNextPage:u,isLoading:m}=z({initialData:t,isMention:e}),{badges:h}=C(),g=(0,w.useMemo)(()=>h.reduce((e,t)=>t.experienceId?{...e,[t.experienceId]:t}:e,{}),[h]),_=n===`drawer`,b=_?6:8,x=_?4:8;return m?(0,M.jsx)(`div`,{className:`py-4`,children:Array.from({length:b},(e,t)=>(0,M.jsx)(L,{noBorder:t===0},t))}):s.length===0?(0,M.jsx)(y,{pictogram:e?d:f,title:i(e?`z2LBkD`:`arvTAl`),description:i(e?`v+6gzA`:`QW5ZTW`),children:(0,M.jsx)(S,{children:(0,M.jsx)(l,{color:`blue`,size:`3`,variant:`solid`,render:(0,M.jsx)(`a`,{href:`/discover/`,target:`_blank`,children:i(`BFz/XI`)})})})}):(0,M.jsxs)(`div`,{className:`py-4`,children:[B.filter(e=>o[e.key]?.length).map((e,t)=>(0,M.jsx)(I,{badges:g,notifications:o[e.key]??V,title:t===0?void 0:e.title,onItemClick:r},e.key)),a?(0,M.jsx)(v,{isFetchingNextPage:u,onScrollIntoView:c,timeout:500,children:Array.from({length:x},(e,t)=>(0,M.jsx)(L,{},t))}):null]})});H.displayName=`NotificationsList`;export{j as n,H as t}; 4//# debugId=c5f7df30-1e36-558d-84ca-5952154ce06b
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.