import{L as Bo,F as ae,_ as pe,b as e,V as Fo,p as q,u as Ge,a0 as jo,e as qo,m as Ko,a1 as Wo,a2 as Go,a3 as Yo,M as J,a4 as Zo,x as pt,k as $,a5 as Xo,a6 as Ne,a7 as Qo,a8 as Jo,y as ea,q as ye,a9 as ta,aa as na,z as oa,ab as aa,W as ra,K as ia,ac as sa,ad as ca,ae as la,af as da,ag as ua,ah as ma,ai as ha,aj as pa,ak as fa,n as ga,al as _a,h as no,am as va,g as Ct,A as zn,an as Bn,ao as ya,a as ft,P as oo,d as it,J as ao,C as ba,f as rn,ap as Ea,aq as Ta,ar as ka}from"./vendor-GrW-f9CX.js";import{_ as h,x as De,s as S,h as wa,p as mn,L as ro,a as sn,g as hn,j as Se,c as Fn,b as Ie,n as io,y as La,z as Aa}from"./useTitle-dCp14HlU.js";window._showToast=ce;function ce(t){typeof t=="string"&&(t={text:t});const{onClick:n,delay:o,...a}=t,r=Bo({className:`${n||t.destination?"shiny-pill":""}`,gravity:"bottom",position:"center",...a,onClick:()=>{n==null||n(r)}});return o?setTimeout(()=>{r.showToast()},o):r.showToast(),r}function qr(t,n,o,a){const r=ae(t);pe(()=>{r.current=t},[t,o]),pe(()=>{!a||n===null||n===!1||r.current()},[a]),pe(()=>{if(n===null||n===!1)return;const c=setInterval(()=>r.current(),n);return()=>clearInterval(c)},[n])}function $a(t){const n=new URL("/compose/",window.location),{width:o,height:a}=window.screen,r=Math.max(0,(o-600)/2),s=Math.max(0,(a-450)/2),c=Math.min(o,600),l=Math.min(a,450),p=(t==null?void 0:t.uid)||Math.random(),d=window.open(n,"compose"+p,`width=${c},height=${l},left=${r},top=${s}`);return d?d.__COMPOSE__=t:alert("Looks like your browser is blocking popups."),d}const Ia=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);function Pa(){if(Ia){const t=document.createElement("input");t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.opacity="0",document.body.appendChild(t),t.focus(),setTimeout(()=>{document.body.removeChild(t)},500)}}const so={x:()=>h(()=>import("./icons/close-line-YTE7hIJE.js"),[],import.meta.url),heart:()=>h(()=>import("./icons/heart-line-VwvWYh8h.js"),[],import.meta.url),bookmark:()=>h(()=>import("./icons/bookmark-line-D6jQ7QFs.js"),[],import.meta.url),"check-circle":()=>h(()=>import("./icons/check-circle-line-sE41WGxF.js"),[],import.meta.url),"x-circle":()=>h(()=>import("./icons/close-circle-line-qd3g541O.js"),[],import.meta.url),transfer:()=>h(()=>import("./icons/transfer-4-line-Q9QJoxz3.js"),[],import.meta.url),rocket:()=>h(()=>import("./icons/rocket-line-rZbVYYCZ.js"),[],import.meta.url),"arrow-left":()=>h(()=>import("./icons/arrow-left-line-_YC6-XGG.js"),[],import.meta.url),"arrow-right":()=>h(()=>import("./icons/arrow-right-line-PypiEqpu.js"),[],import.meta.url),"arrow-up":()=>h(()=>import("./icons/arrow-up-line-fcuKqhVE.js"),[],import.meta.url),"arrow-down":()=>h(()=>import("./icons/arrow-down-line-0TRJUP_K.js"),[],import.meta.url),earth:()=>h(()=>import("./icons/earth-line-t1Um8wpQ.js"),[],import.meta.url),lock:()=>h(()=>import("./icons/lock-line-0jNHqZpm.js"),[],import.meta.url),unlock:()=>h(()=>import("./icons/unlock-line-w3piJMVb.js"),[],import.meta.url),"eye-close":()=>h(()=>import("./icons/eye-close-line-lBiePPv9.js"),[],import.meta.url),"eye-open":()=>h(()=>import("./icons/eye-2-line-vz_Kw-rK.js"),[],import.meta.url),message:()=>h(()=>import("./icons/mail-line-5XLS6FEo.js"),[],import.meta.url),comment:()=>h(()=>import("./icons/chat-3-line-F0xcdpXY.js"),[],import.meta.url),comment2:()=>h(()=>import("./icons/comment-2-line-xEXuT-Ip.js"),[],import.meta.url),home:()=>h(()=>import("./icons/home-3-line-qJiZhXUH.js"),[],import.meta.url),notification:()=>h(()=>import("./icons/notification-line-olNPLtgS.js"),[],import.meta.url),follow:()=>h(()=>import("./icons/user-follow-line-k_GCWTtp.js"),[],import.meta.url),"follow-add":()=>h(()=>import("./icons/user-add-line-zzW9OULB.js"),[],import.meta.url),poll:[()=>h(()=>import("./icons/chart-bar-line-5r_DfN2w.js"),[],import.meta.url),"90deg"],pencil:()=>h(()=>import("./icons/pencil-line-bKXqElLR.js"),[],import.meta.url),quill:()=>h(()=>import("./icons/quill-pen-line-h_5-FsGz.js"),[],import.meta.url),at:()=>h(()=>import("./icons/at-line-9vJS_Hnl.js"),[],import.meta.url),attachment:()=>h(()=>import("./icons/attachment-line-C2PUa1Ke.js"),[],import.meta.url),upload:()=>h(()=>import("./icons/upload-3-line-Qsjvubiw.js"),[],import.meta.url),gear:()=>h(()=>import("./icons/settings-3-line-kt4MSpRv.js"),[],import.meta.url),more:()=>h(()=>import("./icons/more-3-line-wUD-Yhmj.js"),[],import.meta.url),more2:()=>h(()=>import("./icons/more-1-fill-je1-slyh.js"),[],import.meta.url),external:()=>h(()=>import("./icons/external-link-line-8nOOkmFu.js"),[],import.meta.url),popout:()=>h(()=>import("./icons/external-link-line-8nOOkmFu.js"),[],import.meta.url),popin:[()=>h(()=>import("./icons/external-link-line-8nOOkmFu.js"),[],import.meta.url),"180deg"],plus:()=>h(()=>import("./icons/add-circle-line--O-MfyNy.js"),[],import.meta.url),"chevron-left":()=>h(()=>import("./icons/left-line-Jck0yVmC.js"),[],import.meta.url),"chevron-right":()=>h(()=>import("./icons/right-line-7VBoqLdz.js"),[],import.meta.url),"chevron-down":()=>h(()=>import("./icons/down-line-9PeS5YhF.js"),[],import.meta.url),reply:[()=>h(()=>import("./icons/share-forward-line-4jL-2Q4u.js"),[],import.meta.url),"180deg","horizontal"],thread:()=>h(()=>import("./icons/route-line-2YYy3958.js"),[],import.meta.url),group:()=>h(()=>import("./icons/group-line-JvhJklhQ.js"),[],import.meta.url),bot:()=>h(()=>import("./icons/android-2-line-uPwvVubH.js"),[],import.meta.url),menu:()=>h(()=>import("./icons/rows-4-line-SxGPYpTa.js"),[],import.meta.url),list:()=>h(()=>import("./icons/list-check-line-qNqx9Mm4.js"),[],import.meta.url),search:()=>h(()=>import("./icons/search-2-line-G39AynEw.js"),[],import.meta.url),hashtag:()=>h(()=>import("./icons/hashtag-line-SS3QMu1R.js"),[],import.meta.url),info:()=>h(()=>import("./icons/information-line-8SOch6cR.js"),[],import.meta.url),shortcut:()=>h(()=>import("./icons/lightning-line-JMYUlCZM.js"),[],import.meta.url),user:()=>h(()=>import("./icons/user-4-line-zT_bpOrS.js"),[],import.meta.url),following:()=>h(()=>import("./icons/walk-line-CF7a5s4t.js"),[],import.meta.url),pin:()=>h(()=>import("./icons/pin-line-ULyRQyWZ.js"),[],import.meta.url),unpin:[()=>h(()=>import("./icons/pin-line-ULyRQyWZ.js"),[],import.meta.url),"180deg"],bus:()=>h(()=>import("./icons/bus-2-line-XuQdDZ_w.js"),[],import.meta.url),link:()=>h(()=>import("./icons/link-2-line-BUqp1EwN.js"),[],import.meta.url),history:()=>h(()=>import("./icons/history-line-yoG7K8wL.js"),[],import.meta.url),share:()=>h(()=>import("./icons/share-2-line-PYo-zN94.js"),[],import.meta.url),sparkles:()=>h(()=>import("./icons/sparkles-line-wjZWGZ1a.js"),[],import.meta.url),sparkles2:()=>h(()=>import("./icons/sparkles-2-line-g2FqdZ0R.js"),[],import.meta.url),exit:()=>h(()=>import("./icons/exit-line-l-1uUgI7.js"),[],import.meta.url),translate:()=>h(()=>import("./icons/translate-line-HpDtlqS2.js"),[],import.meta.url),play:()=>h(()=>import("./icons/play-fill-Ey-zv2eL.js"),[],import.meta.url),trash:()=>h(()=>import("./icons/delete-2-line-pjUduCFs.js"),[],import.meta.url),mute:()=>h(()=>import("./icons/volume-mute-line-WthBoXru.js"),[],import.meta.url),unmute:()=>h(()=>import("./icons/volume-line-PZujbN8h.js"),[],import.meta.url),block:()=>h(()=>import("./icons/forbid-circle-line-3FxopGoP.js"),[],import.meta.url),unblock:[()=>h(()=>import("./icons/forbid-circle-line-3FxopGoP.js"),[],import.meta.url),"180deg"],flag:()=>h(()=>import("./icons/flag-1-line-xvcg7G7Q.js"),[],import.meta.url),time:()=>h(()=>import("./icons/time-line-ThP0kTRr.js"),[],import.meta.url),refresh:()=>h(()=>import("./icons/refresh-2-line-t42qqclb.js"),[],import.meta.url),emoji2:()=>h(()=>import("./icons/emoji-2-line--uNVc2IC.js"),[],import.meta.url),filter:()=>h(()=>import("./icons/filter-2-line-KyjbFYlO.js"),[],import.meta.url),filters:()=>h(()=>import("./icons/filter-line-1KEfnWDm.js"),[],import.meta.url),chart:()=>h(()=>import("./icons/chart-line-line-pHaLt6yC.js"),[],import.meta.url),react:()=>h(()=>import("./icons/react-line-YfZPqZem.js"),[],import.meta.url),layout4:()=>h(()=>import("./icons/layout-4-line-FOdnyEcZ.js"),[],import.meta.url),layout5:()=>h(()=>import("./icons/layout-5-line-9Kks7dle.js"),[],import.meta.url),announce:()=>h(()=>import("./icons/announcement-line-MSlAmDH1.js"),[],import.meta.url),alert:()=>h(()=>import("./icons/alert-line-zyc6hy8V.js"),[],import.meta.url),round:()=>h(()=>import("./icons/round-fill-a0rplSmV.js"),[],import.meta.url),"arrow-up-circle":()=>h(()=>import("./icons/arrow-up-circle-line-e3kZqEZN.js"),[],import.meta.url),"arrow-down-circle":()=>h(()=>import("./icons/arrow-down-circle-line-mpqFtRtO.js"),[],import.meta.url),clipboard:()=>h(()=>import("./icons/clipboard-line-9F_Yeo71.js"),[],import.meta.url),"account-edit":()=>h(()=>import("./icons/user-edit-line-9VnWCh0X.js"),[],import.meta.url),"account-warning":()=>h(()=>import("./icons/user-warning-line-gL3RGb1N.js"),[],import.meta.url),keyboard:()=>h(()=>import("./icons/keyboard-line-10AZQcVH.js"),[],import.meta.url),cloud:()=>h(()=>import("./icons/cloud-line-abe0HgFS.js"),[],import.meta.url),month:()=>h(()=>import("./icons/calendar-month-line-VoXZVWAe.js"),[],import.meta.url),media:()=>h(()=>import("./icons/photo-album-line--GdJqjfq.js"),[],import.meta.url),speak:()=>h(()=>import("./icons/radar-line-ndI8IhOG.js"),[],import.meta.url),building:()=>h(()=>import("./icons/building-5-line-ew7lu83B.js"),[],import.meta.url),history2:()=>h(()=>import("./icons/history-2-line-3yIVzoWo.js"),[],import.meta.url),document:()=>h(()=>import("./icons/document-line--D6ooZg1.js"),[],import.meta.url),"arrows-right":()=>h(()=>import("./icons/arrows-right-line-HF4HILdT.js"),[],import.meta.url),code:()=>h(()=>import("./icons/code-line-h4RWLaak.js"),[],import.meta.url),copy:()=>h(()=>import("./icons/copy-2-line-mPSDKieb.js"),[],import.meta.url),quote:()=>h(()=>import("./icons/quote-left-line-NQzeELMO.js"),[],import.meta.url),settings:()=>h(()=>import("./icons/settings-6-line-ZgCBilgF.js"),[],import.meta.url),"heart-break":()=>h(()=>import("./icons/heart-crack-line-P3DoKfTT.js"),[],import.meta.url),"user-x":()=>h(()=>import("./icons/user-x-line-zIdph-gu.js"),[],import.meta.url),minimize:()=>h(()=>import("./icons/arrows-down-line-ovOF9r0o.js"),[],import.meta.url)},Sa={s:12,m:16,l:20,xl:24,xxl:32},jn={},Ra=Fo(function({width:t,height:n,body:o,rotate:a,flip:r}){return e("svg",{viewBox:`0 0 ${t} ${n}`,dangerouslySetInnerHTML:{__html:o},style:{transform:`${a?`rotate(${a})`:""} ${r?"scaleX(-1)":""}`}})},{isShallowEqual:!0,maxSize:Object.keys(so).length,matchesArg:(t,n)=>t.icon===n.icon&&t.body===n.body});function v({icon:t,size:n="m",alt:o,title:a,class:r="",style:s={}}){if(!t)return null;const c=Sa[n];let l=so[t];if(!l)return null;let p,d;Array.isArray(l)&&([l,p,d]=l);const[u,m]=q(jn[t]),_=ae(t);return pe(()=>{u&&_.current===t||((async()=>{const k=await l();m(k.default),jn[t]=k.default})(),_.current=t)},[t]),e("span",{class:`icon ${r}`,title:a||o,style:{width:`${c}px`,height:`${c}px`,...s},children:u&&e(Ra,{icon:t,width:u.width,height:u.height,body:u.body,rotate:p,flip:d})})}function Da(t,n=[]){!t||typeof t!="function"||pe(()=>{const o=new CloseWatcher;return o.addEventListener("close",t),()=>{o.destroy()}},n)}const xa=window.CloseWatcher?Da:()=>{},Ca=document.getElementById("modal-container");function cn({children:t,onClose:n,onClick:o,class:a,minimized:r}){if(!t)return null;const s=ae();pe(()=>{let d=setTimeout(()=>{var m;const u=(m=s.current)==null?void 0:m.querySelector('[tabindex="-1"]');u&&u.focus()},100);return()=>clearTimeout(d)},[]);const c=window.CloseWatcher,l=Ge("esc",()=>{setTimeout(()=>{n==null||n()},0)},{enabled:!c&&!!n,keydown:!1,keyup:!0},[n]);xa(n,[n]),pe(()=>{const d=document.querySelectorAll(".deck-container");if(r){const u=d[d.length-1];u&&u.tabIndex===-1&&u.focus()}else t?d.forEach(u=>{u.setAttribute("inert","")}):d.forEach(u=>{u.removeAttribute("inert")});return()=>{d.forEach(u=>{u.removeAttribute("inert")})}},[t,r]);const p=e("div",{ref:d=>{var u;s.current=d,l.current=((u=d==null?void 0:d.querySelector)==null?void 0:u.call(d,'[tabindex="-1"]'))||d},className:a,onClick:d=>{o==null||o(d),d.target===d.currentTarget&&(n==null||n(d))},tabIndex:r?0:"-1",inert:r,onFocus:d=>{var u,m;try{if(d.target===d.currentTarget){const _=(u=s.current)==null?void 0:u.querySelector('[tabindex="-1"]'),k=!!_&&((m=getComputedStyle(_))==null?void 0:m.pointerEvents)!=="none";_&&k&&_.focus()}}catch{}},children:t});return jo(p,Ca)}const qn={s:16,m:20,l:24,xl:32,xxl:50,xxxl:64},st={},ct=window.OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas"),Dt=ct.getContext("2d",{willReadFrequently:!0});Dt.imageSmoothingEnabled=!1;function Ma({url:t,size:n,alt:o="",squircle:a,...r}){n=qn[n]||n||qn.m;const s=ae(),c=/missing\.png$/.test(t);return e("span",{ref:s,class:`avatar ${a?"squircle":""} ${st[t]?"has-alpha":""}`,style:{width:n,height:n},title:o,...r,children:!!t&&e("img",{src:t,width:n,height:n,alt:o,loading:"lazy",decoding:"async",crossOrigin:st[t]===void 0&&!c?"anonymous":void 0,onError:l=>{l.target.crossOrigin&&(l.target.crossOrigin=null,l.target.src=t)},onLoad:l=>{s.current&&(s.current.dataset.loaded=!0),st[t]===void 0&&(c||setTimeout(()=>{try{const{width:p,height:d}=l.target;ct.width!==p&&(ct.width=p),ct.height!==d&&(ct.height=d),Dt.drawImage(l.target,0,0);const u=Dt.getImageData(0,0,p,d),m=u.data.filter((_,k)=>k%4===3&&_<=128).length/(u.data.length/4)>.1;m&&s.current.classList.add("has-alpha"),st[t]=m,Dt.clearRect(0,0,p,d)}catch{st[t]=!1}},1))}})})}const Re=De(Ma),Ye=Ko((t,n)=>{let o;try{o=qo()}catch{}let a=(location.hash||"").replace(/^#/,"").trim();a===""&&(a="/");const{to:r,...s}=t;if(a&&a!=="/"&&a.includes("?"))try{const l=new URL(a,location.origin);if(l.searchParams.size){const p=Array.from(l.searchParams.entries()).map(([d,u])=>`${d}=${encodeURIComponent(u)}`).join("&");a=l.pathname+"?"+p}}catch{}const c=a===r||decodeURIComponent(a)===r;return e("a",{ref:n,href:`#${r}`,...s,class:`${t.class||""} ${c?"is-active":""}`,onClick:l=>{var p,d,u;(d=(p=l.currentTarget)==null?void 0:p.parentNode)!=null&&d.closest("a")&&l.stopPropagation(),o&&(S.prevLocation=o),(u=t.onClick)==null||u.call(t,l)}})}),Oa=document.documentElement,It=getComputedStyle(Oa),Va=8;let co=[0,0,0,0];function lo(){const t=It.getPropertyValue("--sai-top"),n=It.getPropertyValue("--sai-right"),o=It.getPropertyValue("--sai-bottom"),a=It.getPropertyValue("--sai-left");co=[Math.max(0,parseInt(t,10)),Math.max(0,parseInt(n,10)),Math.max(0,parseInt(o,10)),Math.max(0,parseInt(a,10))]}requestAnimationFrame(lo);function uo(t=[]){return co.map((o,a)=>(o||Va)+(t[a]||0)).join(" ")}CSS.supports("top: env(safe-area-inset-top)")&&window.addEventListener("resize",lo,{passive:!0});function mo(t){const{containerProps:n,instanceRef:o}=t,a=Wo(),r=o!=null&&o.current?o:ae();return e(Go,{boundingBoxPadding:uo(),repositionFlag:`${a.width}x${a.height}`,unmountOnClose:!0,...t,instanceRef:r,containerProps:{onClick:s=>{var c,l,p;s.target===s.currentTarget&&((l=(c=r.current)==null?void 0:c.closeMenu)==null||l.call(c)),(p=n==null?void 0:n.onClick)==null||p.call(n,s)},...n}})}function Ua(t){const n=ae();return e(Yo,{...t,instanceRef:n,itemProps:{onPointerMove:o=>{var a,r;o.pointerType==="touch"&&((r=(a=n.current)==null?void 0:a.openMenu)==null||r.call(a))},onPointerLeave:o=>{var a,r;o.pointerType==="touch"&&((r=(a=n.current)==null?void 0:a.openMenu)==null||r.call(a))}}})}function Gt({subMenu:t=!1,confirm:n=!0,confirmLabel:o,menuItemClassName:a,menuFooter:r,menuExtras:s,...c}){const{children:l,onClick:p,...d}=c;return n?e(t?Ua:mo,{openTrigger:"clickOnly",direction:"bottom",overflow:"auto",gap:-8,shift:8,menuClassName:"menu-emphasized",...d,menuButton:t?void 0:l,label:t?l:void 0,children:[e(J,{className:a,onClick:p,children:o}),s,r]}):t?e(J,{...c}):p?Zo(l,{onClick:p}):l}function ln({staticUrl:t,alt:n,url:o}){return e("picture",{children:[t&&e("source",{srcset:t,media:"(prefers-reduced-motion: reduce)"}),e("img",{src:o,alt:n,class:"shortcode-emoji emoji",width:"16",height:"16",loading:"lazy",decoding:"async"},n||o)]})}function Na({text:t,emojis:n}){if(!t)return"";if(!(n!=null&&n.length)||t.indexOf(":")===-1)return t;const o=new RegExp(`:(${n.map(r=>r.shortcode).join("|")}):`,"g");return t.split(o).map(r=>{const s=n.find(c=>c.shortcode===r);if(s){const{url:c,staticUrl:l}=s;return e(ln,{staticUrl:l,alt:r,url:c})}return r})}const Ze=pt(Na,(t,n)=>{var o,a;return t.text===n.text&&((o=t.emojis)==null?void 0:o.length)===((a=n.emojis)==null?void 0:a.length)}),Ha=new Intl.Collator("en",{sensitivity:"base"});function za({account:t,instance:n,showAvatar:o,showAcct:a,short:r,external:s,onClick:c}){const{acct:l,avatar:p,avatarStatic:d,id:u,url:m,displayName:_,emojis:k,bot:b}=t;let{username:E}=t;const[w,D,T]=l.match(/([^@]+)(@.+)/i)||[,l],R=E.toLowerCase().trim(),f=(_||"").toLowerCase().trim(),g=f.replace(/(\:(\w|\+|\-)+\:)(?=|[\!\.\?]|$)/g,"").replace(/\s+/g,""),x=g.replace(/[^a-z0-9@\.]/gi,"");return(!r&&(R===f||R===g||R===x||Ha.compare(R,g)===0)||x===l.toLowerCase())&&(E=null),e("a",{class:`name-text ${a?"show-acct":""} ${r?"short":""}`,href:m,target:s?"_blank":null,title:_?`${_} (${T?"":"@"}${l})`:`${T?"":"@"}${l}`,onClick:P=>{if(!s&&!P.shiftKey){if(P.preventDefault(),P.stopPropagation(),c)return c(P);if(P.metaKey||P.ctrlKey||P.shiftKey||P.which===2){const M=`#/${n}/a/${u}`;window.open(M,"_blank");return}S.showAccount={account:t,instance:n}}},children:[o&&e($,{children:[e(Re,{url:d||p,squircle:b})," "]}),_&&!r?e($,{children:[e("b",{children:e(Ze,{text:_,emojis:k})}),!a&&E&&e($,{children:[" ",e("i",{children:["@",E]})]})]}):r?e("i",{children:E}):e("b",{children:E}),a&&e($,{children:[e("br",{}),e("i",{children:[T?"":"@",D,!!T&&e("span",{class:"ib",children:T})]})]})]})}const lt=pt(za,(t,n)=>{const{account:o}=t,{account:a}=n;return(o==null?void 0:o.acct)===(a==null?void 0:a.acct)});Ne.extend(Xo);Ne.extend(Qo);Ne.extend(Jo);const Ba=new Intl.DateTimeFormat;function He({datetime:t,format:n}){if(!t)return null;const[o,a]=ea(p=>p+1,0),r=ye(()=>Ne(t),[t]),[s,c,l]=ye(()=>{if(!r.isValid())return[""+t,"",""];let p;if(n==="micro"){const d=Ne();d.diff(r,"day")<=1||d.year()===r.year()?p=r.twitter():p=Ba.format(r.toDate())}return p||(p=r.fromNow()),[p,r.toISOString(),r.format("LLLL")]},[r,n,o]);return pe(()=>{if(!r.isValid())return;let p,d;function u(){d=requestAnimationFrame(()=>{a(),m()})}function m(){r.diff(Ne(),"minute",!0)<1?p=setTimeout(u,1e4):r.diff(Ne(),"hour",!0)<1&&(p=setTimeout(u,6e4))}return m(),()=>{clearTimeout(p),cancelAnimationFrame(d)}},[]),e("time",{datetime:c,title:l,children:s})}const Fa=[{code:"af",name:"Afrikaans"},{code:"sq",name:"Albanian"},{code:"am",name:"Amharic"},{code:"ar",name:"Arabic"},{code:"hy",name:"Armenian"},{code:"as",name:"Assamese"},{code:"ay",name:"Aymara"},{code:"az",name:"Azerbaijani"},{code:"bm",name:"Bambara"},{code:"eu",name:"Basque"},{code:"be",name:"Belarusian"},{code:"bn",name:"Bengali"},{code:"bho",name:"Bhojpuri"},{code:"bs",name:"Bosnian"},{code:"bg",name:"Bulgarian"},{code:"ca",name:"Catalan"},{code:"ceb",name:"Cebuano"},{code:"ny",name:"Chichewa"},{code:"zh",name:"Chinese"},{code:"zh_HANT",name:"Chinese (Traditional)"},{code:"co",name:"Corsican"},{code:"hr",name:"Croatian"},{code:"cs",name:"Czech"},{code:"da",name:"Danish"},{code:"dv",name:"Dhivehi"},{code:"doi",name:"Dogri"},{code:"nl",name:"Dutch"},{code:"en",name:"English"},{code:"eo",name:"Esperanto"},{code:"et",name:"Estonian"},{code:"ee",name:"Ewe"},{code:"tl",name:"Filipino"},{code:"fi",name:"Finnish"},{code:"fr",name:"French"},{code:"fy",name:"Frisian"},{code:"gl",name:"Galician"},{code:"ka",name:"Georgian"},{code:"de",name:"German"},{code:"el",name:"Greek"},{code:"gn",name:"Guarani"},{code:"gu",name:"Gujarati"},{code:"ht",name:"Haitian Creole"},{code:"ha",name:"Hausa"},{code:"haw",name:"Hawaiian"},{code:"iw",name:"Hebrew"},{code:"hi",name:"Hindi"},{code:"hmn",name:"Hmong"},{code:"hu",name:"Hungarian"},{code:"is",name:"Icelandic"},{code:"ig",name:"Igbo"},{code:"ilo",name:"Ilocano"},{code:"id",name:"Indonesian"},{code:"ga",name:"Irish"},{code:"it",name:"Italian"},{code:"ja",name:"Japanese"},{code:"jw",name:"Javanese"},{code:"kn",name:"Kannada"},{code:"kk",name:"Kazakh"},{code:"km",name:"Khmer"},{code:"rw",name:"Kinyarwanda"},{code:"gom",name:"Konkani"},{code:"ko",name:"Korean"},{code:"kri",name:"Krio"},{code:"ku",name:"Kurdish (Kurmanji)"},{code:"ckb",name:"Kurdish (Sorani)"},{code:"ky",name:"Kyrgyz"},{code:"lo",name:"Lao"},{code:"la",name:"Latin"},{code:"lv",name:"Latvian"},{code:"ln",name:"Lingala"},{code:"lt",name:"Lithuanian"},{code:"lg",name:"Luganda"},{code:"lb",name:"Luxembourgish"},{code:"mk",name:"Macedonian"},{code:"mai",name:"Maithili"},{code:"mg",name:"Malagasy"},{code:"ms",name:"Malay"},{code:"ml",name:"Malayalam"},{code:"mt",name:"Maltese"},{code:"mi",name:"Maori"},{code:"mr",name:"Marathi"},{code:"mni-Mtei",name:"Meiteilon (Manipuri)"},{code:"lus",name:"Mizo"},{code:"mn",name:"Mongolian"},{code:"my",name:"Myanmar (Burmese)"},{code:"ne",name:"Nepali"},{code:"no",name:"Norwegian"},{code:"or",name:"Odia (Oriya)"},{code:"om",name:"Oromo"},{code:"ps",name:"Pashto"},{code:"fa",name:"Persian"},{code:"pl",name:"Polish"},{code:"pt",name:"Portuguese"},{code:"pa",name:"Punjabi"},{code:"qu",name:"Quechua"},{code:"ro",name:"Romanian"},{code:"ru",name:"Russian"},{code:"sm",name:"Samoan"},{code:"sa",name:"Sanskrit"},{code:"gd",name:"Scots Gaelic"},{code:"nso",name:"Sepedi"},{code:"sr",name:"Serbian"},{code:"st",name:"Sesotho"},{code:"sn",name:"Shona"},{code:"sd",name:"Sindhi"},{code:"si",name:"Sinhala"},{code:"sk",name:"Slovak"},{code:"sl",name:"Slovenian"},{code:"so",name:"Somali"},{code:"es",name:"Spanish"},{code:"su",name:"Sundanese"},{code:"sw",name:"Swahili"},{code:"sv",name:"Swedish"},{code:"tg",name:"Tajik"},{code:"ta",name:"Tamil"},{code:"tt",name:"Tatar"},{code:"te",name:"Telugu"},{code:"th",name:"Thai"},{code:"ti",name:"Tigrinya"},{code:"ts",name:"Tsonga"},{code:"tr",name:"Turkish"},{code:"tk",name:"Turkmen"},{code:"ak",name:"Twi"},{code:"uk",name:"Ukrainian"},{code:"ur",name:"Urdu"},{code:"ug",name:"Uyghur"},{code:"uz",name:"Uzbek"},{code:"vi",name:"Vietnamese"},{code:"cy",name:"Welsh"},{code:"xh",name:"Xhosa"},{code:"yi",name:"Yiddish"},{code:"yo",name:"Yoruba"},{code:"zu",name:"Zulu"}];function ja(...t){try{return ta(...t)}catch{return t[2]||!1}}const dn=De(ja),qa=[new Intl.DateTimeFormat().resolvedOptions().locale,...navigator.languages],Ka=dn(qa,Fa.map(t=>t.code.replace("_","-")),"en");function ho(t=!1){if(t){const{contentTranslationTargetLanguage:n}=S.settings;if(n)return n}return Ka}const Wa=new Intl.DisplayNames(navigator.languages,{type:"language"});function Ga(t){try{return Wa.of(t)}catch{return null}}const Yt=De(Ga);function Mt(t,n=[]){return t?(!n.length||t.indexOf(":")===-1||n.forEach(o=>{const{shortcode:a,staticUrl:r,url:s}=o;t=t.replace(new RegExp(`:${a}:`,"g"),`:${a}:`)}),t):""}const qe=document.createElement("div"),Ya=["u-url","mention","hashtag"];function Za(t,n={}){const{emojis:o,postEnhanceDOM:a=()=>{}}=n;let r=t;const s=document.createElement("div");s.innerHTML=r;const c=/{m.setAttribute("target","_blank")}),s.querySelectorAll("a[class]").forEach(m=>{m.classList.forEach(_=>{Ya.includes(_)||m.classList.remove(_)})})),c&&s.querySelectorAll("a[href]").forEach(u=>{/^https?:\/\//i.test(u.textContent.trim())&&(u.classList.add("has-url-text"),er(u))}),c){const d=s.querySelectorAll("a[href]"),u=[];d.forEach(m=>{const _=m.innerText.trim(),k=m.querySelector("*");if(/^@[^@]+(@[^@]+)?$/g.test(_)){const[b,E,w]=_.split("@");k||(!u.some(([D])=>D===E)||u.some(([D,T])=>D===E&&T===w)?(m.innerHTML=`@${E}`,u.push([E,w])):m.innerHTML=`@${E}@${w}`),m.classList.add("mention")}/^#[^#]+$/g.test(_)&&(k||(m.innerHTML=`#${_.slice(1)}`),m.classList.add("mention","hashtag"))})}let p;if(r.includes(":")&&(p=Xt(s),p.forEach(d=>{let u=d.nodeValue.replace(/&/g,"&").replace(//g,">");o&&(u=Mt(u,o)),qe.innerHTML=u,d.replaceWith(...qe.childNodes)})),l&&[...s.querySelectorAll("p")].filter(u=>/^```[^]+```$/g.test(u.innerText.trim())).forEach(u=>{const m=document.createElement("pre");u.querySelectorAll("br").forEach(_=>_.replaceWith(` `)),m.innerHTML=`${u.innerHTML.trim()}`,u.replaceWith(m)}),l&&[...s.querySelectorAll("p")].filter(m=>/^```/g.test(m.innerText)).forEach(m=>{const _=[m];let k=!1,b=m;for(;b.nextElementSibling;){const E=b.nextElementSibling;if(E&&E.tagName==="P")if(/```$/g.test(E.innerText)){_.push(E),k=!0;break}else _.push(E);else break;b=E}if(k){const E=document.createElement("pre");_.forEach(D=>{D.querySelectorAll("br").forEach(T=>T.replaceWith(` `))});const w=_.map(D=>D.innerHTML).join(` `);E.innerHTML=`${w}`,m.replaceWith(E),_.forEach(D=>D.remove())}}),r.includes("`")&&(p=Xt(s),p.forEach(d=>{let u=d.nodeValue.replace(/&/g,"&").replace(//g,">");/`[^`]+`/g.test(u)&&(u=u.replaceAll(/(`[^]+?`)/g,"$1")),qe.innerHTML=u,d.replaceWith(...qe.childNodes)})),/twitter\.com/i.test(r)&&(p=Xt(s,{rejectFilter:["A"]}),p.forEach(d=>{let u=d.nodeValue.replace(/&/g,"&").replace(//g,">");/@[a-zA-Z0-9_]+@twitter\.com/g.test(u)&&(u=u.replaceAll(/(@([a-zA-Z0-9_]+)@twitter\.com)/g,'$1')),qe.innerHTML=u,d.replaceWith(...qe.childNodes)})),r.includes("#")){let d=null;const u=[...s.querySelectorAll("p")].filter((m,_)=>{let k=0;for(let b=0;b3||k>1&&d&&_===d+1)return d=_,!0});u!=null&&u.length&&u.forEach(m=>{m.classList.add("hashtag-stuffing"),m.title=m.innerText})}return r.includes("{const u=d.getAttribute("width")||d.naturalWidth,m=d.getAttribute("height")||d.naturalHeight;u&&m&&d.style.setProperty("--original-aspect-ratio",`${u}/${m}`)}),a&&queueMicrotask(()=>a(s)),r=s.innerHTML,r}const po=De(Za),Xa=["STYLE","IMG","VIDEO","AUDIO","AREA","MAP","TRACK","EMBED","IFRAME","OBJECT","PICTURE","PORTAL","SOURCE","SVG","MATH","CANVAS","NOSCRIPT","SCRIPT","INPUT","OPTION","TEXTAREA","SLOT","TEMPLATE"],Qa=Object.fromEntries(Xa.map(t=>[t,!0])),Ja=/^(https?:\/\/(www\.)?|xmpp:)/,Zt=30;function er(t){var n;if(!(!t||(n=t.querySelector)!=null&&n.call(t,"*")))try{const o=t.innerText.trim(),a=(o.match(Ja)||[])[0]||"";if(!a)return;const r=o.slice(a.length,a.length+Zt),s=o.slice(a.length+Zt),c=o.slice(a.length).length>Zt;t.innerHTML=`${r}`}catch{}}function Xt(t,n={}){var c;const o=[],a=Object.assign({},Qa,(c=n.rejectFilter)==null?void 0:c.reduce((l,p)=>(l[p]=!0,l),{})),r=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode(l){return a[l.parentNode.nodeName]?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}},!1);let s;for(;s=r.nextNode();)o.push(s);return o}const Ke=document.createElement("div");function tr(t,n){if(!t)return"";const{preProcess:o}=n||{};return Ke.innerHTML=t.replace(/<\/p>/g,`

`).replace(/<\/li>/g,` `),Ke.querySelectorAll("br").forEach(a=>{a.replaceWith(` `)}),o==null||o(Ke),Ke.querySelectorAll(".invisible").forEach(a=>{a.remove()}),Ke.querySelectorAll(".ellipsis").forEach(a=>{a.append("...")}),Ke.innerText.replace(/[\r\n]{3,}/g,` `).trim()}const Ot=De(tr);function nr(t){const{mentions:n=[],instance:o,previewMode:a,statusURL:r}=t||{};return s=>{var u,m;let{target:c}=s;if(c=c.closest("a"),!c||s.metaKey||s.ctrlKey||s.shiftKey||s.altKey||s.which===2)return;const l=(u=c.previousSibling)==null?void 0:u.textContent,p=l==null?void 0:l.endsWith("@"),d=c.innerText.startsWith("@");if((c.classList.contains("u-url")||c.classList.contains("mention"))&&d||p&&!d){const _=(c.querySelector("span")||c).innerText.trim(),k=_.replace(/^@/,""),b=c.getAttribute("href"),E=n.find(w=>w.url===b)||n.find(w=>w.acct===k||w.username===k);if(E)s.preventDefault(),s.stopPropagation(),S.showAccount={account:E.acct,instance:o};else if(!/^http/i.test(_)){s.preventDefault(),s.stopPropagation();const w=c.getAttribute("href");S.showAccount={account:w,instance:o}}}else if(!a){const _=l==null?void 0:l.endsWith("#");if(c.classList.contains("hashtag")||_){s.preventDefault(),s.stopPropagation();const k=c.innerText.replace(/^#/,"").trim(),b=o?`#/${o}/t/${k}`:`#/t/${k}`;location.hash=b}else(m=S.unfurledLinks[c.href])!=null&&m.url&&r!==c.href&&(s.preventDefault(),s.stopPropagation(),S.prevLocation={pathname:location.hash.replace(/^#/,"")},location.hash=`#${S.unfurledLinks[c.href].url}`)}}}const{locale:or}=new Intl.DateTimeFormat().resolvedOptions(),ar=t=>{const{dateYear:n,hideTime:o,formatOpts:a}=t||{},r=new Date().getFullYear();return Intl.DateTimeFormat(or,{year:n===r?void 0:"numeric",month:"short",day:"numeric",hour:o?void 0:"numeric",minute:o?void 0:"numeric",...a})},rr=De(ar);function ht(t,n){return t instanceof Date||(t=new Date(t)),rr({dateYear:t.getFullYear(),...n}).format(t)}const{locale:ir}=Intl.NumberFormat().resolvedOptions(),Ce=Intl.NumberFormat(ir,{notation:"compact",roundingMode:"floor"}).format,Kn=5e3;function Pt(t){if(t||(t=!0),S.showCompose){S.composerState.minimized?ce({duration:Kn,text:"A draft post is currently minimized. Post or discard it before creating a new one."}):ce({duration:Kn,text:"A post is currently open. Post or discard it before creating a new one."});return}Pa(),S.showCompose=t}const sr={"@mastodon/edit-media-attributes":">=4.1","@mastodon/list-exclusive":">=4.2","@mastodon/filtered-notifications":"~4.3 || >=4.3","@mastodon/fetch-multiple-statuses":"~4.3 || >=4.3"},Wn=/pixelfed/i,Pe=/^(?!.*pixelfed).*$/i,Gn={"@mastodon/lists":Pe,"@mastodon/filters":Pe,"@mastodon/mentions":Pe,"@mastodon/trending-hashtags":Pe,"@mastodon/trending-links":Pe,"@mastodon/post-bookmark":Pe,"@mastodon/post-edit":Pe,"@mastodon/profile-edit":Pe,"@mastodon/profile-private-note":Pe,"@pixelfed/trending":Wn,"@pixelfed/home-include-reblogs":Wn},St={};function Rt(t){try{const{version:n,domain:o}=wa(),a=`${o}-${t}`;if(St[a])return St[a];if(Gn[t])return St[a]=Gn[t].test(n);const r=sr[t];return r?St[a]=na(n,r,{includePrerelease:!0,loose:!0}):!1}catch{return!1}}function Kr({skeleton:t,account:n,avatarSize:o="xl",useAvatarStatic:a=!1,instance:r,external:s,internal:c,onClick:l,showActivity:p=!1,showStats:d=!1,accountInstance:u,hideDisplayName:m=!1,relationship:_={},excludeRelationshipAttrs:k=[]}){if(t)return e("div",{class:"account-block skeleton",children:[e(Re,{size:o}),e("span",{children:[e("b",{children:"████████"}),e("br",{}),e("span",{class:"account-block-acct",children:"██████"})]})]});if(!n)return null;const{id:b,acct:E,avatar:w,avatarStatic:D,displayName:T,username:R,emojis:f,url:g,statusesCount:x,lastStatusAt:P,bot:M,fields:A,note:I,group:U,followersCount:z,createdAt:C,locked:Y}=n;let[le,be,Z]=E.match(/([^@]+)(@.+)/i)||[,E];u&&(Z=`@${u}`);const ke=A==null?void 0:A.find(L=>!!L.verifiedAt&&!!L.value),F={};for(const L in _)k.includes(L)||(F[L]=_[L]);const X=F.following||F.followedBy||F.requested;return e("a",{class:"account-block",href:g,target:s?"_blank":null,title:Z?E:`@${E}`,onClick:L=>{if(!s){if(L.preventDefault(),l)return l(L);c?location.hash=`/${r}/a/${b}`:S.showAccount={account:n,instance:r}}},children:[e(Re,{url:a?D:w||D,size:o,squircle:M}),e("span",{class:"account-block-content",children:[!m&&e($,{children:T?e("b",{children:e(Ze,{text:T,emojis:f})}):e("b",{children:R})})," ",e("span",{class:"account-block-acct",children:[Z?"":"@",be,e("wbr",{}),Z,Y&&e($,{children:[" ",e(v,{icon:"lock",size:"s",alt:"Locked"})]})]}),p&&e("div",{class:"account-block-stats",children:["Posts: ",Ce(x),!!P&&e($,{children:[" ","· Last posted:"," ",ht(P,{hideTime:!0})]})]}),d&&e("div",{class:"account-block-stats",children:[M&&e($,{children:e("span",{class:"tag collapsed",children:[e(v,{icon:"bot"})," Automated"]})}),!!U&&e($,{children:e("span",{class:"tag collapsed",children:[e(v,{icon:"group"})," Group"]})}),X&&e("div",{class:"shazam-container-horizontal",children:e("div",{class:"shazam-container-inner",children:F.following&&F.followedBy?e("span",{class:"tag minimal",children:"Mutual"}):F.requested?e("span",{class:"tag minimal",children:"Requested"}):F.following?e("span",{class:"tag minimal",children:"Following"}):F.followedBy?e("span",{class:"tag minimal",children:"Follows you"}):null})},_.id),!!z&&e("span",{class:"ib",children:[Ce(z)," ",z===1?"follower":"followers"]}),!!ke&&e("span",{class:"verified-field",children:[e(v,{icon:"check-circle",size:"s"})," ",e("span",{dangerouslySetInnerHTML:{__html:po(ke.value,{emojis:f})}})]}),!M&&!U&&!X&&!z&&!ke&&!!C&&e("span",{class:"created-at",children:["Joined"," ",e("time",{datetime:C,children:ht(C,{hideTime:!0})})]})]})]})]})}function Yn(t){const{className:n,disabled:o,...a}=t;return e(oa,{className:n,disabled:o,children:({ref:r,closeMenu:s})=>e(Ye,{...a,ref:r,onClick:({detail:c})=>s(c===0?"Enter":void 0)})})}const cr=[{code:"auto",name:"Detect"},{code:"af",name:"Afrikaans"},{code:"sq",name:"Albanian"},{code:"am",name:"Amharic"},{code:"ar",name:"Arabic"},{code:"hy",name:"Armenian"},{code:"as",name:"Assamese"},{code:"ay",name:"Aymara"},{code:"az",name:"Azerbaijani"},{code:"bm",name:"Bambara"},{code:"eu",name:"Basque"},{code:"be",name:"Belarusian"},{code:"bn",name:"Bengali"},{code:"bho",name:"Bhojpuri"},{code:"bs",name:"Bosnian"},{code:"bg",name:"Bulgarian"},{code:"ca",name:"Catalan"},{code:"ceb",name:"Cebuano"},{code:"ny",name:"Chichewa"},{code:"zh",name:"Chinese"},{code:"co",name:"Corsican"},{code:"hr",name:"Croatian"},{code:"cs",name:"Czech"},{code:"da",name:"Danish"},{code:"dv",name:"Dhivehi"},{code:"doi",name:"Dogri"},{code:"nl",name:"Dutch"},{code:"en",name:"English"},{code:"eo",name:"Esperanto"},{code:"et",name:"Estonian"},{code:"ee",name:"Ewe"},{code:"tl",name:"Filipino"},{code:"fi",name:"Finnish"},{code:"fr",name:"French"},{code:"fy",name:"Frisian"},{code:"gl",name:"Galician"},{code:"ka",name:"Georgian"},{code:"de",name:"German"},{code:"el",name:"Greek"},{code:"gn",name:"Guarani"},{code:"gu",name:"Gujarati"},{code:"ht",name:"Haitian Creole"},{code:"ha",name:"Hausa"},{code:"haw",name:"Hawaiian"},{code:"iw",name:"Hebrew"},{code:"hi",name:"Hindi"},{code:"hmn",name:"Hmong"},{code:"hu",name:"Hungarian"},{code:"is",name:"Icelandic"},{code:"ig",name:"Igbo"},{code:"ilo",name:"Ilocano"},{code:"id",name:"Indonesian"},{code:"ga",name:"Irish"},{code:"it",name:"Italian"},{code:"ja",name:"Japanese"},{code:"jw",name:"Javanese"},{code:"kn",name:"Kannada"},{code:"kk",name:"Kazakh"},{code:"km",name:"Khmer"},{code:"rw",name:"Kinyarwanda"},{code:"gom",name:"Konkani"},{code:"ko",name:"Korean"},{code:"kri",name:"Krio"},{code:"ku",name:"Kurdish (Kurmanji)"},{code:"ckb",name:"Kurdish (Sorani)"},{code:"ky",name:"Kyrgyz"},{code:"lo",name:"Lao"},{code:"la",name:"Latin"},{code:"lv",name:"Latvian"},{code:"ln",name:"Lingala"},{code:"lt",name:"Lithuanian"},{code:"lg",name:"Luganda"},{code:"lb",name:"Luxembourgish"},{code:"mk",name:"Macedonian"},{code:"mai",name:"Maithili"},{code:"mg",name:"Malagasy"},{code:"ms",name:"Malay"},{code:"ml",name:"Malayalam"},{code:"mt",name:"Maltese"},{code:"mi",name:"Maori"},{code:"mr",name:"Marathi"},{code:"mni-Mtei",name:"Meiteilon (Manipuri)"},{code:"lus",name:"Mizo"},{code:"mn",name:"Mongolian"},{code:"my",name:"Myanmar (Burmese)"},{code:"ne",name:"Nepali"},{code:"no",name:"Norwegian"},{code:"or",name:"Odia (Oriya)"},{code:"om",name:"Oromo"},{code:"ps",name:"Pashto"},{code:"fa",name:"Persian"},{code:"pl",name:"Polish"},{code:"pt",name:"Portuguese"},{code:"pa",name:"Punjabi"},{code:"qu",name:"Quechua"},{code:"ro",name:"Romanian"},{code:"ru",name:"Russian"},{code:"sm",name:"Samoan"},{code:"sa",name:"Sanskrit"},{code:"gd",name:"Scots Gaelic"},{code:"nso",name:"Sepedi"},{code:"sr",name:"Serbian"},{code:"st",name:"Sesotho"},{code:"sn",name:"Shona"},{code:"sd",name:"Sindhi"},{code:"si",name:"Sinhala"},{code:"sk",name:"Slovak"},{code:"sl",name:"Slovenian"},{code:"so",name:"Somali"},{code:"es",name:"Spanish"},{code:"su",name:"Sundanese"},{code:"sw",name:"Swahili"},{code:"sv",name:"Swedish"},{code:"tg",name:"Tajik"},{code:"ta",name:"Tamil"},{code:"tt",name:"Tatar"},{code:"te",name:"Telugu"},{code:"th",name:"Thai"},{code:"ti",name:"Tigrinya"},{code:"ts",name:"Tsonga"},{code:"tr",name:"Turkish"},{code:"tk",name:"Turkmen"},{code:"ak",name:"Twi"},{code:"uk",name:"Ukrainian"},{code:"ur",name:"Urdu"},{code:"ug",name:"Uyghur"},{code:"uz",name:"Uzbek"},{code:"vi",name:"Vietnamese"},{code:"cy",name:"Welsh"},{code:"xh",name:"Xhosa"},{code:"yi",name:"Yiddish"},{code:"yo",name:"Yoruba"},{code:"zu",name:"Zulu"}],Zn=48,Qt={};function fo({id:t,children:n}){const o=ae(),a=!!Qt[t],[r,s]=q(!1),[c,l]=q(a||!1),{ref:p}=aa({root:null,rootMargin:`-${Zn}px 0px 0px 0px`,trackVisibility:!0,delay:1e3,onChange:d=>{d&&(s(!0),t&&(Qt[t]=!0))},triggerOnce:!0,skip:c||r});return pe(()=>{if(!o.current)return;const d=o.current.getBoundingClientRect();d.bottom>Zn&&(d.top{let r=mt[Jt];return fetch(`https://${r}/api/v1/${n}/${o}/${encodeURIComponent(t)}`).then(s=>{if(!s.ok)throw new Error(s.statusText);return s.json()}).then(s=>{var c;return{provider:"lingva",content:s.translation,detectedSourceLanguage:(c=s.info)==null?void 0:c.detectedSource,info:s.info}})},{retries:3,onFailedAttempt:r=>{Jt=(Jt+1)%mt.length}})}const go=1e3*60*60,_o=mn(ur,{maxAge:go}),mr=mn(dr(_o),{maxAge:go});function hr({forceTranslate:t,sourceLanguage:n,onTranslate:o,text:a="",mini:r,autoDetected:s}){const c=ho(!0),[l,p]=q("default"),[d,u]=q(null),[m,_]=q(null),[k,b]=q(null),E=ae(),w=n?Yt(n):null,D=Yt(c),T=ae("auto");o||(o=r?mr:_o);const R=async()=>{var f,g;p("loading");try{const{content:x,detectedSourceLanguage:P,provider:M,error:A,...I}=await o(a,T.current,c);if(x){if(P){const U=Yt(P);b(U)}if(M==="lingva"){const U=(g=(f=I==null?void 0:I.info)==null?void 0:f.pronunciation)==null?void 0:g.query;U&&u(U)}_(x),p("default"),!r&&x.trim()!==a.trim()&&(E.current.open=!0,E.current.scrollIntoView({behavior:"smooth",block:"nearest"}))}else p("error")}catch{p("error")}};return pe(()=>{t&&R()},[t]),r?m&&m.trim()!==a.trim()&&k!==D?e(fo,{children:e("div",{class:"status-translation-block-mini",children:[e(v,{icon:"translate",alt:`Auto-translated from ${w}`}),e("output",{lang:c,dir:"auto",title:d||"",children:m})]})}):null:e("div",{class:"status-translation-block",onClick:f=>{f.preventDefault()},children:e("details",{ref:E,children:[e("summary",{children:e("button",{type:"button",onClick:async f=>{f.preventDefault(),f.stopPropagation(),E.current.open=!E.current.open,l!=="loading"&&(m||R())},children:[e(v,{icon:"translate"})," ",e("span",{children:l==="loading"?"Translating…":n&&w&&!k?s?`Translate from ${w} (auto-detected)`:`Translate from ${w}`:"Translate"})]})}),e("div",{class:"translated-block",children:[e("div",{class:"translation-info insignificant",children:[e("select",{class:"translated-source-select",disabled:l==="loading",onChange:f=>{T.current=f.target.value,R()},children:cr.map(f=>e("option",{value:f.code,children:f.code==="auto"?`Auto (${k??"…"})`:f.name}))})," ",e("span",{children:["→ ",D]}),e(ro,{abrupt:!0,hidden:l!=="loading"})]}),l==="error"?e("p",{class:"ui-state",children:"Failed to translate"}):!!m&&e($,{children:[e("output",{class:"translated-content",lang:c,dir:"auto",children:m}),!!d&&e("output",{class:"translated-pronunciation-content",tabIndex:-1,onClick:f=>{f.target.classList.toggle("expand")},children:d})]})]})]})})}const pr=mt!=null&&mt.length?hr:()=>null;function Qn(t,n){const o=sa(t,n);return{set:(a,r)=>ca(a,r,o),get:a=>la(a,o),getMany:a=>da(a,o),del:a=>ua(a,o),delMany:a=>ma(a,o),clear:()=>ha(o),keys:()=>pa(o)}}const Wr={drafts:Qn("drafts-db","drafts-store"),catchup:Qn("catchup-db","catchup-store")};async function Gr(t,n={}){if(!(t!=null&&t.length))return;const{masto:o}=sn(),a=hn(),r=t.reduce((s,c)=>(!s.includes(c.id)&&!n[c.id]&&c.id!==a&&s.push(c.id),s),[]);if(!r.length)return null;try{return(await o.v1.accounts.relationships.fetch({id:r})).reduce((l,p)=>(l[p.id]=p,l),{})}catch{return null}}function fr({poll:t,lang:n,readOnly:o,refresh:a=()=>{},votePoll:r=()=>{}}){const[s,c]=q("default"),{expired:l,expiresAt:p,id:d,multiple:u,options:m,ownVotes:_,voted:k,votersCount:b,votesCount:E,emojis:w}=t,D=!!p&&new Date(p),T=b||E;let R=0;T<=1e3?R=0:T<=1e4?R=1:T<=1e5&&(R=2);const[f,g]=q(!1),x=m.every(P=>P.votesCount!==null);return e("div",{lang:n,dir:"auto",class:`poll ${o?"read-only":""} ${s==="loading"?"loading":""}`,children:[f&&x||k||l?e($,{children:[e("div",{class:"poll-options",children:m.map((P,M)=>{const{title:A,votesCount:I}=P,U=T?(I/T*100).toFixed(R):0,z=I>0&&I===Math.max(...m.map(C=>C.votesCount));return e("div",{class:`poll-option poll-result ${z?"poll-option-leading":""}`,style:{"--percentage":`${U}%`},children:[e("div",{class:"poll-option-title",children:[e("span",{children:e(Ze,{text:A,emojis:w})}),k&&_.includes(M)&&e($,{children:[" ",e(v,{icon:"check-circle"})]})]}),e("div",{class:"poll-option-votes",title:`${I} vote${I===1?"":"s"}`,children:[U,"%"]})]},`${M}-${A}-${I}`)})}),!l&&!k&&e("button",{class:"poll-vote-button plain2",disabled:s==="loading",onClick:P=>{P.preventDefault(),g(!1)},children:[e(v,{icon:"arrow-left",size:"s"})," Hide results"]})]}):e("form",{onSubmit:async P=>{P.preventDefault();const M=P.target,A=new FormData(M),I=[];A.forEach((U,z)=>{z==="poll"&&I.push(U)}),I.length&&(c("loading"),await r(I),c("default"))},children:[e("div",{class:"poll-options",children:m.map((P,M)=>{const{title:A}=P;return e("div",{class:"poll-option",children:e("label",{class:"poll-label",children:[e("input",{type:u?"checkbox":"radio",name:"poll",value:M,disabled:s==="loading",readOnly:o}),e("span",{class:"poll-option-title",children:e(Ze,{text:A,emojis:w})})]})})})}),!o&&e("button",{class:"poll-vote-button",type:"submit",disabled:s==="loading",children:"Vote"})]}),e("p",{class:"poll-meta",children:[!l&&!o&&e("button",{type:"button",class:"plain small",disabled:s==="loading",style:{marginLeft:-8},onClick:P=>{P.preventDefault(),c("loading"),(async()=>(await a(),c("default")))()},title:"Refresh",children:e(v,{icon:"refresh",alt:"Refresh"})}),!k&&!l&&!o&&x&&e("button",{type:"button",class:"plain small",disabled:s==="loading",onClick:P=>{P.preventDefault(),g(!f)},title:f?"Hide results":"Show results",children:[e(v,{icon:f?"eye-open":"eye-close",alt:f?"Hide results":"Show results"})," "]}),!l&&!o&&" ",e("span",{title:E,children:Ce(E)})," vote",E===1?"":"s",!!b&&b!==E&&e($,{children:[" ","• ",e("span",{title:b,children:Ce(b)})," ","voter",b===1?"":"s"]})," ","• ",l?"Ended":"Ending"," ",!!D&&e(He,{datetime:D})]})," "]})}const vo=fa();function gr(t,n){if(!(t!=null&&t.length))return!1;const o=t.filter(s=>{const{filter:c}=s,l=c.context.includes(n);return l?c.expiresAt?new Date(c.expiresAt)>new Date:l:!1});if(!o.length)return!1;if(o.some(s=>s.filter.filterAction==="hide"))return{action:"hide"};if(o.some(s=>s.filter.filterAction==="warn")){const s=o.map(c=>c.filter.title);return{action:"warn",titles:s,titlesStr:s.join(" • ")}}return!1}const pn=De(gr);function _r(t,n,o){var c;const{filtered:a}=t;if(!(a!=null&&a.length)||o&&((c=t.account)==null?void 0:c.id)===o)return!0;const s=pn(a,n);return s?s.action!=="hide":!0}function Yr(t,n){if(!(t!=null&&t.length))return[];if(!n)return t;const o=hn();return t.filter(a=>_r(a,n,o))}const en=document.createElement("div");function tn(t){return t?(en.innerHTML=t,en.querySelectorAll(".invisible").forEach(n=>{n.remove()}),en.innerText.length):0}const dt="speechSynthesis"in window;function Jn(t,n){if(dt)try{speechSynthesis.speaking&&speechSynthesis.cancel();const o=new SpeechSynthesisUtterance(t);n&&(o.lang=n),speechSynthesis.speak(o)}catch(o){alert(o)}}function yo(t){var c;const{spoilerText:n,content:o,poll:a,mediaAttachments:r}=t;let s="";return n!=null&&n.trim()?s+=n:s+=Ot(o),s=s.trim(),(c=a==null?void 0:a.options)!=null&&c.length&&(s+=` 📊: ${a.options.map(l=>`${a.multiple?"▪️":"•"} ${l.title}`).join(` `)}`),r!=null&&r.length&&(s+=" "+r.map(l=>({image:"🖼️",gifv:"🎞️",video:"📹",audio:"🎵",unknown:""})[l.type]||"").join("")),s}function xt({className:t="truncated"}={}){const n=ae(),o=ga(({height:a})=>{if(n.current){const{scrollHeight:r}=n.current;let s=r>a;if(s){const{height:c,maxHeight:l}=getComputedStyle(n.current),p=parseInt(l||c,10);s=r>p}n.current.classList.toggle(t,s)}},300);return _a({ref:n,box:"border-box",onResize:o}),n}const un={public:"earth",unlisted:"group",private:"lock",direct:"message"};function nn(t){if(!t)return;let n=Math.floor(t/3600),o=Math.floor(t%3600/60),a=Math.round(t%60);return n===0?`${o}:${a.toString().padStart(2,"0")}`:`${n}:${o.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}`}const vr=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),yr="ALT",on=t=>{const{alt:n,lang:o,index:a,...r}=t;return!n||!n.trim()?null:e("button",{type:"button",class:"alt-badge clickable",...r,onClick:s=>{s.stopPropagation(),s.preventDefault(),S.showMediaAlt={alt:n,lang:o}},title:"Media description",children:[yr,!!a&&e("sup",{children:a})]})},br=140,Er=280,bo=De(t=>t!=null&&t.length?t.length>br||/[\n\r].*[\n\r]/.test(t.trim()):!1);function Eo({class:t="",media:n,to:o,lang:a,showOriginal:r,autoAnimate:s,showCaption:c,allowLongerCaption:l,altIndex:p,onClick:d=()=>{}}){let{blurhash:u,description:m,meta:_,previewRemoteUrl:k,previewUrl:b,remoteUrl:E,url:w,type:D}=n;/no\-preview\./i.test(b)&&(b=null);const{original:T={},small:R,focus:f}=_||{},g=r?T==null?void 0:T.width:(R==null?void 0:R.width)||(T==null?void 0:T.width),x=r?T==null?void 0:T.height:(R==null?void 0:R.height)||(T==null?void 0:T.height),P=r?w:b||w,M=r?E:k||E,A=g&&x,I=A?g>x?"landscape":"portrait":null,U=u?no(u):null,z=ae();let C;if(f){const B=(f.x+1)/2*100,W=(1-f.y)/2*100;C=`${B.toFixed(0)}% ${W.toFixed(0)}%`}const Y=ae(),le=Ct(({x:B,y:W,scale:V})=>{const{current:te}=Y;if(te){const ve=va({x:B,y:W,scale:V});V===1?te.style.removeProperty("transform"):te.style.setProperty("transform",ve),te.closest(".media-zoom").style.touchAction=V<=1.01?"pan-x":""}},[]),[be,Z]=q(!1),ke={enabled:be,draggableUnZoomed:!1,inertiaFriction:.9,tapZoomFactor:2,doubleTapToggleZoom:!0,containerProps:{className:"media-zoom",style:{overflow:"visible"}},onUpdate:le},F=ye(()=>o?B=>e(Ye,{to:o,...B}):"div",[o]),X=M?Tr(M):null,L=D==="unknown"&&X&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(X.pathname),de=D==="unknown"&&X&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test(X.pathname),K=D==="image"||D==="unknown"&&b&&!L&&!de,ie=ae(),[he,Ae]=q(!1);zn(()=>{if(!K||!r||!ie.current)return;const{offsetWidth:B,offsetHeight:W}=ie.current,V=g{const{children:W,...V}=B;return e("figure",{...V,children:[W,e("figcaption",{class:"media-caption",lang:a,dir:"auto",onClick:te=>{te.preventDefault(),te.stopPropagation(),S.showMediaAlt={alt:m,lang:a}},children:m})]})}:$;if(K)return ke.containerProps.style.display="inherit",zn(()=>{vr&&r&&(async()=>{try{await fetch(P,{mode:"no-cors"}),Y.current.src=P}catch{}})()},[P]),e(Ee,{children:e(F,{ref:ie,class:`media media-image ${t}`,onClick:d,"data-orientation":I,"data-has-alt":!N,style:r?{backgroundImage:`url(${b})`,backgroundSize:he?`${g}px ${x}px`:void 0,...we}:_e,children:r?e(Bn,{...ke,children:e("img",{ref:Y,src:P,alt:m,width:g,height:x,"data-orientation":I,loading:"eager",decoding:"sync",onLoad:B=>{B.target.closest(".media-image").style.backgroundImage="",B.target.closest(".media-zoom").style.display="",Z(!0)},onError:B=>{const{src:W}=B.target;W===P&&M&&P!==M&&(B.target.src=M)}})}):e($,{children:[e("img",{src:P,alt:N?"":m,width:g,height:x,"data-orientation":I,loading:"lazy",style:{objectPosition:C||"center","--anim-duration":`${Math.min(Math.max(Math.max(g,x)/100,5),120)}s`},onLoad:B=>{if(B.target.dataset.loaded=!0,!A){const W=B.target.closest(".media");if(W){const{naturalWidth:V,naturalHeight:te}=B.target;W.dataset.orientation=V>te?"landscape":"portrait",W.style.setProperty("--width",`${V}px`),W.style.setProperty("--height",`${te}px`),W.style.aspectRatio=`${V}/${te}`}}},onError:B=>{const{src:W}=B.target;W===P&&P!==M&&(B.target.src=M)}}),!N&&e(on,{alt:m,lang:a,index:p})]})})});if(D==="gifv"||D==="video"||L){const B=T.duration>0,W=T.duration<31,V=D==="gifv"&&W,te=T.duration<61,ve=nn(T.duration),se=!r&&!s&&V,ne=!r&&s&&V,Le=T.duration>5,j=` `;return e(Ee,{children:e(F,{class:`media ${t} media-${V?"gif":"video"} ${ne?"media-contain":""} ${se?"media-hover-animate":""}`,"data-orientation":I,"data-formatted-duration":r?void 0:ve,"data-label":V&&!r&&!ne?"GIF":"","data-has-alt":!N,style:!r&&_e,onClick:Q=>{if(se)try{z.current.pause()}catch{}d(Q)},onMouseEnter:()=>{if(se)try{z.current.play()}catch{}},onMouseLeave:()=>{if(se)try{z.current.pause()}catch{}},onFocus:()=>{if(se)try{z.current.play()}catch{}},onBlur:()=>{if(se)try{z.current.pause()}catch{}},children:[r||ne?V&&r?e(Bn,{...ke,enabled:!0,children:e("div",{ref:Y,dangerouslySetInnerHTML:{__html:j}})}):V?e("div",{class:"video-container",dangerouslySetInnerHTML:{__html:j}}):e("div",{class:"video-container",children:e("video",{slot:"media",src:w,poster:b,width:g,height:x,"data-orientation":I,preload:"auto",autoplay:!0,playsinline:!0,loop:te,controls:!0})}):V?e("video",{ref:z,src:w,poster:b,width:g,height:x,"data-orientation":I,preload:"auto",playsinline:!0,loop:!0,muted:!0,onTimeUpdate:Le?Q=>{const{target:ue}=Q,re=ue==null?void 0:ue.closest(".media-gif");if(re){const Te=ue.currentTime/ue.duration*100;re.style.setProperty("--progress",`${Te}%`)}}:void 0}):e($,{children:[b?e("img",{src:b,alt:N?"":m,width:g,height:x,"data-orientation":I,loading:"lazy",decoding:"async",onLoad:Q=>{if(!A){const ue=Q.target.closest(".media");if(ue){const{naturalHeight:re,naturalWidth:Te}=Q.target;ue.dataset.orientation=Te>re?"landscape":"portrait",ue.style.setProperty("--width",`${Te}px`),ue.style.setProperty("--height",`${re}px`),ue.style.aspectRatio=`${Te}/${re}`}}}}):e("video",{src:w+"#t=0.1",width:g,height:x,"data-orientation":I,preload:"metadata",muted:!0,disablePictureInPicture:!0,onLoadedMetadata:Q=>{if(!B){const{duration:ue}=Q.target;if(ue){const re=nn(ue),Te=Q.target.closest(".media-video");Te&&(Te.dataset.formattedDuration=re)}}}}),e("div",{class:"media-play",children:e(v,{icon:"play",size:"xl"})})]}),!r&&!N&&e(on,{alt:m,lang:a,index:p})]})})}else if(D==="audio"||de){const B=nn(T.duration);return e(Ee,{children:e(F,{class:`media media-audio ${t}`,"data-formatted-duration":r?void 0:B,"data-has-alt":!N,onClick:d,style:!r&&_e,children:[r?e("audio",{src:E||w,preload:"none",controls:!0,autoplay:!0}):b?e("img",{src:b,alt:N?"":m,width:g,height:x,"data-orientation":I,loading:"lazy",onError:W=>{var V,te;try{(te=(V=W.target)==null?void 0:V.remove)==null||te.call(V)}catch{}}}):null,!r&&e($,{children:[e("div",{class:"media-play",children:e(v,{icon:"play",size:"xl"})}),!N&&e(on,{alt:m,lang:a,index:p})]})]})})}}function Tr(t){try{return new URL(t,location.origin)}catch{return null}}const kr=280,wr=140;function Lr(t,n){return n.v1.accounts.$select(t).fetch()}const Ar=mn(Lr),ut={public:"Public",unlisted:"Unlisted",private:"Followers only",direct:"Private mention"},$r=window.ontouchstart!==void 0&&/iPad|iPhone|iPod/.test(navigator.userAgent),Ir=new Intl.RelativeTimeFormat,eo=80;function Pr(t){var n;return(n=t==null?void 0:t.options)!=null&&n.length?`📊: ${t.options.map(o=>`- ${o.title}${o.votesCount>=0?` (${o.votesCount})`:""}`).join(` `)}`:""}function an(t){const{spoilerText:n,content:o,poll:a}=t;return(n?`${n} `:"")+Ot(o)+Pr(a)}const to=pt(({post:t,instance:n,previewMode:o})=>{const{content:a,emojis:r,language:s,mentions:c,url:l}=t;return e("div",{lang:s,dir:"auto",class:"inner-content",onClick:nr({mentions:c,instance:n,previewMode:o,statusURL:l}),dangerouslySetInnerHTML:{__html:po(a,{emojis:r,postEnhanceDOM:p=>{p.querySelectorAll('a.u-url[target="_blank"]').forEach(d=>{/http/i.test(d.innerText.trim())||d.removeAttribute("target")})}})}})},(t,n)=>{const{post:o}=t,{post:a}=n;return o.content===a.content}),Sr={s:"small",m:"medium",l:"large"},Rr=De(t=>{if(t=t==null?void 0:t.trim(),(t==null?void 0:t.length)>500)return null;const o=ya(t)[0];return o!=null&&o.lang&&(o==null?void 0:o.accuracy)>.5?o.lang:null});function Xe({statusID:t,status:n,instance:o,size:a="m",contentTextWeight:r,readOnly:s,enableCommentHint:c,withinContext:l,skeleton:p,enableTranslate:d,forceTranslate:u,previewMode:m,onMediaClick:_,quoted:k,onStatusLinkClick:b=()=>{},showFollowedTags:E,allowContextMenu:w,showActionsBar:D,showReplyParent:T,mediaFirst:R}){var Un,Nn,Hn;if(p)return e("div",{class:`status skeleton ${R?"status-media-first small":""}`,children:[!R&&e(Re,{size:"xxl"}),e("div",{class:"container",children:[e("div",{class:"meta",children:[(a==="s"||R)&&e(Re,{size:"m"})," ███ ████████"]}),e("div",{class:"content-container",children:[R&&e("div",{class:"media-first-container"}),e("div",{class:`content ${R?"media-first-content":""}`,children:e("p",{children:"████ ████████"})})]})]})]});const{masto:f,instance:g,authenticated:x}=sn({instance:o}),{instance:P}=sn(),M=g===P;let A=Se(t||(n==null?void 0:n.id),g);const I=ft(S);if(n||(n=I.statuses[A]||I.statuses[t],A=Se(n==null?void 0:n.id,g)),!n)return null;const{account:{acct:U,avatar:z,avatarStatic:C,id:Y,url:le,displayName:be,username:Z,emojis:ke,bot:F,group:X},id:L,repliesCount:de,reblogged:K,reblogsCount:ie,favourited:he,favouritesCount:Ae,bookmarked:fe,poll:ge,muted:we,sensitive:_e,spoilerText:ee,visibility:N,language:Ee,editedAt:B,filtered:W,card:V,createdAt:te,inReplyToId:ve,inReplyToAccountId:se,content:ne,mentions:Le,mediaAttachments:j,reblog:Q,uri:ue,url:re,emojis:Te,tags:zr,_deleted:ze,_pinned:Be,emojiReactions:gt}=n,[fn,ko]=q(null);pe(()=>{if(!ne||Ee)return;let i;return i=setTimeout(()=>{let y=Rr(Ot(ne,{preProcess:O=>{O.querySelectorAll(".mention, .hashtag, pre, code, a:has(.invisible)").forEach(H=>{H.remove()}),O.querySelectorAll("a").forEach(H=>{const me=H.innerText.trim();(me.startsWith("https://")||me.startsWith("http://"))&&H.remove()})}}));ko(y)},1e3),()=>clearTimeout(i)},[ne,Ee]);const oe=Ee||fn,Vt=!!(j!=null&&j.length);R&&Vt&&(a="s");const Qe=ye(()=>hn(),[]),Me=ye(()=>Qe&&Qe===Y,[Y,Qe]),wo=oo(vo),Je=!Me&&!s&&!m&&pn(W,wo);if((Je==null?void 0:Je.action)==="hide")return null;const et=i=>{i.shiftKey};if(a!=="l"&&Je)return e(Nr,{status:n,filterInfo:Je,instance:g,containerProps:{onMouseEnter:et},showFollowedTags:!0,quoted:k});const Oe=new Date(te),gn=new Date(B);let Ut=Le==null?void 0:Le.find(i=>i.id===se);!Ut&&se===L&&(Ut={url:le,username:Z,displayName:be});const[_t,_n]=q(Ut);if(!l&&!_t&&se){const i=S.accounts[se];i?_n(i):Ar(se,f).then(y=>{_n(y),S.accounts[y.id]=y}).catch(y=>{})}const vn=se===Qe||(Le==null?void 0:Le.find(i=>i.id===Qe)),xe=ye(()=>!!(Fn.account.get("preferences")||{})["reading:expand:spoilers"],[]),yn=ye(()=>(Fn.account.get("preferences")||{})["reading:expand:media"]||"default",[]),$e=m||xe||!!I.spoilers[L],tt=m||yn==="show_all"||!!I.spoilersMedia[L];if(Q)return X?e("div",{"data-state-post-id":A,class:"status-group",onMouseEnter:et,children:[e("div",{class:"status-pre-meta",children:[e(v,{icon:"group",size:"l",alt:"Group"})," ",e(lt,{account:n.account,instance:g,showAvatar:!0})]}),e(Xe,{status:t?null:Q,statusID:t?Q.id:null,instance:g,size:a,contentTextWeight:r,readOnly:s,mediaFirst:R})]}):e("div",{"data-state-post-id":A,class:"status-reblog",onMouseEnter:et,children:[e("div",{class:"status-pre-meta",children:[e(v,{icon:"rocket",size:"l"})," ",e(lt,{account:n.account,instance:g,showAvatar:!0})," ",e("span",{children:"boosted"})]}),e(Xe,{status:t?null:Q,statusID:t?Q.id:null,instance:g,size:a,contentTextWeight:r,readOnly:s,enableCommentHint:!0,mediaFirst:R})]});const Lo=Ct(({children:i})=>e("div",{"data-state-post-id":A,class:"status-followed-tags",onMouseEnter:et,children:[e("div",{class:"status-pre-meta",children:[e(v,{icon:"hashtag",size:"l"})," ",I.statusFollowedTags[A].slice(0,3).map(y=>e(Ye,{to:g?`/${g}/t/${y}`:`/t/${y}`,class:"status-followed-tag-item",children:y},y))]}),i]}),[A,g,I.statusFollowedTags[A]]),Ao=E&&((Un=I.statusFollowedTags[A])!=null&&Un.length)?Lo:$,G=a==="l",[Nt,$o]=q(u),bn=ho(!0),Io=I.settings.contentTranslationHideLanguages||[],{contentTranslation:Ht,contentTranslationAutoInline:En}=I.settings;Ht||(d=!1);const Tn=ye(()=>{if(!Ht||!En||s||l&&!G||m||ee||_e||ge||V||j!=null&&j.length)return!1;const i=tn(ne);return i>0&&i<=wr},[Ht,En,s,l,G,m,ee,_e,ge,V,j,ne]),[zt,vt]=q(!1),[Po,Bt]=q(!1),kn=xt(),wn=xt(),So=xt(),Ft="Read more →",Fe=ae(null),nt="Sorry, your current logged-in instance can't interact with this post from another instance.",Ln=Ct(()=>Math.max(Math.round((ee.length+tn(ne))/140)||1,1),[ee,ne]),An=ht(Oe),$n=B&&ht(gn);let ot=x&&N!=="direct"&&N!=="private";N==="private"&&Me&&(ot=!0);const yt=i=>{var y;if(!M||!x)return alert(nt);(i!=null&&i.shiftKey||(y=i==null?void 0:i.syntheticEvent)!=null&&y.shiftKey)&&$a({replyToStatus:n})||Pt({replyToStatus:n})},jt=ye(()=>j.some(i=>{var y,O;return!((O=(y=i.description)==null?void 0:y.trim)!=null&&O.call(y))}),[j]),In=ye(()=>Math.floor((new Date-Oe)/(1e3*60*60*24*30)),[Oe]),Br=async()=>{if(!M||!x)return alert(nt),!1;try{if(!K){let i="Boost this post?";if(jt&&(i+=` ⚠️ Some media have no descriptions.`),!confirm(i))return!1}if(S.statuses[A]={...n,reblogged:!K,reblogsCount:ie+(K?-1:1)},K){const i=await f.v1.statuses.$select(L).unreblog();return Ie(i,g),!0}else{const i=await f.v1.statuses.$select(L).reblog();return Ie(i,g),!0}}catch{return S.statuses[A]=n,!1}},qt=async()=>{if(!M||!x)return alert(nt),!1;try{if(S.statuses[A]={...n,reblogged:!K,reblogsCount:ie+(K?-1:1)},K){const i=await f.v1.statuses.$select(L).unreblog();Ie(i,g)}else{const i=await f.v1.statuses.$select(L).reblog();Ie(i,g)}return!0}catch{return S.statuses[A]=n,!1}},Pn=async()=>{if(!M||!x)return alert(nt),!1;try{if(S.statuses[A]={...n,favourited:!he,favouritesCount:Ae+(he?-1:1)},he){const i=await f.v1.statuses.$select(L).unfavourite();Ie(i,g)}else{const i=await f.v1.statuses.$select(L).favourite();Ie(i,g)}return!0}catch{return S.statuses[A]=n,!1}},Kt=async()=>{try{const i=await Pn();!G&&i&&ce(he?`Unliked @${Z||U}'s post`:`Liked @${Z||U}'s post`)}catch{}},Sn=async()=>{if(Rt("@mastodon/post-bookmark")){if(!M||!x)return alert(nt),!1;try{if(S.statuses[A]={...n,bookmarked:!fe},fe){const i=await f.v1.statuses.$select(L).unbookmark();Ie(i,g)}else{const i=await f.v1.statuses.$select(L).bookmark();Ie(i,g)}return!0}catch{return S.statuses[A]=n,!1}}},Rn=async()=>{try{const i=await Sn();!G&&i&&ce(fe?`Unbookmarked @${Z||U}'s post`:`Bookmarked @${Z||U}'s post`)}catch{}},bt=!!oe&&oe!==bn&&!dn([oe],[bn])&&!Io.find(i=>oe===i||dn([oe],[i])),Dn=ae(),xn=ae();async function Ro(i){var H,me,je,Wt;i&&(Dn.current=f.v1.statuses.$select(t).rebloggedBy.list({limit:eo}),xn.current=f.v1.statuses.$select(t).favouritedBy.list({limit:eo}));const[{value:y},{value:O}]=await Promise.allSettled([Dn.current.next(),xn.current.next()]);if((H=y.value)!=null&&H.length||(me=O.value)!=null&&me.length){const Ve=[];return(je=y.value)!=null&&je.length&&Ve.push(...y.value.map(Ue=>(Ue._types=["reblog"],Ue))),(Wt=O.value)!=null&&Wt.length&&Ve.push(...O.value.map(Ue=>(Ue._types=["favourite"],Ue))),{value:Ve,done:y.done&&O.done}}return{value:[],done:!0}}const Do=ae(),Cn=["public","unlisted"].includes(N),xo=["public","unlisted","private"].includes(N),Mn=e($,{children:[!G&&M&&e($,{children:e("div",{class:"menu-control-group-horizontal status-menu",children:[e(J,{onClick:yt,children:[e(v,{icon:"comment"}),e("span",{children:de>0?Ce(de):"Reply"})]}),e(Gt,{subMenu:!0,confirmLabel:e($,{children:[e(v,{icon:"rocket"}),e("span",{children:K?"Unboost":"Boost"})]}),className:`menu-reblog ${K?"checked":""}`,menuExtras:e(J,{onClick:()=>{Pt({draftStatus:{status:` ${re}`}})},children:[e(v,{icon:"quote"}),e("span",{children:"Quote"})]}),menuFooter:jt&&!K?e("div",{class:"footer",children:[e(v,{icon:"alert"}),"Some media have no descriptions."]}):In>=3&&e("div",{class:"footer",children:[e(v,{icon:"info"}),e("span",{children:["Old post (",e("strong",{children:Ir.format(-In,"month")}),")"]})]}),disabled:!ot,onClick:async()=>{try{const i=await qt();!G&&i&&ce(K?`Unboosted @${Z||U}'s post`:`Boosted @${Z||U}'s post`)}catch{}},children:[e(v,{icon:"rocket"}),e("span",{children:ie>0?Ce(ie):K?"Unboost":"Boost…"})]}),e(J,{onClick:Kt,className:`menu-favourite ${he?"checked":""}`,children:[e(v,{icon:"heart"}),e("span",{children:Ae>0?Ce(Ae):he?"Unlike":"Like"})]}),Rt("@mastodon/post-bookmark")&&e(J,{onClick:Rn,className:`menu-bookmark ${fe?"checked":""}`,children:[e(v,{icon:"bookmark"}),e("span",{children:fe?"Unbookmark":"Bookmark"})]})]})}),!G&&M&&(G||D)&&e(it,{}),(G||D)&&e($,{children:e(J,{onClick:()=>{S.showGenericAccounts={heading:"Boosted/Liked by…",fetchAccounts:Ro,instance:g,showReactions:!0,postID:A}},children:[e(v,{icon:"react"}),e("span",{children:["Boosted/Liked by",e("span",{class:"more-insignificant",children:"…"})]})]})}),!R&&e($,{children:[(d||!oe||bt)&&e(it,{}),d?e("div",{class:dt?"menu-horizontal":"",children:[e(J,{disabled:Nt,onClick:()=>{$o(!0)},children:[e(v,{icon:"translate"}),e("span",{children:"Translate"})]}),dt&&e(J,{onClick:()=>{const i=an(n);i&&Jn(i,oe)},children:[e(v,{icon:"speak"}),e("span",{children:"Speak"})]})]}):(!oe||bt)&&e("div",{class:dt?"menu-horizontal":"",children:[e(Yn,{to:`${g?`/${g}`:""}/s/${L}?translate=1`,children:[e(v,{icon:"translate"}),e("span",{children:"Translate"})]}),dt&&e(J,{onClick:()=>{const i=an(n);i&&Jn(i,oe)},children:[e(v,{icon:"speak"}),e("span",{children:"Speak"})]})]})]}),(!G&&M||d||!oe||bt)&&e(it,{}),!G&&e($,{children:e(Yn,{to:g?`/${g}/s/${L}`:`/s/${L}`,onClick:i=>{b(i,n)},children:[e(v,{icon:"arrows-right"}),e("small",{children:["View post by @",Z||U,e("br",{}),e("span",{class:"more-insignificant",children:[ut[N]," • ",An]})]})]})}),!!B&&e($,{children:e(J,{onClick:()=>{vt(L)},children:[e(v,{icon:"history"}),e("small",{children:["Show Edit History",e("br",{}),e("span",{class:"more-insignificant",children:["Edited: ",$n]})]})]})}),e(J,{href:re,target:"_blank",children:[e(v,{icon:"external"}),e("small",{class:"menu-double-lines",children:Vr(re)})]}),e("div",{class:"menu-horizontal",children:[e(J,{onClick:()=>{try{navigator.clipboard.writeText(re),ce("Link copied")}catch{ce("Unable to copy link")}},children:[e(v,{icon:"link"}),e("span",{children:"Copy"})]}),Cn&&(navigator==null?void 0:navigator.share)&&((Nn=navigator==null?void 0:navigator.canShare)==null?void 0:Nn.call(navigator,{url:re}))&&e(J,{onClick:()=>{try{navigator.share({url:re})}catch{alert("Sharing doesn't seem to work.")}},children:[e(v,{icon:"share"}),e("span",{children:"Share…"})]})]}),Cn&&G&&e(J,{onClick:()=>{Bt(!0)},children:[e(v,{icon:"code"}),e("span",{children:"Embed post"})]}),(Me||vn)&&e(it,{}),(Me||vn)&&e(J,{onClick:async()=>{try{const i=await f.v1.statuses.$select(L)[we?"unmute":"mute"]();Ie(i,g),ce(we?"Conversation unmuted":"Conversation muted")}catch{ce(we?"Unable to unmute conversation":"Unable to mute conversation")}},children:we?e($,{children:[e(v,{icon:"unmute"}),e("span",{children:"Unmute conversation"})]}):e($,{children:[e(v,{icon:"mute"}),e("span",{children:"Mute conversation"})]})}),Me&&xo&&e(J,{onClick:async()=>{try{const i=await f.v1.statuses.$select(L)[Be?"unpin":"pin"]();ce(Be?"Post unpinned from profile":"Post pinned to profile")}catch{ce(Be?"Unable to unpin post":"Unable to pin post")}},children:Be?e($,{children:[e(v,{icon:"unpin"}),e("span",{children:"Unpin from profile"})]}):e($,{children:[e(v,{icon:"pin"}),e("span",{children:"Pin to profile"})]})}),Me&&e("div",{class:"menu-horizontal",children:[Rt("@mastodon/post-edit")&&e(J,{onClick:()=>{Pt({editStatus:n})},children:[e(v,{icon:"pencil"}),e("span",{children:"Edit"})]}),G&&e(Gt,{subMenu:!0,confirmLabel:e($,{children:[e(v,{icon:"trash"}),e("span",{children:"Delete this post?"})]}),menuItemClassName:"danger",onClick:()=>{(async()=>{try{await f.v1.statuses.$select(L).remove();const i=io(L,g);i._deleted=!0,ce("Deleted")}catch{ce("Unable to delete")}})()},children:[e(v,{icon:"trash"}),e("span",{children:"Delete…"})]})]}),!Me&&G&&e($,{children:[e(it,{}),e(J,{className:"danger",onClick:()=>{S.showReportModal={account:n.account,post:n}},children:[e(v,{icon:"flag"}),e("span",{children:"Report post…"})]})]})]}),On=ae(),[Et,at]=q(!1),[Tt,kt]=q({}),wt=w||!G&&!m&&!ze&&!k,Co=ao($r&&wt?i=>{var me;if(i.pointerType==="mouse")return;const{clientX:y,clientY:O}=((me=i.touches)==null?void 0:me[0])||i,H=i.target.closest("a");H&&Fe.current.contains(H)&&!H.getAttribute("href").startsWith("#")||(i.preventDefault(),kt({anchorPoint:{x:y,y:O},direction:"right"}),at(!0))}:null,{threshold:600,captureEvent:!0,detect:"touch",cancelOnMovement:2}),Lt=!s&&!m&&!k,Mo=Ge("r, shift+r",yt,{enabled:Lt}),Oo=Ge("f, l",Kt,{enabled:Lt}),Vo=Ge("d",Rn,{enabled:Lt}),Uo=Ge("shift+b",()=>{(async()=>{try{const i=await qt();!G&&i&&ce(K?`Unboosted @${Z||U}'s post`:`Boosted @${Z||U}'s post`)}catch{}})()},{enabled:Lt&&ot}),No=Ge("x",i=>{const y=document.activeElement.closest(".status-link, .status-focus");if(y){const O=y.querySelector(".spoiler-button:not(.spoiling)");if(O)i.stopPropagation(),O.click();else{const H=y.querySelector(".spoiler-media-button:not(.spoiling)");H&&(i.stopPropagation(),H.click())}}}),At=j.slice(0,G?void 0:4),$t=j.length>1&&At.some(i=>!!i.description&&!bo(i.description)),Ho=ye(()=>{if(!$t)return null;const i=[];return At.forEach((y,O)=>{if(!y.description)return;const H=i.findIndex(me=>me.media.description===y.description);H===-1?i.push({media:y,indices:[O]}):i[H].indices.push(O)}),i.map(({media:y,indices:O})=>e("div",{"data-caption-index":O.map(H=>H+1).join(" "),onClick:H=>{H.preventDefault(),H.stopPropagation(),S.showMediaAlt={alt:y.description,lang:oe}},title:y.description,children:[e("sup",{children:O.map(H=>H+1).join(" ")})," ",y.description]},y.id))},[$t,At,oe]),rt=ye(()=>{var i;return!!ve&&se===((i=n.account)==null?void 0:i.id)||!!I.statusThreadNumber[A]},[ve,se,(Hn=n.account)==null?void 0:Hn.id,I.statusThreadNumber[A]]),zo=ye(()=>c&&!rt&&!l&&!ve&&N==="public"&&de>0,[c,rt,l,ve,de,N]),Vn=ye(()=>{if(V||ge||_e||ee||j!=null&&j.length||rt||l||ve||de<=0||!/[???︖❓❔⁇⁈⁉¿‽؟]/.test(ne))return!1;const O=tn(ne);if(O>0&&O<=kr)return!0},[V,ge,_e,ee,j,Q,rt,l,ve,de,ne]);return e(Ao,{children:[T&&!!(ve&&se)&&e(Ur,{sKey:A}),e("article",{"data-state-post-id":A,ref:i=>{var O;Fe.current=i;const y=((O=i==null?void 0:i.closest)==null?void 0:O.call(i,".timeline-item, .timeline-item-alt, .status-link, .status-focus"))||i;Mo.current=y,Oo.current=y,Vo.current=y,Uo.current=y,No.current=y},tabindex:"-1",class:`status ${!l&&ve&&_t?"status-reply-to":""} visibility-${N} ${Be?"status-pinned":""} ${Sr[a]} ${ze?"status-deleted":""} ${k?"status-card":""} ${Et?"status-menu-open":""} ${R&&Vt?"status-media-first":""}`,onMouseEnter:et,onContextMenu:i=>{var H,me;if(!wt||i.metaKey)return;const y=i.target.closest("a");if(y&&Fe.current.contains(y)&&!y.getAttribute("href").startsWith("#"))return;const O=(H=window.getSelection)==null?void 0:H.call(window);if(O.toString().length>0){const{anchorNode:je}=O;if((me=Fe.current)!=null&&me.contains(je))return}i.preventDefault(),kt({anchorPoint:{x:i.clientX,y:i.clientY},direction:"right"}),at(!0)},...wt?Co():{},children:[wt&&e(ba,{ref:On,state:Et?"open":void 0,...Tt,onClose:i=>{var y,O,H;at(!1),(i==null?void 0:i.reason)==="click"&&((H=(O=(y=Fe.current)==null?void 0:y.closest("[tabindex]"))==null?void 0:O.focus)==null||H.call(O))},portal:{target:document.body},containerProps:{style:{zIndex:1001},onClick:()=>{var i,y;(y=(i=On.current)==null?void 0:i.closeMenu)==null||y.call(i)}},overflow:"auto",boundingBoxPadding:uo(),unmountOnClose:!0,children:Mn}),D&&a!=="l"&&!m&&!s&&!ze&&!k&&e("div",{class:`status-actions ${Et==="actions-bar"?"open":""}`,ref:Do,children:[e(We,{size:"s",title:"Reply",alt:"Reply",class:"reply-button",icon:"comment",iconSize:"m",onClick:yt}),e(We,{size:"s",checked:he,title:["Like","Unlike"],alt:["Like","Liked"],class:"favourite-button",icon:"heart",iconSize:"m",count:Ae,onClick:Kt}),e("button",{type:"button",title:"More",class:"plain more-button",onClick:i=>{i.preventDefault(),i.stopPropagation(),kt({anchorRef:{current:i.currentTarget},align:"start",direction:"left",gap:0,shift:-8}),at("actions-bar")},children:e(v,{icon:"more2",size:"m",alt:"More"})})]}),a!=="l"&&e("div",{class:"status-badge",children:[K&&e(v,{class:"reblog",icon:"rocket",size:"s"}),he&&e(v,{class:"favourite",icon:"heart",size:"s"}),fe&&e(v,{class:"bookmark",icon:"bookmark",size:"s"}),Be&&e(v,{class:"pin",icon:"pin",size:"s"})]}),a!=="s"&&e("a",{href:le,tabindex:"-1",title:`@${U}`,onClick:i=>{i.preventDefault(),i.stopPropagation(),S.showAccount={account:n.account,instance:g}},children:e(Re,{url:C||z,size:"xxl",squircle:F})}),e("div",{class:"container",children:[e("div",{class:"meta",children:[e("span",{class:"meta-name",children:e(lt,{account:n.account,instance:g,showAvatar:a==="s",showAcct:G})})," ",a!=="l"&&(ze?e("span",{class:"status-deleted-tag",children:"Deleted"}):re&&!m&&!s&&!k?e(Ye,{to:g?`/${g}/s/${L}`:`/s/${L}`,onClick:i=>{i.metaKey||i.ctrlKey||i.shiftKey||i.altKey||i.which===2||(i.preventDefault(),i.stopPropagation(),b==null||b(i,n),kt({anchorRef:{current:i.currentTarget},align:"end",direction:"bottom",gap:4}),at(!0))},class:`time ${Et&&(Tt!=null&&Tt.anchorRef)?"is-open":""}`,children:[zo&&!Vn?e(v,{icon:"comment2",size:"s",alt:`${de} ${de===1?"reply":"replies"}`}):N!=="public"&&N!=="direct"&&e(v,{icon:un[N],alt:ut[N],size:"s"})," ",e(He,{datetime:Oe,format:"micro"}),!m&&!s&&e(v,{icon:"more2",class:"more"})]}):e("span",{class:"time",children:[N!=="public"&&N!=="direct"&&e($,{children:[e(v,{icon:un[N],alt:ut[N],size:"s"})," "]}),e(He,{datetime:Oe,format:"micro"})]}))]}),N==="direct"&&e($,{children:[e("div",{class:"status-direct-badge",children:"Private mention"})," "]}),!l&&e($,{children:rt?e("div",{class:"status-thread-badge",children:[e(v,{icon:"thread",size:"s"}),"Thread",I.statusThreadNumber[A]?` ${I.statusThreadNumber[A]}/X`:""]}):!!ve&&!!_t&&(!!ee||!Le.find(i=>i.id===se))&&e("div",{class:"status-reply-badge",children:[e(v,{icon:"reply"})," ",e(lt,{account:_t,instance:g,short:!0})]})}),e("div",{class:`content-container ${ee||_e?"has-spoiler":""} ${$e?"show-spoiler":""} ${tt?"show-media":""}`,"data-content-text-weight":r?Ln():null,style:(G||r)&&{"--content-text-weight":Ln()},children:R&&Vt?e($,{children:[(!!ee||!!_e)&&!xe&&e($,{children:[!!ee&&e("span",{class:"spoiler-content media-first-spoiler-content",lang:oe,dir:"auto",ref:kn,"data-read-more":Ft,children:[e(Ze,{text:ee,emojis:Te})," "]}),e("button",{class:`light spoiler-button media-first-spoiler-button ${$e?"spoiling":""}`,type:"button",onClick:i=>{i.preventDefault(),i.stopPropagation(),$e?(delete S.spoilers[L],xe||delete S.spoilersMedia[L]):(S.spoilers[L]=!0,xe||(S.spoilersMedia[L]=!0))},children:[e(v,{icon:$e?"eye-open":"eye-close"})," ",$e?"Show less":"Show content"]})]}),e(xr,{mediaAttachments:j,language:oe,postID:L,instance:g}),!!ne&&e("div",{class:"media-first-content content",ref:wn,children:e(to,{post:n,instance:g,previewMode:m})})]}):e($,{children:[!!ee&&e($,{children:[e("div",{class:"content spoiler-content",lang:oe,dir:"auto",ref:kn,"data-read-more":Ft,children:e("p",{children:e(Ze,{text:ee,emojis:Te})})}),xe||m?e("div",{class:"spoiler-divider",children:[e(v,{icon:"eye-open"})," Content warning"]}):e("button",{class:`light spoiler-button ${$e?"spoiling":""}`,type:"button",onClick:i=>{i.preventDefault(),i.stopPropagation(),$e?(delete S.spoilers[L],xe||delete S.spoilersMedia[L]):(S.spoilers[L]=!0,xe||(S.spoilersMedia[L]=!0))},children:[e(v,{icon:$e?"eye-open":"eye-close"})," ",$e?"Show less":"Show content"]})]}),!!ne&&e("div",{class:"content",ref:wn,"data-read-more":Ft,children:[e(to,{post:n,instance:g,previewMode:m}),e(Hr,{id:L,instance:g,level:k})]}),!!ge&&e(fr,{lang:oe,poll:ge,readOnly:s||!M||!x,onUpdate:i=>{S.statuses[A].poll=i},refresh:()=>f.v1.polls.$select(ge.id).fetch().then(i=>{S.statuses[A].poll=i}).catch(i=>{}),votePoll:i=>f.v1.polls.$select(ge.id).votes.create({choices:i}).then(y=>{S.statuses[A].poll=y}).catch(y=>{})}),((d||Tn)&&!!ne.trim()&&!!Ot(Mt(ne,Te))&&bt||Nt)&&e(pr,{forceTranslate:Nt||Tn,mini:!G&&!l,sourceLanguage:oe,autoDetected:fn,text:an(n)}),!m&&_e&&!!j.length&&yn!=="show_all"&&e("button",{class:`plain spoiler-media-button ${tt?"spoiling":""}`,type:"button",hidden:!xe&&!!ee,onClick:i=>{i.preventDefault(),i.stopPropagation(),tt?delete S.spoilersMedia[L]:S.spoilersMedia[L]=!0},children:[e(v,{icon:tt?"eye-open":"eye-close"})," ",tt?"Show less":"Show media"]}),!!j.length&&e(Dr,{lang:oe,enabled:$t,captionChildren:Ho,children:e("div",{ref:So,class:`media-container media-eq${j.length} ${j.length>2?"media-gt2":""} ${j.length>4?"media-gt4":""}`,children:At.map((i,y)=>e(Eo,{media:i,autoAnimate:G,showCaption:j.length===1,allowLongerCaption:!ne&&j.length===1,lang:oe,altIndex:$t&&!!i.description&&y+1,to:`/${g}/s/${L}?${l?"media":"media-only"}=${y+1}`,onClick:_?O=>{_(O,y,i,n)}:void 0},i.id))})}),!!V&&/^https/i.test(V==null?void 0:V.url)&&!_e&&!ee&&!ge&&!j.length&&!I.statusQuotes[A]&&e(Cr,{card:V,selfReferential:(V==null?void 0:V.url)===n.url||(V==null?void 0:V.url)===n.uri,instance:P})]})}),!G&&Vn&&e("div",{class:"content-comment-hint insignificant",children:[e(v,{icon:"comment2",alt:"Replies"})," ",de]}),G&&e($,{children:[e("div",{class:"extra-meta",children:ze?e("span",{class:"status-deleted-tag",children:"Deleted"}):e($,{children:[e("span",{children:ut[N]})," •"," ",e("a",{href:re,target:"_blank",rel:"noopener noreferrer",children:e("time",{class:"created",datetime:Oe.toISOString(),title:Oe.toLocaleString(),children:An})}),B&&e($,{children:[" ","• ",e(v,{icon:"pencil",alt:"Edited"})," ",e("time",{tabIndex:"0",class:"edited",datetime:gn.toISOString(),onClick:()=>{vt(L)},children:$n})]})]})}),!!(gt!=null&>.length)&&e("div",{class:"emoji-reactions",children:gt.map(i=>{const{name:y,count:O,me:H,url:me,staticUrl:je}=i;if(me)return e("span",{class:`emoji-reaction tag ${H?"":"insignificant"}`,children:[e(ln,{alt:y,url:me,staticUrl:je})," ",O]});if(/^:.+?:$/.test(y)){const Ve=Te.find(Ue=>Ue.shortcode===y.replace(/^:/,"").replace(/:$/,""));if(Ve)return e("span",{class:`emoji-reaction tag ${H?"":"insignificant"}`,children:[e(ln,{alt:y,url:Ve.url,staticUrl:Ve.staticUrl})," ",O]})}return e("span",{class:`emoji-reaction tag ${H?"":"insignificant"}`,children:[y," ",O]})})}),e("div",{class:`actions ${ze?"disabled":""}`,children:[e("div",{class:"action has-count",children:e(We,{title:"Reply",alt:"Comments",class:"reply-button",icon:"comment",count:de,onClick:yt})}),e(Gt,{disabled:!ot,onClick:qt,confirmLabel:e($,{children:[e(v,{icon:"rocket"}),e("span",{children:K?"Unboost":"Boost"})]}),menuExtras:e(J,{onClick:()=>{Pt({draftStatus:{status:` ${re}`}})},children:[e(v,{icon:"quote"}),e("span",{children:"Quote"})]}),menuFooter:jt&&!K&&e("div",{class:"footer",children:[e(v,{icon:"alert"}),"Some media have no descriptions."]}),children:e("div",{class:"action has-count",children:e(We,{checked:K,title:["Boost","Unboost"],alt:["Boost","Boosted"],class:"reblog-button",icon:"rocket",count:ie,disabled:!ot})})}),e("div",{class:"action has-count",children:e(We,{checked:he,title:["Like","Unlike"],alt:["Like","Liked"],class:"favourite-button",icon:"heart",count:Ae,onClick:Pn})}),Rt("@mastodon/post-bookmark")&&e("div",{class:"action",children:e(We,{checked:fe,title:["Bookmark","Unbookmark"],alt:["Bookmark","Bookmarked"],class:"bookmark-button",icon:"bookmark",onClick:Sn})}),e(mo,{portal:{target:document.querySelector(".status-deck")||document.body},align:"end",gap:4,overflow:"auto",viewScroll:"close",menuButton:e("div",{class:"action",children:e("button",{type:"button",title:"More",class:"plain more-button",children:e(v,{icon:"more",size:"l",alt:"More"})})}),children:Mn})]})]})]}),!!zt&&e(cn,{onClick:i=>{i.target===i.currentTarget&&vt(!1)},children:e(Mr,{statusID:zt,instance:g,fetchStatusHistory:()=>f.v1.statuses.$select(zt).history.list(),onClose:()=>{var i;vt(!1),(i=Fe.current)==null||i.focus()}})}),!!Po&&e(cn,{onClick:i=>{i.target===i.currentTarget&&Bt(!1)},children:e(Or,{post:n,instance:g,onClose:()=>{Bt(!1)}})})]})]})}function Dr(t){const{enabled:n,children:o,lang:a,captionChildren:r}=t;return!n||!r?o:e("figure",{class:"media-figure-multiple",children:[o,e("figcaption",{lang:a,dir:"auto",children:r})]})}function xr(t){const{mediaAttachments:n,language:o,postID:a,instance:r}=t,s=n.length>1,c=ae(),[l,p]=q(0);return pe(()=>{let d=()=>{const{clientWidth:u,scrollLeft:m}=c.current,_=Math.round(m/u);p(_)};return c.current&&c.current.addEventListener("scroll",d,{passive:!0}),()=>{c.current&&c.current.removeEventListener("scroll",d)}},[]),e($,{children:[e("div",{class:"media-first-container",children:[e("div",{class:"media-first-carousel",ref:c,children:n.map((d,u)=>e("div",{class:"media-first-item",children:e(Eo,{media:d,lang:o,to:`/${r}/s/${a}?media=${u+1}`})},d.id))}),s&&e("div",{class:"media-carousel-controls",children:[e("div",{class:"carousel-indexer",children:[l+1,"/",n.length]}),e("label",{class:"media-carousel-button",children:e("button",{type:"button",class:"carousel-button",hidden:l===0,onClick:d=>{d.preventDefault(),d.stopPropagation(),c.current.focus(),c.current.scrollTo({left:c.current.clientWidth*(l-1),behavior:"smooth"})},children:e(v,{icon:"arrow-left"})})}),e("label",{class:"media-carousel-button",children:e("button",{type:"button",class:"carousel-button",hidden:l===n.length-1,onClick:d=>{d.preventDefault(),d.stopPropagation(),c.current.focus(),c.current.scrollTo({left:c.current.clientWidth*(l+1),behavior:"smooth"})},children:e(v,{icon:"arrow-right"})})})]})]}),s&&e("div",{class:"media-carousel-dots",style:{"--dots-count":n.length},children:n.map((d,u)=>e("span",{class:`carousel-dot ${u===l?"active":""}`},d.id))})]})}function Cr({card:t,selfReferential:n,instance:o}){var z;const a=ft(S),{blurhash:r,title:s,description:c,html:l,providerName:p,providerUrl:d,authorName:u,authorUrl:m,width:_,height:k,image:b,imageDescription:E,url:w,type:D,embedUrl:T,language:R,publishedAt:f}=t,g=s||p||u,P=_/k>=1.2?"large":"",[M,A]=q(null);if(pe(()=>{g&&b&&!n&&La(w)&&Aa(o,w).then(C=>{if(!C)return;const{id:Y,url:le}=C;A("#"+le)})},[g,b,n]),a.unfurledLinks[w])return null;const I=/