PageSourceSearch

https://mastodon.alphapuggle.dev/packs/notifications_v2-DcMM6NEa.js

js alphapuggle.dev collected 2026-10-08 01:13:29 UTC 42,130 bytes, 2 lines download raw bytes

1import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{n as t,t as n}from"./jsx-runtime-CKeovgl0.js";import{a as r,c as i,s as a}from"./react-intl-C-SARy9S.js";import{C as o}from"./initial_state-Bw8LfuSU.js";import{E as s,d as c,f as l,k as u,l as d,m as f,p,r as m}from"./logo-CXYNw2nw.js";import{zt as h}from"./detect-it.esm-DZnguM0j.js";import{$i as g,At as _,Ca as v,Cr as y,Dt as ee,Ia as b,Jn as x,K as S,Ra as C,Sa as te,Sr as ne,Tr as re,Yt as w,Zn as ie,_a as T,_i as E,_r as ae,ba as oe,cr as D,dr as se,fr as ce,gr as O,kt as le,lr as ue,ma as k,na as A,pi as de,q as fe,ur as pe,vr as j,wr as me,xr as he,yr as ge}from"./time-BAFspTYE.js";import{s as _e}from"./react-router-MZ31fgC0.js";import{t as ve}from"./defineProperty-C0YrXxyM.js";import{n as ye,o as M,s as N}from"./typed_functions-Bx3rrHQB.js";import{t as be}from"./helmet-s187qnAA.js";import{t as P}from"./react-router-dom-UToIjw8I.js";import{n as F}from"./modal-Cy2tCnPO.js";import{$t as I,a as xe,n as Se,tn as L}from"./status_quoted-DhuP26-F.js";import{t as Ce}from"./classnames-CfLRLWYq.js";import{i as we}from"./skip_links-Dsj8iwTy.js";import{F as R,M as Te,N as Ee,P as z,b as De,c as Oe,n as B}from"./poll-8PA5LGuO.js";import{t as ke}from"./short_number-CLefuEED.js";import{t as Ae}from"./intl-Bc6RNtc5.js";import{t as je}from"./useAccount-DFHcQYiQ.js";import{t as Me}from"./avatar_group-x8KgnNgQ.js";import{d as Ne,m as Pe}from"./account-DRCoKOdP.js";import{n as V,t as Fe}from"./display_name-CngmvgSK.js";import{a as Ie,c as Le,o as Re,s as ze}from"./navigation_panel-DKDFrMis.js";import{n as Be}from"./home-IbrFWG2m.js";import{c as Ve,f as He,o as Ue,s as H}from"./list_alt-fill-D0syImyh.js";import{a as We,o as Ge}from"./columns_area-BXUaP2yM.js";import{t as Ke}from"./alternate_email-D365s_QD.js";import{t as qe}from"./category-DVBtrZAC.js";import{E as Je,T as Ye}from"./graphic_eq-oI4ReqmY.js";import{t as Xe}from"./edit-CL9scpLF.js";import{t as Ze}from"./insert_chart-D4wAJdIq.js";import{t as Qe}from"./embedded_status-DD3wbDEp.js";import{t as $e}from"./load_gap-D31Veoos.js";import{t as et}from"./scrollable_list-Cdyafjlo.js";import{t as U}from"./index.module-Br8BcTX1.js";import{t as tt}from"./notifications_active-fill-DMtyYmEB.js";import{n as nt}from"./collection_list_item-BWk2hsua.js";import{t as rt}from"./not_signed_in_indicator-CYskkBUu.js";import{n as it}
1from"./revoke_collection_inclusion_modal-BP7S881e.js";import{t as W}from"./setting_toggle-CrE595QW.js";import{t as at}from"./isEqual-m8OZQwoS.js";import{t as ot}from"./inventory_2-DR6xHkyG.js";import{r as st}from"./heart_broken-fill-BHvyF45W.js";import{n as ct,t as lt}from"./relationships_severance_event-BBO0ANDo.js";import{t as ut}from"./policy_controls-CcdIPzf0.js";import{n as dt,r as ft,t as pt}from"./celebration-CTJbRi-r.js";var mt=e(at()),G=e(t()),K=n(),ht=a({filteredNotifications:{id:`notification_requests.title`,defaultMessage:`Filtered notifications`}}),gt=({className:e})=>{let t=i(),n=_e(),r=N(e=>e.notificationPolicy),a=N(he),o=(0,G.useCallback)(()=>{n.push(`/notifications/requests`)},[n]);return r===null||r.summary.pending_requests_count<=0||!a?null:(0,K.jsx)(`button`,{"aria-label":t.formatMessage(ht.filteredNotifications),title:t.formatMessage(ht.filteredNotifications),onClick:o,className:e,type:`button`,children:(0,K.jsx)(R,{id:`filtered-notifications`,icon:ot})})},_t=()=>{let e=M(),t=N(e=>e.notificationPolicy),n=N(he);return(0,G.useEffect)(()=>{e(w());let t=setInterval(()=>{e(w())},12e4);return()=>{clearInterval(t)}},[e]),t===null||t.summary.pending_requests_count<=0||n?null:(0,K.jsxs)(P,{className:`filtered-notifications-banner`,to:`/notifications/requests`,children:[(0,K.jsx)(`div`,{className:`notification-group__icon`,children:(0,K.jsx)(R,{icon:ot,id:`filtered-notifications`})}),(0,K.jsxs)(`div`,{className:`filtered-notifications-banner__text`,children:[(0,K.jsx)(`strong`,{children:(0,K.jsx)(r,{id:`filtered_notifications_banner.title`,defaultMessage:`Filtered notifications`})}),(0,K.jsx)(`span`,{children:(0,K.jsx)(r,{id:`filtered_notifications_banner.pending_requests`,defaultMessage:`From {count, plural, =0 {no one} one {one person} other {# people}} you may know`,values:{count:t.summary.pending_requests_count}})})]})]})},vt=a({close:{id:`lightbox.close`,defaultMessage:`Close`}}),yt=()=>{let e=i(),t=M(),n=(0,G.useCallback)(()=>{t(k())},[t]),a=(0,G.useCallback)(()=>{t(g([`notifications`,`dismissPermissionBanner`],!0))},[t]);return(0,K.jsxs)(`div`,{className:`notifications-permission-banner`,children:[(0,K.jsx)(`div`,{className:`notifications-permission-banner__close`,children:(0,K.jsx)(z,{icon:`times`,iconComponent:u,onClick:a,title:e.formatMessage(vt.close)})}),(0,K.jsx)(`h2`,{children:(0,K.jsx)(r,{id:`notifications_permission_banner.title`,defaultMessage:`Never miss a thing`})}),(0,K.jsx)(`p`,{children:(0,K.jsx)(r,{id:`notifications_permission_banner.how_to_control`,defaultMessage:`To receive notifications when Mastodon isn't open, enable desktop notifications. You can control precisely which types of interactions generate desktop notifications through the {icon} button above once they're enabled.`,values:{icon:(0,K.jsx)(R,{id:`sliders`,icon:Je,"aria-label":e.formatMessage(Ge.show)})}})}),(0,K.jsx)(I,{onClick:n,children:(0,K.jsx)(r,{id:`notifications_permission_banner.enable`,defaultMessage:`Enable desktop notifications`})})]})};m();var bt=class extends G.PureComponent{render(){return(0,K.jsxs)(`button`,{className:`text-btn column-header__setting-btn`,tabIndex:0,onClick:this.props.onClick,children:[(0,K.jsx)(R,{id:`eraser`,icon:dt}),` `,(0,K.jsx)(r,{id:`notifications.clear`,defaultMessage:`Clear notifications`})]})}},xt=class extends G.PureComponent{render(){return(0,K.jsx)(`button`,{className:`text-btn column-header__permission-btn`,tabIndex:0,onClick:this.props.onClick,children:(0,K.jsx)(r,{id:`notifications.grant_permission`,defaultMessage:`Grant permission.`})})}},q=e(Ce()),J=class extends G.PureComponent{constructor(...e){super(...e),ve(this,`onChange`,()=>{let{settings:e,settingPath:t}=this.props;this.props.onChange(t,!e.getIn(t))})}render(){let{prefix:e,settings:t,settingPath:n,label:r,disabled:i}=this.props,a=[`setting-pillbar-button`,e,...n].filter(Boolean).join(`-`),o=t.getIn(n);return(0,K.jsx)(`button`,{id:a,className:(0,q.default)(`pillbar-button`,{active:o}),disabled:i,onClick:this.onChange,"aria-pressed":o,children:r},a)}},St=ye([e=>e.settings.get(`notifications`),e=>e.notifications.get(`browserPermission`),e=>e.push_notifications],(e,t,n)=>({settings:e,browserPermission:t!==`denied`,pushSettings:n,showPushSettings:n.get(`supported`)&&n.get(`enabled`)})),Ct=a({permissionDenied:{id:`notifications.permission_denied_alert`,defaultMessage:`Desktop notifications can't be enabled, as browser permission has been denied before`}}),wt=({label:e,type:t})=>{let{settings:n,browserPermission:i,pushSettings:a,showPushSettings:o}=N(St),s=M(),c=(0,G.useCallback)((e,t)=>{e[0]===`alerts`&&t&&window.Notification!==void 0&&Notification.permission!==`granted`?s(k(n=>{s(n===`granted`?g([`notifications`,...e],t):A({message:Ct.permissionDenied}))})):s(g([`notifications`,...e],t))},[s]),l=(0,G.useCallback)((e,t)=>{t&&window.Notification!==void 0&&Notification.permission!==`granted`?s(k(n=>{s(n===`granted`?T(e,t):A({message:Ct.permissionDenied}))})):s(T(e,t))},[s]);return(0,K.jsxs)(`section`,{role:`group`,"aria-labelledby":`notifications-${t}`,children:[(0,K.jsx)(`h3`,{id:`notifications-${t}`,children:e}),(0,K.jsxs)(`div`,{className:`column-settings__pillbar`,children:[(0,K.jsx)(J,{disabled:!i,prefix:`notifications_desktop`,settings:n,settingPath:[`alerts`,t],onChange:c,label:(0,K.jsx)(r,{id:`notifications.column_settings.alert`,defaultMessage:`Desktop notifications`})}),o&&(0,K.jsx)(J,{prefix:`notifications_push`,settings:a,settingPath:[`alerts`,t],onChange:l,label:(0,K.jsx)(r,{id:`notifications.column_settings.push`,defaultMessage:`Push n
1otifications`})}),(0,K.jsx)(J,{prefix:`notifications`,settings:n,settingPath:[`shows`,t],onChange:c,label:(0,K.jsx)(r,{id:`notifications.column_settings.show`,defaultMessage:`Show in column`})}),(0,K.jsx)(J,{prefix:`notifications`,settings:n,settingPath:[`sounds`,t],onChange:c,label:(0,K.jsx)(r,{id:`notifications.column_settings.sound`,defaultMessage:`Play sound`})})]})]})},Tt=class extends G.PureComponent{constructor(...e){super(...e),ve(this,`onPushChange`,(e,t)=>{this.props.onChange([`push`,...e],t)})}render(){let{settings:e,pushSettings:t,onChange:n,onClear:i,alertsEnabled:a,browserSupport:o,browserPermission:s,onRequestNotificationPermission:c}=this.props,l=(0,K.jsx)(r,{id:`notifications.column_settings.unread_notifications.highlight`,defaultMessage:`Highlight unread notifications`}),u=(0,K.jsx)(r,{id:`notifications.column_settings.filter_bar.show_bar`,defaultMessage:`Show filter bar`}),d=(0,K.jsx)(r,{id:`notifications.column_settings.filter_bar.advanced`,defaultMessage:`Display all categories`}),f=(0,K.jsx)(r,{id:`notifications.column_settings.alert`,defaultMessage:`Desktop notifications`}),p=(0,K.jsx)(r,{id:`notifications.column_settings.show`,defaultMessage:`Show in column`}),m=(0,K.jsx)(r,{id:`notifications.column_settings.sound`,defaultMessage:`Play sound`}),h=(0,K.jsx)(r,{id:`notifications.column_settings.group`,defaultMessage:`Group`}),g=t.get(`browserSupport`)&&t.get(`isSubscribed`),_=g&&(0,K.jsx)(r,{id:`notifications.column_settings.push`,defaultMessage:`Push notifications`});return(0,K.jsxs)(`div`,{className:`column-settings`,children:[(0,K.jsx)(`section`,{children:(0,K.jsx)(bt,{onClick:i})}),a&&o&&s===`denied`&&(0,K.jsx)(`section`,{children:(0,K.jsx)(`span`,{className:`warning-hint`,children:(0,K.jsx)(r,{id:`notifications.permission_denied`,defaultMessage:`Desktop notifications are unavailable due to previously denied browser permissions request`})})}),a&&o&&s==="default"&&(0,K.jsx)(`section`,{children:(0,K.jsxs)(`span`,{className:`warning-hint`,children:[(0,K.jsx)(r,{id:`notifications.permission_required`,defaultMessage:`Desktop notifications are unavailable because the required permission has not been granted.`}),` `,(0,K.jsx)(xt,{onClick:c})]})}),(0,K.jsx)(ut,{}),(0,K.jsxs)(`section`,{role:`group`,"aria-labelledby":`notifications-filter-bar`,children:[(0,K.jsx)(`h3`,{id:`notifications-filter-bar`,children:(0,K.jsx)(r,{id:`notifications.column_settings.filter_bar.category`,defaultMessage:`Quick filter bar`})}),(0,K.jsxs)(`div`,{className:`column-settings__row`,children:[(0,K.jsx)(W,{id:`show-filter-bar`,prefix:`notifications`,settings:e,settingPath:[`quickFilter`,`show`],onChange:n,label:u}),(0,K.jsx)(W,{id:`show-filter-bar`,prefix:`notifications`,settings:e,settingPath:[`quickFilter`,`advanced`],onChange:n,label:d})]})]}),(0,K.jsxs)(`section`,{role:`group`,"aria-labelledby":`notifications-unread-markers`,children:[(0,K.jsx)(`h3`,{id:`notifications-unread-markers`,children:(0,K.jsx)(r,{id:`notifications.column_settings.unread_notifications.category`,defaultMessage:`Unread notifications`})}),(0,K.jsx)(`div`,{className:`column-settings__row`,children:(0,K.jsx)(W,{id:`unread-notification-markers`,prefix:`notifications`,settings:e,settingPath:[`showUnread`],onChange:n,label:l})})]}),(0,K.jsxs)(`section`,{role:`group`,"aria-labelledby":`notifications-follow`,children:[(0,K.jsx)(`h3`,{id:`notifications-follow`,children:(0,K.jsx)(r,{id:`notifications.column_settings.follow`,defaultMessage:`New followers:`})}),(0,K.jsxs)(`div`,{className:`column-settings__pillbar`,children:[(0,K.jsx)(J,{disabled:s===`denied`,prefix:`notifications_desktop`,settings:e,settingPath:[`alerts`,`follow`],onChange:n,label:f}),g&&(0,K.jsx)(J,{prefix:`notifications_push`,settings:t,settingPath:[`alerts`,`follow`],onChange:this.onPushChange,label:_}),(0,K.jsx)(J,{prefix:`notifications`,settings:e,settingPath:[`shows`,`follow`],onChange:n,label:p}),(0,K.jsx)(J,{prefix:`notifications`,settings:e,settingPath:[`sounds`,`follow`],onChange:n,label:m})]}),(0,K.jsx)(`div`,{className:`column-settings__row`,children:(0,K.jsx)(W,{prefix:`notifications`,settings:e,settingPath:[`group`,`follow`],onChange:n,label:h})})]}),(0,K.jsxs)(`section`,{role:`group`,"aria-labelledby":`notifications-follow-request`,children:[(0,K.jsx)(`h3`,{id:`notifications-follow-request`,children:(0,K.jsx)(r,{id:`notifications.column_settings.follow_request`,defaultMessage:`New follow requests:`})}),(0,K.jsxs)(`div`,{className:`column-settings__pillbar`,children:[(0,K.jsx)(J,{disabled:s===`denied`,prefix:`notifications_desktop`,settings:e,settingPath:[`alerts`,`follow_request`],onChange:n,label:f}),g&&(0,K.jsx)(J,{prefix:`notifications_push`,settings:t,settingPath:[`alerts`,`follow_request`],onChange:this.onPushChange,label:_}),(0,K.jsx)(J,{prefix:`notifications`,settings:e,settingPath:[`shows`,`follow_request`],onChange:n,label:p}),(0,K.jsx)(J,{prefix:`notifications`,settings:e,settingPath:[`sounds`,`follow_request`],onChange:n,label:m})]})]}),(0,K.jsxs)(`section`,{role:`group`,"aria-labelledby":`notifications-favourite`,children:[(0,K.jsx)(`h3`,{id:`notifications-favourite`,children:(0,K.jsx)(r,{id:`notifications.column_settings.favourite`,defaultMessage:`Favorites:`})}),(0,K.jsxs)(`div`,{className:`column-settings__pillbar`,children:[(0,K.jsx)(J,{disabled:s===`denied`,prefix:`notifications_desktop`,settings:e,settingPath:[`alerts`,`favourite`],onChange:n,label:f}),g&&(0,K.jsx)(J,{prefix:`notifications_push`,settings:t,settingPath:[`alerts`,`favourite`],onChange:this.onPushChange,label:_}),(0,K.jsx)(J,{prefix:`notifications`,settings:e,settingPath:[`shows`,`favourite`],onChange:n,label:p}),(0,K.jsx)(J,{prefix:`notifications`,settings:e,settingPath:[`sounds`,`favourite`],onChange:n,label:m})]})]}),(0,K.jsxs)(`section`,{role:`group`,"aria-labelledby":`notifications-mention`,children:[(0,K.jsx)(`h3`,{id:`notifications-mention`,children:(0,K.jsx)(r,{id:`notifications.column_settings.mention`,defaultMessage:`Mentions:`})}),(0,K.jsxs)(`div`,{className:`column-settings__pillbar`,children:[(0,K.jsx)(J,{disabled:s===`denied`,prefix:`notifications_desktop`,settings:e,settingPath:[`alerts`,`mention`],onChange:n,label:f}),g&&(0,K.jsx)(J,{prefix:`notifications_push`,settings:t,settingPath:[`alerts`,`mention`],onChange:this.onPushChange,label:_}),(0,K.jsx)(J,{prefix:`notifications`,settings:e,settingPath:[`shows`,`mention`],onChange:n,label:p}),(0,K.jsx)(J,{prefix:`notifications`,settings:e,settingPath:[`sounds`,`mention`],onChange:n,label:m})]})]}),(0,K.jsxs)(`section`,{role:`group`,"aria-labelledby":`notifications-reblog`,children:[(0,K.jsx)(`h3`,{id:`notifications-reblog`,children:(0,K.jsx)(r,{id:`notifications.column_settings.reblog`,defaultMessage:`Boosts:`})}),(0,K.jsxs)(`div`,{className:`column-settings__pillbar`,children:[(0,K.jsx)(J,{disabled:s===`denied`,prefix:`notifications_desktop`,settings:e,settingPath:[`alerts`,`reblog`],onChange:n,label:f}),g&&(0,K.jsx)(J,{prefix:`notifications_push`,settings:t,settingPath:[`alerts`,`reblog`],onChange:this.onPushChange,label:_}),(0,K.jsx)(J,{prefix:`notifications`,settings:e,settingPath:[`shows`,`reblog`],onChange:n,label:p}),(0,K.jsx)(J,{prefix:`notifications`,settings:e,settingPath:[`sounds`,`reblog`],onChange:n,label:m})]})]}),(0,K.jsxs)(`section`,{role:`group`,"aria-labelledby":`notifications-quote`,children:[(0,K.jsx)(`h3`,{id:`notifications-quote`,children:(0,K.jsx)(r,{id:`notifications.column_settings.quote`,defaultMessage:`Quotes:`})}),(0,K.jsxs)(`div`,{className:`column-settings__pillbar`,children:[(0,K.jsx)(J,{disabled:s===`denied`,prefix:`notifications_desktop`,settings:e,settingPath:[`alerts`,`quote`],onChange:n,label:f}),g&&(0,K.jsx)(J,{prefix:`notifications_push`,settings:t,settingPath:[`alerts`,`quote`],onChange:this.onPushChange,label:_}),(0,K.jsx)(J,{prefix:`notifications`,settings:e,settingPath:[`shows`,`quote`],onChange:n,label:p}),(0,K.jsx)(J,{prefix:`notifications`,settings:e,settingPath:[`sounds`,`quote`],onChange:n,label:m})]})]}),(0,K.jsxs)(`section`,{role:`group`,"aria-labelledby":`notifications-poll`,children:[(0,K.jsx)(`h3`,{id:`notifications-poll`,children:(0,K.jsx)(r,{id:`notifications.column_settings.poll`,defaultMessage:`Poll results:`})}),(0,K.jsxs)(`div`,{className:`column-settings__pillbar`,children:[(0,K.jsx)(J,{disabled:s===`denied`,prefix:`notifications_desktop`,settings:e,settingPath:[`alerts`,`poll`],onChange:n,label:f}),g&&(0,K.jsx)(J,{prefix:`notifications_push`,settings:t,settingPath:[`alerts`,`poll`],onChange:this.onPushChange,label:_}),(0,K.jsx)(J,{prefix:`notifications`,settings:e,settingPath:[`shows`,`poll`],onChange:n,label:p}),(0,K.jsx)(J,{prefix:`notifications`,settings:e,settingPath:[`sounds`,`poll`],onChange:n,label:m})]})]}),(0,K.jsxs)(`section`,{role:`group`,"aria-labelledby":`notifications-status`,children:[(0,K.jsx)(`h3`,{id:`notifications-status`,children:(0,K.jsx)(r,{id:`notifications.column_settings.status`,defaultMessage:`New posts:`})}),(0,K.jsxs)(`div`,{className:`column-settings__pillbar`,children:[(0,K.jsx)(J,{disabled:s===`denied`,prefix:`notifications_desktop`,settings:e,settingPath:[`alerts`,`status`],onChange:n,label:f}),g&&(0,K.jsx)(J,{prefix:`notifications_push`,settings:t,settingPath:[`alerts`,`status`],onChange:this.onPushChange,label:_}),(0,K.jsx)(J,{prefix:`notifications`,settings:e,settingPath:[`shows`,`status`],onChange:n,label:p}),(0,K.jsx)(J,{prefix:`notifications`,settings:e,settingPath:[`sounds`,`status`],onChange:n,label:m})]})]}),(0,K.jsxs)(`section`,{role:`group`,"aria-labelledby":`notifications-update`,children:[(0,K.jsx)(`h3`,{id:`notifications-update`,children:(0,K.jsx)(r,{id:`notifications.column_settings.update`,defaultMessage:`Edits:`})}),(0,K.jsxs)(`div`,{className:`column-settings__pillbar`,children:[(0,K.jsx)(J,{disabled:s===`denied`,prefix:`notifications_desktop`,settings:e,settingPath:[`alerts`,`update`],onChange:n,label:f}),g&&(0,K.jsx)(J,{prefix:`notifications_push`,settings:t,settingPath:[`alerts`,`update`],onChange:this.onPushChange,label:_}),(0,K.jsx)(J,{prefix:`notifications`,settings:e,settingPath:[`shows`,`update`],onChange:n,label:p}),(0,K.jsx)(J,{prefix:`notifications`,settings:e,settingPath:[`sounds`,`update`],onChange:n,label:m})]})]}),(0,K.jsx)(wt,{type:`collections`,label:(0,K.jsx)(r,{id:`notifications.column_settings.collections`,defaultMessage:`Collections:`})}),(this.props.identity.permissions&1024)==1024&&(0,K.jsxs)(`section`,{role:`group`,"aria-labelledby":`notifications-admin-sign-up`,children:[(0,K.jsx)(`h3`,{id:`notifications-status`,children:(0,K.jsx)(r,{id:`notifications.column_settings.admin.sign_up`,defaultMessage:`New sign-ups:`})}),(0,K.jsxs)(`div`,{className:`column-settings__pillbar`,children:[(0,K.jsx)(J,{disabled:s===`denied`,prefix:`notifications_desktop`,settings:e,settingPath:[`alerts`,`admin.sign_up`],onChange:n,label:f}),g&&(0,K.jsx)(J,{prefix:`notifications_push`,settings:t,settingPath:[`alerts`,`admin.sign_up`],onChange:this.onPushChange,label:_}),(0,K.jsx)(J,{prefix:`notifications`,settings:e,settingPath:[`shows`,`admin.sign_up`],onChange:n,label:p}),(0,K.jsx)(J,{prefix:`notifications`,settings:e,settingPath:[`sounds`,`admin.sign_up`],onChange:n,label:m})]})]}),(this.props.identity.permissions&16)==16&&(0,K.jsxs)(`section`,{role:`group`,"aria-labelledby":`notifications-admin-report`,children:[(0,K.jsx)(`h3`,{id:`notifications-status`,children:(0,K.jsx)(r,{id:`notifications.column_settings.admin.report`,defaultMessage:`New reports:`})}),(0,K.jsxs)(`div`,{className:`column-settings__pillbar`,children:[(0,K.jsx)(J,{disabled:s===`denied`,prefix:`notifications_desktop`,settings:e,settingPath:[`alerts`,`admin.report`],onChange:n,label:f}),g&&(0,K.jsx)(J,{prefix:`notifications_push`,settings:t,settingPath:[`alerts`,`admin.report`],onChange:this.onPushChange,label:_}),(0,K.jsx)(J,{prefix:`notifications`,settings:e,settingPath:[`shows`,`admin.report`],onChange:n,label:p}),(0,K.jsx)(J,{prefix:`notifications`,settings:e,settingPath:[`sounds`,`admin.report`],onChange:n,label:m})]})]})]})}},Et=Ee(Tt),Dt=a({permissionDenied:{id:`notifications.permission_denied_alert`,defaultMessage:`Desktop notifications can't be enabled, as browser permission has been denied before`}}),Ot=Ae(h(e=>({settings:e.getIn([`settings`,`notifications`]),pushSettings:e.get(`push_notifications`),alertsEnabled:e.getIn([`settings`,`notifications`,`alerts`]).includes(!0),browserSupport:e.getIn([`notifications`,`browserSupport`]),browserPermission:e.getIn([`notifications`,`browserPermission`])}),e=>
1({onChange(t,n){t[0]===`push`?n&&window.Notification!==void 0&&Notification.permission!==`granted`?e(k(r=>{e(r===`granted`?T(t.slice(1),n):A({message:Dt.permissionDenied}))})):e(T(t.slice(1),n)):t[0]===`quickFilter`?(e(g([`notifications`,...t],n)),e(O({filterType:`all`}))):t[0]===`alerts`&&n&&window.Notification!==void 0&&Notification.permission!==`granted`?n&&window.Notification!==void 0&&Notification.permission!==`granted`?e(k(r=>{e(r===`granted`?g([`notifications`,...t],n):A({message:Dt.permissionDenied}))})):e(g([`notifications`,...t],n)):(e(g([`notifications`,...t],n)),t[0]===`group`&&t[1]===`follow`&&e(D()))},onClear(){e(F({modalType:`CONFIRM_CLEAR_NOTIFICATIONS`}))},onRequestNotificationPermission(){e(k())}}))(Et)),kt=a({other:{id:`report_notification.categories.other_sentence`,defaultMessage:`other`},spam:{id:`report_notification.categories.spam_sentence`,defaultMessage:`spam`},legal:{id:`report_notification.categories.legal_sentence`,defaultMessage:`illegal content`},violation:{id:`report_notification.categories.violation_sentence`,defaultMessage:`rule violation`}}),At=({notification:e,notification:{report:t},unread:n})=>{let a=i(),o=N(e=>e.accounts.get(t.targetAccountId)),s=N(t=>t.accounts.get(e.sampleAccountIds[0]??`0`));if(!s||!o)return null;let c={name:(0,K.jsx)(Fe,{account:s,variant:`simple`}),target:(0,K.jsx)(Fe,{account:o,variant:`simple`}),category:a.formatMessage(kt[t.category]),count:t.status_ids.length},l;return l=t.status_ids.length>0?t.category===`other`?(0,K.jsx)(r,{id:`notification.admin.report_account_other`,defaultMessage:`{name} reported {count, plural, one {one post} other {# posts}} from {target}`,values:c}):(0,K.jsx)(r,{id:`notification.admin.report_account`,defaultMessage:`{name} reported {count, plural, one {one post} other {# posts}} from {target} for {category}`,values:c}):t.category===`other`?(0,K.jsx)(r,{id:`notification.admin.report_statuses_other`,defaultMessage:`{name} reported {target}`,values:c}):(0,K.jsx)(r,{id:`notification.admin.report_statuses`,defaultMessage:`{name} reported {target} for {category}`,values:c}),(0,K.jsxs)(`a`,{href:`/admin/reports/${t.id}`,target:`_blank`,rel:`noopener noreferrer`,className:(0,q.default)(`notification-group notification-group--link notification-group--admin-report focusable`,{"notification-group--unread":n}),children:[(0,K.jsx)(`div`,{className:`notification-group__icon`,children:(0,K.jsx)(R,{id:`flag`,icon:st})}),(0,K.jsxs)(`div`,{className:`notification-group__main`,children:[(0,K.jsx)(`div`,{className:`notification-group__main__header`,children:(0,K.jsxs)(`h2`,{className:`notification-group__main__header__label`,children:[l,(0,K.jsx)(B,{timestamp:t.created_at})]})}),t.comment.length>0&&(0,K.jsxs)(`div`,{className:`notification-group__embedded-status__content`,children:[`“`,t.comment,`”`]})]})]})},jt=28,Mt=({accountId:e})=>{let t=N(t=>t.accounts.get(e));return t?(0,K.jsx)(De,{withLink:!0,account:t,size:jt}):null},Y=({icon:e,iconId:t,timestamp:n,accountIds:r,actions:i,count:a,statusId:o,labelRenderer:s,labelSeeMoreHref:c,type:l,unread:u,additionalContent:d})=>{let f=M(),p=N(e=>e.accounts.get(r.at(0)??``)),m=(0,G.useMemo)(()=>s((0,K.jsx)(V,{displayProps:{account:p,variant:`simple`}}),a,c),[s,p,a,c]),h=N(e=>e.statuses.getIn([o,`visibility`])===`direct`),g=(0,G.useMemo)(()=>({open:()=>{f(x(o))},reply:()=>{f(E(o))}}),[f,o]);return(0,K.jsx)(L,{handlers:g,children:(0,K.jsxs)(`div`,{role:`button`,className:(0,q.default)(`notification-group focusable notification-group--${l}`,{"notification-group--unread":u,"notification-group--direct":h}),tabIndex:0,children:[(0,K.jsx)(`div`,{className:`notification-group__icon`,children:(0,K.jsx)(R,{icon:e,id:t})}),(0,K.jsxs)(`div`,{className:`notification-group__main`,children:[(0,K.jsxs)(`div`,{className:`notification-group__main__header`,children:[(0,K.jsxs)(`div`,{className:`notification-group__main__header__wrapper`,children:[(0,K.jsx)(Me,{avatarHeight:jt,children:r.slice(0,8).map(e=>(0,K.jsx)(Mt,{accountId:e},e))}),i&&(0,K.jsx)(`div`,{className:`notification-group__actions`,children:i})]}),(0,K.jsxs)(`h2`,{className:`notification-group__main__header__label`,children:[(0,K.jsx)(`span`,{children:m}),n&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{className:`notification-group__main__header__label-separator`,children:`·`}),(0,K.jsx)(B,{timestamp:n})]})]})]}),o&&(0,K.jsx)(`div`,{className:`notification-group__main__status`,children:(0,K.jsx)(Qe,{statusId:o})}),d&&(0,K.jsx)(`div`,{className:`notification-group__main__additional-content`,children:d})]})]})})},Nt=(e,t)=>
1t===1?(0,K.jsx)(r,{id:`notification.admin.sign_up`,defaultMessage:`{name} signed up`,values:{name:e}}):(0,K.jsx)(r,{id:`notification.admin.sign_up.name_and_others`,defaultMessage:`{name} and {count, plural, one {# other} other {# others}} signed up`,values:{name:e,count:t-1}}),Pt=({notification:e,unread:t})=>(0,K.jsx)(Y,{type:`admin-sign-up`,icon:H,iconId:`person-add`,accountIds:e.sampleAccountIds,timestamp:e.latest_page_notification_at,count:e.notifications_count,labelRenderer:Nt,unread:t}),Ft=({notification:{annualReport:e},unread:t})=>{let n=M(),i=e.year,a=(0,G.useCallback)(()=>{n(F({modalType:`ANNUAL_REPORT`,modalProps:{year:i}}))},[n,i]);return(0,K.jsxs)(`div`,{role:`button`,className:(0,q.default)(`notification-group notification-group--link notification-group--annual-report focusable`,{"notification-group--unread":t}),tabIndex:0,children:[(0,K.jsx)(`div`,{className:`notification-group__icon`,children:(0,K.jsx)(R,{id:`celebration`,icon:pt})}),(0,K.jsxs)(`div`,{className:`notification-group__main`,children:[(0,K.jsx)(`p`,{children:(0,K.jsx)(r,{id:`notification.annual_report.message`,defaultMessage:`Your {year} #Wrapstodon awaits! Unveil your year's highlights and memorable moments on Mastodon!`,values:{year:i}})}),(0,K.jsx)(`button`,{onClick:a,className:`link-button`,type:`button`,children:(0,K.jsx)(r,{id:`notification.annual_report.view`,defaultMessage:`View #Wrapstodon`})})]})]})},It={actions:`_notifications_v2_components_notification_collection__actions`,menuButton:`_notifications_v2_components_notification_collection__menuButton`},Lt=({notification:e,unread:t})=>{let{collection:n,type:i}=e,a=je(n?.account_id),o=it(n);return n?(0,K.jsxs)(`div`,{className:(0,q.default)(`notification-group`,`notification-group--${i}`,{"notification-group--unread":t}),children:[(0,K.jsx)(`div`,{className:`notification-group__icon`,children:(0,K.jsx)(R,{id:`collection`,icon:Ve})}),(0,K.jsxs)(`div`,{className:`notification-group__main`,children:[(0,K.jsx)(`div`,{className:`notification-group__main__header`,children:(0,K.jsxs)(`h2`,{className:`notification-group__main__header__label`,children:[i===`added_to_collection`&&(0,K.jsx)(r,{id:`notification.added_to_collection`,defaultMessage:`{name} added you to a collection`,values:{name:(0,K.jsx)(V,{displayProps:{variant:`simple`,account:a}})}}),i===`collection_update`&&(0,K.jsx)(r,{id:`notification.collection_update`,defaultMessage:`{name} edited a collection you’re in`,values:{name:(0,K.jsx)(V,{displayProps:{variant:`simple`,account:a}})}})]})}),(0,K.jsx)(xe,{collection:n}),(0,K.jsxs)(`div`,{className:It.actions,children:[(0,K.jsx)(I,{compact:!0,secondary:!0,className:`button--destructive`,onClick:o,children:(0,K.jsx)(r,{id:`collections.detail.revoke_inclusion`,defaultMessage:`Remove me`})}),(0,K.jsx)(nt,{context:`notifications`,collection:n,className:It.menuButton})]})]})]}):null},Rt=(e,t,n)=>t===1?(0,K.jsx)(r,{id:`notification.favourite`,defaultMessage:`{name} favorited your post`,values:{name:e}}):(0,K.jsx)(r,{id:`notification.favourite.name_and_others_with_link`,defaultMessage:`{name} and <a>{count, plural, one {# other} other {# others}}</a> favorited your post`,values:{name:e,count:t-1,a:e=>n?(0,K.jsx)(P,{to:n,children:e}):e}}),zt=(e,t,n)=>t===1?(0,K.jsx)(r,{id:`notification.favourite_pm`,defaultMessage:`{name} favorited your private mention`,values:{name:e}}):(0,K.jsx)(r,{id:`notification.favourite_pm.name_and_others_with_link`,defaultMessage:`{name} and <a>{count, plural, one {# other} other {# others}}</a> favorited your private mention`,values:{name:e,count:t-1,a:e=>n?(0,K.jsx)(P,{to:n,children:e}):e}}),Bt=({notification:e,unread:t})=>{let{statusId:n}=e,r=N(e=>e.accounts.get(e.statuses.getIn([n,`account`]))?.acct),i=N(e=>e.statuses.getIn([n,`visibility`])===`direct`);return(0,K.jsx)(Y,{type:`favourite`,icon:p,iconId:`star`,accountIds:e.sampleAccountIds,statusId:e.statusId,timestamp:e.latest_page_notification_at,count:e.notifications_count,labelRenderer:i?zt:Rt,labelSeeMoreHref:r?`/@${r}/${n}/favourites`:void 0,unread:t})},Vt=(e,t,n)=>t===1?(0,K.jsx)(r,{id:`notification.follow`,defaultMessage:`{name} followed you`,values:{name:e}}):(0,K.jsx)(r,{id:`notification.follow.name_and_others`,defaultMessage:`{name} and <a>{count, plural, one {# other} other {# others}}</a> followed you`,values:{name:e,count:t-1,a:e=>n?(0,K.jsx)(P,{to:n,children:e}):e}}),Ht=({accountId:e})=>{let t=N(t=>t.accounts.get(e));return t?(0,K.jsx)(ke,{value:t.followers_count,renderer:Pe}):null},Ut=({notification:e,unread:t})=>{let n=N(e=>e.accounts.getIn([o,`username`])),r,i;if(e.sampleAccountIds.length===1){let t=e.sampleAccountIds[0];t&&(r=(0,K.jsx)(Ne,{compact:!0,accountId:e.sampleAccountIds[0]}),i=(0,K.jsx)(Ht,{accountId:t}))}return(0,K.jsx)(Y,{type:`follow`,icon:H,iconId:`person-add`,accountIds:e.sampleAccountIds,timestamp:e.latest_page_notification_at,count:e.notifications_count,labelRenderer:Vt,labelSeeMoreHref:`/@${n}/followers`,unread:t,actions:r,additionalContent:i})},Wt=a({authorize:{id:`follow_request.authorize`,defaultMessage:`Authorize`},reject:{id:`follow_request.reject`,defaultMessage:`Reject`}}),Gt=(e,t)=>t===1?(0,K.jsx)(r,{id:`notification.follow_request`,defaultMessage:`{name} has requested to follow you`,values:{name:e}}):(0,K.jsx)(r,{id:`notification.follow_request.name_and_others`,defaultMessage:`{name} and {count, plural, one {# other} other {# others}} has requested to follow you`,values:{name:e,count:t-1}}),Kt=({notification:e,unread:t})=>{let n=i(),r=M(),a=(0,G.useCallback)(()=>{r(v(e.sampleAccountIds[0]))},[r,e.sampleAccountIds]),o=(0,G.useCallback)(()=>{r(C(e.sampleAccountIds[0]))},[r,e.sampleAccountIds]),c=(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(z,{title:n.formatMessage(Wt.authorize),icon:`check`,iconComponent:s,onClick:a}),(0,K.jsx)(z,{title:n.formatMessage(Wt.reject),icon:`times`,iconComponent:u,onClick:o})]});return(0,K.jsx)(Y,{type:`follow-request`,icon:H,iconId:`person-add`,accountIds:e.sampleAccountIds,timestamp:e.latest_page_notification_at,count:e.notifications_count,labelRenderer:Gt,actions:c,unread:t})},qt=e=>(0,K.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:24,viewBox:`0 -960 960 960`,width:24,...e,children:(0,K.jsx)(`path`,{d:`M760-200v-160q0-50-35-85t-85-35H273l144 144-57 56-240-240 240-240 57 56-144 144h367q83 0 141.5 58.5T840-360v160h-80Z`})}),X=({icon:e,iconId:t,accountIds:n,statusId:r,count:i,labelRenderer:a,type:o,unread:s})=>{let c=M(),l=N(e=>e.accounts.get(n.at(0)??``)),u=(0,G.useMemo)(()=>a((0,K.jsx)(V,{displayProps:{account:l,variant:`simple`}}),i),[a,l,i]),d=N(e=>e.statuses.getIn([r,`visibility`])===`direct`),f=N(e=>r&&Oe(e,{id:r,contextType:`notifications`})),p=(0,G.useMemo)(()=>({open:()=>{c(x(r))},reply:()=>{c(E(r))},boost:()=>{c(fe(r))},favourite:()=>{c(S(r))},toggleHidden:()=>{c(ie(r))}}),[c,r]);return!r||f?null:(0,K.jsx)(L,{handlers:p,children:(0,K.jsxs)(`div`,{role:`button`,className:(0,q.default)(`notification-ungrouped focusable notification-ungrouped--${o}
1`,{"notification-ungrouped--unread":s,"notification-ungrouped--direct":d}),tabIndex:0,children:[(0,K.jsxs)(`h2`,{className:`notification-ungrouped__header`,children:[(0,K.jsx)(`div`,{className:`notification-ungrouped__header__icon`,children:(0,K.jsx)(R,{icon:e,id:t})}),(0,K.jsx)(`span`,{children:u})]}),(0,K.jsx)(Se,{id:r,contextType:`notifications`,withDismiss:!0,skipPrepend:!0,avatarSize:40,unfocusable:!0})]})})},Jt=()=>(0,K.jsx)(r,{id:`notification.label.mention`,defaultMessage:`Mention`}),Yt=()=>(0,K.jsx)(r,{id:`notification.label.private_mention`,defaultMessage:`Private mention`}),Xt=()=>(0,K.jsx)(r,{id:`notification.label.reply`,defaultMessage:`Reply`}),Zt=()=>(0,K.jsx)(r,{id:`notification.label.private_reply`,defaultMessage:`Private reply`}),Qt=({notification:e,unread:t})=>{let[n,r]=N(t=>{let n=e.statusId?t.statuses.get(e.statusId):void 0;return n?[n.get(`visibility`)===`direct`,n.get(`in_reply_to_account_id`)===o]:[!1,!1]},mt.default),i=Jt;return r&&n?i=Zt:r?i=Xt:n&&(i=Yt),(0,K.jsx)(X,{type:`mention`,icon:r?qt:Ke,iconId:`reply`,accountIds:e.sampleAccountIds,count:e.notifications_count,statusId:e.statusId,labelRenderer:i,unread:t})},$t=({notification:{moderationWarning:e},unread:t})=>(0,K.jsx)(ct,{action:e.action,id:e.id,unread:t}),en=()=>(0,K.jsx)(r,{id:`notification.poll`,defaultMessage:`A poll you voted in has ended`}),tn=()=>(0,K.jsx)(r,{id:`notification.own_poll`,defaultMessage:`Your poll has ended`}),nn=({notification:e,unread:t})=>(0,K.jsx)(X,{type:`poll`,icon:Ye,iconId:`bar-chart-4-bars`,accountIds:e.sampleAccountIds,count:e.notifications_count,statusId:e.statusId,labelRenderer:e.sampleAccountIds[0]===o?tn:en,unread:t}),rn=e=>(0,K.jsx)(r,{id:`notification.label.quote`,defaultMessage:`{name} quoted your post`,values:{name:e}}),an=({notification:e,unread:t})=>(0,K.jsx)(X,{type:`quote`,icon:c,iconId:`quote`,accountIds:e.sampleAccountIds,count:e.notifications_count,statusId:e.statusId,labelRenderer:rn,unread:t}),on=e=>(0,K.jsx)(r,{id:`notification.quoted_update`,defaultMessage:`{name} edited a post you have quoted`,values:{name:e}}),sn=({notification:e,unread:t})=>(0,K.jsx)(X,{type:`update`,icon:Xe,iconId:`edit`,accountIds:e.sampleAccountIds,count:e.notifications_count,statusId:e.statusId,labelRenderer:on,unread:t}),cn=(e,t,n)=>t===1?(0,K.jsx)(r,{id:`notification.reblog`,defaultMessage:`{name} boosted your post`,values:{name:e}}):(0,K.jsx)(r,{id:`notification.reblog.name_and_others_with_link`,defaultMessage:`{name} and <a>{count, plural, one {# other} other {# others}}</a> boosted your post`,values:{name:e,count:t-1,a:e=>n?(0,K.jsx)(P,{to:n,children:e}):e}}),ln=({notification:e,unread:t})=>{let{statusId:n}=e,r=N(e=>e.accounts.get(e.statuses.getIn([n,`account`]))?.acct);return(0,K.jsx)(Y,{type:`reblog`,icon:d,iconId:`repeat`,accountIds:e.sampleAccountIds,statusId:e.statusId,timestamp:e.latest_page_notification_at,count:e.notifications_count,labelRenderer:cn,labelSeeMoreHref:r?`/@${r}/${n}/reblogs`:void 0,unread:t})},un=({notification:{event:e},unread:t})=>(0,K.jsx)(lt,{type:e.type,target:e.target_name,followersCount:e.followers_count,followingCount:e.following_count,unread:t,hidden:!1}),dn=e=>(0,K.jsx)(r,{id:`notification.status`,defaultMessage:`{name} just posted`,values:{name:e}}),fn=({notification:e,unread:t})=>(0,K.jsx)(X,{type:`status`,icon:tt,iconId:`notifications-active`,accountIds:e.sampleAccountIds,count:e.notifications_count,statusId:e.statusId,labelRenderer:dn,unread:t}),pn=e=>(0,K.jsx)(r,{id:`notification.update`,defaultMessage:`{name} edited a post`,values:{name:e}}),mn=({notification:e,unread:t})=>(0,K.jsx)(X,{type:`update`,icon:Xe,iconId:`edit`,accountIds:e.sampleAccountIds,count:e.notifications_count,statusId:e.statusId,labelRenderer:pn,unread:t}),hn=({notificationGroupId:e,unread:t})=>{let n=N(t=>t.notificationGroups.groups.find(t=>t.type!==`gap`&&t.group_key===e)),r=M(),i=n?.type===`gap`?void 0:n?.sampleAccountIds[0],a=(0,G.useMemo)(()=>({openProfile:()=>{i&&r(b(i))},mention:()=>{i&&r(de(i))}}),[r,i]);if(!n||n.type===`gap`)return null;let o;switch(n.type){case`reblog`:o=(0,K.jsx)(ln,{unread:t,notification:n});break;case`favourite`:o=(0,K.jsx)(Bt,{unread:t,notification:n});break;case`severed_relationships`:o=(0,K.jsx)(un,{unread:t,notification:n});break;case`mention`:o=(0,K.jsx)(Qt,{unread:t,notification:n});break;case`quote`:o=(0,K.jsx)(an,{unread:t,notification:n});break;case`follow`:o=(0,K.jsx)(Ut,{unread:t,notification:n});break;case`follow_request`:o=(0,K.jsx)(Kt,{unread:t,notification:n});break;case`poll`:o=(0,K.jsx)(nn,{unread:t,notification:n});break;case`status`:o=(0,K.jsx)(fn,{unread:t,notification:n});break;case`update`:o=(0,K.jsx)(mn,{unread:t,notification:n});break;case`quoted_update`:o=(0,K.jsx)(sn,{unread:t,notification:n});break;case`admin.sign_up`:o=(0,K.jsx)(Pt,{unread:t,notification:n});break;case`admin.report`:o=(0,K.jsx)(At,{unread:t,notification:n});break;case`moderation_warning`:o=(0,K.jsx)($t,{unread:t,notification:n});break;case`annual_report`:o=(0,K.jsx)(Ft,{unread:t,notification:n});break;case`added_to_collection`:case`collection_update`:o=(0,K.jsx)(Lt,{unread:t,notification:n});break;default:return null}return(0,K.jsx)(L,{handlers:a,children:o})},Z=a({mentions:{id:`notifications.filter.mentions`,defaultMessage:`Mentions`},favourites:{id:`notifications.filter.favourites`,defaultMessage:`Favorites`},boosts:{id:`notifications.filter.boosts`,defaultMessage:`Boosts`},polls:{id:`notifications.filter.polls`,defaultMessage:`Poll results`},follows:{id:`notifications.filter.follows`,defaultMessage:`Follows`},collections:{id:`notifications.filter.collections`,defaultMessage:`Collections`},statuses:{id:`notifications.filter.statuses`,defaultMessage:`Updates from people you follow`}}),Q=({selectedFilter:e,type:t,title:n,children:r})=>{let i=M(),a=(0,G.useCallback)(()=>{i(O({filterType:t}))},[i,t]);return(0,K.jsx)(`button`,{className:e===t?`active`:``,onClick:a,title:n,type:`button`,children:r})},gn=()=>{let e=i(),t=N(ne),n=N(y);return N(me)?n?(0,K.jsxs)(`div`,{className:`notification__filter-bar`,children:[(0,K.jsx)(Q,{selectedFilter:t,type:`all`,children:(0,K.jsx)(r,{id:`notifications.filter.all`,defaultMessage:`All`})},`all`),(0,K.jsx)(Q,{selectedFilter:t,type:`mention`,title:e.formatMessage(Z.mentions),children:(0,K.jsx)(R,{id:`reply-all`,icon:f})},`mention`),(0,K.jsx)(Q,{selectedFilter:t,type:`favourite`,title:e.formatMessage(Z.favourites),children:(0,K.jsx)(R,{id:`star`,icon:l})},`favourite`),(0,K.jsx)(Q,{selectedFilter:t,type:`reblog`,title:e.formatMessage(Z.boosts),children:(0,K.jsx)(R,{id:`retweet`,icon:d})},`reblog`),(0,K.jsx)(Q,{selectedFilter:t,type:`poll`,title:e.formatMessage(Z.polls),children:(0,K.jsx)(R,{id:`tasks`,icon:Ze})},`poll`),(0,K.jsx)(Q,{selectedFilter:t,type:`status`,title:e.formatMessage(Z.statuses),children:(0,K.jsx)(R,{id:`home`,icon:Be})},`status`),(0,K.jsx)(Q,{selectedFilter:t,type:`follow`,title:e.formatMessage(Z.follows),children:(0,K.jsx)(R,{id:`user-plus`,icon:Ue})},`follow`),(0,K.jsx)(Q,{selectedFilter:t,type:`collection`,title:e.formatMessage(Z.collections),children:(0,K.jsx)(R,{id:`collections`,icon:qe})},`collection`)]}):(0,K.jsxs)(`div`,{className:`notification__filter-bar`,children:[(0,K.jsx)(Q,{selectedFilter:t,type:`all`,children:(0,K.jsx)(r,{id:`notifications.filter.all`,defaultMessage:`All`})},`all`),(0,K.jsx)(Q,{selectedFilter:t,type:`mention`,children:(0,K.jsx)(r,{id:`notifications.filter.mentions`,defaultMessage:`Mentions`})},`mention`)]}):null},$=a({title:{id:`column.notifications`,defaultMessage:`Notifications`},markAsRead:{id:`notifications.mark_as_read`,defaultMessage:`Mark every notification as read`}}),_n=({columnId:e,multiColumn:t})=>{let n=i(),a=N(Re,mt.default),o=M(),s=N(e=>e.notificationGroups.isLoading),c=a.at(-1)?.type===`gap`,l=N(e=>re(e)?e.notificationGroups.readMarkerId:`0`),u=N(ze),d=N(Le),f=N(Ie),p=N(e=>e.notificationGroups.mergedNotifications===`needs-reload`),m=d>0||p,h=N(re)&&f,g=N(ge),v=(0,G.useRef)(null);(0,G.useEffect)(()=>(o(ce()),()=>{o(ae()),o(j({top:!1}))}),[o]);let y=(0,G.useCallback)(e=>
1{o(ue({gap:e}))},[o]),b=U(()=>{let e=a.at(-1);e?.type===`gap`&&o(ue({gap:e}))},300,{leading:!0}),x=(0,G.useCallback)(()=>{o(pe())},[o]),S=U(()=>{o(j({top:!0}))},100),C=U(()=>{o(j({top:!1}))},100);(0,G.useEffect)(()=>()=>{b.cancel(),S.cancel(),C.cancel()},[b,S,C]);let ne=(0,G.useCallback)(()=>{o(e?_(e):ee(`NOTIFICATIONS`,{}))},[e,o]),w=(0,G.useCallback)(t=>{o(le(e,t))},[o,e]),ie=(0,G.useCallback)(()=>{v.current?.scrollTop()},[]),T=(0,G.useCallback)(()=>{o(se()),o(oe({immediate:!0}))},[o]),E=!!e,D=(0,K.jsx)(r,{id:`empty_column.notifications`,defaultMessage:`You don't have any notifications yet. When other people interact with you, you will see it here.`}),{signedIn:O}=Te(),k=O?(0,K.jsx)(gn,{}):null,A=(0,G.useMemo)(()=>a.length===0&&!c?null:a.map(e=>e.type===`gap`?(0,K.jsx)($e,{disabled:s,param:e,onClick:y},`${e.maxId}-${e.sinceId}`):(0,K.jsx)(hn,{notificationGroupId:e.group_key,unread:l!==`0`&&!!e.page_max_id&&te(e.page_max_id,l)>0},e.group_key)),[a,s,c,l,y]),de=(0,K.jsxs)(K.Fragment,{children:[g&&(0,K.jsx)(yt,{}),(0,K.jsx)(_t,{})]}),fe=O?(0,K.jsx)(et,{scrollKey:`notifications-${e}`,trackScroll:!E,isLoading:s,showLoading:s&&a.length===0,hasMore:c,numPending:u,prepend:de,alwaysPrepend:!0,emptyMessage:D,onLoadMore:b,onLoadPending:x,onScrollToTop:S,onScroll:C,bindToDocument:!t,children:A}):(0,K.jsx)(rt,{}),me=(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(gt,{className:`column-header__button`}),h&&(0,K.jsx)(`button`,{"aria-label":n.formatMessage($.markAsRead),title:n.formatMessage($.markAsRead),onClick:T,className:`column-header__button`,type:`button`,children:(0,K.jsx)(R,{id:`done-all`,icon:ft})})]});return(0,K.jsxs)(we,{bindToDocument:!t,ref:v,label:n.formatMessage($.title),children:[(0,K.jsx)(We,{icon:`bell`,iconComponent:He,active:m,title:n.formatMessage($.title),onPin:ne,onMove:w,onClick:ie,pinned:E,multiColumn:t,extraButton:me,children:(0,K.jsx)(Ot,{})}),k,fe,(0,K.jsxs)(be,{children:[(0,K.jsx)(`title`,{children:n.formatMessage($.title)}),(0,K.jsx)(`meta`,{name:`robots`,content:`noindex`})]})]})};export{_n as Notifications,_n as default};
2//# sourceMappingURL=notifications_v2-DcMM6NEa.js.map

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.