phanpy-cz/assets/main-Oquos95D.js

35 lines
288 KiB
JavaScript
Raw Permalink Normal View History

2024-11-13 19:53:32 +00:00
import{A as Y,y as se,h as M,s as A,a as ce,b as We,i as g,C as st,u as qe,c as e,T as u,d as me,g as wt,p as Mt,e as vn,f as U,j as Qe,k as $n,L as ao,l as ke,D as ro,m as lo,o as Yn,q as Vt,r as _t,t as ct,v as uo,w as Pe,x as yn,z as _i,_ as gt,B as cs,E as td,F as as,G as rs,H as ho,I as fo,J as it,K as po,M as ei,N as ft,O as mo,P as go,Q as bo,R as ti,S as $t,U as Xe,V as ls,W as ds,X as vo,Y as tn,Z as yo,$ as wo,a0 as Dn,a1 as Nn,a2 as ko,a3 as Si,a4 as _o,a5 as So,a6 as Co,a7 as ni,a8 as Ve,a9 as Io,aa as To,ab as xo,ac as Ao}from"./useTitle-i_dVJKRH.js";import{u as ii,s as de,a as Ue,o as Ci,b as Eo,I as S,M as Fe,A as dt,N as mt,c as at,d as we,e as Be,f as Ge,g as lt,L as ue,l as It,h as us,t as Ii,i as Ze,R as Gt,p as id,j as tt,k as Kt,m as rt,n as hs,q as jn,E as fs,r as Ke,v as ht,w as Ro,S as wn,x as Ti,T as ps,y as ut,z as si,B as Ye,C as kt,D as Lo,F as Mo,G as Et,H as oi,J as ms,K as $o,O as Ft,P as Do,Q as No,U as gs,V as Po,W as Oo,X as bs,Y as zo,Z as Rt,_ as ci,$ as Uo,a0 as vs,a1 as Bo,a2 as ys,a3 as Fo,a4 as Ho,a5 as qo,a6 as xi,a7 as Yo,a8 as Ot}from"./fuse-QSdEypyG.js";var ws=jo;function jo(t,n,i){var s=null,o=null,a=function(){s&&(clearTimeout(s),o=null,s=null)},h=function(){var c=o;a(),c&&c()},r=function(){if(!n)return t.apply(this,arguments);var c=this,l=arguments,p=i&&!s;if(a(),o=function(){t.apply(c,l)},s=setTimeout(function(){if(s=null,!p){var f=o;return o=null,f()}},n),p)return o()};return r.cancel=a,r.flush=h,r}/*!
* swiped-events.js - v@version@
* Pure JavaScript swipe events
* https://github.com/john-doherty/swiped-events
* @inspiration https://stackoverflow.com/questions/16348031/disable-scrolling-when-touch-moving-certain-element
* @author John Doherty <www.johndoherty.info>
* @license MIT
*/(function(t,n){"use strict";typeof t.CustomEvent!="function"&&(t.CustomEvent=function(d,v){v=v||{bubbles:!1,cancelable:!1,detail:void 0};var b=n.createEvent("CustomEvent");return b.initCustomEvent(d,v.bubbles,v.cancelable,v.detail),b},t.CustomEvent.prototype=t.Event.prototype),n.addEventListener("touchstart",p,!1),n.addEventListener("touchmove",f,!1),n.addEventListener("touchend",l,!1);var i=null,s=null,o=null,a=null,h=null,r=null,c=0;function l(d){if(r===d.target){var v=parseInt(m(r,"data-swipe-threshold","20"),10),b=m(r,"data-swipe-unit","px"),y=parseInt(m(r,"data-swipe-timeout","500"),10),w=Date.now()-h,k="",C=d.changedTouches||d.touches||[];if(b==="vh"&&(v=Math.round(v/100*n.documentElement.clientHeight)),b==="vw"&&(v=Math.round(v/100*n.documentElement.clientWidth)),Math.abs(o)>Math.abs(a)?Math.abs(o)>v&&w<y&&(o>0?k="swiped-left":k="swiped-right"):Math.abs(a)>v&&w<y&&(a>0?k="swiped-up":k="swiped-down"),k!==""){var I={dir:k.replace(/swiped-/,""),touchType:(C[0]||{}).touchType||"direct",fingers:c,xStart:parseInt(i,10),xEnd:parseInt((C[0]||{}).clientX||-1,10),yStart:parseInt(s,10),yEnd:parseInt((C[0]||{}).clientY||-1,10)};r.dispatchEvent(new CustomEvent("swiped",{bubbles:!0,cancelable:!0,detail:I})),r.dispatchEvent(new CustomEvent(k,{bubbles:!0,cancelable:!0,detail:I}))}i=null,s=null,h=null}}function p(d){d.target.getAttribute("data-swipe-ignore")!=="true"&&(r=d.target,h=Date.now(),i=d.touches[0].clientX,s=d.touches[0].clientY,o=0,a=0,c=d.touches.length)}function f(d){if(!(!i||!s)){var v=d.touches[0].clientX,b=d.touches[0].clientY;o=i-v,a=s-b}}function m(d,v,b){for(;d&&d!==n.documentElement;){var y=d.getAttribute(v);if(y)return y;d=d.parentNode}return b}})(window,document);function Ht(t=()=>{},n=[]){const i=Y(t);se(()=>{i.current=t},[n]),se(()=>{const s=()=>{const o=document.hidden||document.visibilityState==="hidden";i.current(!o)};return document.addEventListener("visibilitychange",s),()=>document.removeEventListener("visibilitychange",s)},[])}const Vo=1e3*3,Ai=2e4,Go=st(function({isLoggedIn:n}){const[i,s]=M(!0),o=Y();Ht(c=>{clearTimeout(o.current),c?s(!0):o.current=setTimeout(()=>{s(!1)},Ai)});const a=async(c,l,p)=>{var f;if(A.notificationsLast){const m=c.v1.notifications.list({limit:1,sinceId:A.notificationsLast.id}),{value:d}=await m.next();if(d!=null&&d.length)if(p)A.notificationsShowNew=!0;else{let v;try{const b=await c.v1.markers.fetch({timeline:"notifications"});v=(f=b==null?void 0:b.notifications)==null?void 0:f.lastReadId}catch{}v?A.notificationsShowNew=d[0].id!==v:A.notificationsShowNew=!0}}};se(()=>{let c,l,p;if(n&&i){const{masto:f,streaming:m,instance:d}=ce();(async()=>{await a(f,d);let v=!1;m&&(l=setTimeout(()=>{(async()=>{try{v=!0,c=m.user.notification.subscribe();for await(const b of c){if(!c||!i)break;b.event==="notification"&&We(b.payload,d,{skipThreading:!0}),A.notificationsShowNew=!0}}catch{v=!1}v||(p=setInterval(()=>{a(f,d,!0)},Ai))})()},Vo))})()}return()=>{var f;(f=c==null?void 0:c.unsubscribe)==null||f.call(c),c=null,clearTimeout(l),clearInterval(p)}},[i,n]);const h=Y(),r=()=>{h.current=Date.now(),fetch("./version.json").then(c=>c.json()).then(c=>{c&&(A.appVersion=c)}).catch(c=>{})};return ii(r,i&&1e3*60*30),Ht(c=>{c&&(h.current?Date.now()-h.current>1e3*60*60&&r():r())}),Ue("shift+alt+k",()=>{const c=A.settings.cloakMode;A.settings.cloakMode=!c,de({text:c?g._({id:"oguMwa"}):g._({id:"IXZLPs"})})}),null});function Ko(){const t=qe(A);function n(i){if(t.composerState.minimized){A.composerState.minimized=!1,Ci();return}i.shiftKey?Eo()||(A.showCompose=!0):(Ci(),A.showCompose=!0)}return Ue("c, shift+c",n,{ignoreEventWhen:i=>!!document.querySelector("#modal-container > *")}),e("button",{type:"button",id:"compose-button",onClick:n,class:`${t.composerState.minimized?"min":""} ${t.composerState.publishing?"loading":""} ${t.composerState.publishingError?"error":""}`,children:e(S,{icon:"quill",size:"xl",alt:g._({id:"QOhkyl"})})})}const Wo=st(function(){const n=qe(A);function i(){A.showKeyboardShortcutsHelp=!1}return Ue("?, shift+?, shift+slash",s=>{A.showKeyboardShortcutsHelp=!0},{ignoreEventWhen:s=>!!doc
${Ti(h)}`).join(`
`))||"",o=Ti(t)+(s?`
${s}`:"");return e("div",{class:"sheet",children:[!!i&&e("button",{type:"button",class:"sheet-close",onClick:i,children:e(S,{icon:"x",alt:g._({id:"yz7wBu"})})}),e("header",{children:e("h2",{children:e(u,{id:"9groMz"})})}),e("main",{children:[e("p",{style:{whiteSpace:"pre-wrap"},children:o}),e(ps,{forceTranslate:!0,text:o})]})]})}function Bc({accountID:t,onClose:n}){const{masto:i}=ce(),[s,o]=M("default"),[a,h]=M([]),[r,c]=M([]),[l,p]=Mt(d=>d+1,0);se(()=>{o("loading"),(async()=>{try{const d=await on();h(d);const v=await i.v1.accounts.$select(t).lists.list();c(v),o("default")}catch{o("error")}})()},[l]);const[f,m]=M(!1);return e("div",{class:"sheet",id:"list-add-remove-container",children:[!!n&&e("button",{type:"button",class:"sheet-close",onClick:n,children:e(S,{icon:"x",alt:g._({id:"yz7wBu"})})}),e("header",{children:e("h2",{children:e(u,{id:"sJ2yQc"})})}),e("main",{children:[a.length>0?e("ul",{class:"list-add-remove",children:a.map(d=>{const v=r.some(b=>b.id===d.id);return e("li",{children:e("button",{type:"button",class:`light ${v?"checked":""}`,disabled:s==="loading",onClick:()=>{o("loading"),(async()=>{try{v?await i.v1.lists.$select(d.id).accounts.remove({accountIds:[t]}):await i.v1.lists.$select(d.id).accounts.create({accountIds:[t]}),p()}catch{o("error"),alert(v?g._({id:"7KnEYa"}):g._({id:"Tba8uO"}))}})()},children:[e(S,{icon:"check-circle",alt:"☑️"}),e("span",{children:d.title})]})})})}):s==="loading"?e("p",{class:"ui-state",children:e(Pe,{abrupt:!0})}):s==="error"?e("p",{class:"ui-state",children:e(u,{id:"v/l5uA"})}):e("p",{class:"ui-state",children:e(u,{id:"/MJ7gZ"})}),e("button",{type:"button",class:"plain2",onClick:()=>m(!0),disabled:s!=="default",children:[e(S,{icon:"plus",size:"l"})," ",e("span",{children:e(u,{id:"Sb2gYF"})})]})]}),f&&e(Fe,{onClick:d=>{d.target===d.currentTarget&&m(!1)},children:e(mi,{list:f==null?void 0:f.list,onClose:d=>{d.state==="success"&&p(),m(!1)}})})]})}function Fc({account:t,note:n,onRelationshipChange:i=()=>{},onClose:s=()=>{}}){const{masto:o}=ce(),[a,h]=M("default"),r=Y(null);return se(()=>{let c;return r.current&&!n&&(c=setTimeout(()=>{var l,p;(p=(l=r.current).focus)==null||p.call(l)},100)),()=>{clearTimeout(c)}},[]),e("div",{class:"sheet",id:"private-note-container",children:[!!s&&e("button",{type:"button",class:"sheet-close",onClick:s,children:e(S,{icon:"x",alt:g._({id:"yz7wBu"})})}),e("header",{children:e("b",{children:e(u,{id:"DYqYm5",values:{0:(t==null?void 0:t.username)||(t==null?void 0:t.acct)},components:{0:e("span",{class:"bidi-isolate"})}})})}),e("main",{children:e("form",{onSubmit:c=>{c.preventDefault();const p=new FormData(c.target).get("note");(p==null?void 0:p.trim())!==(n==null?void 0:n.trim())&&(h("loading"),(async()=>{try{const f=await o.v1.accounts.$select(t==null?void 0:t.id).note.create({comment:p});h("default"),i(f),s()}catch(f){h("error"),alert((f==null?void 0:f.message)||g._({id:"ot8LpF"}))}})())},children:[e("textarea",{ref:r,name:"note",disabled:a==="loading",dir:"auto",children:n}),e("footer",{children:[e("button",{type:"button",class:"light",disabled:a==="loading",onClick:()=>{s==null||s()},children:e(u,{id:"dEgA5A"})}),e("span",{children:[e(Pe,{abrupt:!0,hidden:a!=="loading"}),e("button",{disabled:a==="loading",type:"submit",children:e(u,{id:"SrwrEj"})})]})]})]})})]})}function Hc({onClose:t=()=>{}}){const{masto:n}=ce(),[i,s]=M("loading"),[o,a]=M(null);se(()=>{(async()=>{try{const f=await n.v1.accounts.verifyCredentials();a(f),s("default")}catch{s("error")}})()},[]);const{displayName:h,source:r}=o||{},{note:c,fields:l}=r||{},p=Y(null);return e("div",{class:"sheet",id:"edit-profile-container",children:[!!t&&e("button",{type:"button",class:"sheet-close",onClick:t,children:e(S,{icon:"x",alt:g._({id:"yz7wBu"})})}),e("header",{children:e("b",{children:e(u,{id:"9OpVZg"})})}),e("main",{children:i==="loading"?e("p",{class:"ui-state",children:e(Pe,{abrupt:!0})}):e("form",{onSubmit:f=>{f.preventDefault();const m=new FormData(f.target),d=m.get("display_name"),v=m.get("note"),b=p.current.querySelectorAll('input[name^="fields_attributes"]'),y=[];b.forEach(w=>{co
rgb(${(Z=L.light)==null?void 0:Z.join(",")}) ${V}%,
rgb(${(F=L.light)==null?void 0:F.join(",")}) ${W}%
`,dark:`
rgb(${(H=L.dark)==null?void 0:H.join(",")}) ${V}%,
rgb(${(N=L.dark)==null?void 0:N.join(",")}) ${W}%
`}:{light:`
transparent ${V}%,
transparent ${W}%
`,dark:`
transparent ${V}%,
transparent ${W}%
`}}),$=x.map(L=>L.light).join(", "),D=x.map(L=>L.dark).join(", ");return{light:$,dark:D}},[y]);let k=Y(null);return se(()=>()=>{var T,_;(_=(T=k.current)==null?void 0:T.hideToast)==null||_.call(T)},[]),gt(()=>{const T=y[l];let _,x;if(T){const $=me.local.get("theme");if($){const D=`rgb(${T[$].join(",")})`;_=document.querySelector('meta[name="theme-color"][data-theme-setting="manual"]'),_&&(x=_.content,_.content=D)}else{const D=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",L=`rgb(${T[D].join(",")})`;_=document.querySelector(`meta[name="theme-color"][media*="${D}"]`),_&&(x=_.content,_.content=L)}}return()=>{_&&x&&(_.content=x)}},[l,y]),e("div",{class:`media-modal-container media-modal-count-${t==null?void 0:t.length}`,children:[e("div",{ref:c,tabIndex:"0","data-swipe-threshold":"44",class:"carousel",onClick:T=>{(T.target.classList.contains("carousel-item")||T.target.classList.contains("media")||T.target.classList.contains("media-zoom"))&&a()},style:t.length>1?{backgroundAttachment:"local","--accent-gradient-light":w==null?void 0:w.light,"--accent-gradient-dark":w==null?void 0:w.dark}:{},children:t==null?void 0:t.map((T,_)=>{var $,D;const x=t.length===1?y[_]:null;return e("div",{class:"carousel-item",style:x?{"--accent-color":`rgb(${x.default.join(",")})`,"--accent-light-color":`rgb(${($=x.light)==null?void 0:$.join(",")})`,"--accent-dark-color":`rgb(${(D=x.dark)==null?void 0:D.join(",")})`,"--accent-alpha-color":`rgba(${x.default.join(",")}, 0.4)`}:{},tabindex:"0",ref:_===l?f:null,onClick:L=>{L.target.classList.contains("media")||v(!d)},children:[!!T.description&&e("button",{type:"button",class:"media-alt",hidden:!d,onClick:()=>{A.showMediaAlt={alt:T.description,lang:s}},children:[e("span",{class:"alt-badge",children:"ALT"}),e("span",{class:"media-alt-desc",lang:s,dir:"auto",children:T.description})]}),e(ms,{media:T,showOriginal:!0,lang:s})]},T.id)})}),e("div",{class:"carousel-top-controls",hidden:!d,children:[e("span",{children:e("button",{type:"button",class:"carousel-button",onClick:()=>a(),children:e(S,{icon:"x",alt:g._({id:"yz7wBu"})})})}),(t==null?void 0:t.length)>1?e("span",{class:"carousel-dots",children:t==null?void 0:t.map((T,_)=>e("button",{type:"button",disabled:_===l,class:`carousel-dot ${_===l?"active":""}`,onClick:x=>{x.preventDefault(),x.stopPropagation();const $=c.current.clientWidth*_*(Et()?-1:1);c.current.focus(),c.current.scrollTo({left:$,behavior:"smooth"})},children:e(S,{icon:"round",size:"s",alt:"⸱"})},T.id))}):e("span",{}),e("span",{children:[e(at,{overflow:"auto",align:"end",position:"anchor",gap:4,menuClassName:"glass-menu",menuButton:e("button",{type:"button",class:"carousel-button",children:e(S,{icon:"more",alt:g._({id:"2FYpfJ"})})}),children:[e(Be,{href:((C=t[l])==null?void 0:C.remoteUrl)||((I=t[l])==null?void 0:I.url),class:"carousel-button",target:"_blank",title:g._({id:"5hXGws"}),children:[e(S,{icon:"popout"}),e("span",{children:e(u,{id:"aDr7Vc"})})]}),!1]})," ",e(ue,{to:`${i?`/${i}`:""}/s/${n}${window.matchMedia("(min-width: calc(40em + 350px))").matches?`?media=${l+1}`:""}`,class:"button carousel-button media-post-link",children:[e("span",{class:"button-label",children:[e(u,{id:"ISg5SQ"})," "]}),"»"]})]})]}),(t==null?void 0:t.length)>1&&e("div",{class:"carousel-controls",hidden:!d,children:[e("button",{type:"button",class:"carousel-button",hidden:l===0,onClick:T=>{T.preventDefault(),T.stopPropagation(),c.current.focus(),c.current.scrollTo({left:c.current.clientWidth*(l-1)*(Et()?-1:1),behavior:"smooth"})},children:e(S,{icon:"arrow-left",alt:g._({id:"DHhJ7s"})})}),e("button",{type:"button",class:"carousel-button",hidden:l===t.length-1,onClick:T=>{T.preventDefault(),T.stopPropagation(),c.current.focus(),c.current.scrollTo({left:c.current.clientWidth*(l+1)*(Et()?-1:1),behavior:"smooth"})},children:e(S,{icon:"arrow-right",alt:g._({id:"hXzOVo"})})})]})]})}const fa=[,"spam","legal","violation","other"],Zt={spam:{label:{id:"t8dIOP"},description:{id:"csQin/"}},legal:{label:{id:"IjKdHM"},description:{id:"e6tGFu"}},violation:{label:{id:"KPFHM2"},description:{i
<phanpy-shortcuts-settings>${k}</phanpy-shortcuts-settings>`,de(g._({id:"9ZYiLz"})),await s.v1.accounts.$select(d).note.create({comment:w}),c("default"),de(g._({id:"5w02SH"}))}}catch{c("error"),de(g._({id:"aVsTYo"}))}},title:g._({id:"gWd6Cu"}),children:[e(S,{icon:"cloud"}),e(S,{icon:"arrow-up"})]})," ",o.length>0&&e("small",{class:"insignificant ib",children:e(u,{id:"IPXOXm",values:{0:o.length}})})]}),!!o&&e("details",{children:[e("summary",{class:"insignificant",children:e("small",{children:e(u,{id:"e5E+WH"})})}),e("textarea",{style:{width:"100%"},rows:10,readOnly:!0,children:JSON.stringify(t.filter(Boolean),null,2)})]})]}),A.settings.shortcutSettingsCloudImportExport&&e("footer",{children:e("p",{children:[e(S,{icon:"cloud"})," ",e(u,{id:"C4T6O/"})]})})]})]})}as(A,t=>{for(const[n,i,s,o]of t)/^show/i.test(i)&&!s&&Kn()});function Aa(){var s,o,a,h,r,c,l,p;const t=qe(A),n=rs(),i=Vt();return se(()=>{setTimeout(ho,1e3)},[]),e(U,{children:[!!t.showCompose&&e(Fe,{class:`solid ${t.composerState.minimized?"min":""}`,minimized:!!t.composerState.minimized,children:e(fo,{replyToStatus:typeof t.showCompose!="boolean"?t.showCompose.replyToStatus:((s=window.__COMPOSE__)==null?void 0:s.replyToStatus)||null,editStatus:((o=A.showCompose)==null?void 0:o.editStatus)||((a=window.__COMPOSE__)==null?void 0:a.editStatus)||null,draftStatus:((h=A.showCompose)==null?void 0:h.draftStatus)||((r=window.__COMPOSE__)==null?void 0:r.draftStatus)||null,onClose:f=>{const{newStatus:m,instance:d,type:v}=f||{};A.showCompose=!1,window.__COMPOSE__=null,m&&(A.reloadStatusPage++,de({text:{post:g._({id:"aTyHBW"}),reply:g._({id:"lZdBKl"}),edit:g._({id:"a5BN7l"})}[v||"post"],delay:1e3,duration:1e4,onClick:b=>{b.hideToast(),A.prevLocation=i,n(d?`/${d}/s/${m.id}`:`/s/${m.id}`)}}))}})}),!!t.showSettings&&e(Fe,{onClose:()=>{A.showSettings=!1},children:e(_c,{onClose:()=>{A.showSettings=!1}})}),!!t.showAccounts&&e(Fe,{onClose:()=>{A.showAccounts=!1},children:e(uc,{onClose:()=>{A.showAccounts=!1}})}),!!t.showAccount&&e(Fe,{onClose:()=>{A.showAccount=!1},children:e(jc,{account:((c=t.showAccount)==null?void 0:c.account)||t.showAccount,instance:(l=t.showAccount)==null?void 0:l.instance,onClose:({destination:f}={})=>{A.showAccount=!1}})}),!!t.showDrafts&&e(Fe,{onClose:()=>{A.showDrafts=!1},children:e(Vc,{onClose:()=>A.showDrafts=!1})}),!!t.showMediaModal&&e(Fe,{onClick:f=>{(f.target===f.currentTarget||f.target.classList.contains("media"))&&(A.showMediaModal=!1)},children:e(Ns,{mediaAttachments:t.showMediaModal.mediaAttachments,instance:t.showMediaModal.instance,index:t.showMediaModal.index,statusID:t.showMediaModal.statusID,onClose:()=>{A.showMediaModal=!1}})}),!!t.showShortcutsSettings&&e(Fe,{onClose:()=>{A.showShortcutsSettings=!1},children:e(Ia,{onClose:()=>A.showShortcutsSettings=!1})}),!!t.showGenericAccounts&&e(Fe,{onClose:()=>{A.showGenericAccounts=!1},children:e(Wc,{instance:t.showGenericAccounts.instance,excludeRelationshipAttrs:t.showGenericAccounts.excludeRelationshipAttrs,postID:t.showGenericAccounts.postID,onClose:()=>A.showGenericAccounts=!1,blankCopy:t.showGenericAccounts.blankCopy})}),!!t.showMediaAlt&&e(Fe,{onClose:f=>{A.showMediaAlt=!1},children:e(Zc,{alt:t.showMediaAlt.alt||t.showMediaAlt,lang:(p=t.showMediaAlt)==null?void 0:p.lang,onClose:()=>{A.showMediaAlt=!1}})}),!!t.showEmbedModal&&e(Fe,{class:"solid",onClose:()=>{A.showEmbedModal=!1},children:e(Kc,{html:t.showEmbedModal.html,url:t.showEmbedModal.url,width:t.showEmbedModal.width,height:t.showEmbedModal.height,onClose:()=>{A.showEmbedModal=!1}})}),!!t.showReportModal&&e(Fe,{onClose:()=>{A.showReportModal=!1},children:e(pa,{account:t.showReportModal.account,post:t.showReportModal.post,onClose:()=>{A.showReportModal=!1}})})]})}function Zn({accountID:t,onChange:n}){const{masto:i}=ce(),[s,o]=M("default"),[a,h]=M(null),[r,c]=M(null),l=r!==null;return e("p",{class:"follow-request-buttons",children:[e("button",{type:"button",disabled:s==="loading"||l,onClick:()=>{o("loading"),h("accept"),(async()=>{try{const p=await i.v1.followRequests.$select(t).authorize();if(!(p!=null&&p.followedBy))throw new Error("Follow
media-post
${te?"filtered":""}
${pe?"has-spoiler":""}
${le?"show-media":""}
`,children:e(ms,{class:t,media:fe,lang:Z,to:`/${s}/s/${k}?media-only=${O+1}`,onClick:a?re=>a(re,O,fe,i):void 0})},E)})}const Yi=st(Ha);function qa(t){var T,_,x,$,D;const n=qe(A),{masto:i,instance:s,authenticated:o}=ce(),[a,h]=ke(()=>{const L=me.local.getJSON("accounts")||[];return[L.find(V=>V.info.id===wt())||L[0],L.length>1]},[]),r=(n.settings.shortcutsViewMode==="multi-column"||!n.settings.shortcutsViewMode&&n.settings.shortcutsColumnsMode)&&!n.shortcuts.find(L=>L.type==="following"),c=Po(()=>{A.showAccounts=!0},{threshold:600,detect:"touch",cancelOnMovement:!0}),l=Y(),[p,f]=M(void 0),m=Oo([0,0,n.settings.shortcutsViewMode==="tab-menu-bar"?50:0,0]),d=Y();async function v(L){return(L||!d.current)&&(d.current=i.v1.mutes.list({limit:80})),await d.current.next()}const b=Y();async function y(L){return(L||!b.current)&&(b.current=i.v1.blocks.list({limit:80})),await b.current.next()}const w=Ze("@mastodon/lists"),[k,C]=M([]);se(()=>{w&&p==="open"&&on().then(C)},[p==="open"]);const I=Y();return e(U,{children:[e("button",{ref:l,type:"button",class:`button plain nav-menu-button ${h?"with-avatar":""} ${p==="open"?"active":""}`,style:{position:"relative"},onClick:()=>{I.current=Date.now(),f(L=>L?void 0:"open")},onContextMenu:L=>{L.preventDefault(),A.showAccounts=!0},...c(),children:[h&&e(dt,{url:((T=a==null?void 0:a.info)==null?void 0:T.avatar)||((_=a==null?void 0:a.info)==null?void 0:_.avatarStatic),size:"l",squircle:(x=a==null?void 0:a.info)==null?void 0:x.bot}),e(S,{icon:"menu",size:h?"s":"l",alt:g._({id:"zucql+"})})]}),e(bs,{menuClassName:"nav-menu",state:p,anchorRef:l,onClose:()=>{f(void 0)},containerProps:{style:{zIndex:10},onClick:()=>{Date.now()-I.current<300}},portal:{target:document.body},...t,overflow:"auto",viewScroll:"close",position:"anchor",align:"center",boundingBoxPadding:m,unmountOnClose:!0,children:[!!(($=n.appVersion)!=null&&$.commitHash)&&n.appVersion.commitHash!=="5a4082e"&&e("div",{class:"top-menu",children:[e(we,{onClick:()=>{confirm(g._({id:"Djbaby"}))&&(async()=>{try{location.reload()}catch{}})()},children:[e(S,{icon:"sparkles",class:"sparkle-icon",size:"l"})," ",e("span",{children:e(u,{id:"95IFnD"})})]}),e(Ge,{})]}),e("section",{children:[e(Be,{to:"/",children:[e(S,{icon:"home",size:"l"})," ",e("span",{children:e(u,{id:"i0qMbr"})})]}),o?e(U,{children:[r&&e(Be,{to:"/following",children:[e(S,{icon:"following",size:"l"})," ",e("span",{children:e(u,{id:"following.title"})})]}),e(Be,{to:"/catchup",children:[e(S,{icon:"history2",size:"l"}),e("span",{children:e(u,{id:"xrl8fj"})})]}),Ze("@mastodon/mentions")&&e(Be,{to:"/mentions",children:[e(S,{icon:"at",size:"l"})," ",e("span",{children:e(u,{id:"/bZzdR"})})]}),e(Be,{to:"/notifications",children:[e(S,{icon:"notification",size:"l"})," ",e("span",{children:e(u,{id:"iDNBZe"})}),n.notificationsShowNew&&e("sup",{title:g._({id:"isRobC"}),style:{opacity:.5},children:[" ","•"]})]}),e(Ge,{}),((D=a==null?void 0:a.info)==null?void 0:D.id)&&e(Be,{to:`/${s}/a/${a.info.id}`,children:[e(S,{icon:"user",size:"l"})," ",e("span",{children:e(u,{id:"vERlcd"})})]}),(k==null?void 0:k.length)>0?e(wn,{menuClassName:"nav-submenu",overflow:"auto",gap:-8,label:e(U,{children:[e(S,{icon:"list",size:"l"}),e("span",{class:"menu-grow",children:e(u,{id:"h16FyT"})}),e(S,{icon:"chevron-right"})]}),children:[e(Be,{to:"/l",children:e("span",{children:e(u,{id:"BHWx+g"})})}),(k==null?void 0:k.length)>0&&e(U,{children:[e(Ge,{}),k.map(L=>e(Be,{to:`/l/${L.id}`,children:e("span",{children:L.title})},L.id))]})]}):w&&e(Be,{to:"/l",children:[e(S,{icon:"list",size:"l"}),e("span",{children:e(u,{id:"h16FyT"})})]}),e(Be,{to:"/b",children:[e(S,{icon:"bookmark",size:"l"})," ",e("span",{children:e(u,{id:"7Ff7ia"})})]}),e(wn,{menuClassName:"nav-submenu",overflow:"auto",gap:-8,label:e(U,{children:[e(S,{icon:"more",size:"l"}),e("span",{class:"menu-grow",children:e(u,{id:"24misb"})}),e(S,{icon:"chevron-right"})]}),children:[e(Be,{to:"/f",children:[e(S,{icon:"heart",size:"l"})," ",e("span",{children:e(u,{id:"zZOZj7"})})]}),e(Be,{to:"/fh",children:[e(S,{icon:"hashtag",size:"l"})," ",e("span",{children:e(u,{id:"X
//# sourceMappingURL=main-Oquos95D.js.map