import{ae as he,R as Nt,e as r,d as j,q as xt,A as O,_ as Ie,y as et,E as wr,af as Da,j as it,O as ye,h as ts,ag as Ma,ah as io,ai as Ra,aj as es,Q as ns,k as F,M as Qe,W as Lt,z as En,t as Dt,s as U,ak as C,al as Pa,r as Oa,f as os,am as $a,u as re,a as so,B as Fa,an as Na,ao as za,T as R,ap as rs,aq as Ba,ar as is,p as mo,w as ss,g as Er,as as Va,at as $t,au as Ha,av as Ua,aw as Un,J as ce,c as xn,b as pe,X as as,ax as Ka,ay as ja,az as Wa}from"./useTitle-Bxi1QgwH.js";const cs=["shift","alt","meta","mod","ctrl","control"],Za={esc:"escape",return:"enter",left:"arrowleft",right:"arrowright",up:"arrowup",down:"arrowdown",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function We(t){return(Za[t.trim()]||t.trim()).toLowerCase().replace(/key|digit|numpad/,"")}function qa(t){return cs.includes(t)}function ko(t,e=","){return t.toLowerCase().split(e)}function Co(t,e="+",n=!1,o){const i=t.toLocaleLowerCase().split(e).map(c=>We(c)),a={alt:i.includes("alt"),ctrl:i.includes("ctrl")||i.includes("control"),shift:i.includes("shift"),meta:i.includes("meta"),mod:i.includes("mod"),useKey:n},s=i.filter(c=>!cs.includes(c));return{...a,keys:s,description:o}}typeof document<"u"&&(document.addEventListener("keydown",t=>{t.code!==void 0&&ls([We(t.code)])}),document.addEventListener("keyup",t=>{t.code!==void 0&&us([We(t.code)])})),typeof window<"u"&&window.addEventListener("blur",()=>{ve.clear()});const ve=new Set;function Tr(t){return Array.isArray(t)}function Ga(t,e=","){return(Tr(t)?t:t.split(e)).every(n=>ve.has(n.trim().toLowerCase()))}function ls(t){const e=Array.isArray(t)?t:[t];ve.has("meta")&&ve.forEach(n=>!qa(n)&&ve.delete(n.toLowerCase())),e.forEach(n=>ve.add(n.toLowerCase()))}function us(t){const e=Array.isArray(t)?t:[t];t==="meta"?ve.clear():e.forEach(n=>ve.delete(n.toLowerCase()))}function Ya(t,e,n){(typeof n=="function"&&n(t,e)||n===!0)&&t.preventDefault()}function Xa(t,e,n){return typeof n=="function"?n(t,e):n===!0||n===void 0}function Qa(t){return ds(t,["input","textarea","select"])}function ds(t,e=!1){const{target:n,composed:o}=t;let i;return Ja(n)&&o?i=t.composedPath()[0]&&t.composedPath()[0].tagName:i=n&&n.tagName,Tr(e)?!!(i&&e&&e.some(a=>a.toLowerCase()===i.toLowerCase())):!!(i&&e&&e)}function Ja(t){return!!t.tagName&&!t.tagName.startsWith("-")&&t.tagName.includes("-")}function tc(t,e){return t.length===0&&e?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):e?t.some(n=>e.includes(n))||t.includes("*"):!0}const ec=(t,e,n=!1)=>{const{alt:o,meta:i,mod:a,shift:s,ctrl:c,keys:l,useKey:d}=e,{code:h,key:u,ctrlKey:f,metaKey:m,shiftKey:p,altKey:g}=t,w=We(h);if(d&&(l==null?void 0:l.length)===1&&l.includes(u))return!0;if(!(l!=null&&l.includes(w))&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(w))return!1;if(!n){if(o!==g&&w!=="alt"||s!==p&&w!=="shift")return!1;if(a){if(!m&&!f)return!1}else if(i!==m&&w!=="meta"&&w!=="os"||c!==f&&w!=="ctrl"&&w!=="control")return!1}return l&&l.length===1&&l.includes(w)?!0:l?Ga(l):!l},nc=he(void 0),oc=()=>Nt(nc);function hs(t,e){return t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(t).length===Object.keys(e).length&&Object.keys(t).reduce((n,o)=>n&&hs(t[o],e[o]),!0):t===e}const rc=he({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),ic=()=>Nt(rc);function sc(t){const e=O(void 0);return hs(e.current,t)||(e.current=t),e.current}const ri=t=>{t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation()},ac=typeof window<"u"?Ie:et;function Ve(t,e,n,o){const i=O(null),a=O(!1),s=n instanceof Array?o instanceof Array?void 0:o:n,c=Tr(t)?t.join(s==null?void 0:s.delimiter):t,l=n instanceof Array?n:o instanceof Array?o:void 0,d=xt(e,l??[]),h=O(d);l?h.current=d:h.current=e;const u=sc(s),{activeScopes:f}=ic(),m=oc();return ac(()=>{if((u==null?void 0:u.enabled)===!1||!tc(f,u==null?void 0:u.scopes))return;const p=(v,T=!1)=>{var S;if(!(Qa(v)&&!ds(v,u==null?void 0:u.enableOnFormTags))){if(i.current!==null){const _=i.current.getRootNode();if((_ instanceof Document||_ instanceof ShadowRoot)&&_.activeElement!==i.current&&!i.current.contains(_.activeElement)){ri(v);return}}(S=v.target)!=null&&S.isContentEditable&&!(u!=null&&u.enableOnContentEditable)||ko(c,u==null?void 0:u.delimiter).forEach(_=>{var y,k;const A=Co(_,u==null?void 0:u.splitKey,u==null?void 0:u.useKey,u==null?void 0:u.description);if(ec(v,A,u==null?void 0:u.ignoreModifiers)||(y=A.keys)!=null&&y.includes("*")){if((k=u==null?void 0:u.ignoreEventWhen)!=null&&k.call(u,v)||T&&a.current)return;if(Ya(v,A,u==null?void 0:u.preventDefault),!Xa(v,A,u==null?void 0:u.enabled)){ri(v);return}h.current(v,A),T||(a.current=!0)}})}},g=v=>{v.code!==void 0&&(ls(We(v.code)),((u==null?void 0:u.keydown)===void 0&&(u==null?void 0:u.keyup)!==!0||u!=null&&u.keydown)&&p(v))},w=v=>{v.code!==void 0&&(us(We(v.code)),a.current=!1,u!=null&&u.keyup&&p(v,!0))},E=i.current||(s==null?void 0:s.document)||document;return E.addEventListener("keyup",w,s==null?void 0:s.eventListenerOptions),E.addEventListener("keydown",g,s==null?void 0:s.eventListenerOptions),m&&ko(c,u==null?void 0:u.delimiter).forEach(v=>m.addHotkey(Co(v,u==null?void 0:u.splitKey,u==null?void 0:u.useKey,u==null?void 0:u.description))),()=>{E.removeEventListener("keyup",w,s==null?void 0:s.eventListenerOptions),E.removeEventListener("keydown",g,s==null?void 0:s.eventListenerOptions),m&&ko(c,u==null?void 0:u.delimiter).forEach(v=>m.removeHotkey(Co(v,u==null?void 0:u.splitKey,u==null?void 0:u.useKey,u==null?void 0:u.description)))}},[c,u,f]),i}var eo={exports:{}};/*!
* Toastify js 1.12.0
* https://github.com/apvarun/toastify-js
* @license MIT licensed
*
* Copyright (C) 2018 Varun A P
*/var cc=eo.exports,ii;function lc(){return ii||(ii=1,function(t){(function(e,n){t.exports?t.exports=n():e.Toastify=n()})(cc,function(e){var n=function(s){return new n.lib.init(s)},o="1.12.0";n.defaults={oldestFirst:!0,text:"Toastify is awesome!",node:void 0,duration:3e3,selector:void 0,callback:function(){},destination:void 0,newWindow:!1,close:!1,gravity:"toastify-top",positionLeft:!1,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:!0,onClick:function(){},offset:{x:0,y:0},escapeMarkup:!0,ariaLive:"polite",style:{background:""}},n.lib=n.prototype={toastify:o,constructor:n,init:function(s){return s||(s={}),this.options={},this.toastElement=null,this.options.text=s.text||n.defaults.text,this.options.node=s.node||n.defaults.node,this.options.duration=s.duration===0?0:s.duration||n.defaults.duration,this.options.selector=s.selector||n.defaults.selector,this.options.callback=s.callback||n.defaults.callback,this.options.destination=s.destination||n.defaults.destination,this.options.newWindow=s.newWindow||n.defaults.newWindow,this.options.close=s.close||n.defaults.close,this.options.gravity=s.gravity==="bottom"?"toastify-bottom":n.defaults.gravity,this.options.positionLeft=s.positionLeft||n.defaults.positionLeft,this.options.position=s.position||n.defaults.position,this.options.backgroundColor=s.backgroundColor||n.defaults.backgroundColor,this.options.avatar=s.avatar||n.defaults.avatar,this.options.className=s.className||n.defaults.className,this.options.stopOnFocus=s.stopOnFocus===void 0?n.defaults.stopOnFocus:s.stopOnFocus,this.options.onClick=s.onClick||n.defaults.onClick,this.options.offset=s.offset||n.defaults.offset,this.options.escapeMarkup=s.escapeMarkup!==void 0?s.escapeMarkup:n.defaults.escapeMarkup,this.options.ariaLive=s.ariaLive||n.defaults.ariaLive,this.options.style=s.style||n.defaults.style,s.backgroundColor&&(this.options.style.background=s.backgroundColor),this},buildToast:function(){if(!this.options)throw"Toastify is not initialized";var s=document.createElement("div");s.className="toastify on "+this.options.className,this.options.position?s.className+=" toastify-"+this.options.position:this.options.positionLeft===!0?(s.className+=" toastify-left",console.warn("Property `positionLeft` will be depreciated in further versions. Please use `position` instead.")):s.className+=" toastify-right",s.className+=" "+this.options.gravity,this.options.backgroundColor&&console.warn('DEPRECATION NOTICE: "backgroundColor" is being deprecated. Please use the "style.background" property.');for(var c in this.options.style)s.style[c]=this.options.style[c];if(this.options.ariaLive&&s.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)s.appendChild(this.options.node);else if(this.options.escapeMarkup?s.innerText=this.options.text:s.innerHTML=this.options.text,this.options.avatar!==""){var l=document.createElement("img");l.src=this.options.avatar,l.className="toastify-avatar",this.options.position=="left"||this.options.positionLeft===!0?s.appendChild(l):s.insertAdjacentElement("afterbegin",l)}if(this.options.close===!0){var d=document.createElement("button");d.type="button",d.setAttribute("aria-label","Close"),d.className="toast-close",d.innerHTML="✖",d.addEventListener("click",(function(w){w.stopPropagation(),this.removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)}).bind(this));var h=window.innerWidth>0?window.innerWidth:screen.width;(this.options.position=="left"||this.options.positionLeft===!0)&&h>360?s.insertAdjacentElement("afterbegin",d):s.appendChild(d)}if(this.options.stopOnFocus&&this.options.duration>0){var u=this;s.addEventListener("mouseover",function(w){window.clearTimeout(s.timeOutValue)}),s.addEventListener("mouseleave",function(){s.timeOutValue=window.setTimeout(function(){u.removeElement(s)},u.options.duration)})}if(typeof this.options.destination<"u"&&s.addEventListener("click",(function(w){w.stopPropagation(),this.options.newWindow===!0?window.open(this.options.destination,"_blank"):window.location=this.options.destination}).bind(this)),typeof this.options.onClick=="function"&&typeof this.options.destination>"u"&&s.addEventListener("click",(function(w){w.stopPropagation(),this.options.onClick()}).bind(this)),typeof this.options.offset=="object"){var f=i("x",this.options),m=i("y",this.options),p=this.options.position=="left"?f:"-"+f,g=this.options.gravity=="toastify-top"?m:"-"+m;s.style.transform="translate("+p+","+g+")"}return s},showToast:function(){this.toastElement=this.buildToast();var s;if(typeof this.options.selector=="string"?s=document.getElementById(this.options.selector):this.options.selector instanceof HTMLElement||typeof ShadowRoot<"u"&&this.options.selector instanceof ShadowRoot?s=this.options.selector:s=document.body,!s)throw"Root element is not defined";var c=n.defaults.oldestFirst?s.firstChild:s.lastChild;return s.insertBefore(this.toastElement,c),n.reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout((function(){this.removeElement(this.toastElement)}).bind(this),this.options.duration)),this},hideToast:function(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this.removeElement(this.toastElement)},removeElement:function(s){s.className=s.className.replace(" on",""),window.setTimeout((function(){this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),s.parentNode&&s.parentNode.removeChild(s),this.options.callback.call(s),n.reposition()}).bind(this),400)}},n.reposition=function(){for(var s={top:15,bottom:15},c={top:15,bottom:15},l={top:15,bottom:15},d=document.getElementsByClassName("toastify"),h,u=0;u0?window.innerWidth:screen.width;p<=360?(d[u].style[h]=l[h]+"px",l[h]+=f+m):a(d[u],"toastify-left")===!0?(d[u].style[h]=s[h]+"px",s[h]+=f+m):(d[u].style[h]=c[h]+"px",c[h]+=f+m)}return this};function i(s,c){return c.offset[s]?isNaN(c.offset[s])?c.offset[s]:c.offset[s]+"px":"0px"}function a(s,c){return!s||typeof c!="string"?!1:!!(s.className&&s.className.trim().split(/\s+/gi).indexOf(c)>-1)}return n.lib.init.prototype=n.lib,n})}(eo)),eo.exports}var uc=lc();const dc=wr(uc);window._showToast=St;function St(t){typeof t=="string"&&(t={text:t});const{onClick:e,delay:n,...o}=t,i=dc({className:`${e||t.destination?"shiny-pill":""}`,gravity:"bottom",position:"center",...o,onClick:()=>{e==null||e(i)}});return n?setTimeout(()=>{i.showToast()},n):i.showToast(),i}function mv(t,e,n,o){const i=O(t);et(()=>{i.current=t},[t,n]),et(()=>{!o||e===null||e===!1||i.current()},[o]),et(()=>{if(e===null||e===!1)return;const s=setInterval(()=>i.current(),e);return()=>clearInterval(s)},[e])}const Ar=t=>!!t&&t[0]==="o",er=Da,Tn=(t,e)=>t===!0||!!(t&&t[e]),Ut=(t,e)=>typeof t=="function"?t(e):t,hc="_szhsinMenu",fc=t=>t[hc];const Je=(t,e)=>(e&&Object.keys(e).forEach(n=>{const o=t[n],i=e[n];typeof i=="function"&&o?t[n]=(...a)=>{i(...a),o(...a)}:t[n]=i}),t),mc=t=>{if(typeof t!="string")return{top:0,right:0,bottom:0,left:0};const e=t.trim().split(/\s+/,4).map(parseFloat),n=isNaN(e[0])?0:e[0],o=isNaN(e[1])?n:e[1];return{top:n,right:o,bottom:isNaN(e[2])?n:e[2],left:isNaN(e[3])?o:e[3]}},So=t=>{for(;t;){if(t=t.parentNode,!t||t===document.body||!t.parentNode)return;const{overflow:e,overflowX:n,overflowY:o}=getComputedStyle(t);if(/auto|scroll|overlay|hidden/.test(e+o+n))return t}};function po(t,e){return{"aria-disabled":t||void 0,tabIndex:e?0:-1}}function si(t,e){for(let n=0;nit(()=>{const i=e?`${t}__${e}`:t;let a=i;n&&Object.keys(n).forEach(c=>{const l=n[c];l&&(a+=` ${i}--${l===!0?c:`${c}-${l}`}`)});let s=typeof o=="function"?o(n):o;return typeof s=="string"&&(s=s.trim(),s&&(a+=` ${s}`)),a},[t,e,n,o]),pc="szh-menu-container",ne="szh-menu";const gc="arrow",kr="item",vc="divider",_c="header",yc="group",bc="submenu";const fs=he(),Cr=he({}),ao=he({}),Sr=he({}),wc=he({}),go=he({}),Ft=Object.freeze({ENTER:"Enter",ESC:"Escape",SPACE:" ",HOME:"Home",END:"End",LEFT:"ArrowLeft",RIGHT:"ArrowRight",UP:"ArrowUp",DOWN:"ArrowDown"}),yt=Object.freeze({RESET:0,SET:1,UNSET:2,INCREASE:3,DECREASE:4,FIRST:5,LAST:6,SET_INDEX:7}),An=Object.freeze({CLICK:"click",CANCEL:"cancel",BLUR:"blur",SCROLL:"scroll"}),He=Object.freeze({FIRST:"first",LAST:"last"}),Ec=Object.freeze({entering:"opening",entered:"open",exiting:"closing",exited:"closed"}),ai="absolute",xr="none",Lr="menuitem",nr={preventScroll:!0};const Tc=({className:t,containerRef:e,containerProps:n,children:o,isOpen:i,theming:a,transition:s,onClose:c})=>{const l=Tn(s,"item");return r("div",{...Je({onKeyDown:({key:u})=>{switch(u){case Ft.ESC:Ut(c,{key:u,reason:An.CANCEL});break}},onBlur:u=>{i&&!u.currentTarget.contains(u.relatedTarget)&&Ut(c,{reason:An.BLUR})}},n),className:oe({block:pc,modifiers:it(()=>({theme:a,itemTransition:l}),[a,l]),className:t}),style:{position:"absolute",...n==null?void 0:n.style},ref:e,children:o})},Ac=()=>{let t,e=0;return{toggle:n=>{n?e++:e--,e=Math.max(e,0)},on:(n,o,i)=>{e?t||(t=setTimeout(()=>{t=0,o()},n)):i==null||i()},off:()=>{t&&(clearTimeout(t),t=0)}}},kc=t=>{const[e,n]=j(),i=O({items:[],hoverIndex:-1,sorted:!1}).current,a=xt((c,l)=>{const{items:d}=i;if(!c)i.items=[];else if(l)d.push(c);else{const h=d.indexOf(c);h>-1&&(d.splice(h,1),c.contains(document.activeElement)&&(t.current.focus(nr),n()))}i.hoverIndex=-1,i.sorted=!1},[i,t]),s=xt((c,l,d)=>{const{items:h,hoverIndex:u}=i,f=()=>{if(i.sorted)return;const g=t.current.querySelectorAll(".szh-menu__item");h.sort((w,E)=>si(g,w)-si(g,E)),i.sorted=!0};let m=-1,p;switch(c){case yt.RESET:break;case yt.SET:p=l;break;case yt.UNSET:p=g=>g===l?void 0:g;break;case yt.FIRST:f(),m=0,p=h[m];break;case yt.LAST:f(),m=h.length-1,p=h[m];break;case yt.SET_INDEX:f(),m=d,p=h[m];break;case yt.INCREASE:f(),m=u,m<0&&(m=h.indexOf(l)),m++,m>=h.length&&(m=0),p=h[m];break;case yt.DECREASE:f(),m=u,m<0&&(m=h.indexOf(l)),m--,m<0&&(m=h.length-1),p=h[m];break;default:}p||(m=-1),n(p),i.hoverIndex=m},[t,i]);return{hoverItem:e,dispatch:s,updateItems:a}},ci=(t,e)=>Math.round(t)===e?t:e,ms=t=>{const e=t.getBoundingClientRect();return e.width=ci(e.width,t.offsetWidth),e.height=ci(e.height,t.offsetHeight),e},Cc=(t,e,n,o)=>{const i=ms(e),a=t.getBoundingClientRect(),s=n===window?{left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight}:n.getBoundingClientRect(),c=mc(o),l=p=>p+a.left-s.left-c.left,d=p=>p+a.left+i.width-s.right+c.right,h=p=>p+a.top-s.top-c.top,u=p=>p+a.top+i.height-s.bottom+c.bottom;return{menuRect:i,containerRect:a,getLeftOverflow:l,getRightOverflow:d,getTopOverflow:h,getBottomOverflow:u,confineHorizontally:p=>{let g=l(p);if(g<0)p-=g;else{const w=d(p);w>0&&(p-=w,g=l(p),g<0&&(p-=g))}return p},confineVertically:p=>{let g=h(p);if(g<0)p-=g;else{const w=u(p);w>0&&(p-=w,g=h(p),g<0&&(p-=g))}return p}}},Sc=({arrowRef:t,menuY:e,anchorRect:n,containerRect:o,menuRect:i})=>{let a=n.top-o.top-e+n.height/2;const s=t.current.offsetHeight*1.25;return a=Math.max(s,a),a=Math.min(a,i.height-s),a},xc=({anchorRect:t,containerRect:e,menuRect:n,placeLeftorRightY:o,placeLeftX:i,placeRightX:a,getLeftOverflow:s,getRightOverflow:c,confineHorizontally:l,confineVertically:d,arrowRef:h,arrow:u,direction:f,position:m})=>{let p=f,g=o;m!=="initial"&&(g=d(g),m==="anchor"&&(g=Math.min(g,t.bottom-e.top),g=Math.max(g,t.top-e.top-n.height)));let w,E,v;return p==="left"?(w=i,m!=="initial"&&(E=s(w),E<0&&(v=c(a),(v<=0||-E>v)&&(w=a,p="right")))):(w=a,m!=="initial"&&(v=c(w),v>0&&(E=s(i),(E>=0||-E{let a=n.left-o.left-e+n.width/2;const s=t.current.offsetWidth*1.25;return a=Math.max(s,a),a=Math.min(a,i.width-s),a},Ic=({anchorRect:t,containerRect:e,menuRect:n,placeToporBottomX:o,placeTopY:i,placeBottomY:a,getTopOverflow:s,getBottomOverflow:c,confineHorizontally:l,confineVertically:d,arrowRef:h,arrow:u,direction:f,position:m})=>{let p=f==="top"?"top":"bottom",g=o;m!=="initial"&&(g=l(g),m==="anchor"&&(g=Math.min(g,t.right-e.left),g=Math.max(g,t.left-e.left-n.width)));let w,E,v;return p==="top"?(w=i,m!=="initial"&&(E=s(w),E<0&&(v=c(a),(v<=0||-E>v)&&(w=a,p="bottom")))):(w=a,m!=="initial"&&(v=c(w),v>0&&(E=s(i),(E>=0||-E{const{menuRect:d,containerRect:h}=l,u=n==="left"||n==="right";let f=u?o:i,m=u?i:o;if(t){const _=c.current;u?f+=_.offsetWidth:m+=_.offsetHeight}const p=s.left-h.left-d.width-f,g=s.right-h.left+f,w=s.top-h.top-d.height-m,E=s.bottom-h.top+m;let v,T;e==="end"?(v=s.right-h.left-d.width,T=s.bottom-h.top-d.height):e==="center"?(v=s.left-h.left-(d.width-s.width)/2,T=s.top-h.top-(d.height-s.height)/2):(v=s.left-h.left,T=s.top-h.top),v+=f,T+=m;const S={...l,anchorRect:s,placeLeftX:p,placeRightX:g,placeLeftorRightY:T,placeTopY:w,placeBottomY:E,placeToporBottomX:v,arrowRef:c,arrow:t,direction:n,position:a};switch(n){case"left":case"right":return xc(S);case"top":case"bottom":default:return Ic(S)}},Ue=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?Ie:et;function li(t,e){typeof t=="function"?t(e):t.current=e}const tn=(t,e)=>it(()=>t?e?n=>{li(t,n),li(e,n)}:t:e,[t,e]),ui=-9999,ps=({ariaLabel:t,menuClassName:e,menuStyle:n,arrow:o,arrowProps:i={},anchorPoint:a,anchorRef:s,containerRef:c,containerProps:l,externalRef:d,parentScrollingRef:h,align:u="start",direction:f="bottom",position:m="auto",overflow:p="visible",setDownOverflow:g,repositionFlag:w,captureFocus:E=!0,state:v,endTransition:T,isDisabled:S,menuItemFocus:_,gap:y=0,shift:k=0,children:A,onClose:D,focusProps:P,...L})=>{const[I,$]=j({x:ui,y:ui}),[z,W]=j({}),[nt,st]=j(),[ot,ct]=j(f),[K]=j(Ac),[bt,lt]=ts(Y=>Y+1,1),{transition:wt,boundingBoxRef:N,boundingBoxPadding:ft,rootMenuRef:ut,rootAnchorRef:At,scrollNodesRef:Et,reposition:zt,viewScroll:Mt,submenuCloseDelay:Rt}=Nt(go),{submenuCtx:Bt,reposSubmenu:X=w}=Nt(ao),Q=O(),mt=O(),kt=O(!1),{hoverItem:Gt,dispatch:Pt,updateItems:dt}=kc(Q),B=Ar(v),J=Tn(wt,"open"),Z=Tn(wt,"close"),V=Et.current,It=Y=>{switch(Y.key){case Ft.HOME:Pt(yt.FIRST);break;case Ft.END:Pt(yt.LAST);break;case Ft.UP:Pt(yt.DECREASE,Gt);break;case Ft.DOWN:Pt(yt.INCREASE,Gt);break;case Ft.SPACE:Y.target&&Y.target.className.indexOf(ne)!==-1&&Y.preventDefault();return;default:return}Y.preventDefault(),Y.stopPropagation()},G=()=>{v==="closing"&&st(),Ut(T)},Kt=Y=>{Y.stopPropagation(),K.on(Rt,()=>{Pt(yt.RESET),Q.current.focus(nr)})},we=Y=>{Y.target===Y.currentTarget&&K.off()},vt=xt(Y=>{var nn;const gt=Q.current,Wt=c.current;if(!gt||!Wt)return;const tt=s?(nn=s.current)==null?void 0:nn.getBoundingClientRect():a?{left:a.x,right:a.x,top:a.y,bottom:a.y,width:0,height:0}:null;if(!tt)return;V.menu||(V.menu=(N?N.current:So(ut.current))||window);const ht=Cc(Wt,gt,V.menu,ft);let{arrowX:Vt,arrowY:In,x:en,y:ie,computedDirection:Dn}=Dc({arrow:o,align:u,direction:f,gap:y,shift:k,position:m,anchorRect:tt,arrowRef:mt,positionHelpers:ht});const{menuRect:Mn}=ht,Xt=Mn.height;if(!Y&&p!=="visible"){const{getTopOverflow:Yt,getBottomOverflow:Ee}=ht;let Te,on;const rt=Ee(ie);if(rt>0)Te=Xt-rt,on=rt;else{const me=Yt(ie);me<0&&(Te=Xt+me,on=0-me,Te>=0&&(ie-=me))}Te>=0&&st({height:Te,overflowAmt:on})}o&&W({x:Vt,y:In}),$({x:en,y:ie}),ct(Dn)},[o,u,ft,f,y,k,m,p,a,s,c,N,ut,V]);Ue(()=>{B&&(vt(),kt.current&<()),kt.current=B},[B,vt,X]),Ue(()=>{nt&&!g&&(Q.current.scrollTop=0)},[nt,g]),Ue(()=>dt,[dt]),et(()=>{let{menu:Y}=V;if(!B||!Y)return;if(Y=Y.addEventListener?Y:window,!V.anchors){V.anchors=[];let ht=So(At&&At.current);for(;ht&&ht!==Y;)V.anchors.push(ht),ht=So(ht)}let gt=Mt;if(V.anchors.length&>==="initial"&&(gt="auto"),gt==="initial")return;const Wt=()=>{gt==="auto"?er(()=>vt(!0)):Ut(D,{reason:An.SCROLL})},tt=V.anchors.concat(Mt!=="initial"?Y:[]);return tt.forEach(ht=>ht.addEventListener("scroll",Wt)),()=>tt.forEach(ht=>ht.removeEventListener("scroll",Wt))},[At,V,B,D,Mt,vt]);const Qt=!!nt&&nt.overflowAmt>0;et(()=>{if(Qt||!B||!h)return;const Y=()=>er(vt),gt=h.current;return gt.addEventListener("scroll",Y),()=>gt.removeEventListener("scroll",Y)},[B,Qt,h,vt]),et(()=>{if(!B||typeof ResizeObserver!="function"||zt==="initial")return;const Y=[],gt=new ResizeObserver(ht=>ht.forEach(({target:Vt})=>{Y.indexOf(Vt)<0?Y.push(Vt):Ma(()=>{vt(),lt()})})),Wt={box:"border-box"};gt.observe(Q.current,Wt);const tt=s==null?void 0:s.current;return tt&>.observe(tt,Wt),()=>gt.disconnect()},[B,zt,s,vt]),et(()=>{if(!B){Pt(yt.RESET),Z||st();return}const{position:Y,alwaysUpdate:gt}=_||{},Wt=()=>{Y===He.FIRST?Pt(yt.FIRST):Y===He.LAST?Pt(yt.LAST):Y>=-1&&Pt(yt.SET_INDEX,void 0,Y)};if(gt)Wt();else if(E){const tt=setTimeout(()=>{const ht=Q.current;ht&&!ht.contains(document.activeElement)&&(ht.focus(nr),Wt())},J?170:100);return()=>clearTimeout(tt)}},[B,J,Z,E,_,Pt]);const Ot=it(()=>({isParentOpen:B,submenuCtx:K,dispatch:Pt,updateItems:dt}),[B,K,Pt,dt]);let pt,Ct;nt&&(g?Ct=nt.overflowAmt:pt=nt.height);const jt=it(()=>({reposSubmenu:bt,submenuCtx:K,overflow:p,overflowAmt:Ct,parentMenuRef:Q,parentDir:ot}),[bt,K,p,Ct,ot]),Me=pt>=0?{maxHeight:pt,overflow:p}:void 0,Re=it(()=>({state:v,align:u,dir:ot}),[v,u,ot]),_o=it(()=>({dir:ot}),[ot]),_t=oe({block:ne,element:gc,modifiers:_o,className:i.className}),Pe=r("ul",{role:"menu","aria-label":t,...po(S),...Je({onPointerEnter:Bt==null?void 0:Bt.off,onPointerMove:Kt,onPointerLeave:we,onKeyDown:It,onAnimationEnd:G},L),ref:tn(d,Q),className:oe({block:ne,modifiers:Re,className:e}),style:{...n,...Me,margin:0,display:v==="closed"?"none":void 0,position:ai,left:I.x,top:I.y},children:[o&&r("li",{"aria-hidden":!0,...i,className:_t,style:{display:"block",position:ai,left:z.x,top:z.y,...i.style},ref:mt}),r(ao.Provider,{value:jt,children:r(Cr.Provider,{value:Ot,children:r(fs.Provider,{value:Gt,children:Ut(A,Re)})})})]});return l?r(Tc,{...l,isOpen:B,children:Pe}):Pe},gs=ye(function({"aria-label":e,className:n,containerProps:o,initialMounted:i,unmountOnClose:a,transition:s,transitionTimeout:c,boundingBoxRef:l,boundingBoxPadding:d,reposition:h="auto",submenuOpenDelay:u=300,submenuCloseDelay:f=150,viewScroll:m="initial",portal:p,theming:g,onItemClick:w,...E},v){const T=O(null),S=O({}),{anchorRef:_,state:y,onClose:k}=E,A=it(()=>({initialMounted:i,unmountOnClose:a,transition:s,transitionTimeout:c,boundingBoxRef:l,boundingBoxPadding:d,rootMenuRef:T,rootAnchorRef:_,scrollNodesRef:S,reposition:h,viewScroll:m,submenuOpenDelay:u,submenuCloseDelay:f}),[i,a,s,c,_,l,d,h,m,u,f]),D=it(()=>({handleClick(L,I){L.stopPropagation||Ut(w,L);let $=L.keepOpen;$===void 0&&($=I&&L.key===Ft.SPACE),$||Ut(k,{value:L.value,key:L.key,reason:An.CLICK})},handleClose(L){Ut(k,{key:L,reason:An.CLICK})}}),[w,k]);if(!y)return null;const P=r(go.Provider,{value:A,children:r(Sr.Provider,{value:D,children:r(ps,{...E,ariaLabel:e||"Menu",externalRef:v,containerRef:T,containerProps:{className:n,containerRef:T,containerProps:o,theming:g,transition:s,onClose:k}})})});return p===!0&&typeof document<"u"?io(P,document.body):p?p.target?io(P,p.target):p.stablePosition?null:P:P}),or=0,rr=1,co=2,lo=3,uo=4,Mc=5,vs=6,Rc=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],_s=t=>({_s:t,status:Rc[t],isEnter:tuo}),ir=t=>t?vs:Mc,Pc=(t,e)=>{switch(t){case rr:case or:return co;case uo:case lo:return ir(e)}},Oc=t=>typeof t=="object"?[t.enter,t.exit]:[t,t],$c=(t,e)=>setTimeout(()=>{isNaN(document.body.offsetTop)||t(e+1)},0),di=(t,e,n,o,i)=>{clearTimeout(o.current);const a=_s(t);e(a),n.current=a,i&&i({current:a})},Fc=({enter:t=!0,exit:e=!0,preEnter:n,preExit:o,timeout:i,initialEntered:a,mountOnEnter:s,unmountOnExit:c,onStateChange:l}={})=>{const[d,h]=j(()=>_s(a?co:ir(s))),u=O(d),f=O(),[m,p]=Oc(i),g=xt(()=>{const E=Pc(u.current._s,c);E&&di(E,h,u,f,l)},[l,c]),w=xt(E=>{const v=S=>{switch(di(S,h,u,f,l),S){case rr:m>=0&&(f.current=setTimeout(g,m));break;case uo:p>=0&&(f.current=setTimeout(g,p));break;case or:case lo:f.current=$c(v,S);break}},T=u.current.isEnter;typeof E!="boolean"&&(E=!T),E?!T&&v(t?n?or:rr:co):T&&v(e?o?lo:uo:ir(c))},[g,l,t,e,n,o,m,p,c]);return[d,w,g]};const Nc=({initialOpen:t,initialMounted:e,unmountOnClose:n,transition:o,transitionTimeout:i=500,onMenuChange:a}={})=>{const s=Tn(o,"open"),c=Tn(o,"close"),[{status:l},d,h]=Fc({initialEntered:t,mountOnEnter:!e,unmountOnExit:n,timeout:i,enter:s,exit:c,onStateChange:xt(({current:{isEnter:u,isResolved:f}})=>{!a||u&&s&&f||!u&&c&&f||a({open:u})},[a,s,c])});return[{state:Ec[l],endTransition:h},d]},ys=t=>{const[e,n]=Nc(t),[o,i]=j(),a=(s,c)=>{i({position:s,alwaysUpdate:c}),n(!0)};return[{menuItemFocus:o,...e},n,a]},zc=(t,e)=>{const[n]=j({});return{onMouseDown:()=>{n.v=t&&t!=="closed"},onClick:o=>n.v?n.v=!1:e(!0,o)}},Bc=parseInt(Ra)<19,Vc=ye(function({"aria-label":e,captureFocus:n,initialOpen:o,menuButton:i,instanceRef:a,onMenuChange:s,...c},l){const[d,h,u]=ys({...c,onMenuChange:s}),{state:f}=d,m=Ar(f),p=O(null),g=zc(f,(_,y)=>u(y.detail?void 0:He.FIRST)),w=xt(_=>{h(!1),_.key&&p.current.focus()},[h]),E=_=>{switch(_.key){case Ft.UP:u(He.LAST);break;case Ft.DOWN:u(He.FIRST);break;default:return}_.preventDefault()},v=Ut(i,{open:m});if(!v||!v.type)throw new Error("Menu requires a menuButton prop.");const T={...Je({onKeyDown:E,...g},v.props),ref:tn(Bc?v.ref:v.props.ref,p)};fc(v.type)==="MenuButton"&&(T.isOpen=m);const S=es(v,T);return ns(a,()=>({openMenu:u,closeMenu:()=>h(!1)})),r(F,{children:[S,r(gs,{...c,...d,"aria-label":e||(typeof v.props.children=="string"?v.props.children:"Menu"),anchorRef:p,ref:l,onClose:w})]})}),Ir=(t,e)=>{const n=Qe(e),o=ye((i,a)=>{const s=O(null);return r(n,{...i,itemRef:s,externalRef:a,isHovering:Nt(fs)===s.current})});return o.displayName=`WithHovering(${t})`,o},bs=(t,e,n)=>{Ue(()=>{if(t)return;const o=e.current;return n(o,!0),()=>{n(o)}},[t,e,n])},Hc=Ir("SubMenu",function({"aria-label":e,className:n,disabled:o,direction:i,label:a,openTrigger:s,onMenuChange:c,isHovering:l,instanceRef:d,itemRef:h,captureFocus:u,repositionFlag:f,itemProps:m={},...p}){const g=Nt(go),{rootMenuRef:w,submenuOpenDelay:E,submenuCloseDelay:v}=g,{parentMenuRef:T,parentDir:S,overflow:_}=Nt(ao),{isParentOpen:y,submenuCtx:k,dispatch:A,updateItems:D}=Nt(Cr),P=_!=="visible",[L,I,$]=ys({...g,onMenuChange:c}),{state:z}=L,W=!!o,nt=Ar(z),st=O(null),[ot]=j({v:0}),ct=()=>{k.off(),ot.v&&(clearTimeout(ot.v),ot.v=0)},K=(...X)=>{ct(),bt(),!W&&$(...X)},bt=()=>!l&&!W&&A(yt.SET,h.current),lt=X=>{bt(),s||(ot.v=setTimeout(()=>er(K),Math.max(X,0)))},wt=X=>{W||(X.stopPropagation(),!(ot.v||nt)&&k.on(v,()=>lt(E-v),()=>lt(E)))},N=()=>{ct(),nt||A(yt.UNSET,h.current)},ft=X=>{if(l)switch(X.key){case Ft.ENTER:X.preventDefault();case Ft.SPACE:case Ft.RIGHT:s!=="none"&&K(He.FIRST)}},ut=X=>{let Q=!1;switch(X.key){case Ft.LEFT:nt&&(h.current.focus(),I(!1),Q=!0);break;case Ft.RIGHT:nt||(Q=!0);break}Q&&(X.preventDefault(),X.stopPropagation())};bs(W,h,D),et(()=>k.toggle(nt),[k,nt]),et(()=>()=>{clearTimeout(ot.v),k.toggle(!1)},[ot,k]),et(()=>{l&&y?h.current.focus():I(!1)},[l,y,I,h]),ns(d,()=>({openMenu:(...X)=>{y&&K(...X)},closeMenu:()=>{nt&&(h.current.focus(),I(!1))}}));const At=it(()=>({open:nt,hover:l,disabled:W,submenu:!0}),[nt,l,W]),{ref:Et,className:zt,...Mt}=m,Rt=Je({onPointerEnter:k.off,onPointerMove:wt,onPointerLeave:N,onKeyDown:ft,onClick:()=>s!=="none"&&K()},Mt),Bt=()=>{const X=r(ps,{...p,...L,ariaLabel:e||(typeof a=="string"?a:"Submenu"),anchorRef:h,containerRef:P?w:st,direction:i||(S==="right"||S==="left"?S:"right"),parentScrollingRef:P&&T,isDisabled:W}),Q=w.current;return P&&Q?io(X,Q):X};return r("li",{className:oe({block:ne,element:bc,className:n}),style:{position:"relative"},role:xr,ref:st,onKeyDown:ut,children:[r("div",{role:Lr,"aria-haspopup":!0,"aria-expanded":nt,...po(W,l),...Rt,ref:tn(Et,h),className:oe({block:ne,element:kr,modifiers:At,className:zt}),children:it(()=>Ut(a,At),[a,At])}),z&&Bt()]})}),ws=(t,e,n,o)=>{const{submenuCloseDelay:i}=Nt(go),{isParentOpen:a,submenuCtx:s,dispatch:c,updateItems:l}=Nt(Cr),d=()=>{!n&&!o&&c(yt.SET,t.current)},h=()=>{!o&&c(yt.UNSET,t.current)},u=p=>{n&&!p.currentTarget.contains(p.relatedTarget)&&h()},f=p=>{o||(p.stopPropagation(),s.on(i,d,d))},m=(p,g)=>{s.off(),!g&&h()};return bs(o,t,l),et(()=>{n&&a&&e.current&&e.current.focus()},[e,n,a]),{setHover:d,onBlur:u,onPointerMove:f,onPointerLeave:m}},Tt=Ir("MenuItem",function({className:e,value:n,href:o,type:i,checked:a,disabled:s,children:c,onClick:l,isHovering:d,itemRef:h,externalRef:u,...f}){const m=!!s,{setHover:p,...g}=ws(h,h,d,m),w=Nt(Sr),E=Nt(wc),v=i==="radio",T=i==="checkbox",S=!!o&&!m&&!v&&!T,_=v?E.value===n:T?!!a:!1,y=L=>{if(m){L.stopPropagation(),L.preventDefault();return}const I={value:n,syntheticEvent:L};L.key!==void 0&&(I.key=L.key),T&&(I.checked=!_),v&&(I.name=E.name),Ut(l,I),v&&Ut(E.onRadioChange,I),w.handleClick(I,T||v)},k=L=>{if(d)switch(L.key){case Ft.ENTER:L.preventDefault();case Ft.SPACE:S?h.current.click():y(L)}},A=it(()=>({type:i,disabled:m,hover:d,checked:_,anchor:S}),[i,m,d,_,S]),D=Je({...g,onPointerDown:p,onKeyDown:k,onClick:y},f),P={role:v?"menuitemradio":T?"menuitemcheckbox":Lr,"aria-checked":v||T?_:void 0,...po(m,d),...D,ref:tn(u,h),className:oe({block:ne,element:kr,modifiers:A,className:e}),children:it(()=>Ut(c,A),[c,A])};return S?r("li",{role:xr,children:r("a",{href:o,...P})}):r("li",{...P})}),Uc=Ir("FocusableItem",function({className:e,disabled:n,children:o,isHovering:i,itemRef:a,externalRef:s,...c}){const l=!!n,d=O(null),{setHover:h,onPointerLeave:u,...f}=ws(a,d,i,l),{handleClose:m}=Nt(Sr),p=it(()=>({disabled:l,hover:i,focusable:!0}),[l,i]),g=it(()=>Ut(o,{...p,ref:d,closeMenu:m}),[o,p,m]),w=Je({...f,onPointerLeave:E=>u(E,!0),onFocus:h},c);return r("li",{role:Lr,...po(l),...w,ref:tn(s,a),className:oe({block:ne,element:kr,modifiers:p,className:e}),children:g})}),ln=Qe(ye(function({className:e,...n},o){return r("li",{role:"separator",...n,ref:o,className:oe({block:ne,element:vc,className:e})})})),pv=Qe(ye(function({className:e,...n},o){return r("li",{role:xr,...n,ref:o,className:oe({block:ne,element:_c,className:e})})})),gv=ye(function({className:e,style:n,takeOverflow:o,...i},a){const s=O(null),[c,l]=j(),{overflow:d,overflowAmt:h}=Nt(ao);return Ue(()=>{let u;o&&h>=0&&(u=ms(s.current).height-h,u<0&&(u=0)),l(u>=0?{maxHeight:u,overflow:d}:void 0)},[o,d,h]),Ue(()=>{c&&(s.current.scrollTop=0)},[c]),r("div",{...i,ref:tn(a,s),className:oe({block:ne,element:yc,className:e}),style:{...n,...c}})});var mn=(t=>(t.Mouse="mouse",t.Touch="touch",t.Pointer="pointer",t))(mn||{}),pn=(t=>(t.CancelledByMovement="cancelled-by-movement",t.CancelledByRelease="cancelled-by-release",t.CancelledOutsideElement="cancelled-outside-element",t))(pn||{});const Kc=["mousedown","mousemove","mouseup","mouseleave","mouseout"],jc=["touchstart","touchmove","touchend","touchcancel"],Wc=["pointerdown","pointermove","pointerup","pointerleave","pointerout"];function Zc(t){return typeof t=="object"&&t!==null&&"pageX"in t&&typeof t.pageX=="number"&&"pageY"in t&&typeof t.pageY=="number"}function qc(t){var e;return Kc.includes((e=t==null?void 0:t.nativeEvent)==null?void 0:e.type)}function Es(t){var e;return jc.includes((e=t==null?void 0:t.nativeEvent)==null?void 0:e.type)||"touches"in t}function Gc(t){const{nativeEvent:e}=t;return e?Wc.includes(e==null?void 0:e.type)||"pointerId"in e:!1}function xo(t){return qc(t)||Es(t)||Gc(t)}function hi(t){var e;const n=Es(t)?(e=t==null?void 0:t.touches)==null?void 0:e[0]:t;return Zc(n)?{x:n.pageX,y:n.pageY}:null}function Yc(t){return{target:t.target,currentTarget:t.currentTarget,nativeEvent:t,persist:()=>{}}}function Ts(t,{threshold:e=400,captureEvent:n=!1,detect:o=mn.Pointer,cancelOnMovement:i=!1,cancelOutsideElement:a=!0,filterEvents:s,onStart:c,onMove:l,onFinish:d,onCancel:h}={}){const u=O(!1),f=O(!1),m=O(),p=O(),g=O(t),w=O(null),E=xt(_=>y=>{f.current||xo(y)&&(s!==void 0&&!s(y)||(n&&y.persist(),c==null||c(y,{context:_}),w.current=hi(y),f.current=!0,m.current=y.currentTarget,p.current=setTimeout(()=>{g.current&&(g.current(y,{context:_}),u.current=!0)},e)))},[n,s,c,e]),v=xt(_=>(y,k)=>{xo(y)&&f.current&&(w.current=null,n&&y.persist(),u.current?d==null||d(y,{context:_}):f.current&&(h==null||h(y,{context:_,reason:k??pn.CancelledByRelease})),u.current=!1,f.current=!1,p.current!==void 0&&clearTimeout(p.current))},[n,d,h]),T=xt(_=>y=>{if(xo(y)&&(l==null||l(y,{context:_}),i!==!1&&w.current)){const k=hi(y);if(k){const A=i===!0?25:i,D={x:Math.abs(k.x-w.current.x),y:Math.abs(k.y-w.current.y)};(D.x>A||D.y>A)&&v(_)(y,pn.CancelledByMovement)}}},[v,i,l]),S=xt(_=>{if(t===null)return{};switch(o){case mn.Mouse:{const y={onMouseDown:E(_),onMouseMove:T(_),onMouseUp:v(_)};return a&&(y.onMouseLeave=k=>{v(_)(k,pn.CancelledOutsideElement)}),y}case mn.Touch:return{onTouchStart:E(_),onTouchMove:T(_),onTouchEnd:v(_)};case mn.Pointer:{const y={onPointerDown:E(_),onPointerMove:T(_),onPointerUp:v(_)};return a&&(y.onPointerLeave=k=>v(_)(k,pn.CancelledOutsideElement)),y}}},[t,v,a,o,T,E]);return et(()=>{function _(y){const k=Yc(y);v()(k)}return window.addEventListener("mouseup",_),window.addEventListener("touchend",_),window.addEventListener("pointerup",_),()=>{window.removeEventListener("mouseup",_),window.removeEventListener("touchend",_),window.removeEventListener("pointerup",_)}},[v]),et(()=>()=>{p.current!==void 0&&clearTimeout(p.current)},[]),et(()=>{g.current=t},[t]),S}const Xc=Lt(()=>new Intl.DateTimeFormat().resolvedOptions().locale),Qc=t=>{const{locale:e,dateYear:n,hideTime:o,formatOpts:i,forceOpts:a}=t||{},s=e.replace(/-[a-z]+$/i,""),c=En([s],[Xc],e),l=new Date().getFullYear(),d=a||{year:n===l?void 0:"numeric",month:"short",day:"numeric",hour:o?void 0:"numeric",minute:o?void 0:"numeric",...i};try{return Intl.DateTimeFormat(c,d)}catch{}try{return Intl.DateTimeFormat(e,d)}catch{}return Intl.DateTimeFormat(void 0,d)},Jc=Lt(Qc);function kn(t,e){return t instanceof Date||(t=new Date(t)),Jc({dateYear:t.getFullYear(),locale:Dt.locale,...e}).format(t)}function tl(t){const e=URL.parse("/compose/",window.location),{width:n,height:o}=window.screen,i=Math.max(0,(n-600)/2),a=Math.max(0,(o-450)/2),s=Math.min(n,600),c=Math.min(o,450),l=(t==null?void 0:t.uid)||Math.random(),d=window.open(e,"compose"+l,`width=${s},height=${c},left=${i},top=${a}`);return d?d.__COMPOSE__=t:alert(Dt._({id:"4S86wI"})),d}const el=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);function nl(){if(el){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 ol=document.documentElement,Kn=getComputedStyle(ol),rl=8;let As=[0,0,0,0];function ks(){const t=Kn.getPropertyValue("--sai-top"),e=Kn.getPropertyValue("--sai-right"),n=Kn.getPropertyValue("--sai-bottom"),o=Kn.getPropertyValue("--sai-left");As=[Math.max(0,parseInt(t,10)),Math.max(0,parseInt(e,10)),Math.max(0,parseInt(n,10)),Math.max(0,parseInt(o,10))]}requestAnimationFrame(ks);function Cs(t=[]){return As.map((n,o)=>(n||rl)+(t[o]||0)).join(" ")}CSS.supports("top: env(safe-area-inset-top)")&&window.addEventListener("resize",ks,{passive:!0});const fi=5e3;function jn(t){if(t||(t=!0),U.showCompose){U.composerState.minimized?St({duration:fi,text:Dt._({id:"/4fHR1"})}):St({duration:fi,text:Dt._({id:"vvl08N"})});return}nl(),U.showCompose=t}const Fe=document.createElement("div");function il(t,e){if(!t)return"";const{preProcess:n}=e||{};return Fe.innerHTML=t.replace(/<\/p>/g,`
`).replace(/<\/li>/g,`
`),Fe.querySelectorAll("br").forEach(o=>{o.replaceWith(`
`)}),n==null||n(Fe),Fe.querySelectorAll(".invisible").forEach(o=>{o.remove()}),Fe.querySelectorAll(".ellipsis").forEach(o=>{o.append("...")}),Fe.innerText.replace(/[\r\n]{3,}/g,`
`).trim()}const vo=Lt(il);function Ss(t){var s;const{spoilerText:e,content:n,poll:o,mediaAttachments:i}=t;let a="";return e!=null&&e.trim()?a+=e:a+=vo(n),a=a.trim(),(s=o==null?void 0:o.options)!=null&&s.length&&(a+=`
📊:
${o.options.map(c=>`${o.multiple?"▪️":"•"} ${c.title}`).join(`
`)}`),i!=null&&i.length&&(a+=" "+i.map(c=>({image:"🖼️",gifv:"🎞️",video:"📹",audio:"🎵",unknown:""})[c.type]||"").join("")),a}const xs={x:()=>C(()=>import("./icons/close-line-Bfj902o4.js"),[],import.meta.url),heart:()=>C(()=>import("./icons/heart-line-vi3QqJTo.js"),[],import.meta.url),bookmark:()=>C(()=>import("./icons/bookmark-line-BMGZc_Mc.js"),[],import.meta.url),"check-circle":()=>C(()=>import("./icons/check-circle-line-CSlVj8QA.js"),[],import.meta.url),"x-circle":()=>C(()=>import("./icons/close-circle-line-DlCWcUwK.js"),[],import.meta.url),transfer:()=>C(()=>import("./icons/transfer-4-line-BHXBUumZ.js"),[],import.meta.url),rocket:()=>C(()=>import("./icons/rocket-line-B7gBxy4I.js"),[],import.meta.url),"arrow-left":{module:()=>C(()=>import("./icons/arrow-left-line-BGgZ0udH.js"),[],import.meta.url),rtl:!0},"arrow-right":{module:()=>C(()=>import("./icons/arrow-right-line-zKtS4vm5.js"),[],import.meta.url),rtl:!0},"arrow-up":()=>C(()=>import("./icons/arrow-up-line-Bow_AQZ6.js"),[],import.meta.url),"arrow-down":()=>C(()=>import("./icons/arrow-down-line-RSwsrALM.js"),[],import.meta.url),earth:()=>C(()=>import("./icons/earth-line-DW_CwNjP.js"),[],import.meta.url),lock:()=>C(()=>import("./icons/lock-line-BbTC1fux.js"),[],import.meta.url),unlock:()=>C(()=>import("./icons/unlock-line-CGrzBxul.js"),[],import.meta.url),"eye-close":()=>C(()=>import("./icons/eye-close-line-DQnawnJE.js"),[],import.meta.url),"eye-open":()=>C(()=>import("./icons/eye-2-line-Dvog5oyl.js"),[],import.meta.url),message:()=>C(()=>import("./icons/mail-line-Cadg2cpP.js"),[],import.meta.url),comment:{module:()=>C(()=>import("./icons/chat-3-line-C4e7R0Zy.js"),[],import.meta.url),rtl:!0},comment2:{module:()=>C(()=>import("./icons/comment-2-line-DfD-95ou.js"),[],import.meta.url),rtl:!0},home:()=>C(()=>import("./icons/home-3-line-BLD1YYP8.js"),[],import.meta.url),notification:()=>C(()=>import("./icons/notification-line-Cc2m6sh5.js"),[],import.meta.url),follow:()=>C(()=>import("./icons/user-follow-line-CsL-DB1N.js"),[],import.meta.url),"follow-add":()=>C(()=>import("./icons/user-add-line-DuegJyfy.js"),[],import.meta.url),poll:[()=>C(()=>import("./icons/chart-bar-line-W9BuvVdR.js"),[],import.meta.url),"90deg"],pencil:()=>C(()=>import("./icons/pencil-line-BwUdLENj.js"),[],import.meta.url),quill:()=>C(()=>import("./icons/quill-pen-line-oAx8SSeF.js"),[],import.meta.url),at:()=>C(()=>import("./icons/at-line-C4-OGRKX.js"),[],import.meta.url),attachment:()=>C(()=>import("./icons/attachment-line-C4ysC1zZ.js"),[],import.meta.url),upload:()=>C(()=>import("./icons/upload-3-line-BB2RA_2Z.js"),[],import.meta.url),gear:()=>C(()=>import("./icons/settings-3-line-BGrM7a5R.js"),[],import.meta.url),more:()=>C(()=>import("./icons/more-3-line-WfszpsFu.js"),[],import.meta.url),more2:()=>C(()=>import("./icons/more-1-fill-Cnnj9cLP.js"),[],import.meta.url),external:{module:()=>C(()=>import("./icons/external-link-line-BYXsdcMa.js"),[],import.meta.url),rtl:!0},popout:{module:()=>C(()=>import("./icons/external-link-line-BYXsdcMa.js"),[],import.meta.url),rtl:!0},popin:{module:()=>C(()=>import("./icons/external-link-line-BYXsdcMa.js"),[],import.meta.url),rotate:"180deg",rtl:!0},plus:()=>C(()=>import("./icons/add-circle-line-VUOz5dLS.js"),[],import.meta.url),"chevron-left":{module:()=>C(()=>import("./icons/left-line-8vYaPuok.js"),[],import.meta.url),rtl:!0},"chevron-right":{module:()=>C(()=>import("./icons/right-line-E80CeS1Q.js"),[],import.meta.url),rtl:!0},"chevron-down":()=>C(()=>import("./icons/down-line-PlS1iUy8.js"),[],import.meta.url),reply:{module:()=>C(()=>import("./icons/share-forward-line-DX1QbiUu.js"),[],import.meta.url),rotate:"180deg",flip:"horizontal",rtl:!0},thread:()=>C(()=>import("./icons/route-line-D10jSVCO.js"),[],import.meta.url),group:{module:()=>C(()=>import("./icons/group-line-Cw2Phg9p.js"),[],import.meta.url),rtl:!0},bot:()=>C(()=>import("./icons/android-2-line-C7qVwx2U.js"),[],import.meta.url),menu:()=>C(()=>import("./icons/rows-4-line-DIXu-DVG.js"),[],import.meta.url),list:{module:()=>C(()=>import("./icons/list-check-line-BaMf8v8i.js"),[],import.meta.url),rtl:!0},search:()=>C(()=>import("./icons/search-2-line-CoCbFBVR.js"),[],import.meta.url),hashtag:()=>C(()=>import("./icons/hashtag-line-Cml-0qv2.js"),[],import.meta.url),info:()=>C(()=>import("./icons/information-line-Dn255DD5.js"),[],import.meta.url),shortcut:()=>C(()=>import("./icons/lightning-line-cvW5NR-M.js"),[],import.meta.url),user:()=>C(()=>import("./icons/user-4-line-C89P3h09.js"),[],import.meta.url),following:()=>C(()=>import("./icons/walk-line-BZwRwcxJ.js"),[],import.meta.url),pin:()=>C(()=>import("./icons/pin-line-BqseDe3t.js"),[],import.meta.url),unpin:[()=>C(()=>import("./icons/pin-line-BqseDe3t.js"),[],import.meta.url),"180deg"],bus:()=>C(()=>import("./icons/bus-2-line-CfBaNBAi.js"),[],import.meta.url),link:()=>C(()=>import("./icons/link-2-line-SnIkQ_rZ.js"),[],import.meta.url),history:()=>C(()=>import("./icons/history-line-Bi2So-je.js"),[],import.meta.url),share:()=>C(()=>import("./icons/share-2-line-C2byQ30z.js"),[],import.meta.url),sparkles:()=>C(()=>import("./icons/sparkles-line-DWyRj8uB.js"),[],import.meta.url),sparkles2:()=>C(()=>import("./icons/sparkles-2-line-H731KO3v.js"),[],import.meta.url),exit:{module:()=>C(()=>import("./icons/exit-line-NjC63GxM.js"),[],import.meta.url),rtl:!0},translate:()=>C(()=>import("./icons/translate-line-cdOWN72F.js"),[],import.meta.url),play:()=>C(()=>import("./icons/play-fill-D1o3ePO2.js"),[],import.meta.url),trash:()=>C(()=>import("./icons/delete-2-line-C-lQIJNC.js"),[],import.meta.url),mute:{module:()=>C(()=>import("./icons/volume-mute-line-BluUkhVT.js"),[],import.meta.url),rtl:!0},unmute:{module:()=>C(()=>import("./icons/volume-line-dtC5ZFr8.js"),[],import.meta.url),rtl:!0},block:()=>C(()=>import("./icons/forbid-circle-line-f_JQE7a8.js"),[],import.meta.url),unblock:[()=>C(()=>import("./icons/forbid-circle-line-f_JQE7a8.js"),[],import.meta.url),"180deg"],flag:()=>C(()=>import("./icons/flag-1-line-sWzx_4o4.js"),[],import.meta.url),time:()=>C(()=>import("./icons/time-line-CHAmvUdg.js"),[],import.meta.url),refresh:()=>C(()=>import("./icons/refresh-2-line-B3CD5yz0.js"),[],import.meta.url),emoji2:()=>C(()=>import("./icons/emoji-2-line-DODV8bnC.js"),[],import.meta.url),filter:()=>C(()=>import("./icons/filter-2-line-DLBEPhKS.js"),[],import.meta.url),filters:()=>C(()=>import("./icons/filter-line-CuUlgBZU.js"),[],import.meta.url),chart:()=>C(()=>import("./icons/chart-line-line-noCpZUdN.js"),[],import.meta.url),react:()=>C(()=>import("./icons/react-line-C6TecPWI.js"),[],import.meta.url),layout4:{module:()=>C(()=>import("./icons/layout-4-line-BFFb1cPy.js"),[],import.meta.url),rtl:!0},layout5:()=>C(()=>import("./icons/layout-5-line-tauINoiF.js"),[],import.meta.url),announce:{module:()=>C(()=>import("./icons/announcement-line-BdsFnqjO.js"),[],import.meta.url),rtl:!0},alert:()=>C(()=>import("./icons/alert-line-CcwmWSBO.js"),[],import.meta.url),round:()=>C(()=>import("./icons/round-fill-CaZIeOWe.js"),[],import.meta.url),"arrow-up-circle":()=>C(()=>import("./icons/arrow-up-circle-line-SO68bPTf.js"),[],import.meta.url),"arrow-down-circle":()=>C(()=>import("./icons/arrow-down-circle-line-SfuiravZ.js"),[],import.meta.url),clipboard:{module:()=>C(()=>import("./icons/clipboard-line-CIOFpSsX.js"),[],import.meta.url),rtl:!0},"account-edit":()=>C(()=>import("./icons/user-edit-line-CC6Y-fJT.js"),[],import.meta.url),"account-warning":()=>C(()=>import("./icons/user-warning-line-BLfdr8Bj.js"),[],import.meta.url),keyboard:()=>C(()=>import("./icons/keyboard-line-BRd9ohM1.js"),[],import.meta.url),cloud:()=>C(()=>import("./icons/cloud-line-CCOdtB64.js"),[],import.meta.url),month:{module:()=>C(()=>import("./icons/calendar-month-line-DGpTEHfi.js"),[],import.meta.url),rtl:!0},media:()=>C(()=>import("./icons/photo-album-line-DkklX4P5.js"),[],import.meta.url),speak:()=>C(()=>import("./icons/radar-line-Dch2zZ5p.js"),[],import.meta.url),building:()=>C(()=>import("./icons/building-5-line-jPUf3HeC.js"),[],import.meta.url),history2:{module:()=>C(()=>import("./icons/history-2-line-C2uKqj-3.js"),[],import.meta.url),rtl:!0},document:()=>C(()=>import("./icons/document-line-ewA3UKpU.js"),[],import.meta.url),"arrows-right":{module:()=>C(()=>import("./icons/arrows-right-line-B7gMPCMB.js"),[],import.meta.url),rtl:!0},code:()=>C(()=>import("./icons/code-line-_8nrb8Yp.js"),[],import.meta.url),copy:()=>C(()=>import("./icons/copy-2-line-SBRewLs-.js"),[],import.meta.url),quote:{module:()=>C(()=>import("./icons/quote-left-line-D0CgS7V6.js"),[],import.meta.url),rtl:!0},settings:()=>C(()=>import("./icons/settings-6-line-3dTfr4F6.js"),[],import.meta.url),"heart-break":()=>C(()=>import("./icons/heart-crack-line-BlrTdexG.js"),[],import.meta.url),"user-x":()=>C(()=>import("./icons/user-x-line-Dahn1YZg.js"),[],import.meta.url),minimize:()=>C(()=>import("./icons/arrows-down-line-4JmRUmoO.js"),[],import.meta.url),celebrate:()=>C(()=>import("./icons/celebrate-line-CwClz8eZ.js"),[],import.meta.url),schedule:()=>C(()=>import("./icons/calendar-time-add-line-BwP_cVys.js"),[],import.meta.url),month:()=>C(()=>import("./icons/calendar-month-line-DGpTEHfi.js"),[],import.meta.url),day:()=>C(()=>import("./icons/calendar-day-line-zQlj2fPr.js"),[],import.meta.url),camera:()=>C(()=>import("./icons/camera-line-DK82q_yA.js"),[],import.meta.url)},sl={s:12,m:16,l:20,xl:24,xxl:32},mi={},al=Pa(function({width:t,height:e,body:n,rotate:o,flip:i}){return r("svg",{viewBox:`0 0 ${t} ${e}`,dangerouslySetInnerHTML:{__html:n},style:{transform:`${o?`rotate(${o})`:""} ${i?"scaleX(-1)":""}`}})},{isShallowEqual:!0,maxSize:Object.keys(xs).length,matchesArg:(t,e)=>t.icon===e.icon&&t.body===e.body});function M({icon:t,size:e="m",alt:n,title:o,class:i="",style:a={}}){if(!t)return null;const s=sl[e];let c=xs[t];if(!c)return null;let l,d,h=!1;Array.isArray(c)?[c,l,d]=c:typeof c=="object"&&({rotate:l,flip:d,rtl:h}=c,c=c.module);const[u,f]=j(mi[t]),m=O(t);return et(()=>{u&&m.current===t||((async()=>{const p=await c();f(p.default),mi[t]=p.default})(),m.current=t)},[t]),r("span",{class:`icon ${i} ${h?"rtl-flip":""}`,title:o||n,style:{width:`${s}px`,height:`${s}px`,...a},"data-icon":t,children:u&&r(al,{icon:t,width:u.width,height:u.height,body:u.body,rotate:l,flip:d})})}const Ze=ye((t,e)=>{var c;let n;try{n=Oa()}catch{}let o=(location.hash||"").replace(/^#/,"").trim();o===""&&(o="/");const{to:i,...a}=t;if(o&&o!=="/"&&o.includes("?")){const l=URL.parse(o,location.origin);if((c=l==null?void 0:l.searchParams)!=null&&c.size){const d=Array.from(l.searchParams.entries()).map(([h,u])=>`${h}=${encodeURIComponent(u)}`).join("&");o=l.pathname+"?"+d}}const s=o===i||decodeURIComponent(o)===i;return r("a",{ref:e,href:`#${i}`,...a,class:`${t.class||""} ${s?"is-active":""}`,onClick:l=>{var d,h,u;(h=(d=l.currentTarget)==null?void 0:d.parentNode)!=null&&h.closest("a")&&l.stopPropagation(),n&&(U.prevLocation=n),(u=t.onClick)==null||u.call(t,l)}})});function pi(t){const{className:e,disabled:n,...o}=t;return r(Uc,{className:e,disabled:n,children:({ref:i,closeMenu:a})=>r(Ze,{...o,ref:i,onClick:({detail:s})=>a(s===0?"Enter":void 0)})})}function gi(t){if(t instanceof Date)return!isNaN(t.getTime());{const e=new Date(t);return!isNaN(e.getTime())}}const cl=Lt(()=>new Intl.DateTimeFormat().resolvedOptions().locale),vi=Lt((t,e={})=>{const n=t.replace(/-[a-z]+$/i,""),o=En([n],[cl()],t);try{return new Intl.DateTimeFormat(o,e)}catch{}try{return new Intl.DateTimeFormat(t,e)}catch{}return new Intl.DateTimeFormat(void 0,e)}),ll=Lt(t=>new Intl.RelativeTimeFormat(t||void 0)),qe=60,Ge=60*qe,gn=24*Ge,ul=t=>{const e=ll(Dt.locale),n=(t.getTime()-Date.now())/1e3,o=Math.abs(n);return o{const e=(Date.now()-t.getTime())/1e3;return el+1,0),i=it(()=>new Date(t),[t]),[a,s,c]=it(()=>{if(!gi(i))return[""+(typeof t=="string"?t:""),"",""];let l;if(e==="micro"){const d=new Date;(d.getTime()-i.getTime())/1e3/gn<=1?l=dl(i):d.getFullYear()===i.getFullYear()?l=vi(Dt.locale,{year:void 0,month:"short",day:"numeric"}).format(i):l=vi(Dt.locale,{dateStyle:"short"}).format(i)}return l||(l=ul(i)),[l,i.toISOString(),i.toLocaleString()]},[i,e,n]);return et(()=>{if(!gi(i))return;let l,d;function h(){d=requestAnimationFrame(()=>{o(),u()})}function u(){const f=(Date.now()-i.getTime())/1e3;f{clearTimeout(l),cancelAnimationFrame(d)}},[]),r("time",{datetime:s,title:c,children:a})}function hl(t){const e=O();return r(Hc,{...t,instanceRef:e,itemProps:{onPointerMove:n=>{var o,i;n.pointerType==="touch"&&((i=(o=e.current)==null?void 0:o.openMenu)==null||i.call(o))},onPointerLeave:n=>{var o,i;n.pointerType==="touch"&&((i=(o=e.current)==null?void 0:o.openMenu)==null||i.call(o))},...t.itemProps}})}function fl(t,e=[]){!t||typeof t!="function"||et(()=>{const n=new CloseWatcher;return n.addEventListener("close",t),()=>{n.destroy()}},e)}const ml=window.CloseWatcher?fl:()=>{},pl=document.getElementById("modal-container");function _i(){return getComputedStyle(document.documentElement).getPropertyValue("--backdrop-theme-color")}function sr({children:t,onClose:e,onClick:n,class:o,minimized:i}){if(!t)return null;const a=O();et(()=>{let u=setTimeout(()=>{var m;const f=(m=a.current)==null?void 0:m.querySelector('[tabindex="-1"]');f&&f.focus()},100);return()=>clearTimeout(u)},[]);const s=window.CloseWatcher,c=Ve("esc",()=>{setTimeout(()=>{e==null||e()},0)},{enabled:!s&&!!e,keydown:!1,keyup:!0},[e]);ml(e,[e]),et(()=>{const u=document.querySelectorAll(".deck-container");if(i){const f=u[u.length-1];f&&f.tabIndex===-1&&f.focus()}else t?u.forEach(f=>{f.setAttribute("inert","")}):u.forEach(f=>{f.removeAttribute("inert")});return()=>{u.forEach(f=>{f.removeAttribute("inert")})}},[t,i]);const l=O(),d=O();Ie(()=>{if(t&&!i)if(os.local.get("theme")){const f=_i();l.current=document.querySelector('meta[name="theme-color"][data-theme-setting="manual"]'),l.current&&(d.current=l.current.content,l.current.content=f)}else{const f=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",m=_i();l.current=document.querySelector(`meta[name="theme-color"][media*="${f}"]`),l.current&&(d.current=l.current.content,l.current.content=m)}else l.current&&d.current&&(l.current.content=d.current);return()=>{l.current&&d.current&&(l.current.content=d.current)}},[t,i]);const h=r("div",{ref:u=>{var f;a.current=u,c.current=((f=u==null?void 0:u.querySelector)==null?void 0:f.call(u,'[tabindex="-1"]'))||u},className:o,onClick:u=>{n==null||n(u),u.target===u.currentTarget&&(e==null||e(u))},tabIndex:i?0:"-1",inert:i,onFocus:u=>{var f,m;try{if(u.target===u.currentTarget){const p=(f=a.current)==null?void 0:f.querySelector('[tabindex="-1"]'),g=!!p&&((m=getComputedStyle(p))==null?void 0:m.pointerEvents)!=="none";p&&g&&p.focus()}}catch{}},children:t});return io(h,pl)}const yi={s:16,m:20,l:24,xl:32,xxl:50,xxxl:64},un={},vn=window.OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas"),no=vn.getContext("2d",{willReadFrequently:!0});no.imageSmoothingEnabled=!1;const gl=/missing\.png$/;function vl({url:t,size:e,alt:n="",squircle:o,...i}){e=yi[e]||e||yi.m;const a=O(),s=gl.test(t);return r("span",{ref:a,class:`avatar ${o?"squircle":""} ${un[t]?"has-alpha":""}`,style:{width:e,height:e},title:n,...i,children:!!t&&r("img",{src:t,width:e,height:e,alt:n,loading:"lazy",decoding:"async",fetchPriority:"low",crossOrigin:un[t]===void 0&&!s?"anonymous":void 0,onError:c=>{c.target.crossOrigin&&(c.target.crossOrigin=null,c.target.src=t)},onLoad:c=>{a.current&&(a.current.dataset.loaded=!0),un[t]===void 0&&(s||setTimeout(()=>{try{const{width:l,height:d}=c.target;vn.width!==l&&(vn.width=l),vn.height!==d&&(vn.height=d),no.drawImage(c.target,0,0);const h=no.getImageData(0,0,l,d),u=h.data.filter((f,m)=>m%4===3&&f<=128).length/(h.data.length/4)>.1;u&&a.current.classList.add("has-alpha"),un[t]=u,no.clearRect(0,0,l,d)}catch{un[t]=!1}},1))}})})}const ue=Lt(vl);let ar=!1;const _l=new MutationObserver(t=>{t.forEach(e=>{if(e.type==="attributes"){const{dir:n}=e.target;n==="rtl"?ar=!0:ar=!1}})});_l.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});function cr(){return ar}function yl(){const[t,e]=j({width:null,height:null});return Ie(()=>{const n=()=>{e({width:window.innerWidth,height:window.innerHeight})};return n(),window.addEventListener("resize",n,{passive:!0}),()=>{window.removeEventListener("resize",n)}},[]),t}function Ls(t){const{containerProps:e,instanceRef:n,align:o}=t,i=yl(),a=n!=null&&n.current?n:O(),s=cr()?o==="end"?"start":o==="start"?"end":o:o;return r(Vc,{boundingBoxPadding:Cs(),repositionFlag:`${i.width}x${i.height}`,unmountOnClose:!0,...t,align:s,instanceRef:a,containerProps:{onClick:c=>{var l,d,h;c.target===c.currentTarget&&((d=(l=a.current)==null?void 0:l.closeMenu)==null||d.call(l)),(h=e==null?void 0:e.onClick)==null||h.call(e,c)},...e}})}function Lo({subMenu:t=!1,confirm:e=!0,confirmLabel:n,menuItemClassName:o,menuFooter:i,menuExtras:a,...s}){const{children:c,onClick:l,...d}=s;return e?r(t?hl:Ls,{openTrigger:"clickOnly",direction:"bottom",overflow:"auto",gap:-8,shift:8,menuClassName:"menu-emphasized",...d,menuButton:t?void 0:c,label:t?c:void 0,children:[r(Tt,{className:o,onClick:l,children:n}),a,i]}):t?r(Tt,{...s}):l?$a(c,{onClick:l}):c}function lr({staticUrl:t,alt:e,url:n}){return r("picture",{children:[t&&r("source",{srcset:t,media:"(prefers-reduced-motion: reduce)"}),r("img",{src:n,alt:e,class:"shortcode-emoji emoji",width:"16",height:"16",loading:"lazy",decoding:"async",fetchPriority:"low"},e||n)]})}const bl=Lt(t=>new RegExp(`:(${t.join("|")}):`,"g"));function wl({text:t,emojis:e}){if(!t)return"";if(!(e!=null&&e.length)||t.indexOf(":")===-1)return t;const n=bl(e.map(i=>i.shortcode));return t.split(n).map((i,a)=>{const s=e.find(c=>c.shortcode===i);if(s){const{url:c,staticUrl:l}=s;return r(lr,{staticUrl:l,alt:i,url:c},i+"-"+a)}return i})}const Ye=Lt(wl),El=Lt(t=>{const e={sensitivity:"base"};try{return new Intl.Collator(t||void 0,e)}catch{return new Intl.Collator(void 0,e)}}),Tl=/([^@]+)(@.+)/i,Al=/(\:(\w|\+|\-)+\:)(?=|[\!\.\?]|$)/g,kl=/\s+/g,Cl=/[^a-z0-9@\.]/gi;function Sl({account:t,instance:e,showAvatar:n,showAcct:o,short:i,external:a,onClick:s}){const{i18n:c}=re();if(!t)return null;const{acct:l,avatar:d,avatarStatic:h,id:u,url:f,displayName:m,emojis:p,bot:g,username:w}=t,[E,v,T]=l.match(Tl)||[,l];e||(e=so().instance);const S=w.toLowerCase().trim(),_=(m||"").toLowerCase().trim(),y=_.replace(Al,"").replace(kl,""),k=y.replace(Cl,""),A=!i&&(S===_||S===y||S===k||El(c.locale).compare(S,y)===0)||k===l.toLowerCase();return r("a",{class:`name-text ${o?"show-acct":""} ${i?"short":""}`,href:f,target:a?"_blank":null,title:m?`${m} (${T?"":"@"}${l})`:`${T?"":"@"}${l}`,onClick:D=>{if(!a&&!D.shiftKey){if(D.preventDefault(),D.stopPropagation(),s)return s(D);if(D.metaKey||D.ctrlKey||D.shiftKey||D.which===2){const P=`#/${e}/a/${u}`;window.open(P,"_blank");return}U.showAccount={account:t,instance:e}}},children:[n&&r(F,{children:[r(ue,{url:h||d,squircle:g})," "]}),m&&!i?r(F,{children:[r("b",{dir:"auto",children:r(Ye,{text:m,emojis:p})}),!o&&!A&&r(F,{children:[" ",r("i",{class:"bidi-isolate",children:["@",w]})]})]}):i?r("i",{children:w}):r("b",{children:w}),o&&r(F,{children:[r("br",{}),r("i",{class:"bidi-isolate",children:[T?"":"@",v,!!T&&r("span",{class:"ib",children:T})]})]})]})}const _e=Lt(Sl),xl="Аҧсшәа",Ll="Acèh",Il="Lëbacoli",Dl="Afár",Ml="Afrikaans",Rl="Shqip",Pl="Dhalur",Ol="አማርኛ",$l="العربية",Fl="Հայերեն",Nl="অসমীয়া",zl="Авар мацӀ",Bl="अवधी",Vl="Aymar aru",Hl="Azərbaycanca",Ul="Basa Bali",Kl="بلوچی",jl="Bamanankan",Wl="Baoulé",Zl="Башҡортса",ql="Euskara",Gl="Batak Karo",Yl="Batak Simalungun",Xl="Batak Toba",Ql="Беларуская",Jl="Ichibemba",tu="বাংলা",eu="Betawi",nu="भोजपुरी",ou="Bikol",ru="Bosanski",iu="Brezhoneg",su="Български",au="Буряад",cu="粵語",lu="Català",uu="Cebuano",du="Chamoru",hu="Нохчийн мотт",fu="Chichewa",mu="Kapasen Chuuk",pu="Чӑвашла",gu="Corsu",vu="Qırımtatarca (Кирилл)",_u="Hrvatski",yu="Čeština",bu="Dansk",wu="ދިވެހި",Eu="Thuɔŋjäŋ",Tu="डोगरी",Au="Dombe",ku="Nederlands",Cu="Jula",Su="རྫོང་ཁ",xu="English",Lu="Esperanto",Iu="Eesti",Du="Eʋegbe",Mu="Føroyskt",Ru="Vosa Vakaviti",Pu="Tagalog",Ou="Suomi",$u="Fon",Fu="Français",Nu="Frysk",zu="Furlan",Bu="Fulfulde",Vu="Gã",Hu="Galego",Uu="ქართული",Ku="Deutsch",ju="Ελληνικά",Wu="Avañe'ẽ",Zu="ગુજરાતી",qu="Kreyòl ayisyen",Gu="Hakha Chin",Yu="Hausa",Xu="ʻŌlelo Hawaiʻi",Qu="עברית",Ju="Hiligaynon",td="हिन्दी",ed="Hmoob",nd="Magyar",od="Hunsrik",rd="Iban",id="Íslenska",sd="Igbo",ad="Iloko",cd="Bahasa Indonesia",ld="ᐃᓄᒃᑎᑐᑦ",ud="Gaeilge",dd="Italiano",hd="Patwa",fd="日本語",md="Basa Jawa",pd="Jinghpaw",gd="Kalaallisut",vd="ಕನ್ನಡ",_d="Kanuri",yd="Kapampangan",bd="Қазақша",wd="Khasi",Ed="ភាសាខ្មែរ",Td="Rukiga",Ad="Kikongo",kd="Kinyarwanda",Cd="Kituba",Sd="Kokborok",xd="Коми кыв",Ld="कोंकणी",Id="한국어",Dd="Krio",Md="Kurdî (Kurmancî)",Rd="کوردی (سۆرانی)",Pd="Кыргызча",Od="ລາວ",$d="Latgaļu",Fd="Latina",Nd="Latviešu",zd="Ligure",Bd="Limburgs",Vd="Lingála",Hd="Lietuvių",Ud="Lombard",Kd="Luganda",jd="Dholuo",Wd="Lëtzebuergesch",Zd="Македонски",qd="Madhurâ",Gd="मैथिली",Yd="Makassar",Xd="Malagasy",Qd="Bahasa Melayu",Jd="മലയാളം",th="Malti",eh="Mam",nh="Gaelg",oh="Te Reo Māori",rh="मराठी",ih="Kajin M̧ajeļ",sh="मारवाड़ी",ah="Kreol Morisien",ch="Олык марий",lh="Baso Minang",uh="Mizo ṭawng",dh="Монгол",hh="မြန်မာစာ",fh="Náhuatl",mh="isiNdebele",ph="नेपाली",gh="Norsk",vh="Thok Nath",_h="Occitan",yh="ଓଡ଼ିଆ",bh="Afaan Oromoo",wh="Ирон æвзаг",Eh="Pangasinan",Th="Papiamentu",Ah="پښتو",kh="فارسی",Ch="Polski",Sh="Português (Brasil)",xh="ਪੰਜਾਬੀ",Lh="Runa Simi",Ih="Qʼeqchiʼ",Dh="Romani čhib",Mh="Română",Rh="Ikirundi",Ph="Русский",Oh="Davvisámegiella",$h="Gagana Samoa",Fh="Sängö",Nh="संस्कृतम्",zh="ᱥᱟᱱᱛᱟᱲᱤ",Bh="Gàidhlig",Vh="Sepedi",Hh="Српски",Uh="Sesotho",Kh="Kreol seselwa",jh="လိၵ်ႈတႆး",Wh="chiShona",Zh="Sicilianu",qh="Ślōnskŏ",Gh="سنڌي",Yh="සිංහල",Xh="Slovenčina",Qh="Slovenščina",Jh="Soomaali",tf="Español",ef="Basa Sunda",nf="Susu",of="Kiswahili",rf="siSwati",sf="Svenska",af="Reo Tahiti",cf="Тоҷикӣ",lf="ⵜⴰⵎⴰⵣⵉⵖⵜ",uf="தமிழ்",df="Татарча",hf="తెలుగు",ff="Tetun",mf="ไทย",pf="བོད་ཡིག",gf="ትግርኛ",vf="Tiv",_f="Tok Pisin",yf="Lea fakatonga",bf="Tshiluba",wf="Xitsonga",Ef="Setswana",Tf="ತುಳು",Af="chiTumbuka",kf="Türkçe",Cf="Türkmençe",Sf="Тыва дыл",xf="Akankasa",Lf="Удмурт кыл",If="Українська",Df="اردو",Mf="ئۇيغۇرچە",Rf="Oʻzbekcha",Pf="Tshivenḓa",Of="Vèneto",$f="Tiếng Việt",Ff="Winaray",Nf="Cymraeg",zf="Wolof",Bf="isiXhosa",Vf="Саха тыла",Hf="ייִדיש",Uf="Yorùbá",Kf="Màaya T'àan",jf="Didxazá",Wf="isiZulu",Io={ab:xl,ace:Ll,ach:Il,aa:Dl,af:Ml,sq:Rl,alz:Pl,am:Ol,ar:$l,hy:Fl,as:Nl,av:zl,awa:Bl,ay:Vl,az:Hl,ban:Ul,bal:Kl,bm:jl,bci:Wl,ba:Zl,eu:ql,btx:Gl,bts:Yl,bbc:Xl,be:Ql,bem:Jl,bn:tu,bew:eu,bho:nu,bik:ou,bs:ru,br:iu,bg:su,bua:au,yue:cu,ca:lu,ceb:uu,ch:du,ce:hu,ny:fu,"zh-CN":"简体中文","zh-TW":"繁體中文",chk:mu,cv:pu,co:gu,crh:vu,"crh-Latn":"Qırımtatarca (Latin)",hr:_u,cs:yu,da:bu,"fa-AF":"درى",dv:wu,din:Eu,doi:Tu,dov:Au,nl:ku,dyu:Cu,dz:Su,en:xu,eo:Lu,et:Iu,ee:Du,fo:Mu,fj:Ru,tl:Pu,fi:Ou,fon:$u,fr:Fu,"fr-CA":"Français (Canada)",fy:Nu,fur:zu,ff:Bu,gaa:Vu,gl:Hu,ka:Uu,de:Ku,el:ju,gn:Wu,gu:Zu,ht:qu,cnh:Gu,ha:Yu,haw:Xu,iw:Qu,hil:Ju,hi:td,hmn:ed,hu:nd,hrx:od,iba:rd,is:id,ig:sd,ilo:ad,id:cd,"iu-Latn":"Inuktitut (Latin)",iu:ld,ga:ud,it:dd,jam:hd,ja:fd,jw:md,kac:pd,kl:gd,kn:vd,kr:_d,pam:yd,kk:bd,kha:wd,km:Ed,cgg:Td,kg:Ad,rw:kd,ktu:Cd,trp:Sd,kv:xd,gom:Ld,ko:Id,kri:Dd,ku:Md,ckb:Rd,ky:Pd,lo:Od,ltg:$d,la:Fd,lv:Nd,lij:zd,li:Bd,ln:Vd,lt:Hd,lmo:Ud,lg:Kd,luo:jd,lb:Wd,mk:Zd,mad:qd,mai:Gd,mak:Yd,mg:Xd,ms:Qd,"ms-Arab":"بهاس ملايو",ml:Jd,mt:th,mam:eh,gv:nh,mi:oh,mr:rh,mh:ih,mwr:sh,mfe:ah,chm:ch,"mni-Mtei":"ꯃꯤꯇꯩꯂꯣꯟ",min:lh,lus:uh,mn:dh,my:hh,nhe:fh,"ndc-ZW":"Ndau",nr:mh,new:"नेपाल भाषा",ne:ph,"bm-Nkoo":"ߒߞߏ",no:gh,nus:vh,oc:_h,or:yh,om:bh,os:wh,pag:Eh,pap:Th,ps:Ah,fa:kh,pl:Ch,pt:Sh,"pt-PT":"Português (Portugal)",pa:xh,"pa-Arab":"پنجابی",qu:Lh,kek:Ih,rom:Dh,ro:Mh,rn:Rh,ru:Ph,se:Oh,sm:$h,sg:Fh,sa:Nh,"sat-Latn":"Santali (Latin)",sat:zh,gd:Bh,nso:Vh,sr:Hh,st:Uh,crs:Kh,shn:jh,sn:Wh,scn:Zh,szl:qh,sd:Gh,si:Yh,sk:Xh,sl:Qh,so:Jh,es:tf,su:ef,sus:nf,sw:of,ss:rf,sv:sf,ty:af,tg:cf,"ber-Latn":"Tamazight (Latin)",ber:lf,ta:uf,tt:df,te:hf,tet:ff,th:mf,bo:pf,ti:gf,tiv:vf,tpi:_f,to:yf,lua:bf,ts:wf,tn:Ef,tcy:Tf,tum:Af,tr:kf,tk:Cf,tyv:Sf,ak:xf,udm:Lf,uk:If,ur:Df,ug:Mf,uz:Rf,ve:Pf,vec:Of,vi:$f,war:Ff,cy:Nf,wo:zf,xh:Bf,sah:Vf,yi:Hf,yo:Uf,yua:Kf,zap:jf,zu:Wf},Wn={"zh-YUE":"YUE",zh_HANT:"zh-Hant"},Do=Lt(t=>new Intl.DisplayNames(t||void 0,{type:"language"}));function Zf(t){let e,n;typeof t=="object"&&({code:t,locale:e,fallback:n}=t);try{const o=Do(e||Dt.locale).of(t);if(o!==t)return o;if(!n){const i=Do(t).of(t);if(i!==t)return i;const a=Io==null?void 0:Io[e];if(a!==t)return a}return n||""}catch{if(Wn[t])try{const i=Do(Wn[e]||e||Dt.locale).of(Wn[t]);return i!==Wn[t]?i:n||""}catch{}return n||""}}const dn=Lt(Zf),qf={auto:"Detect language",ab:"Abkhaz",ace:"Acehnese",ach:"Acholi",aa:"Afar",af:"Afrikaans",sq:"Albanian",alz:"Alur",am:"Amharic",ar:"Arabic",hy:"Armenian",as:"Assamese",av:"Avar",awa:"Awadhi",ay:"Aymara",az:"Azerbaijani",ban:"Balinese",bal:"Baluchi",bm:"Bambara",bci:"Baoulé",ba:"Bashkir",eu:"Basque",btx:"Batak Karo",bts:"Batak Simalungun",bbc:"Batak Toba",be:"Belarusian",bem:"Bemba",bn:"Bengali",bew:"Betawi",bho:"Bhojpuri",bik:"Bikol",bs:"Bosnian",br:"Breton",bg:"Bulgarian",bua:"Buryat",yue:"Cantonese",ca:"Catalan",ceb:"Cebuano",ch:"Chamorro",ce:"Chechen",ny:"Chichewa","zh-CN":"Chinese (Simplified)","zh-TW":"Chinese (Traditional)",chk:"Chuukese",cv:"Chuvash",co:"Corsican",crh:"Crimean Tatar (Cyrillic)","crh-Latn":"Crimean Tatar (Latin)",hr:"Croatian",cs:"Czech",da:"Danish","fa-AF":"Dari",dv:"Dhivehi",din:"Dinka",doi:"Dogri",dov:"Dombe",nl:"Dutch",dyu:"Dyula",dz:"Dzongkha",en:"English",eo:"Esperanto",et:"Estonian",ee:"Ewe",fo:"Faroese",fj:"Fijian",tl:"Filipino",fi:"Finnish",fon:"Fon",fr:"French","fr-CA":"French (Canada)",fy:"Frisian",fur:"Friulian",ff:"Fulani",gaa:"Ga",gl:"Galician",ka:"Georgian",de:"German",el:"Greek",gn:"Guarani",gu:"Gujarati",ht:"Haitian Creole",cnh:"Hakha Chin",ha:"Hausa",haw:"Hawaiian",iw:"Hebrew",hil:"Hiligaynon",hi:"Hindi",hmn:"Hmong",hu:"Hungarian",hrx:"Hunsrik",iba:"Iban",is:"Icelandic",ig:"Igbo",ilo:"Ilocano",id:"Indonesian","iu-Latn":"Inuktut (Latin)",iu:"Inuktut (Syllabics)",ga:"Irish",it:"Italian",jam:"Jamaican Patois",ja:"Japanese",jw:"Javanese",kac:"Jingpo",kl:"Kalaallisut",kn:"Kannada",kr:"Kanuri",pam:"Kapampangan",kk:"Kazakh",kha:"Khasi",km:"Khmer",cgg:"Kiga",kg:"Kikongo",rw:"Kinyarwanda",ktu:"Kituba",trp:"Kokborok",kv:"Komi",gom:"Konkani",ko:"Korean",kri:"Krio",ku:"Kurdish (Kurmanji)",ckb:"Kurdish (Sorani)",ky:"Kyrgyz",lo:"Lao",ltg:"Latgalian",la:"Latin",lv:"Latvian",lij:"Ligurian",li:"Limburgish",ln:"Lingala",lt:"Lithuanian",lmo:"Lombard",lg:"Luganda",luo:"Luo",lb:"Luxembourgish",mk:"Macedonian",mad:"Madurese",mai:"Maithili",mak:"Makassar",mg:"Malagasy",ms:"Malay","ms-Arab":"Malay (Jawi)",ml:"Malayalam",mt:"Maltese",mam:"Mam",gv:"Manx",mi:"Maori",mr:"Marathi",mh:"Marshallese",mwr:"Marwadi",mfe:"Mauritian Creole",chm:"Meadow Mari","mni-Mtei":"Meiteilon (Manipuri)",min:"Minang",lus:"Mizo",mn:"Mongolian",my:"Myanmar (Burmese)",nhe:"Nahuatl (Eastern Huasteca)","ndc-ZW":"Ndau",nr:"Ndebele (South)",new:"Nepalbhasa (Newari)",ne:"Nepali","bm-Nkoo":"NKo",no:"Norwegian",nus:"Nuer",oc:"Occitan",or:"Odia (Oriya)",om:"Oromo",os:"Ossetian",pag:"Pangasinan",pap:"Papiamento",ps:"Pashto",fa:"Persian",pl:"Polish",pt:"Portuguese (Brazil)","pt-PT":"Portuguese (Portugal)",pa:"Punjabi (Gurmukhi)","pa-Arab":"Punjabi (Shahmukhi)",qu:"Quechua",kek:"Qʼeqchiʼ",rom:"Romani",ro:"Romanian",rn:"Rundi",ru:"Russian",se:"Sami (North)",sm:"Samoan",sg:"Sango",sa:"Sanskrit","sat-Latn":"Santali (Latin)",sat:"Santali (Ol Chiki)",gd:"Scots Gaelic",nso:"Sepedi",sr:"Serbian",st:"Sesotho",crs:"Seychellois Creole",shn:"Shan",sn:"Shona",scn:"Sicilian",szl:"Silesian",sd:"Sindhi",si:"Sinhala",sk:"Slovak",sl:"Slovenian",so:"Somali",es:"Spanish",su:"Sundanese",sus:"Susu",sw:"Swahili",ss:"Swati",sv:"Swedish",ty:"Tahitian",tg:"Tajik","ber-Latn":"Tamazight",ber:"Tamazight (Tifinagh)",ta:"Tamil",tt:"Tatar",te:"Telugu",tet:"Tetum",th:"Thai",bo:"Tibetan",ti:"Tigrinya",tiv:"Tiv",tpi:"Tok Pisin",to:"Tongan",lua:"Tshiluba",ts:"Tsonga",tn:"Tswana",tcy:"Tulu",tum:"Tumbuka",tr:"Turkish",tk:"Turkmen",tyv:"Tuvan",ak:"Twi",udm:"Udmurt",uk:"Ukrainian",ur:"Urdu",ug:"Uyghur",uz:"Uzbek",ve:"Venda",vec:"Venetian",vi:"Vietnamese",war:"Waray",cy:"Welsh",wo:"Wolof",xh:"Xhosa",sah:"Yakut",yi:"Yiddish",yo:"Yoruba",yua:"Yucatec Maya",zap:"Zapotec",zu:"Zulu"},Gf={ab:"Abkhaz",ace:"Acehnese",ach:"Acholi",aa:"Afar",af:"Afrikaans",sq:"Albanian",alz:"Alur",am:"Amharic",ar:"Arabic",hy:"Armenian",as:"Assamese",av:"Avar",awa:"Awadhi",ay:"Aymara",az:"Azerbaijani",ban:"Balinese",bal:"Baluchi",bm:"Bambara",bci:"Baoulé",ba:"Bashkir",eu:"Basque",btx:"Batak Karo",bts:"Batak Simalungun",bbc:"Batak Toba",be:"Belarusian",bem:"Bemba",bn:"Bengali",bew:"Betawi",bho:"Bhojpuri",bik:"Bikol",bs:"Bosnian",br:"Breton",bg:"Bulgarian",bua:"Buryat",yue:"Cantonese",ca:"Catalan",ceb:"Cebuano",ch:"Chamorro",ce:"Chechen",ny:"Chichewa","zh-CN":"Chinese (Simplified)","zh-TW":"Chinese (Traditional)",chk:"Chuukese",cv:"Chuvash",co:"Corsican",crh:"Crimean Tatar (Cyrillic)","crh-Latn":"Crimean Tatar (Latin)",hr:"Croatian",cs:"Czech",da:"Danish","fa-AF":"Dari",dv:"Dhivehi",din:"Dinka",doi:"Dogri",dov:"Dombe",nl:"Dutch",dyu:"Dyula",dz:"Dzongkha",en:"English",eo:"Esperanto",et:"Estonian",ee:"Ewe",fo:"Faroese",fj:"Fijian",tl:"Filipino",fi:"Finnish",fon:"Fon",fr:"French","fr-CA":"French (Canada)",fy:"Frisian",fur:"Friulian",ff:"Fulani",gaa:"Ga",gl:"Galician",ka:"Georgian",de:"German",el:"Greek",gn:"Guarani",gu:"Gujarati",ht:"Haitian Creole",cnh:"Hakha Chin",ha:"Hausa",haw:"Hawaiian",iw:"Hebrew",hil:"Hiligaynon",hi:"Hindi",hmn:"Hmong",hu:"Hungarian",hrx:"Hunsrik",iba:"Iban",is:"Icelandic",ig:"Igbo",ilo:"Ilocano",id:"Indonesian","iu-Latn":"Inuktut (Latin)",iu:"Inuktut (Syllabics)",ga:"Irish",it:"Italian",jam:"Jamaican Patois",ja:"Japanese",jw:"Javanese",kac:"Jingpo",kl:"Kalaallisut",kn:"Kannada",kr:"Kanuri",pam:"Kapampangan",kk:"Kazakh",kha:"Khasi",km:"Khmer",cgg:"Kiga",kg:"Kikongo",rw:"Kinyarwanda",ktu:"Kituba",trp:"Kokborok",kv:"Komi",gom:"Konkani",ko:"Korean",kri:"Krio",ku:"Kurdish (Kurmanji)",ckb:"Kurdish (Sorani)",ky:"Kyrgyz",lo:"Lao",ltg:"Latgalian",la:"Latin",lv:"Latvian",lij:"Ligurian",li:"Limburgish",ln:"Lingala",lt:"Lithuanian",lmo:"Lombard",lg:"Luganda",luo:"Luo",lb:"Luxembourgish",mk:"Macedonian",mad:"Madurese",mai:"Maithili",mak:"Makassar",mg:"Malagasy",ms:"Malay","ms-Arab":"Malay (Jawi)",ml:"Malayalam",mt:"Maltese",mam:"Mam",gv:"Manx",mi:"Maori",mr:"Marathi",mh:"Marshallese",mwr:"Marwadi",mfe:"Mauritian Creole",chm:"Meadow Mari","mni-Mtei":"Meiteilon (Manipuri)",min:"Minang",lus:"Mizo",mn:"Mongolian",my:"Myanmar (Burmese)",nhe:"Nahuatl (Eastern Huasteca)","ndc-ZW":"Ndau",nr:"Ndebele (South)",new:"Nepalbhasa (Newari)",ne:"Nepali","bm-Nkoo":"NKo",no:"Norwegian",nus:"Nuer",oc:"Occitan",or:"Odia (Oriya)",om:"Oromo",os:"Ossetian",pag:"Pangasinan",pap:"Papiamento",ps:"Pashto",fa:"Persian",pl:"Polish",pt:"Portuguese (Brazil)","pt-PT":"Portuguese (Portugal)",pa:"Punjabi (Gurmukhi)","pa-Arab":"Punjabi (Shahmukhi)",qu:"Quechua",kek:"Qʼeqchiʼ",rom:"Romani",ro:"Romanian",rn:"Rundi",ru:"Russian",se:"Sami (North)",sm:"Samoan",sg:"Sango",sa:"Sanskrit","sat-Latn":"Santali (Latin)",sat:"Santali (Ol Chiki)",gd:"Scots Gaelic",nso:"Sepedi",sr:"Serbian",st:"Sesotho",crs:"Seychellois Creole",shn:"Shan",sn:"Shona",scn:"Sicilian",szl:"Silesian",sd:"Sindhi",si:"Sinhala",sk:"Slovak",sl:"Slovenian",so:"Somali",es:"Spanish",su:"Sundanese",sus:"Susu",sw:"Swahili",ss:"Swati",sv:"Swedish",ty:"Tahitian",tg:"Tajik","ber-Latn":"Tamazight",ber:"Tamazight (Tifinagh)",ta:"Tamil",tt:"Tatar",te:"Telugu",tet:"Tetum",th:"Thai",bo:"Tibetan",ti:"Tigrinya",tiv:"Tiv",tpi:"Tok Pisin",to:"Tongan",lua:"Tshiluba",ts:"Tsonga",tn:"Tswana",tcy:"Tulu",tum:"Tumbuka",tr:"Turkish",tk:"Turkmen",tyv:"Tuvan",ak:"Twi",udm:"Udmurt",uk:"Ukrainian",ur:"Urdu",ug:"Uyghur",uz:"Uzbek",ve:"Venda",vec:"Venetian",vi:"Vietnamese",war:"Waray",cy:"Welsh",wo:"Wolof",xh:"Xhosa",sah:"Yakut",yi:"Yiddish",yo:"Yoruba",yua:"Yucatec Maya",zap:"Zapotec",zu:"Zulu"},Yf={},Is={sl:qf,tl:Gf,al:Yf},Xf=Object.entries(Is.tl).map(([t,{name:e}])=>({code:t,name:e})),Qf=Lt(()=>[new Intl.DateTimeFormat().resolvedOptions().locale,...navigator.languages]),Jf=()=>En(Qf(),Xf.map(t=>t.code.replace("_","-")),"en");function Ds(t=!1){if(t){const{contentTranslationTargetLanguage:e}=U.settings;if(e)return e}return Jf()}const bi=["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte"];function vv(t){const e=Math.min(Math.floor(Math.log2(t)/10),bi.length-1),n=t/1024**e;return Dt.number(n,{style:"unit",unit:bi[e],unitDisplay:"narrow",maximumFractionDigits:0})}const tm={"@mastodon/edit-media-attributes":">=4.1","@mastodon/list-exclusive":">=4.2","@gotosocial/list-exclusive":">=0.17","@mastodon/filtered-notifications":"~4.3 || >=4.3","@mastodon/fetch-multiple-statuses":"~4.3 || >=4.3","@mastodon/trending-link-posts":"~4.3 || >=4.3","@mastodon/grouped-notifications":"~4.3 || >=4.3","@mastodon/annual-report":"~4.4 || >=4.4"},Mo=/pixelfed/i,se=/^(?!.*pixelfed).*$/i,em=/pleroma/i,nm=/akkoma/i;const wi={"@mastodon/lists":se,"@mastodon/filters":se,"@mastodon/mentions":se,"@mastodon/trending-hashtags":se,"@mastodon/trending-links":se,"@mastodon/post-bookmark":se,"@mastodon/post-edit":se,"@mastodon/profile-edit":se,"@mastodon/profile-private-note":se,"@pixelfed/trending":Mo,"@pixelfed/home-include-reblogs":Mo,"@pixelfed/global-feed":Mo,"@pleroma/local-visibility-post":em,"@akkoma/local-visibility-post":nm},Zn={};function qn(t){var e,n;try{let{version:o,domain:i}=Fa(),a=((n=(e=Na())==null?void 0:e.software)==null?void 0:n.name)||"mastodon";a==="hometown"&&(a="mastodon");const s=`${i}-${t}`;if(Zn[s])return Zn[s];if(wi[t])return Zn[s]=wi[t].test(o);const c=tm[t];if(!c)return!1;const d=t.match(/^@([a-z]+)\//)[1]===a.toLowerCase();return Zn[s]=d&&za(o,c,{includePrerelease:!0,loose:!0})}catch{return!1}}const Ke=2147483647,Jt=36,Dr=1,Cn=26,om=38,rm=700,Ms=72,Rs=128,Ps="-",im=/^xn--/,sm=/[^\0-\x7F]/,am=/[\x2E\u3002\uFF0E\uFF61]/g,cm={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Ro=Jt-Dr,te=Math.floor,Po=String.fromCharCode;function ge(t){throw new RangeError(cm[t])}function lm(t,e){const n=[];let o=t.length;for(;o--;)n[o]=e(t[o]);return n}function Os(t,e){const n=t.split("@");let o="";n.length>1&&(o=n[0]+"@",t=n[1]),t=t.replace(am,".");const i=t.split("."),a=lm(i,e).join(".");return o+a}function $s(t){const e=[];let n=0;const o=t.length;for(;n=55296&&i<=56319&&nString.fromCodePoint(...t),dm=function(t){return t>=48&&t<58?26+(t-48):t>=65&&t<91?t-65:t>=97&&t<123?t-97:Jt},Ei=function(t,e){return t+22+75*(t<26)-((e!=0)<<5)},Fs=function(t,e,n){let o=0;for(t=n?te(t/rm):t>>1,t+=te(t/e);t>Ro*Cn>>1;o+=Jt)t=te(t/Ro);return te(o+(Ro+1)*t/(t+om))},Ns=function(t){const e=[],n=t.length;let o=0,i=Rs,a=Ms,s=t.lastIndexOf(Ps);s<0&&(s=0);for(let c=0;c=128&&ge("not-basic"),e.push(t.charCodeAt(c));for(let c=s>0?s+1:0;c=n&&ge("invalid-input");const f=dm(t.charCodeAt(c++));f>=Jt&&ge("invalid-input"),f>te((Ke-o)/h)&&ge("overflow"),o+=f*h;const m=u<=a?Dr:u>=a+Cn?Cn:u-a;if(fte(Ke/p)&&ge("overflow"),h*=p}const d=e.length+1;a=Fs(o-l,d,l==0),te(o/d)>Ke-i&&ge("overflow"),i+=te(o/d),o%=d,e.splice(o++,0,i)}return String.fromCodePoint(...e)},zs=function(t){const e=[];t=$s(t);const n=t.length;let o=Rs,i=0,a=Ms;for(const l of t)l<128&&e.push(Po(l));const s=e.length;let c=s;for(s&&e.push(Ps);c=o&&hte((Ke-i)/d)&&ge("overflow"),i+=(l-o)*d,o=l;for(const h of t)if(hKe&&ge("overflow"),h===o){let u=i;for(let f=Jt;;f+=Jt){const m=f<=a?Dr:f>=a+Cn?Cn:f-a;if(u{const{shortcode:o,staticUrl:i,url:a}=n;t=t.replace(new RegExp(`:${o}:`,"g"),`
`)}),t):""}const Ne=document.createElement("div"),mm=["u-url","mention","hashtag"],pm=/[&<>]/g;function Oo(t){return t.replace(pm,e=>({"&":"&","<":"<",">":">"})[e])}const gm=/{}}=e;let a=t;const s=xm(a,o),c=gm.test(a),l=a.includes("```");if(c){const f=s.querySelectorAll('a:not([target="_blank"])');for(const p of f)p.setAttribute("target","_blank");const m=s.querySelectorAll("a[class]");for(const p of m)for(const g of p.classList)mm.includes(g)||p.classList.remove(g)}if(c){const f=s.querySelectorAll("a[href]");for(const m of f)vm.test(m.textContent.trim())&&(m.classList.add("has-url-text"),Rm(m))}if(c){const f=s.querySelectorAll("a[href]"),m=[];for(const p of f){const g=p.innerText.trim(),w=p.querySelector("*");if(_m.test(g)){const[E,v,T]=g.split("@");w||(!m.some(([S])=>S===v)||m.some(([S,_])=>S===v&&_===T)?(p.innerHTML=`@${v}`,m.push([v,T])):p.innerHTML=`@${v}@${T}`),p.classList.add("mention")}ym.test(g)&&(w||(p.innerHTML=`#${g.slice(1)}`),p.classList.add("mention","hashtag"))}}let d;if(a.includes(":")&&(n!=null&&n.length)){d=Fo(s);for(const f of d){let m=Oo(f.nodeValue);m=ur(m,n),Ne.innerHTML=m,f.replaceWith(...Ne.childNodes)}}if(l){const f=[...s.querySelectorAll("p")].filter(m=>bm.test(m.innerText.trim()));for(const m of f){const p=document.createElement("pre");for(const g of m.querySelectorAll("br"))g.replaceWith(`
`);p.innerHTML=`${m.innerHTML.trim()}
`,m.replaceWith(p)}}if(l){const m=[...s.querySelectorAll("p")].filter(p=>wm.test(p.innerText));for(const p of m){const g=[p];let w=!1,E=p;for(;E.nextElementSibling;){const v=E.nextElementSibling;if(v&&v.tagName==="P")if(Em.test(v.innerText)){g.push(v),w=!0;break}else g.push(v);else break;E=v}if(w){const v=document.createElement("pre");for(const S of g)for(const _ of S.querySelectorAll("br"))_.replaceWith(`
`);const T=g.map(S=>S.innerHTML).join(`
`);v.innerHTML=`${T}
`,p.replaceWith(v);for(const S of g)S.remove()}}}if(a.includes("`")){d=Fo(s);for(const f of d){let m=Oo(f.nodeValue);Tm.test(m)&&(m=m.replaceAll(Sm,"$1
")),Ne.innerHTML=m,f.replaceWith(...Ne.childNodes)}}if(Am.test(a)){d=Fo(s,{rejectFilter:["A"]});for(const f of d){let m=Oo(f.nodeValue);km.test(m)&&(m=m.replaceAll(Cm,'$1')),Ne.innerHTML=m,f.replaceWith(...Ne.childNodes)}}if(a.includes("#")){let f=null;const m=[...s.querySelectorAll("p")].filter((p,g)=>{let w=0;for(let E=0;E3||w>1&&f&&g===f+1)return f=g,!0});if(m!=null&&m.length)for(const p of m)p.classList.add("hashtag-stuffing"),p.title=p.innerText}if(a.includes("
i(s)),o?s:s.innerHTML}const Vs=Lt(Lm),Im=["STYLE","IMG","VIDEO","AUDIO","AREA","MAP","TRACK","EMBED","IFRAME","OBJECT","PICTURE","PORTAL","SOURCE","SVG","MATH","CANVAS","NOSCRIPT","SCRIPT","INPUT","OPTION","TEXTAREA","SLOT","TEMPLATE"],Dm=Object.fromEntries(Im.map(t=>[t,!0])),Mm=/^(https?:\/\/(www\.)?|xmpp:)/,$o=30;function Rm(t){var e;if(!(!t||(e=t.querySelector)!=null&&e.call(t,"*")))try{const n=t.innerText.trim(),o=(n.match(Mm)||[])[0]||"";if(!o)return;const i=n.slice(o.length,o.length+$o),a=n.slice(o.length+$o),s=n.slice(o.length).length>$o;t.innerHTML=`${o}${i}${a}`}catch{}}function Fo(t,e={}){var s;const n=[],o=Object.assign({},Dm,(s=e.rejectFilter)==null?void 0:s.reduce((c,l)=>(c[l]=!0,c),{})),i=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode(c){return o[c.parentNode.nodeName]?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}},!1);let a;for(;a=i.nextNode();)n.push(a);return n}function Pm(t){const{mentions:e=[],instance:n,previewMode:o,statusURL:i}=t||{};return a=>{var h,u;let{target:s}=a;if(s=s.closest("a"),!s||a.metaKey||a.ctrlKey||a.shiftKey||a.altKey||a.which===2)return;const c=(h=s.previousSibling)==null?void 0:h.textContent,l=c==null?void 0:c.endsWith("@"),d=s.innerText.startsWith("@");if((s.classList.contains("u-url")||s.classList.contains("mention"))&&d||l&&!d){const f=(s.querySelector("span")||s).innerText.trim(),m=f.replace(/^@/,""),p=s.getAttribute("href"),g=e.find(w=>w.url===p)||e.find(w=>w.acct===m||w.username===m);if(g)a.preventDefault(),a.stopPropagation(),U.showAccount={account:g.acct,instance:n};else if(!/^http/i.test(f)){a.preventDefault(),a.stopPropagation();const w=s.getAttribute("href");U.showAccount={account:w,instance:n}}}else if(!o){const f=c==null?void 0:c.endsWith("#");if(s.classList.contains("hashtag")||f){a.preventDefault(),a.stopPropagation();const m=s.innerText.replace(/^#/,"").trim(),p=n?`#/${n}/t/${m}`:`#/t/${m}`;location.hash=p}else(u=U.unfurledLinks[s.href])!=null&&u.url&&i!==s.href&&(a.preventDefault(),a.stopPropagation(),U.prevLocation={pathname:location.hash.replace(/^#/,"")},location.hash=`#${U.unfurledLinks[s.href].url}`)}}}function _v(t,e){return()=>Dt.number(t,{style:"unit",unit:e,unitDisplay:"long"})}function ae(t){try{return Dt.number(t,{notation:"compact",roundingMode:"floor"})}catch{return t}}function yv({skeleton:t,account:e,avatarSize:n="xl",useAvatarStatic:o=!1,instance:i,external:a,internal:s,onClick:c,showActivity:l=!1,showStats:d=!1,accountInstance:h,hideDisplayName:u=!1,relationship:f={},excludeRelationshipAttrs:m=[]}){const{_:p}=re();if(t)return r("div",{class:"account-block skeleton",children:[r(ue,{size:n}),r("span",{children:[r("b",{children:"████████"}),r("br",{}),r("span",{class:"account-block-acct",children:"██████"})]})]});if(!e)return null;const{id:g,acct:w,avatar:E,avatarStatic:v,displayName:T,username:S,emojis:_,url:y,statusesCount:k,lastStatusAt:A,bot:D,fields:P,note:L,group:I,followersCount:$,createdAt:z,locked:W}=e;let[nt,st,ot]=w.match(/([^@]+)(@.+)/i)||[,w];h&&(ot=`@${h}`);const ct=P==null?void 0:P.find(lt=>!!lt.verifiedAt&&!!lt.value),K={};for(const lt in f)m.includes(lt)||(K[lt]=f[lt]);const bt=K.following||K.followedBy||K.requested;return r("a",{class:"account-block",href:y,target:a?"_blank":null,title:ot?w:`@${w}`,onClick:lt=>{if(!a){if(lt.preventDefault(),c)return c(lt);s?location.hash=`/${i}/a/${g}`:U.showAccount={account:e,instance:i}}},children:[r("div",{class:"avatar-container",children:r(ue,{url:o?v:E||v,size:n,squircle:D})}),r("span",{class:"account-block-content",children:[!u&&r(F,{children:T?r("b",{children:r(Ye,{text:T,emojis:_})}):r("b",{children:S})})," ",r("span",{class:"account-block-acct bidi-isolate",children:[ot?"":"@",st,r("wbr",{}),ot,W&&r(F,{children:[" ",r(M,{icon:"lock",size:"s",alt:p({id:"G2fuEb"})})]})]}),l&&r("div",{class:"account-block-stats",children:[r(R,{id:"ajzDof",values:{0:ae(k)}}),!!A&&r(F,{children:[" ","·"," ",r(R,{id:"f8bJ3C",values:{0:kn(A,{hideTime:!0})}})]})]}),d&&r("div",{class:"account-block-stats",children:[D&&r(F,{children:r("span",{class:"tag collapsed",children:[r(M,{icon:"bot"})," ",r(R,{id:"9Vdq+j"})]})}),!!I&&r(F,{children:r("span",{class:"tag collapsed",children:[r(M,{icon:"group"})," ",r(R,{id:"L8fEEm"})]})}),bt&&r("div",{class:"shazam-container-horizontal",children:r("div",{class:"shazam-container-inner",children:K.following&&K.followedBy?r("span",{class:"tag minimal",children:r(R,{id:"7oRLbi"})}):K.requested?r("span",{class:"tag minimal",children:r(R,{id:"Yx0Ud8"})}):K.following?r("span",{class:"tag minimal",children:r(R,{id:"y6sq5j"})}):K.followedBy?r("span",{class:"tag minimal",children:r(R,{id:"p3UO/y"})}):null})},f.id),!!$&&r("span",{class:"ib",children:r(R,{id:"Mn1E9C",values:{followersCount:$}})}),!!ct&&r("span",{class:"verified-field",children:[r(M,{icon:"check-circle",size:"s",alt:p({id:"QDEWii"})})," ",r("span",{dangerouslySetInnerHTML:{__html:Vs(ct.value,{emojis:_})}})]}),!D&&!I&&!bt&&!$&&!ct&&!!z&&r("span",{class:"created-at",children:r(R,{id:"PCcEFZ",values:{0:kn(z,{hideTime:!0})},components:{0:r("time",{datetime:z})}})})]})]})]})}var No={},zo,Ti;function Om(){if(Ti)return zo;Ti=1;function t(e,n){typeof n=="boolean"&&(n={forever:n}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=n||{},this._maxRetryTime=n&&n.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}return zo=t,t.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},t.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},t.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var n=new Date().getTime();if(e&&n-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var o=this._timeouts.shift();if(o===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),o=this._cachedTimeouts.slice(-1);else return!1;var i=this;return this._timer=setTimeout(function(){i._attempts++,i._operationTimeoutCb&&(i._timeout=setTimeout(function(){i._operationTimeoutCb(i._attempts)},i._operationTimeout),i._options.unref&&i._timeout.unref()),i._fn(i._attempts)},o),this._options.unref&&this._timer.unref(),!0},t.prototype.attempt=function(e,n){this._fn=e,n&&(n.timeout&&(this._operationTimeout=n.timeout),n.cb&&(this._operationTimeoutCb=n.cb));var o=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){o._operationTimeoutCb()},o._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)},t.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)},t.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)},t.prototype.start=t.prototype.try,t.prototype.errors=function(){return this._errors},t.prototype.attempts=function(){return this._attempts},t.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},n=null,o=0,i=0;i=o&&(n=a,o=c)}return n},zo}var Ai;function $m(){return Ai||(Ai=1,function(t){var e=Om();t.operation=function(n){var o=t.timeouts(n);return new e(o,{forever:n&&(n.forever||n.retries===1/0),unref:n&&n.unref,maxRetryTime:n&&n.maxRetryTime})},t.timeouts=function(n){if(n instanceof Array)return[].concat(n);var o={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var i in n)o[i]=n[i];if(o.minTimeout>o.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var a=[],s=0;sBm.call(t)==="[object Error]",Hm=new Set(["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Load failed","Network request failed","fetch failed"]);function Um(t){return t&&Vm(t)&&t.name==="TypeError"&&typeof t.message=="string"?t.message==="Load failed"?t.stack===void 0:Hm.has(t.message):!1}class Km extends Error{constructor(e){super(),e instanceof Error?(this.originalError=e,{message:e}=e):(this.originalError=new Error(e),this.originalError.stack=this.stack),this.name="AbortError",this.message=e}}const Ci=(t,e,n)=>{const o=n.retries-(e-1);return t.attemptNumber=e,t.retriesLeft=o,t};async function jm(t,e){return new Promise((n,o)=>{e={...e},e.onFailedAttempt??(e.onFailedAttempt=()=>{}),e.shouldRetry??(e.shouldRetry=()=>!0),e.retries??(e.retries=10);const i=zm.operation(e),a=()=>{var c;i.stop(),o((c=e.signal)==null?void 0:c.reason)};e.signal&&!e.signal.aborted&&e.signal.addEventListener("abort",a,{once:!0});const s=()=>{var c;(c=e.signal)==null||c.removeEventListener("abort",a),i.stop()};i.attempt(async c=>{try{const l=await t(c);s(),n(l)}catch(l){try{if(!(l instanceof Error))throw new TypeError(`Non-error was thrown: "${l}". You should only throw errors.`);if(l instanceof Km)throw l.originalError;if(l instanceof TypeError&&!Um(l))throw l;if(Ci(l,c,e),await e.shouldRetry(l)||(i.stop(),o(l)),await e.onFailedAttempt(l),!i.retry(l))throw i.mainError()}catch(d){Ci(d,c,e),s(),o(d)}}})})}const Hs="ai"in self&&"translator"in self.ai;let je;Hs&&(async()=>{try{const e=(await self.ai.languageDetector.capabilities()).capabilities;e==="readily"?je=await self.ai.languageDetector.create():(je=await self.ai.languageDetector.create({monitor(n){n.addEventListener("downloadprogress",o=>{})}}),await je.ready)}catch{}})();const Wm=async(t,e,n)=>{let o;const i=e;if(e==="auto")try{e=(await je.detect(t))[0].detectedLanguage,o=e}catch(a){return{error:a}}console.groupCollapsed("💬 BROWSER TRANSLATE",i,o,n);try{const s=(await self.ai.translator.capabilities()).languagePairAvailable(e,n);if(s==="no")return console.groupEnd(),{error:`Unsupported language pair: ${e} -> ${n}`};let c;s==="readily"?c=await self.ai.translator.create({sourceLanguage:e,targetLanguage:n}):c=await self.ai.translator.create({sourceLanguage:e,targetLanguage:n,monitor(d){d.addEventListener("downloadprogress",h=>{})}});const l=await c.translate(t);return console.groupEnd(),{content:l,detectedSourceLanguage:o,provider:"browser"}}catch(a){return console.groupEnd(),{error:a}}};var Zm=Object.defineProperty,qm=(t,e,n)=>e in t?Zm(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Gn=(t,e,n)=>qm(t,typeof e!="symbol"?e+"":e,n),dr=new Map,Yn=new WeakMap,Si=0,Gm=void 0;function Ym(t){return t?(Yn.has(t)||(Si+=1,Yn.set(t,Si.toString())),Yn.get(t)):"0"}function Xm(t){return Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>`${e}_${e==="root"?Ym(t.root):t[e]}`).toString()}function Qm(t){const e=Xm(t);let n=dr.get(e);if(!n){const o=new Map;let i;const a=new IntersectionObserver(s=>{s.forEach(c=>{var l;const d=c.isIntersecting&&i.some(h=>c.intersectionRatio>=h);t.trackVisibility&&typeof c.isVisible>"u"&&(c.isVisible=d),(l=o.get(c.target))==null||l.forEach(h=>{h(d,c)})})},t);i=a.thresholds||(Array.isArray(t.threshold)?t.threshold:[t.threshold||0]),n={id:e,observer:a,elements:o},dr.set(e,n)}return n}function Us(t,e,n={},o=Gm){if(typeof window.IntersectionObserver>"u"&&o!==void 0){const l=t.getBoundingClientRect();return e(o,{isIntersecting:o,target:t,intersectionRatio:typeof n.threshold=="number"?n.threshold:0,time:0,boundingClientRect:l,intersectionRect:l,rootBounds:l}),()=>{}}const{id:i,observer:a,elements:s}=Qm(n),c=s.get(t)||[];return s.has(t)||s.set(t,c),c.push(e),a.observe(t),function(){c.splice(c.indexOf(e),1),c.length===0&&(s.delete(t),a.unobserve(t)),s.size===0&&(a.disconnect(),dr.delete(i))}}function Jm(t){return typeof t.children!="function"}var bv=class extends rs{constructor(t){super(t),Gn(this,"node",null),Gn(this,"_unobserveCb",null),Gn(this,"handleNode",e=>{this.node&&(this.unobserve(),!e&&!this.props.triggerOnce&&!this.props.skip&&this.setState({inView:!!this.props.initialInView,entry:void 0})),this.node=e||null,this.observeNode()}),Gn(this,"handleChange",(e,n)=>{e&&this.props.triggerOnce&&this.unobserve(),Jm(this.props)||this.setState({inView:e,entry:n}),this.props.onChange&&this.props.onChange(e,n)}),this.state={inView:!!t.initialInView,entry:void 0}}componentDidMount(){this.unobserve(),this.observeNode()}componentDidUpdate(t){(t.rootMargin!==this.props.rootMargin||t.root!==this.props.root||t.threshold!==this.props.threshold||t.skip!==this.props.skip||t.trackVisibility!==this.props.trackVisibility||t.delay!==this.props.delay)&&(this.unobserve(),this.observeNode())}componentWillUnmount(){this.unobserve()}observeNode(){if(!this.node||this.props.skip)return;const{threshold:t,root:e,rootMargin:n,trackVisibility:o,delay:i,fallbackInView:a}=this.props;this._unobserveCb=Us(this.node,this.handleChange,{threshold:t,root:e,rootMargin:n,trackVisibility:o,delay:i},a)}unobserve(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)}render(){const{children:t}=this.props;if(typeof t=="function"){const{inView:m,entry:p}=this.state;return t({inView:m,entry:p,ref:this.handleNode})}const{as:e,triggerOnce:n,threshold:o,root:i,rootMargin:a,onChange:s,skip:c,trackVisibility:l,delay:d,initialInView:h,fallbackInView:u,...f}=this.props;return Ba(e||"div",{ref:this.handleNode,...f},t)}};function tp({threshold:t,delay:e,trackVisibility:n,rootMargin:o,root:i,triggerOnce:a,skip:s,initialInView:c,fallbackInView:l,onChange:d}={}){var h;const[u,f]=j(null),m=O(d),[p,g]=j({inView:!!c,entry:void 0});m.current=d,et(()=>{if(s||!u)return;let T;return T=Us(u,(S,_)=>{g({inView:S,entry:_}),m.current&&m.current(S,_),_.isIntersecting&&a&&T&&(T(),T=void 0)},{root:i,rootMargin:o,threshold:t,trackVisibility:n,delay:e},l),()=>{T&&T()}},[Array.isArray(t)?t.toString():t,u,i,o,a,s,n,l,e]);const w=(h=p.entry)==null?void 0:h.target,E=O(void 0);!u&&w&&!a&&!s&&E.current!==w&&(E.current=w,g({inView:!!c,entry:void 0}));const v=[f,p.inView,p.entry];return v.ref=v[0],v.inView=v[1],v.entry=v[2],v}const xi=48,Vo={};function Ks({id:t,children:e}){const n=O(),o=!!Vo[t],[i,a]=j(!1),[s,c]=j(o||!1),{ref:l}=tp({root:null,rootMargin:`-${xi}px 0px 0px 0px`,trackVisibility:!0,delay:1e3,onChange:d=>{d&&(a(!0),t&&(Vo[t]=!0))},triggerOnce:!0,skip:s||i});return et(()=>{if(!n.current)return;const d=n.current.getBoundingClientRect();d.bottom>xi&&(d.top({code:t,name:e})),{PHANPY_TRANSLANG_INSTANCES:Li}=ep,_n=Li?Li.split(/\s+/):[],op=is({limit:1,interval:2e3}),js=1e3*60*60;let Ho=0;function rp(t,e,n){return jm(()=>{let i=_n[Ho];const a=t.length>2e3;let s;return a?s=fetch(`https://${i}/api/v1/translate`,{method:"POST",priority:"low",referrerPolicy:"no-referrer",headers:{"Content-Type":"application/json"},body:JSON.stringify({sl:e,tl:n,text:t})}):s=fetch(`https://${i}/api/v1/translate?sl=${encodeURIComponent(e)}&tl=${encodeURIComponent(n)}&text=${encodeURIComponent(t)}`,{priority:"low",referrerPolicy:"no-referrer"}),s.then(c=>{if(!c.ok)throw new Error(c.statusText);return c.json()}).then(c=>({provider:"translang",content:c.translated_text,detectedSourceLanguage:c.detected_language,pronunciation:c.pronunciation}))},{retries:3,onFailedAttempt:i=>{Ho=(Ho+1)%_n.length}})}const Ws=mo(rp,{maxAge:js}),ip=mo(op(Ws),{maxAge:js});function sp({forceTranslate:t,sourceLanguage:e,onTranslate:n,text:o="",mini:i,autoDetected:a}){const{_:s}=re(),c=Ds(!0),[l,d]=j("default"),[h,u]=j(null),[f,m]=j(null),[p,g]=j(null),w=O(),E=e?dn(e):null,v=dn(c),T=O("auto");n||(n=async(..._)=>{if(Hs){const y=await Wm(..._);if(y&&!y.error)return y}return i?await ip(..._):await Ws(..._)});const S=async()=>{d("loading");try{const{content:_,detectedSourceLanguage:y,provider:k,error:A,...D}=await n(o,T.current,c);if(_){if(y){const P=dn(y);g(P)}if(k==="translang"){const P=D==null?void 0:D.pronunciation;P&&u(P)}m(_),d("default"),!i&&_.trim()!==o.trim()&&(w.current.open=!0,w.current.scrollIntoView({behavior:"smooth",block:"nearest"}))}else d("error")}catch{d("error")}};return et(()=>{t&&S()},[t]),i?f&&f.trim()!==o.trim()&&p!==v?r(Ks,{children:r("div",{class:"status-translation-block-mini",children:[r(M,{icon:"translate",alt:s({id:"zVJKbG",values:{sourceLangText:E}})}),r("output",{lang:c,dir:"auto",title:h||"",children:f})]})}):null:r("div",{class:"status-translation-block",onClick:_=>{_.preventDefault()},children:r("details",{ref:w,children:[r("summary",{children:r("button",{type:"button",onClick:async _=>{_.preventDefault(),_.stopPropagation(),w.current.open=!w.current.open,l!=="loading"&&(f||S())},children:[r(M,{icon:"translate"})," ",r("span",{children:s(l==="loading"?{id:"Zxkt/v"}:e&&E&&!p?a?{id:"R20Yf9",values:{sourceLangText:E}}:{id:"h8zDAI",values:{sourceLangText:E}}:{id:"pi8x/S"})})]})}),r("div",{class:"translated-block",children:[r("div",{class:"translation-info insignificant",children:[r("select",{class:"translated-source-select",disabled:l==="loading",onChange:_=>{T.current=_.target.value,S()},children:np.map(_=>{const y=dn({code:_.code,fallback:_.name}),k=dn({code:_.code,locale:_.code}),A=k&&y!==k;return r("option",{value:_.code,children:_.code==="auto"?s({id:"Bze3gr",values:{0:p??"…"}}):A?`${k} - ${y}`:y})})})," ",r("span",{children:["→ ",v]}),r(ss,{abrupt:!0,hidden:l!=="loading"})]}),l==="error"?r("p",{class:"ui-state",children:r(R,{id:"m5LihO"})}):!!f&&r(F,{children:[r("output",{class:"translated-content",lang:c,dir:"auto",children:f}),!!h&&r("output",{class:"translated-pronunciation-content",tabIndex:-1,onClick:_=>{_.target.classList.toggle("expand")},children:h})]})]})]})})}const ap=_n!=null&&_n.length?sp:()=>null;function fe(t){return new Promise((e,n)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>n(t.error)})}function Zs(t,e){const n=indexedDB.open(t);n.onupgradeneeded=()=>n.result.createObjectStore(e);const o=fe(n);return(i,a)=>o.then(s=>a(s.transaction(e,i).objectStore(e)))}let Uo;function De(){return Uo||(Uo=Zs("keyval-store","keyval")),Uo}function cp(t,e=De()){return e("readonly",n=>fe(n.get(t)))}function lp(t,e,n=De()){return n("readwrite",o=>(o.put(e,t),fe(o.transaction)))}function up(t,e=De()){return e("readonly",n=>Promise.all(t.map(o=>fe(n.get(o)))))}function dp(t,e=De()){return e("readwrite",n=>(n.delete(t),fe(n.transaction)))}function hp(t,e=De()){return e("readwrite",n=>(t.forEach(o=>n.delete(o)),fe(n.transaction)))}function fp(t=De()){return t("readwrite",e=>(e.clear(),fe(e.transaction)))}function mp(t,e){return t.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},fe(t.transaction)}function pp(t=De()){return t("readonly",e=>{if(e.getAllKeys)return fe(e.getAllKeys());const n=[];return mp(e,o=>n.push(o.key)).then(()=>n)})}function Ii(t,e){const n=Zs(t,e);return{set:(o,i)=>lp(o,i,n),get:o=>cp(o,n),getMany:o=>up(o,n),del:o=>dp(o,n),delMany:o=>hp(o,n),clear:()=>fp(n),keys:()=>pp(n)}}const wv={drafts:Ii("drafts-db","drafts-store"),catchup:Ii("catchup-db","catchup-store")};async function Ev(t,e={}){if(!(t!=null&&t.length))return;const{masto:n}=so(),o=Er(),i=t.reduce((a,s)=>(!a.includes(s.id)&&!e[s.id]&&s.id!==o&&a.push(s.id),a),[]);if(!i.length)return null;try{return(await n.v1.accounts.relationships.fetch({id:i})).reduce((c,l)=>(c[l.id]=l,c),{})}catch{return null}}class Ht extends HTMLElement{constructor(){super(),this.isIframeLoaded=!1,this.setupDom()}static get observedAttributes(){return["videoid","playlistid","videoplay","videotitle"]}connectedCallback(){this.addEventListener("pointerover",()=>Ht.warmConnections(this),{once:!0}),this.addEventListener("click",()=>this.addIframe())}get videoId(){return encodeURIComponent(this.getAttribute("videoid")||"")}set videoId(e){this.setAttribute("videoid",e)}get playlistId(){return encodeURIComponent(this.getAttribute("playlistid")||"")}set playlistId(e){this.setAttribute("playlistid",e)}get videoTitle(){return this.getAttribute("videotitle")||"Video"}set videoTitle(e){this.setAttribute("videotitle",e)}get videoPlay(){return this.getAttribute("videoplay")||"Play"}set videoPlay(e){this.setAttribute("videoplay",e)}get videoStartAt(){return this.getAttribute("videoStartAt")||"0"}get autoLoad(){return this.hasAttribute("autoload")}get autoPause(){return this.hasAttribute("autopause")}get noCookie(){return this.hasAttribute("nocookie")}get posterQuality(){return this.getAttribute("posterquality")||"hqdefault"}get posterLoading(){return this.getAttribute("posterloading")||"lazy"}get params(){return`start=${this.videoStartAt}&${this.getAttribute("params")}`}set params(e){this.setAttribute("params",e)}set posterQuality(e){this.setAttribute("posterquality",e)}get disableNoscript(){return this.hasAttribute("disablenoscript")}setupDom(){const e=this.attachShadow({mode:"open"});let n="";window.liteYouTubeNonce&&(n=`nonce="${window.liteYouTubeNonce}"`),e.innerHTML=`
`,this.domRefFrame=e.querySelector("#frame"),this.domRefImg={fallback:e.querySelector("#fallbackPlaceholder"),webp:e.querySelector("#webpPlaceholder"),jpeg:e.querySelector("#jpegPlaceholder")},this.domRefPlayButton=e.querySelector("#playButton")}setupComponent(){this.shadowRoot.querySelector("slot[name=image]").assignedNodes().length===0&&this.initImagePlaceholder(),this.domRefPlayButton.setAttribute("aria-label",`${this.videoPlay}: ${this.videoTitle}`),this.setAttribute("title",`${this.videoPlay}: ${this.videoTitle}`),(this.autoLoad||this.isYouTubeShort()||this.autoPause)&&this.initIntersectionObserver(),this.disableNoscript||this.injectSearchNoScript()}attributeChangedCallback(e,n,o){n!==o&&(this.setupComponent(),this.domRefFrame.classList.contains("activated")&&(this.domRefFrame.classList.remove("activated"),this.shadowRoot.querySelector("iframe").remove(),this.isIframeLoaded=!1))}injectSearchNoScript(){const e=document.createElement("noscript");this.prepend(e),e.innerHTML=this.generateIframe()}generateIframe(e=!1){let n=e?0:1;const o=this.noCookie?"-nocookie":"";let i;return this.playlistId?i=`?listType=playlist&list=${this.playlistId}&`:i=`${this.videoId}?`,this.autoPause&&(this.params="enablejsapi=1"),this.isYouTubeShort()&&(this.params=`loop=1&mute=1&modestbranding=1&playsinline=1&rel=0&enablejsapi=1&playlist=${this.videoId}`,n=1),`
`}addIframe(e=!1){if(!this.isIframeLoaded){const n=this.generateIframe(e);this.domRefFrame.insertAdjacentHTML("beforeend",n),this.domRefFrame.classList.add("activated"),this.isIframeLoaded=!0,this.attemptShortAutoPlay(),this.dispatchEvent(new CustomEvent("liteYoutubeIframeLoaded",{detail:{videoId:this.videoId},bubbles:!0,cancelable:!0}))}}initImagePlaceholder(){var e,n;this.testPosterImage(),this.domRefImg.fallback.setAttribute("aria-label",`${this.videoPlay}: ${this.videoTitle}`),(n=(e=this.domRefImg)==null?void 0:e.fallback)==null||n.setAttribute("alt",`${this.videoPlay}: ${this.videoTitle}`)}async testPosterImage(){setTimeout(()=>{const e=`https://i.ytimg.com/vi_webp/${this.videoId}/${this.posterQuality}.webp`,n=new Image;n.fetchPriority="low",n.referrerPolicy="origin",n.src=e,n.onload=async o=>{const i=o.target;(i==null?void 0:i.naturalHeight)==90&&(i==null?void 0:i.naturalWidth)==120&&(this.posterQuality="hqdefault");const s=`https://i.ytimg.com/vi_webp/${this.videoId}/${this.posterQuality}.webp`;this.domRefImg.webp.srcset=s;const c=`https://i.ytimg.com/vi/${this.videoId}/${this.posterQuality}.jpg`;this.domRefImg.fallback.loading=this.posterLoading,this.domRefImg.jpeg.srcset=c,this.domRefImg.fallback.src=c,this.domRefImg.fallback.loading=this.posterLoading}},100)}initIntersectionObserver(){const e={root:null,rootMargin:"0px",threshold:0};new IntersectionObserver((o,i)=>{o.forEach(a=>{a.isIntersecting&&!this.isIframeLoaded&&(Ht.warmConnections(this),this.addIframe(!0),i.unobserve(this))})},e).observe(this),this.autoPause&&new IntersectionObserver((i,a)=>{i.forEach(s=>{var c,l;s.intersectionRatio!==1&&((l=(c=this.shadowRoot.querySelector("iframe"))==null?void 0:c.contentWindow)==null||l.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*"))})},{threshold:1}).observe(this)}attemptShortAutoPlay(){this.isYouTubeShort()&&setTimeout(()=>{var e,n;(n=(e=this.shadowRoot.querySelector("iframe"))==null?void 0:e.contentWindow)==null||n.postMessage('{"event":"command","func":"playVideo","args":""}',"*")},2e3)}isYouTubeShort(){return this.getAttribute("short")===""&&window.matchMedia("(max-width: 40em)").matches}static addPrefetch(e,n){const o=document.createElement("link");o.rel=e,o.href=n,o.crossOrigin="true",document.head.append(o)}static warmConnections(e){Ht.isPreconnected||window.liteYouTubeIsPreconnected||(Ht.addPrefetch("preconnect","https://i.ytimg.com/"),Ht.addPrefetch("preconnect","https://s.ytimg.com"),e.noCookie?Ht.addPrefetch("preconnect","https://www.youtube-nocookie.com"):(Ht.addPrefetch("preconnect","https://www.youtube.com"),Ht.addPrefetch("preconnect","https://www.google.com"),Ht.addPrefetch("preconnect","https://googleads.g.doubleclick.net"),Ht.addPrefetch("preconnect","https://static.doubleclick.net")),Ht.isPreconnected=!0,window.liteYouTubeIsPreconnected=!0)}}Ht.isPreconnected=!1;customElements.define("lite-youtube",Ht);const qs=new Uint8Array(128);for(let t=0;t<83;t++)qs["0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~".charCodeAt(t)]=t;const oo=(t,e,n)=>{let o=0;for(;et>10.31475?Gs(t/Xs+.052132,2.4):t/Ys,Ko=t=>~~(t>1227e-8?Xs*Gs(t,.416666)-13.025:t*Ys+1),yn=t=>(t<0?-1:1)*t*t,Di=t=>{for(t+=Sn/2;t>Sn;)t-=gp;const e=1.27323954*t-.405284735*yn(t);return .225*(yn(e)-e)+e};function Mr(t){const e=oo(t,2,6);return[e>>16,e>>8&255,e&255]}function _p(t,e,n,o){const i=oo(t,0,1),a=i%9+1,s=~~(i/9)+1,c=a*s;let l=0,d=0,h=0,u=0,f=0,m=0,p=0,g=0,w=0,E=0,v=0,T=0;const S=(oo(t,1,2)+1)/13446*(o|1),_=new Float64Array(c*3),y=Mr(t);for(l=0;l<3;l++)_[l]=vp(y[l]);for(l=1;l{const o=n.char||" ",i=n.count||2;let a=0;const s=[];return e.reverse().reduce((c,l)=>{s.length&&a&&s[a]&&s[a]===l.substring(1,s[a].length+1)&&(s.splice(a,1),a--);const h=[`${o.repeat(a?a*i:0)}${l}`,...c];return l.substring(0,2)===""&&(a++,s[a]=l.substring(2,l.length-1)),h},[]).join(`
`)}),jo}var Wo,Ri;function bp(){if(Ri)return Wo;Ri=1;const t=n=>n.trim().replace(/(^(\s|\t)+|(( |\t)+)$)/gm,"");return Wo={mergeAttributesWithElements:n=>{const o=t(n).split(`
`),i=[];let a="";for(let s=0;s")){i.push(`${a}${c.slice(0,-2)} />`),a="";continue}if(c.endsWith(">")){i.push(`${a}${c.startsWith(">")||c.startsWith("<")?"":" "}${c}`),a="";continue}a+=a.length?` ${c}`:c}return i},removeEmptyLines:t},Wo}var Zo,Pi;function wp(){if(Pi)return Zo;Pi=1;const t=yp(),{mergeAttributesWithElements:e}=bp();return Zo=(o,i={})=>{const a=e(o);return t(a,i)},Zo}var Ep=wp();const Tp=wr(Ep);function Ap({poll:t,lang:e,readOnly:n,refresh:o=()=>{},votePoll:i=()=>{}}){const{_:a}=re(),[s,c]=j("default"),{expired:l,expiresAt:d,id:h,multiple:u,options:f,ownVotes:m,voted:p,votersCount:g,votesCount:w=0,emojis:E}=t,v=!!d&&new Date(d),T=u?g:w;let S=0;T<=1e3?S=0:T<=1e4?S=1:T<=1e5&&(S=2);const[_,y]=j(!1),k=f.every(A=>A.votesCount!==null);return r("div",{lang:e,dir:"auto",class:`poll ${n?"read-only":""} ${s==="loading"?"loading":""}`,children:[_&&k||p||l?r(F,{children:[r("div",{class:"poll-options",children:f.map((A,D)=>{const{title:P,votesCount:L}=A,I=T?L/T:0,$=I?I.toLocaleString(Dt.locale||void 0,{style:"percent",maximumFractionDigits:S}):"0%",z=L>0&&L===Math.max(...f.map(W=>W.votesCount));return r("div",{class:`poll-option poll-result ${z?"poll-option-leading":""}`,style:{"--percentage":`${I*100}%`},children:[r("div",{class:"poll-option-title",children:[r("span",{children:r(Ye,{text:P,emojis:E})}),p&&m.includes(D)&&r(F,{children:[" ",r(M,{icon:"check-circle",alt:a({id:"IeO7us"})})]})]}),r("div",{class:"poll-option-votes",title:Dt._({id:"+syLpm",values:{optionVotesCount:L}}),children:$})]},`${D}-${P}-${L}`)})}),!l&&!p&&r("button",{class:"poll-vote-button plain2",disabled:s==="loading",onClick:A=>{A.preventDefault(),y(!1)},children:[r(M,{icon:"arrow-left",size:"s"})," ",r(R,{id:"L96xSt"})]})]}):r("form",{onSubmit:async A=>{A.preventDefault();const D=A.target,P=new FormData(D),L=[];P.forEach((I,$)=>{$==="poll"&&L.push(I)}),L.length&&(c("loading"),await i(L),c("default"))},children:[r("div",{class:"poll-options",children:f.map((A,D)=>{const{title:P}=A;return r("div",{class:"poll-option",children:r("label",{class:"poll-label",children:[r("input",{type:u?"checkbox":"radio",name:"poll",value:D,disabled:s==="loading",readOnly:n}),r("span",{class:"poll-option-title",children:r(Ye,{text:P,emojis:E})})]})})})}),!n&&r("button",{class:"poll-vote-button",type:"submit",disabled:s==="loading",children:r(R,{id:"lQXQKs"})})]}),r("p",{class:"poll-meta",children:[!l&&!n&&r("button",{type:"button",class:"plain small",disabled:s==="loading",onClick:A=>{A.preventDefault(),c("loading"),(async()=>(await o(),c("default")))()},title:a({id:"lCF0wC"}),children:r(M,{icon:"refresh",alt:a({id:"lCF0wC"})})}),!p&&!l&&!n&&k&&r("button",{type:"button",class:"plain small",disabled:s==="loading",onClick:A=>{A.preventDefault(),y(!_)},title:a(_?{id:"L96xSt"}:{id:"zCjei3"}),children:[r(M,{icon:_?"eye-open":"eye-close",alt:a(_?{id:"L96xSt"}:{id:"zCjei3"})})," "]}),!l&&!n&&" ",r(R,{id:"k7v0Rh",values:{0:ae(w),1:ae(w),votesCount:w},components:{0:r("span",{title:w}),1:r("span",{title:w})}}),!!g&&g!==w&&r(F,{children:[" ","•"," ",r(R,{id:"jf1i1L",values:{0:ae(g),1:ae(g),votersCount:g},components:{0:r("span",{title:g}),1:r("span",{title:g})}})]})," ","•"," ",l?v?r(R,{id:"5LwCCI",components:{0:r(le,{datetime:v})}}):a({id:"237hSL"}):v?r(R,{id:"ooHDPY",components:{0:r(le,{datetime:v})}}):a({id:"O2tNG0"})]})]})}const Qs=he();function kp(t,e){if(!(t!=null&&t.length))return!1;const n=t.filter(s=>{const{filter:c}=s,l=c.context.includes(e);return l?c.expiresAt?new Date(c.expiresAt)>new Date:l:!1});if(!n.length)return!1;if(n.some(s=>s.filter.filterAction==="hide"))return{action:"hide"};if(n.every(s=>s.filter.filterAction==="blur")){const s=n.map(c=>c.filter.title);return{action:"blur",titles:s,titlesStr:s.join(" • ")}}if(n.some(s=>!!s.filter.filterAction)){const s=n.map(c=>c.filter.title);return{action:"warn",titles:s,titlesStr:s.join(" • ")}}return!1}const Rr=Lt(kp);function Cp(t,e,n){var s;const{filtered:o}=t;if(!(o!=null&&o.length)||n&&((s=t.account)==null?void 0:s.id)===n)return!0;const a=Rr(o,e);return a?a.action!=="hide":!0}function Tv(t,e){if(!(t!=null&&t.length))return[];if(!e)return t;const n=Er();return t.filter(o=>Cp(o,e,n))}function Oi(t){try{return Bs.toUnicode(URL.parse(t).hostname.replace(/^www\./,"").replace(/\/$/,""))}catch{return""}}const qo=document.createElement("div");function Go(t){return t?(qo.innerHTML=t,qo.querySelectorAll(".invisible").forEach(e=>{e.remove()}),qo.innerText.length):0}const hr="speechSynthesis"in window;function Sp(t,e){if(hr)try{speechSynthesis.speaking&&speechSynthesis.cancel();const n=new SpeechSynthesisUtterance(t);e&&(n.lang=e),speechSynthesis.speak(n)}catch(n){alert(n)}}function xp(t,e,n){var o=this,i=O(null),a=O(0),s=O(null),c=O([]),l=O(),d=O(),h=O(t),u=O(!0);h.current=t;var f=typeof window<"u",m=!e&&e!==0&&f;if(typeof t!="function")throw new TypeError("Expected a function");e=+e||0;var p=!!(n=n||{}).leading,g=!("trailing"in n)||!!n.trailing,w="maxWait"in n,E="debounceOnServer"in n&&!!n.debounceOnServer,v=w?Math.max(+n.maxWait||0,e):null;et(function(){return u.current=!0,function(){u.current=!1}},[]);var T=it(function(){var S=function(P){var L=c.current,I=l.current;return c.current=l.current=null,a.current=P,d.current=h.current.apply(I,L)},_=function(P,L){m&&cancelAnimationFrame(s.current),s.current=m?requestAnimationFrame(P):setTimeout(P,L)},y=function(P){if(!u.current)return!1;var L=P-i.current;return!i.current||L>=e||L<0||w&&P-a.current>=v},k=function(P){return s.current=null,g&&c.current?S(P):(c.current=l.current=null,d.current)},A=function P(){var L=Date.now();if(y(L))return k(L);if(u.current){var I=e-(L-i.current),$=w?Math.min(I,v-(L-a.current)):I;_(P,$)}},D=function(){if(f||E){var P=Date.now(),L=y(P);if(c.current=[].slice.call(arguments),l.current=o,i.current=P,L){if(!s.current&&u.current)return a.current=i.current,_(A,e),p?S(i.current):d.current;if(w)return _(A,e),S(i.current)}return s.current||_(A,e),d.current}};return D.cancel=function(){s.current&&(m?cancelAnimationFrame(s.current):clearTimeout(s.current)),a.current=0,c.current=i.current=l.current=s.current=null},D.isPending=function(){return!!s.current},D.flush=function(){return s.current?k(Date.now()):d.current},D},[p,w,e,v,g,m,f,E]);return T}function Lp(t,e,n){var o=n===void 0?{}:n,i=o.leading,a=o.trailing;return xp(t,e,{maxWait:e,leading:i===void 0||i,trailing:a===void 0||a})}function Ip(t,e){var n=O(null),o=O(null);o.current=e;var i=O(null);et(function(){a()});var a=xt(function(){var s=i.current,c=o.current,l=s||(c?c instanceof Element?c:c.current:null);n.current&&n.current.element===l&&n.current.subscriber===t||(n.current&&n.current.cleanup&&n.current.cleanup(),n.current={element:l,subscriber:t,cleanup:l?t(l):void 0})},[t]);return et(function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}},[]),xt(function(s){i.current=s,a()},[a])}function $i(t,e,n){return t[e]?t[e][0]?t[e][0][n]:t[e][n]:e==="contentBoxSize"?t.contentRect[n==="inlineSize"?"width":"height"]:void 0}function Dp(t){t===void 0&&(t={});var e=t.onResize,n=O(void 0);n.current=e;var o=t.round||Math.round,i=O(),a=j({width:void 0,height:void 0}),s=a[0],c=a[1],l=O(!1);et(function(){return l.current=!1,function(){l.current=!0}},[]);var d=O({width:void 0,height:void 0}),h=Ip(xt(function(u){return(!i.current||i.current.box!==t.box||i.current.round!==o)&&(i.current={box:t.box,round:o,instance:new ResizeObserver(function(f){var m=f[0],p=t.box==="border-box"?"borderBoxSize":t.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",g=$i(m,p,"inlineSize"),w=$i(m,p,"blockSize"),E=g?o(g):void 0,v=w?o(w):void 0;if(d.current.width!==E||d.current.height!==v){var T={width:E,height:v};d.current.width=E,d.current.height=v,n.current?n.current(T):l.current||c(T)}})}),i.current.instance.observe(u,{box:t.box}),function(){i.current&&i.current.instance.unobserve(u)}},[t.box,o]),t.ref);return it(function(){return{ref:h,width:s.width,height:s.height}},[h,s.width,s.height])}function ro({className:t="truncated"}={}){const e=O(),n=Lp(({height:o})=>{if(e.current){const{scrollHeight:i}=e.current;let a=i>o;if(a){const{height:s,maxHeight:c}=getComputedStyle(e.current),l=parseInt(c||s,10);a=i>l}e.current.classList.toggle(t,a)}},300);return Dp({ref:e,box:"border-box",onResize:n}),e}const bn={public:"earth",unlisted:"group",private:"lock",direct:"message",local:"building"};var Js="kvfysmfp",ta="ufhsfnkm",Mp=".".concat(Js,"{overflow:hidden;touch-action:none}.").concat(ta,"{transform-origin: 0 0}"),Rp=typeof window>"u",Pp=function(){return!Rp&&("ontouchstart"in window||navigator.maxTouchPoints>0)};var Op=function(t){var e=t.x,n=t.y,o=t.scale;return"scale3d(".concat(o,",").concat(o,", 1) translate3d(").concat(e,"px, ").concat(n,"px, 0)")};var $p=Math.min,Fp=Math.max;function Fi(t){var e=t.containerDimension,n=t.childDimension,o=t.padding,i=t.centerContained,a=n-e;return a+2*o<=0&&i?[a/2,a/2]:[$p(a+o,0)-o,Fp(0,a+o)]}var Ni=function(t,e){return e?"".concat(t," ").concat(e):t},Xn=Math.abs,Np=Math.min,zp=Math.sqrt,ea=typeof window>"u",Bp=ea?!1:/(Mac)/i.test(navigator.platform),ze=function(t){return t==="drag"},hn=function(t){return t==="zoom"},Vp=function(t){return Bp&&t.ctrlKey},fn=function(t){t.stopPropagation(),t.preventDefault()},zi=function(t,e){var n=t.x-e.x,o=t.y-e.y;return zp(n*n+o*o)},Hp=function(t,e){var n=zi(t[0],t[1]),o=zi(e[0],e[1]);return o/n},Up=function(t,e){return t>e-.01&&te?e:n},Zp=function(t){return!(t.ctrlKey||t.metaKey)},qp=function(t){if(t){var e=t.offsetWidth,n=t.offsetHeight;if(e&&n)return{width:e,height:n};var o=getComputedStyle(t),i=parseFloat(o.width),a=parseFloat(o.height);if(a&&i)return{width:i,height:a}}return{width:0,height:0}},Gp=function(t,e){return{x:e.x-t.x,y:e.y-t.y}},Yp=function(t,e){return t.x===e.x&&t.y===e.y},Se=function(){},Jn={x:0,y:0},Vi=function(t){Va(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n._prevDragMovePoint=null,n._containerObserver=null,n._fingers=0,n._firstMove=!0,n._initialOffset=$t({},Jn),n._interaction=null,n._isDoubleTap=!1,n._isOffsetsSet=!1,n._lastDragPosition=null,n._lastScale=1,n._lastTouchStart=0,n._lastZoomCenter=null,n._listenMouseMove=!1,n._nthZoom=0,n._offset=$t({},Jn),n._startOffset=$t({},Jn),n._startTouches=null,n._updatePlaned=!1,n._wheelTimeOut=null,n._zoomFactor=1,n._initialZoomFactor=1,n._draggingPoint=$t({},Jn),n._ignoreNextClick=!1,n._containerRef=Ha(),n._handleClick=function(o){n._ignoreNextClick&&(n._ignoreNextClick=!1,o.stopPropagation())},n._onResize=function(){var o;!((o=n._containerRef)===null||o===void 0)&&o.current&&(n._updateInitialZoomFactor(),n._setupOffsets(),n._update())},n._handlerOnTouchEnd=n._handlerIfEnable(function(o){n._fingers=o.touches.length,n.props.shouldCancelHandledTouchEndEvents&&(hn(n._interaction)||ze(n._interaction)&&(n._startOffset.x!==n._offset.x||n._startOffset.y!==n._offset.y))&&fn(o),ze(n._interaction)&&!n._enoughToDrag()&&n._handleClick(o),n._updateInteraction(o)}),n._handlerOnTouchStart=n._handlerIfEnable(function(o){n._firstMove=!0,n._fingers=o.touches.length,n._detectDoubleTap(o)}),n._handlerOnTouchMove=n._handlerIfEnable(function(o){n._isDoubleTap||(n._collectInertia(o),n._firstMove?(n._updateInteraction(o),n._interaction&&fn(o),n._startOffset=$t({},n._offset),n._startTouches=Qn(o.touches)):(hn(n._interaction)?n._startTouches&&n._startTouches.length===2&&o.touches.length===2&&n._handleZoom(o,Hp(n._startTouches,Qn(o.touches))):ze(n._interaction)&&n._handleDrag(o),n._interaction&&(fn(o),n._update())),n._firstMove=!1)}),n._handlerWheel=function(o){if(!n.props.shouldInterceptWheel(o)){fn(o);var i=o.pageX,a=o.pageY,s=o.deltaY,c=o.deltaMode,l=1;(Vp(o)||c===1)&&(l=15);var d={touches:[{pageX:i,pageY:a}]},h=n._getOffsetByFirstTouch(d),u=s*l;n._stopAnimation(),n._scaleTo(n._zoomFactor-u/n.props.wheelScaleFactor,h),n._update(),clearTimeout(n._wheelTimeOut),n._wheelTimeOut=setTimeout(function(){return n._sanitize()},100)}},n._handlers=n.props.isTouch()?[["touchstart",n._handlerOnTouchStart],["touchend",n._handlerOnTouchEnd],["touchmove",n._handlerOnTouchMove]]:[["mousemove",n.simulate(n._handlerOnTouchMove),n.props._document],["mouseup",n.simulate(n._handlerOnTouchEnd),n.props._document],["mousedown",n.simulate(n._handlerOnTouchStart)],["click",n._handleClick],["wheel",n._handlerWheel]],n}return e.prototype._handleDragStart=function(n){this._ignoreNextClick=!0,this.props.onDragStart(),this._stopAnimation(),this._resetInertia(),this._lastDragPosition=null,this._hasInteraction=!0,this._draggingPoint=this._offset,this._handleDrag(n)},e.prototype._handleDrag=function(n){var o=this._getOffsetByFirstTouch(n);this._enoughToDrag()?this._drag(o,this._lastDragPosition):this._virtualDrag(o,this._lastDragPosition),this._offset=this._sanitizeOffset(this._offset),this._lastDragPosition=o},e.prototype._resetInertia=function(){this._velocity=null,this._prevDragMovePoint=null},e.prototype._realizeInertia=function(){var n=this,o=this.props,i=o.inertiaFriction,a=o.inertia;if(!(!a||!this._velocity)){var s=this._velocity,c=s.x,l=s.y;if(c||l){this._stopAnimation(),this._resetInertia();var d=function(){if(c*=i,l*=i,!c&&!l)return n._stopAnimation();var h=$t({},n._offset);if(n._addOffset({x:c,y:l}),n._offset=n._sanitizeOffset(n._offset),Yp(h,n._offset))return n._stopAnimation();n._update({isAnimation:!0})};this._animate(d,{duration:9999})}}},e.prototype._collectInertia=function(n){var o=n.touches;if(this.props.inertia){var i=Qn(o)[0],a=this._prevDragMovePoint;a&&(this._velocity=Gp(i,a)),this._prevDragMovePoint=i}},e.prototype._handleDragEnd=function(){this.props.onDragEnd(),this._end(),this._realizeInertia()},e.prototype._handleZoomStart=function(){this.props.onZoomStart(),this._stopAnimation(),this._lastScale=1,this._nthZoom=0,this._lastZoomCenter=null,this._hasInteraction=!0},e.prototype._handleZoom=function(n,o){var i=Wp(this._getOffsetTouches(n)),a=o/this._lastScale;this._lastScale=o,this._nthZoom+=1,this._nthZoom>3&&(this._scale(a,i),this._drag(i,this._lastZoomCenter),this.props.enforceBoundsDuringZoom&&(this._offset=this._sanitizeOffset(this._offset))),this._lastZoomCenter=i},e.prototype._handleZoomEnd=function(){this.props.onZoomEnd(),this._end()},e.prototype._handleDoubleTap=function(n){var o=this;if(!(this._hasInteraction||this.props.tapZoomFactor===0)){var i=this.props.doubleTapZoomOutOnMaxScale&&this._zoomFactor===this.props.maxZoom||this.props.doubleTapToggleZoom&&this._zoomFactor>1;this.props.onDoubleTap(),this._ignoreNextClick=!0;var a=this._zoomFactor+this.props.tapZoomFactor,s=this._zoomFactor,c=function(d){o._scaleTo(s+d*(a-s),l)},l=this._getOffsetByFirstTouch(n);this._isDoubleTap=!0,s>a&&(l=this._getCurrentZoomCenter()),i?this._zoomOutAnimation():this._animate(c)}},e.prototype._computeInitialOffset=function(){var n=this._getContainerRect(),o=this._getChildSize(),i=o.width,a=o.height,s=-Xn(i*this._getInitialZoomFactor()-n.width)/2,c=-Xn(a*this._getInitialZoomFactor()-n.height)/2;this._initialOffset={x:s,y:c}},e.prototype._resetOffset=function(){this._offset=$t({},this._initialOffset)},e.prototype._setupOffsets=function(){this.props.setOffsetsOnce&&this._isOffsetsSet||(this._isOffsetsSet=!0,this._computeInitialOffset(),this._resetOffset())},e.prototype._sanitizeOffset=function(n){var o=this._getContainerRect(),i=this._getChildSize(),a=i.width,s=i.height,c=a*this._getInitialZoomFactor()*this._zoomFactor,l=s*this._getInitialZoomFactor()*this._zoomFactor,d=Fi({containerDimension:o.width,childDimension:c,padding:this.props.horizontalPadding,centerContained:this.props.centerContained}),h=d[0],u=d[1],f=Fi({containerDimension:o.height,childDimension:l,padding:this.props.verticalPadding,centerContained:this.props.centerContained}),m=f[0],p=f[1];return{x:Yo(h,u,n.x),y:Yo(m,p,n.y)}},e.prototype.alignCenter=function(n){var o=this,i=$t({duration:250,animated:!0},n),a=i.x,s=i.y,c=i.scale,l=i.animated,d=i.duration,h=a*this._initialZoomFactor,u=s*this._initialZoomFactor,f=this._zoomFactor,m=$t({},this._offset),p=this._getContainerRect(),g={x:p.width/2,y:p.height/2};if(this._zoomFactor=1,this._offset={x:-(g.x-h),y:-(g.y-u)},this._scaleTo(c,g),this._stopAnimation(),!l)return this._update();var w=this._zoomFactor-f,E={x:this._offset.x-m.x,y:this._offset.y-m.y};this._zoomFactor=f,this._offset=$t({},m);var v=function(T){var S=m.x+E.x*T,_=m.y+E.y*T;o._zoomFactor=f+w*T,o._offset=o._sanitizeOffset({x:S,y:_}),o._update()};this._animate(v,{callback:function(){return o._sanitize()},duration:d})},e.prototype.scaleTo=function(n){var o=this,i=$t({duration:250,animated:!0},n),a=i.x,s=i.y,c=i.scale,l=i.animated,d=i.duration,h=this._zoomFactor,u=$t({},this._offset);if(this._zoomFactor=1,this._offset={x:0,y:0},this._scaleTo(c,{x:a,y:s}),this._stopAnimation(),!l)return this._update();var f=this._zoomFactor-h,m={x:this._offset.x-u.x,y:this._offset.y-u.y};this._zoomFactor=h,this._offset=$t({},u);var p=function(g){var w=u.x+m.x*g,E=u.y+m.y*g;o._zoomFactor=h+f*g,o._offset={x:w,y:E},o._update()};this._animate(p,{callback:function(){return o._sanitize()},duration:d})},e.prototype._scaleTo=function(n,o){this._scale(n/this._zoomFactor,o),this._offset=this._sanitizeOffset(this._offset)},e.prototype._scale=function(n,o){n=this._scaleZoomFactor(n),this._addOffset({x:(n-1)*(o.x+this._offset.x),y:(n-1)*(o.y+this._offset.y)}),this.props.onZoomUpdate()},e.prototype._scaleZoomFactor=function(n){var o=this._zoomFactor;return this._zoomFactor*=n,this._zoomFactor=Yo(this.props.minZoom,this.props.maxZoom,this._zoomFactor),this._zoomFactor/o},e.prototype._canDrag=function(){return this.props.draggableUnZoomed||!Up(this._zoomFactor,1)},e.prototype._drag=function(n,o){if(o){var i=-(n.y-o.y),a=-(n.x-o.x);this.props.lockDragAxis?Xn(a)>Xn(i)?this._addOffset({x:a,y:0}):this._addOffset({y:i,x:0}):this._addOffset({x:a,y:i}),this.props.onDragUpdate()}},e.prototype._virtualDrag=function(n,o){if(o){var i=-(n.y-o.y),a=-(n.x-o.x);this._draggingPoint={x:a+this._draggingPoint.x,y:i+this._draggingPoint.y}}},e.prototype._addOffset=function(n){var o=this._offset,i=o.x,a=o.y;this._offset={x:i+n.x,y:a+n.y}},e.prototype._sanitize=function(){this._zoomFactor=d?(n(1),i._stopAnimation(),l(),i._update()):(f=c(f),n(f),i._update({isAnimation:!0}),requestAnimationFrame(h))}};this._inAnimation=!0,requestAnimationFrame(h)},e.prototype._stopAnimation=function(){this._inAnimation=!1},e.prototype._end=function(){this._hasInteraction=!1,this._sanitize(),this._update()},e.prototype._getContainerRect=function(){var n=this._containerRef.current;return n.getBoundingClientRect()},e.prototype._getChildSize=function(){var n=this._containerRef.current;return qp(n==null?void 0:n.firstElementChild)},e.prototype._updateInitialZoomFactor=function(){var n=this._getContainerRect(),o=this._getChildSize(),i=n.width/o.width,a=n.height/o.height;this._initialZoomFactor=Np(i,a)},e.prototype._bindEvents=function(){var n=this,o=this._containerRef.current;window.ResizeObserver?(this._containerObserver=new ResizeObserver(this._onResize),this._containerObserver.observe(o)):window.addEventListener("resize",this._onResize),this._handlers.forEach(function(i){var a=i[0],s=i[1],c=i[2];(c||o).addEventListener(a,s,!0)}),Array.from(o.querySelectorAll("img")).forEach(function(i){return i.addEventListener("load",n._onResize)})},e.prototype._unSubscribe=function(){var n=this,o=this._containerRef.current;this._containerObserver&&(this._containerObserver.disconnect(),this._containerObserver=null),window.removeEventListener("resize",this._onResize),this._handlers.forEach(function(i){var a=i[0],s=i[1],c=i[2];(c||o).removeEventListener(a,s,!0)}),Array.from(o.querySelectorAll("img")).forEach(function(i){return i.removeEventListener("load",n._onResize)})},e.prototype._update=function(n){var o=this;if(!this._updatePlaned){var i=function(){var a=o._getInitialZoomFactor()*o._zoomFactor,s=-o._offset.x/a,c=-o._offset.y/a;o.props.onUpdate({scale:a,x:s,y:c})};if(n!=null&&n.isAnimation)return i();this._updatePlaned=!0,requestAnimationFrame(function(){o._updatePlaned=!1,i()})}},e.prototype._handlerIfEnable=function(n){var o=this;return function(){for(var i=[],a=0;ao?n-o:o-n},e.prototype._enoughToDrag=function(){return this._distanceBetweenNumbers(this._startOffset.x,this._draggingPoint.x)>5||this._distanceBetweenNumbers(this._startOffset.y,this._draggingPoint.y)>5},e.prototype._updateInteraction=function(n){var o=this._fingers;if(o===2)return this._setInteraction("zoom",n);if(o===1&&this._canDrag())return this._setInteraction("drag",n);this._setInteraction(null,n)},e.prototype._detectDoubleTap=function(n){var o=new Date().getTime();this._fingers>1&&(this._lastTouchStart=0),o-this._lastTouchStart<300?(fn(n),this._handleDoubleTap(n),hn(this._interaction)?this._handleZoomEnd():ze(this._interaction)&&this._handleDragEnd()):this._isDoubleTap=!1,this._fingers===1&&(this._lastTouchStart=o)},e.prototype.simulate=function(n){var o=this;return function(i){var a=i.pageX,s=i.pageY,c=i.type,l=c==="mouseup",d=c==="mousedown";d&&(i.preventDefault(),o._listenMouseMove=!0),o._listenMouseMove&&(i.touches=l?[]:[{pageX:a,pageY:s}],n(i)),l&&(o._listenMouseMove=!1)}},e.prototype.componentDidMount=function(){this._bindEvents(),this._update()},e.prototype.componentWillUnmount=function(){this._stopAnimation(),this._unSubscribe()},e.prototype.render=function(){var n=this.props,o=n.children,i=n.containerProps,a=Ua.only(o),s=i||{};return Un.createElement(Un.Fragment,null,Un.createElement("style",null,Mp),Un.createElement("div",$t({},s,{ref:this._containerRef,className:Ni(Js,s.className)}),es(a,{className:Ni(ta,a.props.className)})))},e.defaultProps={animationDuration:250,draggableUnZoomed:!0,enforceBoundsDuringZoom:!1,centerContained:!1,enabled:!0,inertia:!0,inertiaFriction:.96,horizontalPadding:0,isTouch:Pp,lockDragAxis:!1,maxZoom:5,minZoom:.5,onDoubleTap:Se,onDragEnd:Se,onDragStart:Se,onDragUpdate:Se,onZoomEnd:Se,onZoomStart:Se,onZoomUpdate:Se,setOffsetsOnce:!1,shouldInterceptWheel:Zp,shouldCancelHandledTouchEndEvents:!1,tapZoomFactor:1,verticalPadding:0,wheelScaleFactor:1500,zoomOutFactor:1.3,doubleTapZoomOutOnMaxScale:!1,doubleTapToggleZoom:!1,_document:ea?null:window.document},e}(rs);if(0)var Av,kv,Cv,Sv,xv,Lv,Iv;function Xo(t){if(!t)return;let e=Math.floor(t/3600),n=Math.floor(t%3600/60),o=Math.round(t%60);return e===0?`${n}:${o.toString().padStart(2,"0")}`:`${e}:${n.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`}const Xp=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Qp="ALT",Qo=t=>{const{_:e}=re(),{alt:n,lang:o,index:i,...a}=t;return!n||!n.trim()?null:r("button",{type:"button",class:"alt-badge clickable",...a,onClick:s=>{s.stopPropagation(),s.preventDefault(),U.showMediaAlt={alt:n,lang:o}},title:e({id:"5gfDMm"}),children:[Qp,!!i&&r("sup",{children:i})]})},Jp=140,tg=280,na=Lt(t=>t!=null&&t.length?t.length>Jp||/[\n\r].*[\n\r]/.test(t.trim()):!1);function eg({class:t="",media:e,to:n,lang:o,showOriginal:i,autoAnimate:a,showCaption:s,allowLongerCaption:c,altIndex:l,checkAspectRatio:d=!0,onClick:h=()=>{}}){let{blurhash:u,description:f,meta:m,previewRemoteUrl:p,previewUrl:g,remoteUrl:w,url:E,type:v}=e;/no\-preview\./i.test(g)&&(g=null);const{original:T={},small:S,focus:_}=m||{},y=i?T==null?void 0:T.width:(S==null?void 0:S.width)||(T==null?void 0:T.width),k=i?T==null?void 0:T.height:(S==null?void 0:S.height)||(T==null?void 0:T.height),A=i?E:g||E,D=i?w:p||w,P=y&&k,L=P?y>k?"landscape":"portrait":null,I=u?Mr(u):null,$=O();let z;if(_){const B=(_.x+1)/2*100,J=(1-_.y)/2*100;z=`${B.toFixed(0)}% ${J.toFixed(0)}%`}const W=O(),nt=xt(({x:B,y:J,scale:Z})=>{const{current:V}=W;if(V){const It=Op({x:B,y:J,scale:Z});Z===1?V.style.removeProperty("transform"):V.style.setProperty("transform",It),V.closest(".media-zoom").style.touchAction=Z<=1.01?"pan-x":""}},[]),[st,ot]=j(!1),ct={enabled:st,draggableUnZoomed:!1,inertiaFriction:.9,tapZoomFactor:2,doubleTapToggleZoom:!0,containerProps:{className:"media-zoom",style:{overflow:"visible"}},onUpdate:nt},[K,bt]=j(!1),lt=it(()=>n&&!K?B=>r(Ze,{to:n,...B}):"div",[n,K]),wt=D?Hi(D):null,N=v==="unknown"&&wt&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(wt.pathname),ft=v==="unknown"&&wt&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test(wt.pathname),ut=v==="image"||v==="unknown"&&g&&!N&&!ft,At=g&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(Hi(g).pathname),Et=O(),[zt,Mt]=j(!1);Ie(()=>{if(!ut||!i||!Et.current)return;const{offsetWidth:B,offsetHeight:J}=Et.current,Z=y{const{children:J,...Z}=B;return r("figure",{...Z,children:[J,r("figcaption",{class:"media-caption",lang:o,dir:"auto",onClick:V=>{V.preventDefault(),V.stopPropagation(),U.showMediaAlt={alt:f,lang:o}},children:f})]})}:F,[Pt,dt]=j(void 0);if(ut)return ct.containerProps.style.display="inherit",Ie(()=>{Xp&&i&&(async()=>{try{await fetch(A,{mode:"no-cors"}),W.current.src=A}catch{}})()},[A]),r(Gt,{children:[r(lt,{ref:Et,class:`media media-image ${t}`,onClick:h,"data-orientation":L,"data-has-alt":!kt||void 0,"data-has-natural-aspect-ratio":Pt||void 0,style:i?{backgroundImage:`url(${g})`,backgroundSize:zt?`${y}px ${k}px`:void 0,...X}:Q,children:i?r(Vi,{...ct,children:r("img",{ref:W,src:A,alt:f,width:y,height:k,"data-orientation":L,loading:"eager",decoding:"sync",onLoad:B=>{B.target.closest(".media-image").style.backgroundImage="",B.target.closest(".media-zoom").style.display="",ot(!0)},onError:B=>{const{src:J}=B.target;J===A&&D&&A!==D&&(B.target.src=D)}})}):r(F,{children:[r("img",{src:A,alt:kt?"":f,width:y,height:k,"data-orientation":L,loading:"lazy",style:{objectPosition:z||"center","--anim-duration":`${Math.min(Math.max(Math.max(y,k)/100,5),120)}s`},onLoad:B=>{B.target.dataset.loaded=!0;const J=B.target.closest(".media");if(!P&&J){const{naturalWidth:Z,naturalHeight:V}=B.target;J.dataset.orientation=Z>V?"landscape":"portrait",J.style.setProperty("--width",`${Z}px`),J.style.setProperty("--height",`${V}px`),J.style.aspectRatio=`${Z}/${V}`}if(d&&J){const{clientWidth:Z,clientHeight:V,naturalWidth:It,naturalHeight:G}=B.target;if(Z&&V&&It&&G)if(It<88||G<88)J.dataset.hasSmallDimension=!0;else{const we=G*Z/It;Math.abs(we-V)<5&&dt(!0)}}},onError:B=>{const{src:J}=B.target;J===A&&A!==D?B.target.src=D:bt(!0)}}),!kt&&r(Qo,{alt:f,lang:o,index:l})]})}),K&&r("div",{children:r("a",{href:w,class:"button plain6 small",target:"_blank",children:[r(M,{icon:"external"})," ",r("span",{children:r(R,{id:"9npOH9"})})]})})]});if(v==="gifv"||v==="video"||N){const B=T.duration>0,J=T.duration<31,Z=v==="gifv"&&J,V=T.duration<61,It=Xo(T.duration),G=!i&&!a&&Z,Kt=!i&&a&&Z,we=T.duration>5,vt=`
`,Qt=`
`;return r(Gt,{children:r(lt,{class:`media ${t} media-${Z?"gif":"video"} ${Kt?"media-contain":""} ${G?"media-hover-animate":""}`,"data-orientation":L,"data-formatted-duration":i?void 0:It,"data-label":Z&&!i&&!Kt?"GIF":void 0,"data-has-alt":!kt||void 0,style:!i&&Q,onClick:Ot=>{if(G)try{$.current.pause()}catch{}h(Ot)},onMouseEnter:()=>{if(G)try{$.current.play()}catch{}},onMouseLeave:()=>{if(G)try{$.current.pause()}catch{}},onFocus:()=>{if(G)try{$.current.play()}catch{}},onBlur:()=>{if(G)try{$.current.pause()}catch{}},children:[i||Kt?Z&&i?r(Vi,{...ct,enabled:!0,children:r("div",{ref:W,dangerouslySetInnerHTML:{__html:vt}})}):Z?r("div",{class:"video-container",dangerouslySetInnerHTML:{__html:vt}}):r("div",{class:"video-container",dangerouslySetInnerHTML:{__html:Qt}}):Z?r("video",{ref:$,src:E,poster:g,width:y,height:k,"data-orientation":L,preload:"auto",playsinline:!0,loop:!0,muted:!0,onTimeUpdate:we?Ot=>{const{target:pt}=Ot,Ct=pt==null?void 0:pt.closest(".media-gif");if(Ct){const jt=pt.currentTime/pt.duration*100;Ct.style.setProperty("--progress",`${jt}%`)}}:void 0}):r(F,{children:[g&&!At?r("img",{src:g,alt:kt?"":f,width:y,height:k,"data-orientation":L,loading:"lazy",decoding:"async",onLoad:Ot=>{if(!P){const pt=Ot.target.closest(".media");if(pt){const{naturalHeight:Ct,naturalWidth:jt}=Ot.target;pt.dataset.orientation=jt>Ct?"landscape":"portrait",pt.style.setProperty("--width",`${jt}px`),pt.style.setProperty("--height",`${Ct}px`),pt.style.aspectRatio=`${jt}/${Ct}`}}}}):r("video",{src:E+"#t=0.1",width:y,height:k,"data-orientation":L,preload:"metadata",muted:!0,disablePictureInPicture:!0,onLoadedMetadata:Ot=>{if(!B){const{duration:pt}=Ot.target;if(pt){const Ct=Xo(pt),jt=Ot.target.closest(".media-video");jt&&(jt.dataset.formattedDuration=Ct)}}}}),r("div",{class:"media-play",children:r(M,{icon:"play",size:"xl",alt:"▶"})})]}),!i&&!kt&&r(Qo,{alt:f,lang:o,index:l})]})})}else if(v==="audio"||ft){const B=Xo(T.duration);return r(Gt,{children:r(lt,{class:`media media-audio ${t}`,"data-formatted-duration":i?void 0:B,"data-has-alt":!kt||void 0,onClick:h,style:!i&&Q,children:[i?r("audio",{src:w||E,preload:"none",controls:!0,autoPlay:!0}):g?r("img",{src:g,alt:kt?"":f,width:y,height:k,"data-orientation":L,loading:"lazy",onError:J=>{var Z,V;try{(V=(Z=J.target)==null?void 0:Z.remove)==null||V.call(Z)}catch{}}}):null,!i&&r(F,{children:[r("div",{class:"media-play",children:r(M,{icon:"play",size:"xl",alt:"▶"})}),!kt&&r(Qo,{alt:f,lang:o,index:l})]})]})})}}function Hi(t){return URL.parse(t,location.origin)}const fr=Qe(eg,(t,e)=>{const n=t.media||{},o=e.media||{};return(n==null?void 0:n.id)===(o==null?void 0:o.id)&&n.url===o.url&&t.to===e.to&&t.class===e.class}),ng=280,og=140,rg=is({limit:1,interval:1e3});function ig(t,e){return e.v1.accounts.$select(t).fetch()}const sg=mo(rg(ig)),Le={public:{id:"7d1a0d"},local:{id:"d5zxa4"},unlisted:{id:"WDcQq9"},private:{id:"o34OrG"},direct:{id:"IV4QaU"}},ag=window.ontouchstart!==void 0&&/iPad|iPhone|iPod/.test(navigator.userAgent),cg=new Intl.RelativeTimeFormat,Ui=80;function lg(t){var e;return(e=t==null?void 0:t.options)!=null&&e.length?`📊:
${t.options.map(n=>`- ${n.title}${n.votesCount>=0?` (${n.votesCount})`:""}`).join(`
`)}`:""}function Jo(t,e){const{maskCustomEmojis:n}=e||{},{spoilerText:o,poll:i,emojis:a}=t;let{content:s}=t;if(n&&(a!=null&&a.length)){const c=new RegExp(`:(${a.map(l=>l.shortcode).join("|")}):`,"g");s=s.replace(c,"⬚")}return(o?`${o}
`:"")+vo(s)+lg(i)}function oa(t=[],e=document){for(const n of t)try{return e.querySelectorAll(n)}catch{}return[]}function ug(t,e){if(!t)return!1;if(e!=null&&e.length){const o=new RegExp(`:(${e.map(i=>i.shortcode).join("|")}):`,"g");t=t.replace(o,"")}return t=t.trim(),t?!!vo(t,{preProcess:o=>{for(const i of oa([".mention, pre, code, a:has(.invisible)",".mention, pre, code"],o))i.remove()}}):!1}function dg(t,e){if(e!=null&&e.length){const n=new RegExp(`:(${e.map(o=>o.shortcode).join("|")}):`,"g");t=t.replace(n,"")}return vo(t,{preProcess:n=>{for(const o of oa([".mention, .hashtag, pre, code, a:has(.invisible)",".mention, .hashtag, pre, code"],n))o.remove();for(const o of n.querySelectorAll("a")){const i=o.innerText.trim();(i.startsWith("https://")||i.startsWith("http://"))&&o.remove()}}})}const hg=/^http/i,Ki=({post:t,instance:e,previewMode:n})=>{const{content:o,emojis:i,language:a,mentions:s,url:c}=t,l=O();return Ie(()=>{if(!l.current)return;const d=Vs(o,{emojis:i,returnDOM:!0});for(const h of d.querySelectorAll('a.u-url[target="_blank"]'))hg.test(h.innerText.trim())||h.removeAttribute("target");l.current.replaceChildren(d.cloneNode(!0))},[o,i==null?void 0:i.length]),r("div",{ref:l,lang:a,dir:"auto",class:"inner-content",onClick:Pm({mentions:s,instance:e,previewMode:n,statusURL:c})})},fg={s:"small",m:"medium",l:"large"},mg=mo(async t=>{if(t=t==null?void 0:t.trim(),(t==null?void 0:t.length)>500)return null;if(je){const i=await je.detect(t);console.groupCollapsed("💬 DETECTLANG BROWSER",i.slice(0,3).map(s=>s.detectedLanguage)),console.groupEnd();const a=i[0];if(a!=null&&a.detectedLanguage&&(a==null?void 0:a.confidence)>.5)return a.detectedLanguage}const{detectAll:e}=await C(async()=>{const{detectAll:i}=await import("./tinyld-light-CT4H0yPw.js");return{detectAll:i}},[],import.meta.url),n=e(t);console.groupCollapsed("💬 DETECTLANG TINYLD",n.slice(0,3).map(i=>i.lang)),console.groupEnd();const o=n[0];return o!=null&&o.lang&&(o==null?void 0:o.accuracy)>.5?o.lang:null}),wn={id:"8fZueG"},mr={},ji=(t,e=[])=>{if(!t)return!1;const n=Ds(!0),o=t!==n&&!En([t],[n])&&!e.find(i=>t===i||En([t],[i]));return o&&(mr[t+e]=!0),o},ra=Lt(()=>Er(),{maxAge:60*1e3}),Wi=Lt(()=>os.account.get("preferences")||{},{maxAge:60*1e3});function Xe({statusID:t,status:e,instance:n,size:o="m",contentTextWeight:i,readOnly:a,enableCommentHint:s,withinContext:c,skeleton:l,enableTranslate:d,forceTranslate:h,previewMode:u,allowFilters:f,onMediaClick:m,quoted:p,onStatusLinkClick:g=()=>{},showFollowedTags:w,allowContextMenu:E,showActionsBar:v,showReplyParent:T,mediaFirst:S}){var ti,ei,ni,oi;const{_,_:y}=re();if(l)return r("div",{class:`status skeleton ${S?"status-media-first small":""}`,children:[!S&&r(ue,{size:"xxl"}),r("div",{class:"container",children:[r("div",{class:"meta",children:[(o==="s"||S)&&r(ue,{size:"m"})," ███ ████████"]}),r("div",{class:"content-container",children:[S&&r("div",{class:"media-first-container"}),r("div",{class:`content ${S?"media-first-content":""}`,children:r("p",{children:"████ ████████"})})]})]})]});const{masto:k,instance:A,authenticated:D}=so({instance:n}),{instance:P}=so(),L=A===P;let I=ce(t||(e==null?void 0:e.id),A);const $=xn(U);if(e||(e=$.statuses[I]||$.statuses[t],I=ce(e==null?void 0:e.id,A)),!e)return null;const{account:{acct:z,avatar:W,avatarStatic:nt,id:st,url:ot,displayName:ct,username:K,emojis:bt,bot:lt,group:wt}={},id:N,repliesCount:ft,reblogged:ut,reblogsCount:At,favourited:Et,favouritesCount:zt,bookmarked:Mt,poll:Rt,muted:Bt,sensitive:X,spoilerText:Q,visibility:mt,language:kt,editedAt:Gt,filtered:Pt,card:dt,createdAt:B,inReplyToId:J,inReplyToAccountId:Z,content:V,mentions:It,mediaAttachments:G,reblog:Kt,uri:we,url:vt,emojis:Qt,tags:Ot,pinned:pt,_deleted:Ct,_pinned:jt,emojiReactions:Me}=e,[Re,_o]=j(null);et(()=>{if(!V||kt||Re)return;let b;return b=setTimeout(async()=>{let x=await mg(dg(V,Qt));_o(x)},1e3),()=>clearTimeout(b)},[V,kt]);const _t=kt||Re,Pe=!!(G!=null&&G.length);S&&Pe&&(o="s");const Y=ra(),gt=it(()=>Y&&Y===st,[st,Y]),Wt=Nt(Qs),tt=!gt&&(!a&&!u||f)&&Rr(Pt,Wt);if((tt==null?void 0:tt.action)==="hide")return null;const ht=b=>{b.shiftKey};if((f||o!=="l")&&tt&&tt.action!=="blur")return r(Tg,{status:e,filterInfo:tt,instance:A,containerProps:{onMouseEnter:ht},showFollowedTags:!0,quoted:p});const Vt=new Date(B),In=new Date(Gt);let en=It==null?void 0:It.find(b=>b.id===Z);!en&&Z===N&&(en={url:ot,username:K,displayName:ct});const[ie,Dn]=j(en);if(!c&&!ie&&Z){const b=U.accounts[Z];b?Dn(b):sg(Z,k).then(x=>{Dn(x),U.accounts[x.id]=x}).catch(x=>{})}const Mn=Z===Y||(It==null?void 0:It.find(b=>b.id===Y)),Xt=it(()=>!!Wi()["reading:expand:spoilers"],[]),nn=it(()=>{var x;return((x=Wi()["reading:expand:media"])==null?void 0:x.toLowerCase())||"default"},[]),Yt=u||Xt||!!$.spoilers[N],Ee=u||nn==="show_all"&&(tt==null?void 0:tt.action)!=="blur"||!!$.spoilersMedia[N];if(Kt)return wt?r("div",{"data-state-post-id":I,class:"status-group",onMouseEnter:ht,children:[r("div",{class:"status-pre-meta",children:[r(M,{icon:"group",size:"l",alt:y({id:"L8fEEm"})})," ",r(_e,{account:e.account,instance:A,showAvatar:!0})]}),r(Xe,{status:t?null:Kt,statusID:t?Kt.id:null,instance:A,size:o,contentTextWeight:i,readOnly:a,mediaFirst:S})]}):r("div",{"data-state-post-id":I,class:"status-reblog",onMouseEnter:ht,children:[r("div",{class:"status-pre-meta",children:[r(M,{icon:"rocket",size:"l"})," ",r(R,{id:"DlhB4J",components:{0:r(_e,{account:e.account,instance:A,showAvatar:!0}),1:r("span",{})}})]}),r(Xe,{status:t?null:Kt,statusID:t?Kt.id:null,instance:A,size:o,contentTextWeight:i,readOnly:a,enableCommentHint:!0,mediaFirst:S})]});const Te=xt(({children:b})=>r("div",{"data-state-post-id":I,class:"status-followed-tags",onMouseEnter:ht,children:[r("div",{class:"status-pre-meta",children:[r(M,{icon:"hashtag",size:"l"})," ",$.statusFollowedTags[I].slice(0,3).map(x=>r(Ze,{to:A?`/${A}/t/${x}`:`/t/${x}`,class:"status-followed-tag-item",children:x},x))]}),b]}),[I,A,$.statusFollowedTags[I]]),on=w&&((ti=$.statusFollowedTags[I])!=null&&ti.length)?Te:F,rt=o==="l",[me,ga]=j(h),{contentTranslation:yo,contentTranslationAutoInline:Or}=$.settings;yo||(d=!1);const $r=it(()=>{if(!yo||!Or||a||c&&!rt||u||Q||X||Rt||dt||G!=null&&G.length)return!1;const b=Go(V);return b>0&&b<=og},[yo,Or,a,c,rt,u,Q,X,Rt,dt,G,V]),[bo,Rn]=j(!1),[va,wo]=j(!1),Fr=ro(),Nr=ro(),_a=ro(),Oe=O(null),Pn=y({id:"7jyUKe"}),zr=xt(()=>Math.max(Math.round((Q.length+Go(V))/140)||1,1),[Q,V]),Br=B&&kn(Vt),Vr=Gt&&kn(In);let rn=D&&mt!=="direct"&&mt!=="private";mt==="private"&>&&(rn=!0);const On=b=>{var x;if(!L||!D)return alert(Pn);(b!=null&&b.shiftKey||(x=b==null?void 0:b.syntheticEvent)!=null&&x.shiftKey)&&tl({replyToStatus:e})||jn({replyToStatus:e})},ya=it(()=>G.some(b=>{var x,q;return!((q=(x=b.description)==null?void 0:x.trim)!=null&&q.call(x))}),[G]),Hr=it(()=>Math.floor((new Date-Vt)/(1e3*60*60*24*30)),[Vt]),Eo=async()=>{if(!L||!D)return alert(Pn),!1;try{if(U.statuses[I]={...e,reblogged:!ut,reblogsCount:At+(ut?-1:1)},ut){const b=await k.v1.statuses.$select(N).unreblog();pe(b,A)}else{const b=await k.v1.statuses.$select(N).reblog();pe(b,A)}return!0}catch{return U.statuses[I]=e,!1}},Ur=async()=>{if(!L||!D)return alert(Pn),!1;try{if(U.statuses[I]={...e,favourited:!Et,favouritesCount:zt+(Et?-1:1)},Et){const b=await k.v1.statuses.$select(N).unfavourite();pe(b,A)}else{const b=await k.v1.statuses.$select(N).favourite();pe(b,A)}return!0}catch{return U.statuses[I]=e,!1}},To=async()=>{try{const b=await Ur();!rt&&b&&St(y(Et?{id:"sZvpIt",values:{0:K||z}}:{id:"yUngDO",values:{0:K||z}}))}catch{}},Kr=async()=>{if(qn("@mastodon/post-bookmark")){if(!L||!D)return alert(Pn),!1;try{if(U.statuses[I]={...e,bookmarked:!Mt},Mt){const b=await k.v1.statuses.$select(N).unbookmark();pe(b,A)}else{const b=await k.v1.statuses.$select(N).bookmark();pe(b,A)}return!0}catch{return U.statuses[I]=e,!1}}},jr=async()=>{try{const b=await Kr();!rt&&b&&St(y(Mt?{id:"lWQguj",values:{0:K||z}}:{id:"Fb2K8h",values:{0:K||z}}))}catch{}},sn=$.settings.contentTranslationHideLanguages||[],[Ae,Wr]=j(()=>mr[_t+sn]||ji(_t,sn));et(()=>{if(!_t||Ae)return;if(!Ae&&mr[_t+sn]){Wr(!0);return}let b=setTimeout(()=>{const x=ji(_t,sn);x&&Wr(x)},1);return()=>clearTimeout(b)},[_t,Ae,sn]);const Zr=O(),qr=O();async function ba(b){var at,Zt,$e,Ao;b&&(Zr.current=k.v1.statuses.$select(t).rebloggedBy.list({limit:Ui}),qr.current=k.v1.statuses.$select(t).favouritedBy.list({limit:Ui}));const[{value:x},{value:q}]=await Promise.allSettled([Zr.current.next(),qr.current.next()]);if((at=x.value)!=null&&at.length||(Zt=q.value)!=null&&Zt.length){const ke=[];return($e=x.value)!=null&&$e.length&&ke.push(...x.value.map(Ce=>(Ce._types=["reblog"],Ce))),(Ao=q.value)!=null&&Ao.length&&ke.push(...q.value.map(Ce=>(Ce._types=["favourite"],Ce))),{value:ke,done:x.done&&q.done}}return{value:[],done:!0}}const wa=O(),Gr=["public","unlisted"].includes(mt),Ea=["public","unlisted","private"].includes(mt),Yr=ya&&!ut?r("div",{class:"footer",children:[r(M,{icon:"alert"}),r(R,{id:"MB+wJL"})]}):Hr>=3&&r("div",{class:"footer",children:[r(M,{icon:"info"}),r("span",{children:r(R,{id:"dBme/4",values:{0:cg.format(-Hr,"month")},components:{0:r("strong",{})}})})]}),Xr=r(F,{children:[!rt&&L&&r(F,{children:r("div",{class:"menu-control-group-horizontal status-menu",children:[r(Tt,{onClick:On,children:[r(M,{icon:"comment"}),r("span",{children:ft>0?ae(ft):y({id:"ImOQa9"})})]}),r(Lo,{subMenu:!0,confirmLabel:r(F,{children:[r(M,{icon:"rocket"}),r("span",{children:y(ut?{id:"QzzGsY"}:{id:"kulphB"})})]}),className:`menu-reblog ${ut?"checked":""}`,menuExtras:r(Tt,{onClick:()=>{jn({draftStatus:{status:`
${vt}`}})},children:[r(M,{icon:"quote"}),r("span",{children:r(R,{id:"ZhhOwV"})})]}),menuFooter:Yr,disabled:!rn,onClick:async()=>{try{const b=await Eo();!rt&&b&&St(y(ut?{id:"bpDheH",values:{0:K||z}}:{id:"dbNZdP",values:{0:K||z}}))}catch{}},children:[r(M,{icon:"rocket"}),r("span",{children:At>0?ae(At):y(ut?{id:"QzzGsY"}:{id:"PiVIlD"})})]}),r(Tt,{onClick:To,className:`menu-favourite ${Et?"checked":""}`,children:[r(M,{icon:"heart"}),r("span",{children:zt>0?ae(zt):y(Et?{id:"OcUmcH"}:{id:"W9FRBT"})})]}),qn("@mastodon/post-bookmark")&&r(Tt,{onClick:jr,className:`menu-bookmark ${Mt?"checked":""}`,children:[r(M,{icon:"bookmark"}),r("span",{children:y(Mt?{id:"q8EQYI"}:{id:"PZlHt8"})})]})]})}),!rt&&L&&(rt||v)&&r(ln,{}),(rt||v)&&r(F,{children:r(Tt,{onClick:()=>{U.showGenericAccounts={heading:y({id:"+XOeb+"}),fetchAccounts:ba,instance:A,showReactions:!0,postID:I}},children:[r(M,{icon:"react"}),r("span",{children:r(R,{id:"+XOeb+"})})]})}),(rt||!S&&(d||!_t||Ae))&&r(ln,{}),!S&&(d||!_t||Ae)&&r("div",{class:hr?"menu-horizontal":"",children:[d?r(Tt,{disabled:me,onClick:()=>ga(!0),children:[r(M,{icon:"translate"}),r("span",{children:r(R,{id:"pi8x/S"})})]}):r(pi,{to:`${A?`/${A}`:""}/s/${N}?translate=1`,children:[r(M,{icon:"translate"}),r("span",{children:r(R,{id:"pi8x/S"})})]}),hr&&r(Tt,{onClick:()=>{try{const b=Jo(e);b&&Sp(b,_t)}catch{}},children:[r(M,{icon:"speak"}),r("span",{children:r(R,{id:"yIBLq8"})})]})]}),rt&&r(Tt,{onClick:()=>{try{const b=Jo(e);navigator.clipboard.writeText(b),St(y({id:"iSRQvy"}))}catch{St(y({id:"N1MyiN"}))}},children:[r(M,{icon:"clipboard"}),r("span",{children:r(R,{id:"iQgJaz"})})]}),(!rt&&L||d||!_t||Ae)&&r(ln,{}),!rt&&r(F,{children:r(pi,{to:A?`/${A}/s/${N}`:`/s/${N}`,onClick:b=>{g(b,e)},children:[r(M,{icon:"arrows-right"}),r("small",{children:[r(R,{id:"8MkSAW",values:{0:K||z},components:{0:r("span",{class:"bidi-isolate"})}}),r("br",{}),r("span",{class:"more-insignificant",children:[_(Le[mt])," • ",Br]})]})]})}),!!Gt&&r(F,{children:r(Tt,{onClick:()=>{Rn(N)},children:[r(M,{icon:"history"}),r("small",{children:[r(R,{id:"QL+7Jw"}),r("br",{}),r("span",{class:"more-insignificant",children:r(R,{id:"DuJJm9",values:{editedDateText:Vr}})})]})]})}),r(Tt,{href:vt,target:"_blank",children:[r(M,{icon:"external"}),r("small",{class:"menu-double-lines",style:{maxWidth:"16em"},children:wg(vt)})]}),r("div",{class:"menu-horizontal",children:[r(Tt,{onClick:()=>{try{navigator.clipboard.writeText(vt),St(y({id:"edWbV6"}))}catch{St(y({id:"W1ewR0"}))}},children:[r(M,{icon:"link"}),r("span",{children:r(R,{id:"he3ygx"})})]}),Gr&&(navigator==null?void 0:navigator.share)&&((ei=navigator==null?void 0:navigator.canShare)==null?void 0:ei.call(navigator,{url:vt}))&&r(Tt,{onClick:()=>{try{navigator.share({url:vt})}catch{alert(y({id:"TtG3Uh"}))}},children:[r(M,{icon:"share"}),r("span",{children:r(R,{id:"LFKLqp"})})]})]}),Gr&&rt&&r(Tt,{onClick:()=>{wo(!0)},children:[r(M,{icon:"code"}),r("span",{children:r(R,{id:"jdVwsS"})})]}),(gt||Mn)&&r(ln,{}),(gt||Mn)&&r(Tt,{onClick:async()=>{try{const b=await k.v1.statuses.$select(N)[Bt?"unmute":"mute"]();pe(b,A),St(y(Bt?{id:"Pm+5jw"}:{id:"ywB7JM"}))}catch{St(y(Bt?{id:"c6jxNY"}:{id:"8SN9kN"}))}},children:Bt?r(F,{children:[r(M,{icon:"unmute"}),r("span",{children:r(R,{id:"i51zUR"})})]}):r(F,{children:[r(M,{icon:"mute"}),r("span",{children:r(R,{id:"OiUYO5"})})]})}),gt&&Ea&&r(Tt,{onClick:async()=>{try{const b=await k.v1.statuses.$select(N)[pt?"unpin":"pin"]();pe(b,A),St(y(pt?{id:"Yx809+"}:{id:"S6P6E+"}))}catch{St(y(pt?{id:"A6cs15"}:{id:"vgUfWO"}))}},children:pt?r(F,{children:[r(M,{icon:"unpin"}),r("span",{children:r(R,{id:"XQMQZw"})})]}):r(F,{children:[r(M,{icon:"pin"}),r("span",{children:r(R,{id:"lfHLsx"})})]})}),gt&&r("div",{class:"menu-horizontal",children:[qn("@mastodon/post-edit")&&r(Tt,{onClick:()=>{jn({editStatus:e})},children:[r(M,{icon:"pencil"}),r("span",{children:r(R,{id:"ePK91l"})})]}),rt&&r(Lo,{subMenu:!0,confirmLabel:r(F,{children:[r(M,{icon:"trash"}),r("span",{children:r(R,{id:"FbPNuJ"})})]}),itemProps:{className:"danger"},menuItemClassName:"danger",onClick:()=>{(async()=>{try{await k.v1.statuses.$select(N).remove();const b=as(N,A);b._deleted=!0,St(y({id:"KiyvHV"}))}catch{St(y({id:"Yb6p2q"}))}})()},children:[r(M,{icon:"trash"}),r("span",{children:r(R,{id:"Jb6/SB"})})]})]}),!gt&&rt&&r(F,{children:[r(ln,{}),r(Tt,{className:"danger",onClick:()=>{U.showReportModal={account:e.account,post:e}},children:[r(M,{icon:"flag"}),r("span",{children:r(R,{id:"7PQAMY"})})]})]})]}),Qr=O(),[$n,an]=j(!1),[Fn,Nn]=j({}),zn=E||!rt&&!u&&!Ct&&!p,Ta=Ts(ag&&zn?b=>{var Zt;if(b.pointerType==="mouse")return;const{clientX:x,clientY:q}=((Zt=b.touches)==null?void 0:Zt[0])||b,at=b.target.closest("a");at&&Oe.current.contains(at)&&!at.getAttribute("href").startsWith("#")||(b.preventDefault(),Nn({anchorPoint:{x,y:q},direction:"right"}),an(!0))}:null,{threshold:600,captureEvent:!0,detect:"touch",cancelOnMovement:2}),Bn=!a&&!u&&!p,Aa=Ve("r, shift+r",On,{enabled:Bn,useKey:!0}),ka=Ve("f, l",To,{enabled:Bn,useKey:!0}),Ca=Ve("d",jr,{enabled:Bn,useKey:!0}),Sa=Ve("shift+b",b=>{b.shiftKey&&(async()=>{try{const x=await Eo();!rt&&x&&St(y(ut?{id:"bpDheH",values:{0:K||z}}:{id:"dbNZdP",values:{0:K||z}}))}catch{}})()},{enabled:Bn&&rn,useKey:!0}),xa=Ve("x",b=>{const x=document.activeElement.closest(".status-link, .status-focus");if(x){const q=x.querySelector(".spoiler-button:not(.spoiling)");if(q)b.stopPropagation(),q.click();else{const at=x.querySelector(".spoiler-media-button:not(.spoiling)");at&&(b.stopPropagation(),at.click())}}},{useKey:!0}),Vn=G.slice(0,rt?void 0:4),Hn=G.length>1&&Vn.some(b=>!!b.description&&!na(b.description)),La=it(()=>{if(!Hn)return null;const b=[];return Vn.forEach((x,q)=>{if(!x.description)return;const at=b.findIndex(Zt=>Zt.media.description===x.description);at===-1?b.push({media:x,indices:[q]}):b[at].indices.push(q)}),b.map(({media:x,indices:q})=>r("div",{"data-caption-index":q.map(at=>at+1).join(" "),onClick:at=>{at.preventDefault(),at.stopPropagation(),U.showMediaAlt={alt:x.description,lang:_t}},title:x.description,children:[r("sup",{children:q.map(at=>at+1).join(" ")})," ",x.description]},x.id))},[Hn,Vn,_t]),cn=it(()=>{var b;return!!J&&Z===((b=e.account)==null?void 0:b.id)||!!$.statusThreadNumber[I]},[J,Z,(ni=e.account)==null?void 0:ni.id,$.statusThreadNumber[I]]),Ia=it(()=>s&&!cn&&!c&&!J&&mt==="public"&&ft>0,[s,cn,c,J,ft,mt]),Jr=it(()=>{if(dt||Rt||X||Q||G!=null&&G.length||cn||c||J||ft<=0||!/[???︖❓❔⁇⁈⁉¿‽؟]/.test(V))return!1;const q=Go(V);if(q>0&&q<=ng)return!0},[dt,Rt,X,Q,G,Kt,cn,c,J,ft,V]);return r(on,{children:[T&&!!(J&&Z)&&r(Eg,{sKey:I}),r("article",{"data-state-post-id":I,ref:b=>{var q;Oe.current=b;const x=((q=b==null?void 0:b.closest)==null?void 0:q.call(b,".timeline-item, .timeline-item-alt, .status-link, .status-focus"))||b;Aa.current=x,ka.current=x,Ca.current=x,Sa.current=x,xa.current=x},tabindex:"-1",class:`status ${!c&&J&&ie?"status-reply-to":""} visibility-${mt} ${jt?"status-pinned":""} ${fg[o]} ${Ct?"status-deleted":""} ${p?"status-card":""} ${$n?"status-menu-open":""} ${S&&Pe?"status-media-first":""}`,onMouseEnter:ht,onContextMenu:b=>{var at,Zt;if(!zn||b.metaKey)return;const x=b.target.closest("a");if(x&&Oe.current.contains(x)&&!x.getAttribute("href").startsWith("#"))return;const q=(at=window.getSelection)==null?void 0:at.call(window);if(q.toString().length>0){const{anchorNode:$e}=q;if((Zt=Oe.current)!=null&&Zt.contains($e))return}b.preventDefault(),Nn({anchorPoint:{x:b.clientX,y:b.clientY},direction:"right"}),an(!0)},...zn?Ta():{},children:[zn&&r(gs,{ref:Qr,state:$n?"open":void 0,...Fn,onClose:b=>{var x,q,at;an(!1),(b==null?void 0:b.reason)==="click"&&((at=(q=(x=Oe.current)==null?void 0:x.closest("[tabindex]"))==null?void 0:q.focus)==null||at.call(q))},portal:{target:document.body},containerProps:{style:{zIndex:1001},onClick:()=>{var b,x;(x=(b=Qr.current)==null?void 0:b.closeMenu)==null||x.call(b)}},overflow:"auto",boundingBoxPadding:Cs(),unmountOnClose:!0,children:Xr}),v&&o!=="l"&&!u&&!a&&!Ct&&!p&&r("div",{class:`status-actions ${$n==="actions-bar"?"open":""}`,ref:wa,children:[r(Be,{size:"s",title:y({id:"ImOQa9"}),alt:y({id:"ImOQa9"}),class:"reply-button",icon:"comment",iconSize:"m",onClick:On}),r(Be,{size:"s",checked:Et,title:[y({id:"W9FRBT"}),y({id:"OcUmcH"})],alt:[y({id:"W9FRBT"}),y({id:"8ab1sR"})],class:"favourite-button",icon:"heart",iconSize:"m",count:zt,onClick:To}),r("button",{type:"button",title:y({id:"2FYpfJ"}),class:"plain more-button",onClick:b=>{b.preventDefault(),b.stopPropagation(),Nn({anchorRef:{current:b.currentTarget},align:"start",direction:"left",gap:0,shift:-8}),an("actions-bar")},children:r(M,{icon:"more2",size:"m",alt:y({id:"2FYpfJ"})})})]}),o!=="l"&&r("div",{class:"status-badge",children:[ut&&r(M,{class:"reblog",icon:"rocket",size:"s",alt:y({id:"b7T5Zj"})}),Et&&r(M,{class:"favourite",icon:"heart",size:"s",alt:y({id:"8ab1sR"})}),Mt&&r(M,{class:"bookmark",icon:"bookmark",size:"s",alt:y({id:"1C/9Sa"})}),jt&&r(M,{class:"pin",icon:"pin",size:"s",alt:y({id:"kNiQp6"})})]}),o!=="s"&&r("a",{href:ot,tabindex:"-1",title:`@${z}`,onClick:b=>{b.preventDefault(),b.stopPropagation(),U.showAccount={account:e.account,instance:A}},children:r(ue,{url:nt||W,size:"xxl",squircle:lt})}),r("div",{class:"container",children:[!!(e.account||B)&&r("div",{class:"meta",children:[r("span",{class:"meta-name",children:r(_e,{account:e.account,instance:A,showAvatar:o==="s",showAcct:rt})})," ",o!=="l"&&(Ct?r("span",{class:"status-deleted-tag",children:r(R,{id:"vGjmyl"})}):vt&&!u&&!a&&!p?r(Ze,{to:A?`/${A}/s/${N}`:`/s/${N}`,onClick:b=>{b.metaKey||b.ctrlKey||b.shiftKey||b.altKey||b.which===2||(b.preventDefault(),b.stopPropagation(),g==null||g(b,e),Nn({anchorRef:{current:b.currentTarget},align:"end",direction:"bottom",gap:4}),an(!0))},class:`time ${$n&&(Fn!=null&&Fn.anchorRef)?"is-open":""}`,children:[Ia&&!Jr?r(M,{icon:"comment2",size:"s",alt:Dt._({id:"RXmXDR",values:{repliesCount:ft}})}):mt!=="public"&&mt!=="direct"&&r(M,{icon:bn[mt],alt:_(Le[mt]),size:"s"})," ",r(le,{datetime:Vt,format:"micro"}),!u&&!a&&r(M,{icon:"more2",class:"more",alt:y({id:"2FYpfJ"})})]}):r("span",{class:"time",children:[mt!=="public"&&mt!=="direct"&&r(F,{children:[r(M,{icon:bn[mt],alt:_(Le[mt]),size:"s"})," "]}),r(le,{datetime:Vt,format:"micro"})]}))]}),mt==="direct"&&r(F,{children:[r("div",{class:"status-direct-badge",children:r(R,{id:"IV4QaU"})})," "]}),!c&&r(F,{children:cn?r("div",{class:"status-thread-badge",children:[r(M,{icon:"thread",size:"s"}),r(R,{id:"lQ8zCz",values:{0:$.statusThreadNumber[I]?` ${$.statusThreadNumber[I]}/X`:""}})]}):!!J&&!!ie&&(!!Q||!It.find(b=>b.id===Z))&&r("div",{class:"status-reply-badge",children:[r(M,{icon:"reply"})," ",r(_e,{account:ie,instance:A,short:!0})]})}),r("div",{class:`content-container ${Q||X||(tt==null?void 0:tt.action)==="blur"?"has-spoiler":""} ${Yt?"show-spoiler":""} ${Ee?"show-media":""}`,"data-content-text-weight":i?zr():null,style:(rt||i)&&{"--content-text-weight":zr()},children:S&&Pe?r(F,{children:[(!!Q||!!X)&&!Xt&&r(F,{children:[!!Q&&r("span",{class:"spoiler-content media-first-spoiler-content",lang:_t,dir:"auto",ref:Fr,"data-read-more":_(wn),children:[r(Ye,{text:Q,emojis:Qt})," "]}),r("button",{class:`light spoiler-button media-first-spoiler-button ${Yt?"spoiling":""}`,type:"button",onClick:b=>{b.preventDefault(),b.stopPropagation(),Yt?(delete U.spoilers[N],Xt||delete U.spoilersMedia[N]):(U.spoilers[N]=!0,Xt||(U.spoilersMedia[N]=!0))},children:[r(M,{icon:Yt?"eye-open":"eye-close"})," ",y(Yt?{id:"6lGV3K"}:{id:"lqBX03"})]})]}),r(gg,{mediaAttachments:G,language:_t,postID:N,instance:A}),!!V&&r("div",{class:"media-first-content content",ref:Nr,children:r(Ki,{post:e,instance:A,previewMode:u})})]}):r(F,{children:[!!Q&&r(F,{children:[r("div",{class:"content spoiler-content",lang:_t,dir:"auto",ref:Fr,"data-read-more":_(wn),children:r("p",{children:r(Ye,{text:Q,emojis:Qt})})}),Xt||u?r("div",{class:"spoiler-divider",children:[r(M,{icon:"eye-open"})," ",r(R,{id:"gnKo7f"})]}):r("button",{class:`light spoiler-button ${Yt?"spoiling":""}`,type:"button",onClick:b=>{b.preventDefault(),b.stopPropagation(),Yt?(delete U.spoilers[N],Xt||delete U.spoilersMedia[N]):(U.spoilers[N]=!0,Xt||(U.spoilersMedia[N]=!0))},children:[r(M,{icon:Yt?"eye-open":"eye-close"})," ",y(Yt?{id:"6lGV3K"}:{id:"lqBX03"})]})]}),!!V&&r("div",{class:"content",ref:Nr,"data-read-more":_(wn),inert:Q&&!Yt?!0:void 0,children:[r(Ki,{post:e,instance:A,previewMode:u}),r(Ag,{id:N,instance:A,level:p})]}),!!Rt&&r(Ap,{lang:_t,poll:Rt,readOnly:a||!L||!D,onUpdate:b=>{U.statuses[I].poll=b},refresh:()=>k.v1.polls.$select(Rt.id).fetch().then(b=>{U.statuses[I].poll=b}).catch(b=>{}),votePoll:b=>k.v1.polls.$select(Rt.id).votes.create({choices:b}).then(x=>{U.statuses[I].poll=x}).catch(x=>{})}),((d||$r)&&ug(V,Qt)&&Ae||me)&&r(ap,{forceTranslate:me||$r,mini:!rt&&!c,sourceLanguage:_t,autoDetected:Re,text:Jo(e,{maskCustomEmojis:!0})}),!u&&(X||(tt==null?void 0:tt.action)==="blur")&&!!G.length&&(nn==="show_all"||(tt==null?void 0:tt.action)==="blur")&&r("button",{class:`plain spoiler-media-button ${Ee?"spoiling":""}`,type:"button",hidden:!Xt&&!!Q,onClick:b=>{b.preventDefault(),b.stopPropagation(),Ee?delete U.spoilersMedia[N]:U.spoilersMedia[N]=!0},children:[r(M,{icon:Ee?"eye-open":"eye-close"})," ",r("span",{children:[(tt==null?void 0:tt.action)==="blur"&&r("small",{children:[r(R,{id:"suKjh3",values:{0:tt==null?void 0:tt.titlesStr}}),r("br",{})]}),y(Ee?{id:"6lGV3K"}:{id:"9ZCilh"})]})]}),!!G.length&&(G.length>1&&(rt||c&&o==="m")?r("div",{class:"media-large-container",children:G.map((b,x)=>r("div",{class:"media-container media-eq1",children:r(fr,{media:b,autoAnimate:!0,showCaption:!0,allowLongerCaption:!V,lang:_t,to:`/${A}/s/${N}?${c?"media":"media-only"}=${x+1}`,onClick:m?q=>m(q,x,b,e):void 0})},b.id))}):r(pg,{lang:_t,enabled:Hn,captionChildren:La,children:r("div",{ref:_a,class:`media-container media-eq${G.length} ${G.length>2?"media-gt2":""} ${G.length>4?"media-gt4":""}`,children:Vn.map((b,x)=>r(fr,{media:b,autoAnimate:rt,showCaption:G.length===1,allowLongerCaption:!V&&G.length===1,lang:_t,altIndex:Hn&&!!b.description&&x+1,to:`/${A}/s/${N}?${c?"media":"media-only"}=${x+1}`,onClick:m?q=>{m(q,x,b,e)}:void 0,checkAspectRatio:G.length===1},b.id))})})),!!dt&&/^https/i.test(dt==null?void 0:dt.url)&&!X&&!Q&&!Rt&&!G.length&&!$.statusQuotes[I]&&r(_g,{card:dt,selfReferential:(dt==null?void 0:dt.url)===e.url||(dt==null?void 0:dt.url)===e.uri,selfAuthor:(oi=dt==null?void 0:dt.authors)==null?void 0:oi.some(b=>{var x;return((x=b.account)==null?void 0:x.url)===ot}),instance:P})]})}),!rt&&Jr&&r("div",{class:"content-comment-hint insignificant",children:[r(M,{icon:"comment2",alt:y({id:"N8UzTV"})})," ",ft]}),rt&&r(F,{children:[r("div",{class:"extra-meta",children:Ct?r("span",{class:"status-deleted-tag",children:r(R,{id:"vGjmyl"})}):r(F,{children:[r("span",{children:_(Le[mt])})," •"," ",r("a",{href:vt,target:"_blank",rel:"noopener",children:[new Date().getTime()-Vt.getTime()<864e5&&r(F,{children:[r(le,{datetime:Vt,format:"micro"})," ","‒"," "]}),!!B&&r("time",{class:"created",datetime:Vt.toISOString(),title:Vt.toLocaleString(),children:Br})]}),Gt&&r(F,{children:[" ","• ",r(M,{icon:"pencil",alt:y({id:"MRZxAn"})})," ",r("time",{tabIndex:"0",class:"edited",datetime:In.toISOString(),onClick:()=>{Rn(N)},children:Vr})]})]})}),!!(Me!=null&&Me.length)&&r("div",{class:"emoji-reactions",children:Me.map(b=>{const{name:x,count:q,me:at,url:Zt,staticUrl:$e}=b;if(Zt)return r("span",{class:`emoji-reaction tag ${at?"":"insignificant"}`,children:[r(lr,{alt:x,url:Zt,staticUrl:$e})," ",q]});if(/^:.+?:$/.test(x)){const ke=Qt.find(Ce=>Ce.shortcode===x.replace(/^:/,"").replace(/:$/,""));if(ke)return r("span",{class:`emoji-reaction tag ${at?"":"insignificant"}`,children:[r(lr,{alt:x,url:ke.url,staticUrl:ke.staticUrl})," ",q]})}return r("span",{class:`emoji-reaction tag ${at?"":"insignificant"}`,children:[x," ",q]})})}),r("div",{class:`actions ${Ct?"disabled":""}`,children:[r("div",{class:"action has-count",children:r(Be,{title:y({id:"ImOQa9"}),alt:y({id:"VbyRUy"}),class:"reply-button",icon:"comment",count:ft,onClick:On})}),r("div",{class:"action has-count",children:r(Lo,{disabled:!rn,onClick:Eo,confirmLabel:r(F,{children:[r(M,{icon:"rocket"}),r("span",{children:y(ut?{id:"QzzGsY"}:{id:"kulphB"})})]}),menuExtras:r(Tt,{onClick:()=>{jn({draftStatus:{status:`
${vt}`}})},children:[r(M,{icon:"quote"}),r("span",{children:r(R,{id:"ZhhOwV"})})]}),menuFooter:Yr,children:r(Be,{checked:ut,title:[y({id:"kulphB"}),y({id:"QzzGsY"})],alt:[y({id:"kulphB"}),y({id:"b7T5Zj"})],class:"reblog-button",icon:"rocket",count:At,disabled:!rn})})}),r("div",{class:"action has-count",children:r(Be,{checked:Et,title:[y({id:"W9FRBT"}),y({id:"OcUmcH"})],alt:[y({id:"W9FRBT"}),y({id:"8ab1sR"})],class:"favourite-button",icon:"heart",count:zt,onClick:Ur})}),qn("@mastodon/post-bookmark")&&r("div",{class:"action",children:r(Be,{checked:Mt,title:[y({id:"PZlHt8"}),y({id:"q8EQYI"})],alt:[y({id:"PZlHt8"}),y({id:"1C/9Sa"})],class:"bookmark-button",icon:"bookmark",onClick:Kr})}),r(Ls,{portal:{target:document.querySelector(".status-deck")||document.body},align:"end",gap:4,overflow:"auto",viewScroll:"close",menuButton:r("div",{class:"action",children:r("button",{type:"button",title:y({id:"2FYpfJ"}),class:"plain more-button",children:r(M,{icon:"more",size:"l",alt:y({id:"2FYpfJ"})})})}),children:[Xr," "]})]})]})]}),!!bo&&r(sr,{onClick:b=>{b.target===b.currentTarget&&Rn(!1)},children:r(yg,{statusID:bo,instance:A,fetchStatusHistory:()=>k.v1.statuses.$select(bo).history.list(),onClose:()=>{var b;Rn(!1),(b=Oe.current)==null||b.focus()}})}),!!va&&r(sr,{onClick:b=>{b.target===b.currentTarget&&wo(!1)},children:r(bg,{post:e,instance:A,onClose:()=>{wo(!1)}})})]})]})}function pg(t){const{enabled:e,children:n,lang:o,captionChildren:i}=t;return!e||!i?n:r("figure",{class:"media-figure-multiple",children:[n,r("figcaption",{lang:o,dir:"auto",children:i})]})}function gg(t){const{mediaAttachments:e,language:n,postID:o,instance:i}=t,a=e.length>1,s=O(),[c,l]=j(0);return et(()=>{let d=()=>{const{clientWidth:h,scrollLeft:u}=s.current,f=Math.round(Math.abs(u)/h);l(f)};return s.current&&s.current.addEventListener("scroll",d,{passive:!0}),()=>{s.current&&s.current.removeEventListener("scroll",d)}},[]),r(F,{children:[r("div",{class:"media-first-container",children:[r("div",{class:"media-first-carousel",ref:s,children:e.map((d,h)=>r("div",{class:"media-first-item",children:r(fr,{media:d,lang:n,to:`/${i}/s/${o}?media=${h+1}`})},d.id))}),a&&r("div",{class:"media-carousel-controls",children:[r("div",{class:"carousel-indexer",children:[c+1,"/",e.length]}),r("label",{class:"media-carousel-button",children:r("button",{type:"button",class:"carousel-button",hidden:c===0,onClick:d=>{d.preventDefault(),d.stopPropagation(),s.current.focus(),s.current.scrollTo({left:s.current.clientWidth*(c-1)*(cr()?-1:1),behavior:"smooth"})},children:r(M,{icon:"arrow-left"})})}),r("label",{class:"media-carousel-button",children:r("button",{type:"button",class:"carousel-button",hidden:c===e.length-1,onClick:d=>{d.preventDefault(),d.stopPropagation(),s.current.focus(),s.current.scrollTo({left:s.current.clientWidth*(c+1)*(cr()?-1:1),behavior:"smooth"})},children:r(M,{icon:"arrow-right"})})})]})]}),a&&r("div",{class:"media-carousel-dots",style:{"--dots-count":e.length},children:e.map((d,h)=>r("span",{class:`carousel-dot ${h===c?"active":""}`},d.id))})]})}function Zi(t){return["x.com","twitter.com","threads.net","bsky.app"].includes(t)}function vg({authors:t,hidden:e,children:n}){var i,a;if(e||!((a=(i=t==null?void 0:t[0])==null?void 0:i.account)!=null&&a.id))return n;const o=t[0].account;return r("div",{class:"card-byline",children:[n,r("div",{class:"card-byline-author",children:[r(M,{icon:"link",size:"s"})," ",r("small",{children:r(R,{id:"4LHHK6",components:{0:r(_e,{account:o,showAvatar:!0})}})})]})]})}function _g({card:t,selfReferential:e,selfAuthor:n,instance:o}){var nt;const i=xn(U),{blurhash:a,title:s,description:c,html:l,providerName:d,providerUrl:h,authorName:u,authorUrl:f,width:m,height:p,image:g,imageDescription:w,url:E,type:v,embedUrl:T,language:S,publishedAt:_,authors:y}=t,k=s||d||u,D=m/p>=1.2?"large":"",[P,L]=j(null);if(et(()=>{k&&g&&!e&&Ka(E)&&ja(o,E).then(st=>{if(!st)return;const{id:ot,url:ct}=st;L("#"+ct)})},[k,g,e]),i.unfurledLinks[E])return null;const I=/