Files
phanpy-cz/assets/ScheduledAtField-C2dSuh6f.js

195 lines
220 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{at as ie,Z as Lt,e as o,d as F,q as yt,A as $,_ as me,y as V,N as js,au as Sc,m as st,W as $e,h as Wr,av as Tc,aw as wo,ax as Cc,ay as Us,Y as Ws,k as N,M as Ne,l as br,a0 as Zt,I as _o,G as Pt,s as z,az as Ec,aA as Oi,w as Ac,aB as xc,aC as Zr,g as Gr,F as wr,u as $t,a as De,a3 as Mc,K as Ic,aD as Lc,aE as Fi,T as M,aF as Zs,aG as Pc,aH as Dc,p as xo,z as Fn,J as Gs,aI as Rc,aJ as Ot,aK as $c,aL as Nc,aM as no,c as Ye,S as Jt,a4 as Vr,b as _e,aN as Oc,aO as Fc,aP as Yr,aQ as Bc,t as zc,x as qc}from"./pwa-viewport-CJ-1bFP1.js";import{ICONS as Hc}from"./ICONS-DaAGffIM.js";const Vs=["shift","alt","meta","mod","ctrl","control"],Kc={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 Pe(t){return(Kc[t.trim()]||t.trim()).toLowerCase().replace(/key|digit|numpad/,"")}function Ys(t){return Vs.includes(t)}function Go(t,e=","){return t.toLowerCase().split(e)}function Vo(t,e="+",n=">",r=!1,s){let a=[],i=!1;t=t.trim(),t.includes(n)?(i=!0,a=t.toLocaleLowerCase().split(n).map(d=>Pe(d))):a=t.toLocaleLowerCase().split(e).map(d=>Pe(d));const c={alt:a.includes("alt"),ctrl:a.includes("ctrl")||a.includes("control"),shift:a.includes("shift"),meta:a.includes("meta"),mod:a.includes("mod"),useKey:r},u=a.filter(d=>!Vs.includes(d));return{...c,keys:u,description:s,isSequence:i,hotkey:t}}typeof document<"u"&&(document.addEventListener("keydown",t=>{t.code!==void 0&&Qs([Pe(t.code)])}),document.addEventListener("keyup",t=>{t.code!==void 0&&Xs([Pe(t.code)])})),typeof window<"u"&&(window.addEventListener("blur",()=>{ke.clear()}),window.addEventListener("contextmenu",()=>{setTimeout(()=>{ke.clear()},0)}));const ke=new Set;function Qr(t){return Array.isArray(t)}function jc(t,e=","){return(Qr(t)?t:t.split(e)).every(n=>ke.has(n.trim().toLowerCase()))}function Qs(t){const e=Array.isArray(t)?t:[t];ke.has("meta")&&ke.forEach(n=>!Ys(n)&&ke.delete(n.toLowerCase())),e.forEach(n=>ke.add(n.toLowerCase()))}function Xs(t){const e=Array.isArray(t)?t:[t];t==="meta"?ke.clear():e.forEach(n=>ke.delete(n.toLowerCase()))}function Uc(t,e,n){(typeof n=="function"&&n(t,e)||n===!0)&&t.preventDefault()}function Wc(t,e,n){return typeof n=="function"?n(t,e):n===!0||n===void 0}const Zc=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"];function Gc(t){return Js(t,Zc)}function Js(t,e=!1){const{target:n,composed:r}=t;let s,a;return Vc(n)&&r?(s=t.composedPath()[0]&&t.composedPath()[0].tagName,a=t.composedPath()[0]&&t.composedPath()[0].role):(s=n&&n.tagName,a=n&&n.role),Qr(e)?!!(s&&e&&e.some(i=>i.toLowerCase()===s.toLowerCase()||i===a)):!!(s&&e&&e)}function Vc(t){return!!t.tagName&&!t.tagName.startsWith("-")&&t.tagName.includes("-")}function Yc(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 <HotkeysProvider>'),!0):e?t.some(n=>e.includes(n))||t.includes("*"):!0}const Qc=(t,e,n=!1)=>{const{alt:r,meta:s,mod:a,shift:i,ctrl:c,keys:u,useKey:d}=e,{code:h,key:l,ctrlKey:f,metaKey:p,shiftKey:m,altKey:g}=t,v=Pe(h);if(d&&u?.length===1&&u.includes(l))return!0;if(!u?.includes(v)&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(v))return!1;if(!n){if(r!==g&&v!=="alt"||i!==m&&v!=="shift")return!1;if(a){if(!p&&!f)return!1}else if(s!==p&&v!=="meta"&&v!=="os"||c!==f&&v!=="ctrl"&&v!=="control")return!1}return u&&u.length===1&&u.includes(v)?!0:u?jc(u):!u},Xc=ie(void 0),Jc=()=>Lt(Xc);function ta(t,e){return t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(t).length===Object.keys(e).length&&Object.keys(t).reduce((n,r)=>n&&ta(t[r],e[r]),!0):t===e}const tl=ie({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),el=()=>Lt(tl);function nl(t){const e=$(void 0);return ta(e.current,t)||(e.current=t),e.current}const Bi=t=>{t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation()},ol=typeof window<"u"?me:V;function je(t,e,n,r){const s=$(null),a=$(!1),i=Array.isArray(n)?Array.isArray(r)?void 0:r:n,c=Qr(t)?t.join(i?.delimiter):t,u=Array.isArray(n)?n:Array.isArray(r)?r:void 0,d=yt(e,u??[]),h=$(d);u?h.current=d:h.current=e;const l=nl(i),{activeScopes:f}=el(),p=Jc();return ol(()=>{if(l?.enabled===!1||!Yc(f,l?.scopes))return;let m=[],g;const v=(C,w=!1)=>{if(!(Gc(C)&&!Js(C,l?.enableOnFormTags))){if(s.current!==null){const T=s.current.getRootNode();if((T instanceof Document||T instanceof ShadowRoot)&&T.activeElement!==s.current&&!s.current.contains(T.activeElement)){Bi(C);return}}C.target?.isContentEditable&&!l?.enableOnContentEditable||Go(c,l?.delimiter).forEach(T=>{if(T.includes(l?.splitKey??"+")&&T.includes(l?.sequenceSplitKey??">")){console.warn(`Hotkey ${T} contains both ${l?.splitKey??"+"} and ${l?.sequenceSplitKey??">"} which is not supported.`);return}const A=Vo(T,l?.splitKey,l?.sequenceSplitKey,l?.useKey,l?.description);if(A.isSequence){g=setTimeout(()=>{m=[]},l?.sequenceTimeoutMs??1e3);const I=A.useKey?C.key:Pe(C.code);if(Ys(I.toLowerCase()))return;m.push(I);const x=A.keys?.[m.length-1];if(I!==x){m=[],g&&clearTimeout(g);return}m.length===A.keys?.length&&(h.current(C,A),g&&clearTimeout(g),m=[])}else if(Qc(C,A,l?.ignoreModifiers)||A.keys?.includes("*")){if(l?.ignoreEventWhen?.(C)||w&&a.current)return;if(Uc(C,A,l?.preventDefault),!Wc(C,A,l?.enabled)){Bi(C);return}h.current(C,A),w||(a.current=!0)}})}},b=C=>{C.code!==void 0&&(Qs(Pe(C.code)),(l?.keydown===void 0&&l?.keyup!==!0||l?.keydown)&&v(C))},_=C=>{C.code!==void 0&&(Xs(Pe(C.code)),a.current=!1,l?.keyup&&v(C,!0))},S=s.current||i?.document||document;return S.addEventListener("keyup",_,i?.eventListenerOptions),S.addEventListener("keydown",b,i?.eventListenerOptions),p&&Go(c,l?.delimiter).forEach(C=>p.addHotkey(Vo(C,l?.splitKey,l?.sequenceSplitKey,l?.useKey,l?.description))),()=>{S.removeEventListener("keyup",_,i?.eventListenerOptions),S.removeEventListener("keydown",b,i?.eventListenerOptions),p&&Go(c,l?.delimiter).forEach(C=>p.removeHotkey(Vo(C,l?.splitKey,l?.sequenceSplitKey,l?.useKey,l?.description))),m=[],g&&clearTimeout(g)}},[c,l,f]),s}var vo={exports:{}};var rl=vo.exports,zi;function il(){return zi||(zi=1,(function(t){(function(e,n){t.exports?t.exports=n():e.Toastify=n()})(rl,function(e){var n=function(i){return new n.lib.init(i)},r="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:r,constructor:n,init:function(i){return i||(i={}),this.options={},this.toastElement=null,this.options.text=i.text||n.defaults.text,this.options.node=i.node||n.defaults.node,this.options.duration=i.duration===0?0:i.duration||n.defaults.duration,this.options.selector=i.selector||n.defaults.selector,this.options.callback=i.callback||n.defaults.callback,this.options.destination=i.destination||n.defaults.destination,this.options.newWindow=i.newWindow||n.defaults.newWindow,this.options.close=i.close||n.defaults.close,this.options.gravity=i.gravity==="bottom"?"toastify-bottom":n.defaults.gravity,this.options.positionLeft=i.positionLeft||n.defaults.positionLeft,this.options.position=i.position||n.defaults.position,this.options.backgroundColor=i.backgroundColor||n.defaults.backgroundColor,this.options.avatar=i.avatar||n.defaults.avatar,this.options.className=i.className||n.defaults.className,this.options.stopOnFocus=i.stopOnFocus===void 0?n.defaults.stopOnFocus:i.stopOnFocus,this.options.onClick=i.onClick||n.defaults.onClick,this.options.offset=i.offset||n.defaults.offset,this.options.escapeMarkup=i.escapeMarkup!==void 0?i.escapeMarkup:n.defaults.escapeMarkup,this.options.ariaLive=i.ariaLive||n.defaults.ariaLive,this.options.style=i.style||n.defaults.style,i.backgroundColor&&(this.options.style.background=i.backgroundColor),this},buildToast:function(){if(!this.options)throw"Toastify is not initialized";var i=document.createElement("div");i.className="toastify on "+this.options.className,this.options.position?i.className+=" toastify-"+this.options.position:this.options.positionLeft===!0?(i.className+=" toastify-left",console.warn("Property `positionLeft` will be depreciated in further versions. Please use `position` instead.")):i.className+=" toastify-right",i.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)i.style[c]=this.options.style[c];if(this.options.ariaLive&&i.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)i.appendChild(this.options.node);else if(this.options.escapeMarkup?i.innerText=this.options.text:i.innerHTML=this.options.text,this.options.avatar!==""){var u=document.createElement("img");u.src=this.options.avatar,u.className="toastify-avatar",this.options.position=="left"||this.options.positionLeft===!0?i.appendChild(u):i.insertAdjacentElement("afterbegin",u)}if(this.options.close===!0){var d=document.createElement("button");d.type="button",d.setAttribute("aria-label","Close"),d.className="toast-close",d.innerHTML="&#10006;",d.addEventListener("click",(function(v){v.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?i.insertAdjacentElement("afterbegin",d):i.appendChild(d)}if(this.options.stopOnFocus&&this.options.duration>0){var l=this;i.addEventListener("mouseover",function(v){window.clearTimeout(i.timeOutValue)}),i.addEventListener("mouseleave",function(){i.timeOutValue=window.setTimeout(function(){l.removeElement(i)},l.options.duration)})}if(typeof this.options.destination<"u"&&i.addEventListener("click",(function(v){v.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"&&i.addEventListener("click",(function(v){v.stopPropagation(),this.options.onClick()}).bind(this)),typeof this.options.offset=="object"){var f=s("x",this.options),p=s("y",this.options),m=this.options.position=="left"?f:"-"+f,g=this.options.gravity=="toastify-top"?p:"-"+p;i.style.transform="translate("+m+","+g+")"}return i},showToast:function(){this.toastElement=this.buildToast();var i;if(typeof this.options.selector=="string"?i=document.getElementById(this.options.selector):this.options.selector instanceof HTMLElement||typeof ShadowRoot<"u"&&this.options.selector instanceof ShadowRoot?i=this.options.selector:i=document.body,!i)throw"Root element is not defined";var c=n.defaults.oldestFirst?i.firstChild:i.lastChild;return i.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(i){i.className=i.className.replace(" on",""),window.setTimeout((function(){this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),i.parentNode&&i.parentNode.removeChild(i),this.options.callback.call(i),n.reposition()}).bind(this),400)}},n.reposition=function(){for(var i={top:15,bottom:15},c={top:15,bottom:15},u={top:15,bottom:15},d=document.getElementsByClassName("toastify"),h,l=0;l<d.length;l++){a(d[l],"toastify-top")===!0?h="toastify-top":h="toastify-bottom";var f=d[l].offsetHeight;h=h.substr(9,h.length-1);var p=15,m=window.innerWidth>0?window.innerWidth:screen.width;m<=360?(d[l].style[h]=u[h]+"px",u[h]+=f+p):a(d[l],"toastify-left")===!0?(d[l].style[h]=i[h]+"px",i[h]+=f+p):(d[l].style[h]=c[h]+"px",c[h]+=f+p)}return this};function s(i,c){return c.offset[i]?isNaN(c.offset[i])?c.offset[i]:c.offset[i]+"px":"0px"}function a(i,c){return!i||typeof c!="string"?!1:!!(i.className&&i.className.trim().split(/\s+/gi).indexOf(c)>-1)}return n.lib.init.prototype=n.lib,n})})(vo)),vo.exports}var sl=il();const al=js(sl);window._showToast=pt;function pt(t){typeof t=="string"&&(t={text:t});const{onClick:e,delay:n,...r}=t,s=al({className:`${e||t.destination?"shiny-pill":""}`,gravity:"bottom",position:"center",...r,onClick:()=>{e?.(s)}});return n?setTimeout(()=>{s.showToast()},n):s.showToast(),s}function By(t,e,n,r){const s=$(t);V(()=>{s.current=t},[t,n]),V(()=>{!r||e===null||e===!1||s.current()},[r]),V(()=>{if(e===null||e===!1)return;const i=setInterval(()=>s.current(),e);return()=>clearInterval(i)},[e])}const Xr=t=>!!t&&t[0]==="o",_r=Sc,Bn=(t,e)=>t===!0||!!(t&&t[e]),Wt=(t,e)=>typeof t=="function"?t(e):t,cl="_szhsinMenu",ll=t=>t[cl];const pn=(t,e)=>(e&&Object.keys(e).forEach(n=>{const r=t[n],s=e[n];typeof s=="function"&&r?t[n]=(...a)=>{s(...a),r(...a)}:t[n]=s}),t),ul=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],r=isNaN(e[1])?n:e[1];return{top:n,right:r,bottom:isNaN(e[2])?n:e[2],left:isNaN(e[3])?r:e[3]}},Yo=t=>{for(;t;){if(t=t.parentNode,!t||t===document.body||!t.parentNode)return;const{overflow:e,overflowX:n,overflowY:r}=getComputedStyle(t);if(/auto|scroll|overlay|hidden/.test(e+r+n))return t}};function Mo(t,e){return{"aria-disabled":t||void 0,tabIndex:e?0:-1}}function qi(t,e){for(let n=0;n<t.length;n++)if(t[n]===e)return n;return-1}const ge=({block:t,element:e,modifiers:n,className:r})=>st(()=>{const s=e?`${t}__${e}`:t;let a=s;n&&Object.keys(n).forEach(c=>{const u=n[c];u&&(a+=` ${s}--${u===!0?c:`${c}-${u}`}`)});let i=typeof r=="function"?r(n):r;return typeof i=="string"&&(i=i.trim(),i&&(a+=` ${i}`)),a},[t,e,n,r]),dl="szh-menu-container",pe="szh-menu";const hl="arrow",Jr="item",fl="divider",pl="header",ml="group",gl="submenu";const ea=ie(),ti=ie({}),ko=ie({}),ei=ie({}),vl=ie({}),Io=ie({}),Ft=Object.freeze({ENTER:"Enter",ESC:"Escape",SPACE:" ",HOME:"Home",END:"End",LEFT:"ArrowLeft",RIGHT:"ArrowRight",UP:"ArrowUp",DOWN:"ArrowDown"}),Ct=Object.freeze({RESET:0,SET:1,UNSET:2,INCREASE:3,DECREASE:4,FIRST:5,LAST:6,SET_INDEX:7}),zn=Object.freeze({CLICK:"click",CANCEL:"cancel",BLUR:"blur",SCROLL:"scroll"}),an=Object.freeze({FIRST:"first",LAST:"last"}),yl=Object.freeze({entering:"opening",entered:"open",exiting:"closing",exited:"closed"}),Hi="absolute",ni="none",oi="menuitem",kr={preventScroll:!0};const bl=({className:t,containerRef:e,containerProps:n,children:r,isOpen:s,theming:a,transition:i,onClose:c})=>{const u=Bn(i,"item");return o("div",{...pn({onKeyDown:({key:l})=>{l===Ft.ESC&&Wt(c,{key:l,reason:zn.CANCEL})},onBlur:l=>{s&&!l.currentTarget.contains(l.relatedTarget)&&Wt(c,{reason:zn.BLUR})}},n),className:ge({block:dl,modifiers:st(()=>({theme:a,itemTransition:u}),[a,u]),className:t}),style:{position:"absolute",...n?.style},ref:e,children:r})},wl=()=>{let t,e=0;return{toggle:n=>{n?e++:e--,e=Math.max(e,0)},on:(n,r,s)=>{e?t||(t=setTimeout(()=>{t=0,r()},n)):s?.()},off:()=>{t&&(clearTimeout(t),t=0)}}},_l=t=>{const[e,n]=F(),s=$({items:[],hoverIndex:-1,sorted:!1}).current,a=yt((c,u)=>{const{items:d}=s;if(!c)s.items=[];else if(u)d.push(c);else{const h=d.indexOf(c);h>-1&&(d.splice(h,1),c.contains(document.activeElement)&&(t.current.focus(kr),n()))}s.hoverIndex=-1,s.sorted=!1},[s,t]),i=yt((c,u,d)=>{const{items:h,hoverIndex:l}=s,f=()=>{if(s.sorted)return;const g=t.current.querySelectorAll(".szh-menu__item");h.sort((v,b)=>qi(g,v)-qi(g,b)),s.sorted=!0};let p=-1,m;switch(c){case Ct.RESET:break;case Ct.SET:m=u;break;case Ct.UNSET:m=g=>g===u?void 0:g;break;case Ct.FIRST:f(),p=0,m=h[p];break;case Ct.LAST:f(),p=h.length-1,m=h[p];break;case Ct.SET_INDEX:f(),p=d,m=h[p];break;case Ct.INCREASE:f(),p=l,p<0&&(p=h.indexOf(u)),p++,p>=h.length&&(p=0),m=h[p];break;case Ct.DECREASE:f(),p=l,p<0&&(p=h.indexOf(u)),p--,p<0&&(p=h.length-1),m=h[p];break;default:}m||(p=-1),n(m),s.hoverIndex=p},[t,s]);return{hoverItem:e,dispatch:i,updateItems:a}},Ki=(t,e)=>Math.round(t)===e?t:e,na=t=>{const e=t.getBoundingClientRect();return e.width=Ki(e.width,t.offsetWidth),e.height=Ki(e.height,t.offsetHeight),e},kl=(t,e,n,r)=>{const s=na(e),a=t.getBoundingClientRect(),i=n===window?{left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight}:n.getBoundingClientRect(),c=ul(r),u=m=>m+a.left-i.left-c.left,d=m=>m+a.left+s.width-i.right+c.right,h=m=>m+a.top-i.top-c.top,l=m=>m+a.top+s.height-i.bottom+c.bottom;return{menuRect:s,containerRect:a,getLeftOverflow:u,getRightOverflow:d,getTopOverflow:h,getBottomOverflow:l,confineHorizontally:m=>{let g=u(m);if(g<0)m-=g;else{const v=d(m);v>0&&(m-=v,g=u(m),g<0&&(m-=g))}return m},confineVertically:m=>{let g=h(m);if(g<0)m-=g;else{const v=l(m);v>0&&(m-=v,g=h(m),g<0&&(m-=g))}return m}}},Sl=({arrowRef:t,menuY:e,anchorRect:n,containerRect:r,menuRect:s})=>{let a=n.top-r.top-e+n.height/2;const i=t.current.offsetHeight*1.25;return a=Math.max(i,a),a=Math.min(a,s.height-i),a},Tl=({anchorRect:t,containerRect:e,menuRect:n,placeLeftorRightY:r,placeLeftX:s,placeRightX:a,getLeftOverflow:i,getRightOverflow:c,confineHorizontally:u,confineVertically:d,arrowRef:h,arrow:l,direction:f,position:p})=>{let m=f,g=r;p!=="initial"&&(g=d(g),p==="anchor"&&(g=Math.min(g,t.bottom-e.top),g=Math.max(g,t.top-e.top-n.height)));let v,b,_;return m==="left"?(v=s,p!=="initial"&&(b=i(v),b<0&&(_=c(a),(_<=0||-b>_)&&(v=a,m="right")))):(v=a,p!=="initial"&&(_=c(v),_>0&&(b=i(s),(b>=0||-b<_)&&(v=s,m="left")))),p==="auto"&&(v=u(v)),{arrowY:l?Sl({menuY:g,arrowRef:h,anchorRect:t,containerRect:e,menuRect:n}):void 0,x:v,y:g,computedDirection:m}},Cl=({arrowRef:t,menuX:e,anchorRect:n,containerRect:r,menuRect:s})=>{let a=n.left-r.left-e+n.width/2;const i=t.current.offsetWidth*1.25;return a=Math.max(i,a),a=Math.min(a,s.width-i),a},El=({anchorRect:t,containerRect:e,menuRect:n,placeToporBottomX:r,placeTopY:s,placeBottomY:a,getTopOverflow:i,getBottomOverflow:c,confineHorizontally:u,confineVertically:d,arrowRef:h,arrow:l,direction:f,position:p})=>{let m=f==="top"?"top":"bottom",g=r;p!=="initial"&&(g=u(g),p==="anchor"&&(g=Math.min(g,t.right-e.left),g=Math.max(g,t.left-e.left-n.width)));let v,b,_;return m==="top"?(v=s,p!=="initial"&&(b=i(v),b<0&&(_=c(a),(_<=0||-b>_)&&(v=a,m="bottom")))):(v=a,p!=="initial"&&(_=c(v),_>0&&(b=i(s),(b>=0||-b<_)&&(v=s,m="top")))),p==="auto"&&(v=d(v)),{arrowX:l?Cl({menuX:g,arrowRef:h,anchorRect:t,containerRect:e,menuRect:n}):void 0,x:g,y:v,computedDirection:m}},Al=({arrow:t,align:e,direction:n,gap:r,shift:s,position:a,anchorRect:i,arrowRef:c,positionHelpers:u})=>{const{menuRect:d,containerRect:h}=u,l=n==="left"||n==="right";let f=l?r:s,p=l?s:r;if(t){const w=c.current;l?f+=w.offsetWidth:p+=w.offsetHeight}const m=i.left-h.left-d.width-f,g=i.right-h.left+f,v=i.top-h.top-d.height-p,b=i.bottom-h.top+p;let _,S;e==="end"?(_=i.right-h.left-d.width,S=i.bottom-h.top-d.height):e==="center"?(_=i.left-h.left-(d.width-i.width)/2,S=i.top-h.top-(d.height-i.height)/2):(_=i.left-h.left,S=i.top-h.top),_+=f,S+=p;const C={...u,anchorRect:i,placeLeftX:m,placeRightX:g,placeLeftorRightY:S,placeTopY:v,placeBottomY:b,placeToporBottomX:_,arrowRef:c,arrow:t,direction:n,position:a};switch(n){case"left":case"right":return Tl(C);default:return El(C)}},cn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?me:V;function ji(t,e){typeof t=="function"?t(e):t.current=e}const mn=(t,e)=>st(()=>t?e?n=>{ji(t,n),ji(e,n)}:t:e,[t,e]),Ui=-9999,oa=({ariaLabel:t,menuClassName:e,menuStyle:n,arrow:r,arrowProps:s={},anchorPoint:a,anchorRef:i,containerRef:c,containerProps:u,externalRef:d,parentScrollingRef:h,align:l="start",direction:f="bottom",position:p="auto",overflow:m="visible",setDownOverflow:g,repositionFlag:v,captureFocus:b=!0,state:_,endTransition:S,isDisabled:C,menuItemFocus:w,gap:T=0,shift:A=0,children:I,onClose:x,focusProps:k,...R})=>{const[O,D]=F({x:Ui,y:Ui}),[E,Q]=F({}),[G,rt]=F(),[H,Y]=F(f),[nt]=F(wl),[mt,at]=Wr(W=>W+1,1),{transition:U,boundingBoxRef:Et,boundingBoxPadding:Nt,rootMenuRef:At,rootAnchorRef:Bt,scrollNodesRef:ne,reposition:vt,viewScroll:se,submenuCloseDelay:qt}=Lt(Io),{submenuCtx:Gt,reposSubmenu:Z=v}=Lt(ko),ht=$(),xt=$(),Mt=$(!1),{hoverItem:X,dispatch:ut,updateItems:ot}=_l(ht),dt=Xr(_),Ht=Bn(U,"open"),ae=Bn(U,"close"),B=ne.current,K=W=>{switch(W.key){case Ft.HOME:ut(Ct.FIRST);break;case Ft.END:ut(Ct.LAST);break;case Ft.UP:ut(Ct.DECREASE,X);break;case Ft.DOWN:ut(Ct.INCREASE,X);break;case Ft.SPACE:W.target&&W.target.className.indexOf(pe)!==-1&&W.preventDefault();return;default:return}W.preventDefault(),W.stopPropagation()},q=()=>{_==="closing"&&rt(),Wt(S)},gt=W=>{W.stopPropagation(),nt.on(qt,()=>{ut(Ct.RESET),ht.current.focus(kr)})},Vt=W=>{W.target===W.currentTarget&&nt.off()},_t=yt(W=>{const wt=ht.current,te=c.current;if(!wt||!te)return;const zt=i?i.current?.getBoundingClientRect():a?{left:a.x,right:a.x,top:a.y,bottom:a.y,width:0,height:0}:null;if(!zt)return;B.menu||(B.menu=(Et?Et.current:Yo(At.current))||window);const ft=kl(te,wt,B.menu,Nt);let{arrowX:oe,arrowY:jn,x:Un,y:Ee,computedDirection:Do}=Al({arrow:r,align:l,direction:f,gap:T,shift:A,position:p,anchorRect:zt,arrowRef:xt,positionHelpers:ft});const{menuRect:St}=ft,Xe=St.height;if(!W&&m!=="visible"){const{getTopOverflow:ve,getBottomOverflow:le}=ft;let Be,Kt;const ye=le(Ee);if(ye>0)Be=Xe-ye,Kt=ye;else{const jt=ve(Ee);jt<0&&(Be=Xe+jt,Kt=0-jt,Be>=0&&(Ee-=jt))}Be>=0&&rt({height:Be,overflowAmt:Kt})}r&&Q({x:oe,y:jn}),D({x:Un,y:Ee}),Y(Do)},[r,l,Nt,f,T,A,p,m,a,i,c,Et,At,B]);cn(()=>{dt&&(_t(),Mt.current&&at()),Mt.current=dt},[dt,_t,Z]),cn(()=>{G&&!g&&(ht.current.scrollTop=0)},[G,g]),cn(()=>ot,[ot]),V(()=>{let{menu:W}=B;if(!dt||!W)return;if(W=W.addEventListener?W:window,!B.anchors){B.anchors=[];let ft=Yo(Bt&&Bt.current);for(;ft&&ft!==W;)B.anchors.push(ft),ft=Yo(ft)}let wt=se;if(B.anchors.length&&wt==="initial"&&(wt="auto"),wt==="initial")return;const te=()=>{wt==="auto"?_r(()=>_t(!0)):Wt(x,{reason:zn.SCROLL})},zt=B.anchors.concat(se!=="initial"?W:[]);return zt.forEach(ft=>ft.addEventListener("scroll",te)),()=>zt.forEach(ft=>ft.removeEventListener("scroll",te))},[Bt,B,dt,x,se,_t]);const kt=!!G&&G.overflowAmt>0;V(()=>{if(kt||!dt||!h)return;const W=()=>_r(_t),wt=h.current;return wt.addEventListener("scroll",W),()=>wt.removeEventListener("scroll",W)},[dt,kt,h,_t]),V(()=>{if(!dt||typeof ResizeObserver!="function"||vt==="initial")return;const W=[],wt=new ResizeObserver(ft=>ft.forEach(({target:oe})=>{W.indexOf(oe)<0?W.push(oe):Tc(()=>{_t(),at()})})),te={box:"border-box"};wt.observe(ht.current,te);const zt=i?.current;return zt&&wt.observe(zt,te),()=>wt.disconnect()},[dt,vt,i,_t]),V(()=>{if(!dt){ut(Ct.RESET),ae||rt();return}const{position:W,alwaysUpdate:wt}=w||{},te=()=>{W===an.FIRST?ut(Ct.FIRST):W===an.LAST?ut(Ct.LAST):W>=-1&&ut(Ct.SET_INDEX,void 0,W)};if(wt)te();else if(b){const zt=setTimeout(()=>{const ft=ht.current;ft&&!ft.contains(document.activeElement)&&(ft.focus(kr),te())},Ht?170:100);return()=>clearTimeout(zt)}},[dt,Ht,ae,b,w,ut]);const ce=st(()=>({isParentOpen:dt,submenuCtx:nt,dispatch:ut,updateItems:ot}),[dt,nt,ut,ot]);let Dt,It;G&&(g?It=G.overflowAmt:Dt=G.height);const tt=st(()=>({reposSubmenu:mt,submenuCtx:nt,overflow:m,overflowAmt:It,parentMenuRef:ht,parentDir:H}),[mt,nt,m,It,H]),bt=Dt>=0?{maxHeight:Dt,overflow:m}:void 0,et=st(()=>({state:_,align:l,dir:H}),[_,l,H]),Rt=st(()=>({dir:H}),[H]),Fe=ge({block:pe,element:hl,modifiers:Rt,className:s.className}),Po=o("ul",{role:"menu","aria-label":t,...Mo(C),...pn({onPointerEnter:Gt?.off,onPointerMove:gt,onPointerLeave:Vt,onKeyDown:K,onAnimationEnd:q},R),ref:mn(d,ht),className:ge({block:pe,modifiers:et,className:e}),style:{...n,...bt,margin:0,display:_==="closed"?"none":void 0,position:Hi,left:O.x,top:O.y},children:[r&&o("li",{"aria-hidden":!0,...s,className:Fe,style:{display:"block",position:Hi,left:E.x,top:E.y,...s.style},ref:xt}),o(ko.Provider,{value:tt,children:o(ti.Provider,{value:ce,children:o(ea.Provider,{value:X,children:Wt(I,et)})})})]});return u?o(bl,{...u,isOpen:dt,children:Po}):Po},ra=$e(function({"aria-label":e,className:n,containerProps:r,initialMounted:s,unmountOnClose:a,transition:i,transitionTimeout:c,boundingBoxRef:u,boundingBoxPadding:d,reposition:h="auto",submenuOpenDelay:l=300,submenuCloseDelay:f=150,viewScroll:p="initial",portal:m,theming:g,onItemClick:v,...b},_){const S=$(null),C=$({}),{anchorRef:w,state:T,onClose:A}=b,I=st(()=>({initialMounted:s,unmountOnClose:a,transition:i,transitionTimeout:c,boundingBoxRef:u,boundingBoxPadding:d,rootMenuRef:S,rootAnchorRef:w,scrollNodesRef:C,reposition:h,viewScroll:p,submenuOpenDelay:l,submenuCloseDelay:f}),[s,a,i,c,w,u,d,h,p,l,f]),x=st(()=>({handleClick(R,O){R.stopPropagation||Wt(v,R);let D=R.keepOpen;D===void 0&&(D=O&&R.key===Ft.SPACE),D||Wt(A,{value:R.value,key:R.key,reason:zn.CLICK})},handleClose(R){Wt(A,{key:R,reason:zn.CLICK})}}),[v,A]);if(!T)return null;const k=o(Io.Provider,{value:I,children:o(ei.Provider,{value:x,children:o(oa,{...b,ariaLabel:e||"Menu",externalRef:_,containerRef:S,containerProps:{className:n,containerRef:S,containerProps:r,theming:g,transition:i,onClose:A}})})});return m===!0&&typeof document<"u"?wo(k,document.body):m?m.target?wo(k,m.target):m.stablePosition?null:k:k}),Sr=0,Tr=1,So=2,To=3,Co=4,xl=5,ia=6,Ml=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],sa=t=>({_s:t,status:Ml[t],isEnter:t<To,isMounted:t!==ia,isResolved:t===So||t>Co}),Cr=t=>t?ia:xl,Il=(t,e)=>{switch(t){case Tr:case Sr:return So;case Co:case To:return Cr(e)}},Ll=t=>typeof t=="object"?[t.enter,t.exit]:[t,t],Pl=(t,e)=>setTimeout(()=>{isNaN(document.body.offsetTop)||t(e+1)},0),Wi=(t,e,n,r,s)=>{clearTimeout(r.current);const a=sa(t);e(a),n.current=a,s&&s({current:a})},Dl=({enter:t=!0,exit:e=!0,preEnter:n,preExit:r,timeout:s,initialEntered:a,mountOnEnter:i,unmountOnExit:c,onStateChange:u}={})=>{const[d,h]=F(()=>sa(a?So:Cr(i))),l=$(d),f=$(),[p,m]=Ll(s),g=yt(()=>{const b=Il(l.current._s,c);b&&Wi(b,h,l,f,u)},[u,c]),v=yt(b=>{const _=C=>{switch(Wi(C,h,l,f,u),C){case Tr:p>=0&&(f.current=setTimeout(g,p));break;case Co:m>=0&&(f.current=setTimeout(g,m));break;case Sr:case To:f.current=Pl(_,C);break}},S=l.current.isEnter;typeof b!="boolean"&&(b=!S),b?!S&&_(t?n?Sr:Tr:So):S&&_(e?r?To:Co:Cr(c))},[g,u,t,e,n,r,p,m,c]);return[d,v,g]};const Rl=({initialOpen:t,initialMounted:e,unmountOnClose:n,transition:r,transitionTimeout:s=500,onMenuChange:a}={})=>{const i=Bn(r,"open"),c=Bn(r,"close"),[{status:u},d,h]=Dl({initialEntered:t,mountOnEnter:!e,unmountOnExit:n,timeout:s,enter:i,exit:c,onStateChange:yt(({current:{isEnter:l,isResolved:f}})=>{!a||l&&i&&f||!l&&c&&f||a({open:l})},[a,i,c])});return[{state:yl[u],endTransition:h},d]},aa=t=>{const[e,n]=Rl(t),[r,s]=F(),a=(i,c)=>{s({position:i,alwaysUpdate:c}),n(!0)};return[{menuItemFocus:r,...e},n,a]},$l=(t,e)=>{const[n]=F({});return{onMouseDown:()=>{n.v=t&&t!=="closed"},onClick:r=>n.v?n.v=!1:e(!0,r)}},Nl=parseInt(Cc)<19,Ol=$e(function({"aria-label":e,captureFocus:n,initialOpen:r,menuButton:s,instanceRef:a,onMenuChange:i,...c},u){const[d,h,l]=aa({...c,onMenuChange:i}),{state:f}=d,p=Xr(f),m=$(null),g=$l(f,(w,T)=>l(T.detail?void 0:an.FIRST)),v=yt(w=>{h(!1),w.key&&m.current.focus()},[h]),b=w=>{switch(w.key){case Ft.UP:l(an.LAST);break;case Ft.DOWN:l(an.FIRST);break;default:return}w.preventDefault()},_=Wt(s,{open:p});if(!_||!_.type)throw new Error("Menu requires a menuButton prop.");const S={...pn({onKeyDown:b,...g},_.props),ref:mn(Nl?_.ref:_.props.ref,m)};ll(_.type)==="MenuButton"&&(S.isOpen=p);const C=Us(_,S);return Ws(a,()=>({openMenu:l,closeMenu:()=>h(!1)})),o(N,{children:[C,o(ra,{...c,...d,"aria-label":e||(typeof _.props.children=="string"?_.props.children:"Menu"),anchorRef:m,ref:u,onClose:v})]})}),ri=(t,e)=>{const n=Ne(e),r=$e((s,a)=>{const i=$(null);return o(n,{...s,itemRef:i,externalRef:a,isHovering:Lt(ea)===i.current})});return r.displayName=`WithHovering(${t})`,r},ca=t=>{const[e,n]=F(!1);return V(()=>{!t&&n(!1)},[t]),[e,()=>!e&&n(!0),()=>n(!1)]},la=(t,e,n)=>{cn(()=>{if(t)return;const r=e.current;return n(r,!0),()=>{n(r)}},[t,e,n])},Fl=ri("SubMenu",function({"aria-label":e,className:n,disabled:r,direction:s,label:a,openTrigger:i,onMenuChange:c,isHovering:u,instanceRef:d,itemRef:h,captureFocus:l,repositionFlag:f,itemProps:p={},portal:m=!1,...g}){const v=Lt(Io),{rootMenuRef:b,submenuOpenDelay:_,submenuCloseDelay:S}=v,{parentMenuRef:C,parentDir:w,overflow:T}=Lt(ko),{isParentOpen:A,submenuCtx:I,dispatch:x,updateItems:k}=Lt(ti),R=m||T!=="visible",[O,D,E]=aa({...v,onMenuChange:c}),[Q,G,rt]=ca(u),{state:H}=O,Y=!!r,nt=Xr(H),mt=$(null),[at]=F({v:0}),U=()=>{I.off(),at.v&&(clearTimeout(at.v),at.v=0)},Et=(...X)=>{U(),Nt(),!Y&&E(...X)},Nt=()=>!u&&!Y&&x(Ct.SET,h.current),At=X=>{Nt(),i||(at.v=setTimeout(()=>_r(Et),Math.max(X,0)))},Bt=X=>{Y||(X.stopPropagation(),G(),!(at.v||nt)&&I.on(S,()=>At(_-S),()=>At(_)))},ne=()=>{rt(),U(),nt||x(Ct.UNSET,h.current)},vt=X=>{if(u)switch(X.key){case Ft.ENTER:X.preventDefault();case Ft.SPACE:case Ft.RIGHT:i!=="none"&&Et(an.FIRST)}},se=X=>{let ut=!1;switch(X.key){case Ft.LEFT:nt&&(h.current.focus(),D(!1),ut=!0);break;case Ft.RIGHT:nt||(ut=!0);break}ut&&(X.preventDefault(),X.stopPropagation())};la(Y,h,k),V(()=>I.toggle(nt),[I,nt]),V(()=>()=>{clearTimeout(at.v),I.toggle(!1)},[at,I]),V(()=>{u&&A?h.current.focus():D(!1)},[u,A,D,h]),Ws(d,()=>({openMenu:(...X)=>{A&&Et(...X)},closeMenu:()=>{nt&&(h.current.focus(),D(!1))}}));const qt=st(()=>({open:nt,hover:Q||u,disabled:Y,submenu:!0}),[nt,u,Y,Q]),{ref:Gt,className:Z,...ht}=p,xt=pn({onPointerEnter:I.off,onPointerMove:Bt,onPointerLeave:ne,onKeyDown:vt,onClick:()=>i!=="none"&&Et()},ht),Mt=()=>{const X=o(oa,{...g,...O,ariaLabel:e||(typeof a=="string"?a:"Submenu"),anchorRef:h,containerRef:R?b:mt,direction:s||(w==="right"||w==="left"?w:"right"),parentScrollingRef:R&&C,isDisabled:Y}),ut=b.current;return R&&ut?wo(X,ut):X};return o("li",{className:ge({block:pe,element:gl,className:n}),style:{position:"relative"},role:ni,ref:mt,onKeyDown:se,children:[o("div",{role:oi,"aria-haspopup":!0,"aria-expanded":nt,...Mo(Y,u),...xt,ref:mn(Gt,h),className:ge({block:pe,element:Jr,modifiers:qt,className:Z}),children:st(()=>Wt(a,qt),[a,qt])}),H&&Mt()]})}),ua=(t,e,n,r)=>{const[s,a,i]=ca(n),{submenuCloseDelay:c}=Lt(Io),{isParentOpen:u,submenuCtx:d,dispatch:h,updateItems:l}=Lt(ti),f=()=>{!n&&!r&&h(Ct.SET,t.current)},p=()=>{!r&&h(Ct.UNSET,t.current)},m=b=>{n&&!b.currentTarget.contains(b.relatedTarget)&&p()},g=b=>{r||(b.stopPropagation(),a(),d.on(c,f,f))},v=(b,_)=>{i(),d.off(),!_&&p()};return la(r,t,l),V(()=>{n&&u&&e.current&&e.current.focus()},[e,n,u]),{mouseOver:s,setHover:f,onBlur:m,onPointerMove:g,onPointerLeave:v}},lt=ri("MenuItem",function({className:e,value:n,href:r,type:s,checked:a,disabled:i,children:c,onClick:u,isHovering:d,itemRef:h,externalRef:l,...f}){const p=!!i,{mouseOver:m,setHover:g,...v}=ua(h,h,d,p),b=Lt(ei),_=Lt(vl),S=s==="radio",C=s==="checkbox",w=!!r&&!p&&!S&&!C,T=S?_.value===n:C?!!a:!1,A=O=>{if(p){O.stopPropagation(),O.preventDefault();return}const D={value:n,syntheticEvent:O};O.key!==void 0&&(D.key=O.key),C&&(D.checked=!T),S&&(D.name=_.name),Wt(u,D),S&&Wt(_.onRadioChange,D),b.handleClick(D,C||S)},I=O=>{if(d)switch(O.key){case Ft.ENTER:O.preventDefault();case Ft.SPACE:w?h.current.click():A(O)}},x=st(()=>({type:s,disabled:p,hover:m||d,checked:T,anchor:w}),[s,p,m,d,T,w]),k=pn({...v,onPointerDown:g,onKeyDown:I,onClick:A},f),R={role:S?"menuitemradio":C?"menuitemcheckbox":oi,"aria-checked":S||C?T:void 0,...Mo(p,d),...k,ref:mn(l,h),className:ge({block:pe,element:Jr,modifiers:x,className:e}),children:st(()=>Wt(c,x),[c,x])};return w?o("li",{role:ni,children:o("a",{href:r,...R})}):o("li",{...R})}),Bl=ri("FocusableItem",function({className:e,disabled:n,children:r,isHovering:s,itemRef:a,externalRef:i,...c}){const u=!!n,d=$(null),{mouseOver:h,setHover:l,onPointerLeave:f,...p}=ua(a,d,s,u),{handleClose:m}=Lt(ei),g=st(()=>({disabled:u,hover:h||s,focusable:!0}),[u,s,h]),v=st(()=>Wt(r,{...g,ref:d,closeMenu:m}),[r,g,m]),b=pn({...p,onPointerLeave:_=>f(_,!0),onFocus:l},c);return o("li",{role:oi,...Mo(u),...b,ref:mn(i,a),className:ge({block:pe,element:Jr,modifiers:g,className:e}),children:v})}),Sn=Ne($e(function({className:e,...n},r){return o("li",{role:"separator",...n,ref:r,className:ge({block:pe,element:fl,className:e})})})),zy=Ne($e(function({className:e,...n},r){return o("li",{role:ni,...n,ref:r,className:ge({block:pe,element:pl,className:e})})})),qy=$e(function({className:e,style:n,takeOverflow:r,...s},a){const i=$(null),[c,u]=F(),{overflow:d,overflowAmt:h}=Lt(ko);return cn(()=>{let l;r&&h>=0&&(l=na(i.current).height-h,l<0&&(l=0)),u(l>=0?{maxHeight:l,overflow:d}:void 0)},[r,d,h]),cn(()=>{c&&(i.current.scrollTop=0)},[c]),o("div",{...s,ref:mn(a,i),className:ge({block:pe,element:ml,className:e}),style:{...n,...c}})});var Dn=(t=>(t.Mouse="mouse",t.Touch="touch",t.Pointer="pointer",t))(Dn||{}),Rn=(t=>(t.CancelledByMovement="cancelled-by-movement",t.CancelledByRelease="cancelled-by-release",t.CancelledOutsideElement="cancelled-outside-element",t))(Rn||{});const zl=["mousedown","mousemove","mouseup","mouseleave","mouseout"],ql=["touchstart","touchmove","touchend","touchcancel"],Hl=["pointerdown","pointermove","pointerup","pointerleave","pointerout"];function Kl(t){return typeof t=="object"&&t!==null&&"pageX"in t&&typeof t.pageX=="number"&&"pageY"in t&&typeof t.pageY=="number"}function jl(t){var e;return zl.includes((e=t?.nativeEvent)==null?void 0:e.type)}function da(t){var e;return ql.includes((e=t?.nativeEvent)==null?void 0:e.type)||"touches"in t}function Ul(t){const{nativeEvent:e}=t;return e?Hl.includes(e?.type)||"pointerId"in e:!1}function Qo(t){return jl(t)||da(t)||Ul(t)}function Zi(t){var e;const n=da(t)?(e=t?.touches)==null?void 0:e[0]:t;return Kl(n)?{x:n.pageX,y:n.pageY}:null}function Wl(t){return{target:t.target,currentTarget:t.currentTarget,nativeEvent:t,persist:()=>{}}}function ha(t,{threshold:e=400,captureEvent:n=!1,detect:r=Dn.Pointer,cancelOnMovement:s=!1,cancelOutsideElement:a=!0,filterEvents:i,onStart:c,onMove:u,onFinish:d,onCancel:h}={}){const l=$(!1),f=$(!1),p=$(),m=$(),g=$(t),v=$(null),b=yt(w=>T=>{f.current||Qo(T)&&(i!==void 0&&!i(T)||(n&&T.persist(),c?.(T,{context:w}),v.current=Zi(T),f.current=!0,p.current=T.currentTarget,m.current=setTimeout(()=>{g.current&&(g.current(T,{context:w}),l.current=!0)},e)))},[n,i,c,e]),_=yt(w=>(T,A)=>{Qo(T)&&f.current&&(v.current=null,n&&T.persist(),l.current?d?.(T,{context:w}):f.current&&h?.(T,{context:w,reason:A??Rn.CancelledByRelease}),l.current=!1,f.current=!1,m.current!==void 0&&clearTimeout(m.current))},[n,d,h]),S=yt(w=>T=>{if(Qo(T)&&(u?.(T,{context:w}),s!==!1&&v.current)){const A=Zi(T);if(A){const I=s===!0?25:s,x={x:Math.abs(A.x-v.current.x),y:Math.abs(A.y-v.current.y)};(x.x>I||x.y>I)&&_(w)(T,Rn.CancelledByMovement)}}},[_,s,u]),C=yt(w=>{if(t===null)return{};switch(r){case Dn.Mouse:{const T={onMouseDown:b(w),onMouseMove:S(w),onMouseUp:_(w)};return a&&(T.onMouseLeave=A=>{_(w)(A,Rn.CancelledOutsideElement)}),T}case Dn.Touch:return{onTouchStart:b(w),onTouchMove:S(w),onTouchEnd:_(w)};case Dn.Pointer:{const T={onPointerDown:b(w),onPointerMove:S(w),onPointerUp:_(w)};return a&&(T.onPointerLeave=A=>_(w)(A,Rn.CancelledOutsideElement)),T}}},[t,_,a,r,S,b]);return V(()=>{function w(T){const A=Wl(T);_()(A)}return window.addEventListener("mouseup",w),window.addEventListener("touchend",w),window.addEventListener("pointerup",w),()=>{window.removeEventListener("mouseup",w),window.removeEventListener("touchend",w),window.removeEventListener("pointerup",w)}},[_]),V(()=>()=>{m.current!==void 0&&clearTimeout(m.current)},[]),V(()=>{g.current=t},[t]),C}const Gi="dtflocale";function Zl(){try{const t=br.session.get(Gi);if(t)return t;const e=new Intl.DateTimeFormat().resolvedOptions().locale;return br.session.set(Gi,e),e}catch{return null}}const fa=Zt(Zl);function Gl(){const t=[...navigator.languages],e=fa();return e&&!t.includes(e)&&t.unshift(e),t}let Vi=Gl();const Xo=Zt((t,e={})=>{try{return new Intl.Locale(t,e)}catch{if(!t)return null;const[r,...s]=t.split("-",4),a=s.pop()||null,i={language:r,region:a,...e,toString:()=>{const c=i.language,u=s.length>0?`-${s.join("-")}-`:"-",d=i.region;return d?`${c}${u}${d}`:c}};return i}}),Vl=(t,e)=>{const n=e,r=Xo(t);let s=null;for(const c of Vi){const u=Xo(c)?.region;if(u){s=u;break}}const a=s&&r&&r.region!==s?Xo(r.language,{...r,region:s})?.toString():null,i=_o([a,t,t?.replace(/-[a-z]+$/i,"")],Vi,t);try{return new Intl.DateTimeFormat(i,n)}catch{return new Intl.DateTimeFormat(void 0,n)}},Er=Zt(Vl);function qn(t,e){t instanceof Date||(t=new Date(t));const{hideTime:n,formatOpts:r,forceOpts:s}=e||{},a=new Date().getFullYear(),i=s||{year:t.getFullYear()===a?void 0:"numeric",month:"short",day:"numeric",hour:n?void 0:"numeric",minute:n?void 0:"numeric",...r};return Er(Pt.locale,i).format(t)}function Yl(t){const e=URL.parse("./compose/",window.location),{width:n,height:r}=window.screen,s=Math.max(0,(n-600)/2),a=Math.max(0,(r-450)/2),i=Math.min(n,600),c=Math.min(r,450),u=t?.uid||Math.random(),d=window.open(e,"compose"+u,`width=${i},height=${c},left=${s},top=${a}`);return d?d.__COMPOSE__=t:alert(Pt._({id:"4S86wI"})),d}const Ql=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);function Xl(){if(Ql){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 Jl=document.documentElement,oo=getComputedStyle(Jl),tu=8;let pa=[0,0,0,0];function ma(){const t=oo.getPropertyValue("--sai-top"),e=oo.getPropertyValue("--sai-right"),n=oo.getPropertyValue("--sai-bottom"),r=oo.getPropertyValue("--sai-left");pa=[Math.max(0,parseInt(t,10)),Math.max(0,parseInt(e,10)),Math.max(0,parseInt(n,10)),Math.max(0,parseInt(r,10))]}requestAnimationFrame(ma);function ga(t=[]){return pa.map((n,r)=>(n||tu)+(t[r]||0)).join(" ")}CSS.supports("top: env(safe-area-inset-top)")&&window.addEventListener("resize",ma,{passive:!0});const Yi=5e3;function Ie(t){if(t||(t=!0),z.showCompose){z.composerState.minimized?pt({duration:Yi,text:Pt._({id:"/4fHR1"})}):pt({duration:Yi,text:Pt._({id:"vvl08N"})});return}Xl(),z.showCompose=t}const Qi=document.createElement("template"),eu=/<\/p>/g,nu=/<\/li>/g,ou=/[\r\n]{3,}/g;function ii(t,e){if(!t)return"";const{preProcess:n,truncateLinks:r=!0}=e||{};Qi.innerHTML=t.replace(eu,`</p>
`).replace(nu,`</li>
`);const s=Qi.content,a=s.querySelectorAll("br");for(let c=0;c<a.length;c++)a[c].replaceWith(`
`);if(n?.(s),r){const c=s.querySelectorAll(".invisible");for(let d=0;d<c.length;d++)c[d].remove();const u=s.querySelectorAll(".ellipsis");for(let d=0;d<u.length;d++)u[d].append("…")}let i="";for(let c=0;c<s.childNodes.length;c++){const u=s.childNodes[c];i+=u.innerText||u.textContent||""}return i.replace(ou,`
`).trim()}function si(t){const{spoilerText:e,content:n,poll:r,mediaAttachments:s,quote:a}=t;let i="";const c=!!a?.quotedStatus?.id;if(e?.trim()?i+=e:i+=ii(n,{preProcess:u=>{if(c){const d=u.querySelector(".quote-inline");d&&d.remove()}}}),i=i.trim(),r?.options?.length&&(i+=`
📊:
${r.options.map(u=>`${r.multiple?"▪️":"•"} ${u.title}`).join(`
`)}`),s?.length&&(i+=" "+s.map(u=>({image:"🖼️",gifv:"🎞️",video:"📹",audio:"🎵",unknown:""})[u.type]||"").join("")),c){const u=si(a.quotedStatus);i+=`
${u}
`}return i}const ru={xs:8,s:12,m:16,l:20,xl:24,xxl:32},iu=/[^a-zA-Z0-9]/g;function su({icon:t,size:e="m",alt:n,title:r,class:s="",style:a={}}){r=r||n;const{loadIcon:i,isIconLoaded:c}=Ec();if(!t)return null;const u=ru[e];let d=Hc[t];if(!d)return null;let h,l,f=!1;Array.isArray(d)?[d,h,l]=d:typeof d=="object"&&({rotate:h,flip:l,rtl:f}=d,d=d.module);const p=r?.replace(iu,"-"),m=`${Oi}-title-${t}-${p}`;V(()=>{c(t)||i(t)},[t]);const g=c(t);return o("span",{class:`icon ${s} ${f?"rtl-flip":""}`,style:{width:`${u}px`,height:`${u}px`,...a},"data-icon":t,title:g?void 0:r||void 0,children:g&&o("svg",{width:u,height:u,role:r?"img":"presentation","aria-labelledby":m,style:{transform:`${h?`rotate(${h})`:""} ${l?"scaleX(-1)":""}`},children:[r?o("title",{id:m,children:r}):null,o("use",{href:`#${Oi}-${t}`})]})})}const L=Ne(su,(t,e)=>t.icon===e.icon&&t.title===e.title&&t.alt===e.alt),Re=$e((t,e)=>{let n;try{n=Ac()}catch{}let r=(location.hash||"").replace(/^#/,"").trim();r===""&&(r="/");const{to:s,...a}=t;if(r&&r!=="/"&&r.includes("?")){const c=URL.parse(r,location.origin);if(c?.searchParams?.size){const u=Array.from(c.searchParams.entries()).map(([d,h])=>`${d}=${encodeURIComponent(h)}`).join("&");r=c.pathname+"?"+u}}const i=r===s||decodeURIComponent(r)===s;return o("a",{ref:e,href:`#${s}`,...a,class:`${t.class||""} ${i?"is-active":""}`,onClick:c=>{c.currentTarget?.parentNode?.closest("a")&&c.stopPropagation(),n&&(z.prevLocation=n),t.onClick?.(c)}})});function Xi(t){const{className:e,disabled:n,...r}=t;return o(Bl,{className:e,disabled:n,children:({ref:s,closeMenu:a})=>o(Re,{...r,ref:s,onClick:({detail:i})=>a(i===0?"Enter":void 0)})})}const va=Zt(t=>new Intl.RelativeTimeFormat(t||void 0));function Ji(t){if(t instanceof Date)return!isNaN(t.getTime());{const e=new Date(t);return!isNaN(e.getTime())}}const un=60,dn=60*un,Ue=24*dn,au=t=>{const e=va(Pt.locale),n=(t.getTime()-Date.now())/1e3,r=Math.abs(n);return r<un?e.format(Math.floor(n),"second"):r<dn?e.format(Math.floor(n/un),"minute"):r<Ue?e.format(Math.floor(n/dn),"hour"):r<30*Ue?e.format(Math.floor(n/Ue),"day"):r<365*Ue?e.format(Math.floor(n/Ue/30),"month"):e.format(Math.floor(n/Ue/365),"year")},cu=t=>{const e=(Date.now()-t.getTime())/1e3;return e<un?Pt._({id:"NnRCUm",values:{0:e<1?1:Math.floor(e)}}):e<dn?Pt._({id:"ZSWUwq",values:{0:Math.floor(e/un)}}):Pt._({id:"NSSJsj",values:{0:Math.floor(e/dn)}})};function Se({datetime:t,format:e}){if(!t)return null;const[n,r]=Wr(u=>u+1,0),s=st(()=>new Date(t),[t]),[a,i,c]=st(()=>{if(!Ji(s))return[""+(typeof t=="string"?t:""),"",""];let u;if(e==="micro"){const d=new Date;(d.getTime()-s.getTime())/1e3/Ue<=1?u=cu(s):d.getFullYear()===s.getFullYear()?u=Er(Pt.locale,{year:void 0,month:"short",day:"numeric"}).format(s):u=Er(Pt.locale,{dateStyle:"short"}).format(s)}return u||(u=au(s)),[u,s.toISOString(),s.toLocaleString()]},[s,e,n]);return V(()=>{if(!Ji(s))return;let u,d;function h(){d=requestAnimationFrame(()=>{r(),l()})}function l(){const f=(Date.now()-s.getTime())/1e3;f<un?u=setTimeout(h,1e4):f<dn&&(u=setTimeout(h,6e4))}return l(),()=>{clearTimeout(u),cancelAnimationFrame(d)}},[]),o("time",{datetime:i,title:c,children:a})}function ya(t){const e=$(),n=$(),{label:r,direction:s,shift:a,...i}=t,[c,u]=F(s),[d,h]=F(a);return me(()=>{if(n.current){const l=n.current.offsetWidth,f=window.innerWidth;l>f*.5?(u("bottom"),h(a||8)):(u(s),h(a))}},[s,a]),o(Fl,{...i,direction:c,shift:d,label:r,instanceRef:e,itemProps:{ref:n,onPointerMove:l=>{l.pointerType==="touch"&&e.current?.openMenu?.()},onPointerLeave:l=>{l.pointerType==="touch"&&e.current?.openMenu?.()},...t.itemProps}})}function lu(t,e=[]){!t||typeof t!="function"||V(()=>{const n=new CloseWatcher;return n.addEventListener("close",t),()=>{n.destroy()}},e)}const uu=window.CloseWatcher?lu:()=>{},du=document.getElementById("modal-container");function ts(){return getComputedStyle(document.documentElement).getPropertyValue("--backdrop-theme-color")}function sn({children:t,onClose:e,onClick:n,class:r,minimized:s}){if(!t)return null;const a=$();V(()=>{let l=setTimeout(()=>{const f=a.current?.querySelector('[tabindex="-1"]');f&&f.focus()},100);return()=>clearTimeout(l)},[]);const i=window.CloseWatcher,c=je("esc",()=>{setTimeout(()=>{e?.()},0)},{enabled:!i&&!!e,keydown:!1,keyup:!0,useKey:!0,ignoreEventWhen:l=>l.metaKey||l.ctrlKey||l.altKey||l.shiftKey},[e]);uu(e,[e]),V(()=>{const l=document.querySelectorAll(".deck-container");if(s){const f=l[l.length-1];f&&f.tabIndex===-1&&f.focus()}else t?l.forEach(f=>{f.setAttribute("inert","")}):l.forEach(f=>{f.removeAttribute("inert")});return()=>{l.forEach(f=>{f.removeAttribute("inert")})}},[t,s]);const u=$(),d=$();me(()=>{if(t&&!s)if(br.local.get("theme")){const f=ts();u.current=document.querySelector('meta[name="theme-color"][data-theme-setting="manual"]'),u.current&&(d.current=u.current.content,u.current.content=f),document.documentElement.style.setProperty("--meta-theme-color",f)}else{const f=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",p=ts();u.current=document.querySelector(`meta[name="theme-color"][media*="${f}"]`),u.current&&(d.current=u.current.content,u.current.content=p),document.documentElement.style.setProperty("--meta-theme-color",p)}else u.current&&d.current&&(u.current.content=d.current),document.documentElement.style.removeProperty("--meta-theme-color");return()=>{u.current&&d.current&&(u.current.content=d.current),document.documentElement.style.removeProperty("--meta-theme-color")}},[t,s]);const h=o("div",{ref:l=>{a.current=l,c.current=l?.querySelector?.('[tabindex="-1"]')||l},className:r,onClick:l=>{n?.(l),l.target===l.currentTarget&&e?.(l)},tabIndex:s?0:"-1",inert:s,onFocus:l=>{try{if(l.target===l.currentTarget){const f=a.current?.querySelector('[tabindex="-1"]'),p=!!f&&getComputedStyle(f)?.pointerEvents!=="none";f&&p&&f.focus()}}catch{}},children:t});return wo(h,du)}const es={s:16,m:20,l:24,xl:32,xxl:50,xxxl:64},Tn={},$n=window.OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas"),yo=$n.getContext("2d",{willReadFrequently:!0});yo.imageSmoothingEnabled=!1;const hu=/missing\.png$/;function fu({url:t,staticUrl:e,size:n,alt:r="",squircle:s,...a}){n=es[n]||n||es.m;const i=$(),c=hu.test(t);return o("picture",{ref:i,class:`avatar ${s?"squircle":""} ${Tn[t]?"has-alpha":""}`,style:{width:n,height:n},title:r,...a,children:[!!e&&o("source",{srcset:e,media:"(prefers-reduced-motion: reduce)"}),!!t&&o("img",{src:t,width:n,height:n,alt:r,loading:"lazy",decoding:"async",fetchPriority:"low",crossOrigin:Tn[t]===void 0&&!c?"anonymous":void 0,onError:u=>{u.target.crossOrigin&&(u.target.crossOrigin=null,u.target.src=t)},onLoad:u=>{i.current&&(i.current.dataset.loaded=!0),Tn[t]===void 0&&(c||setTimeout(()=>{try{const{width:d,height:h}=u.target;$n.width!==d&&($n.width=d),$n.height!==h&&($n.height=h),yo.drawImage(u.target,0,0);const l=yo.getImageData(0,0,d,h),f=l.data.filter((p,m)=>m%4===3&&p<=128).length/(l.data.length/4)>.1;f&&i.current.classList.add("has-alpha"),Tn[t]=f,yo.clearRect(0,0,d,h)}catch{Tn[t]=!1}},1))}})]})}const re=Zt(fu);let Ar=!1;const pu=new MutationObserver(t=>{t.forEach(e=>{if(e.type==="attributes"){const{dir:n}=e.target;n==="rtl"?Ar=!0:Ar=!1}})});pu.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});function xr(){return Ar}function mu(){const[t,e]=F({width:null,height:null});return me(()=>{const n=()=>{e({width:window.innerWidth,height:window.innerHeight})};return n(),window.addEventListener("resize",n,{passive:!0}),()=>{window.removeEventListener("resize",n)}},[]),t}function Mr(t){const{containerProps:e,instanceRef:n,align:r}=t,s=mu(),a=n?.current?n:$(),i=xr()?r==="end"?"start":r==="start"?"end":r:r;return o(Ol,{boundingBoxPadding:ga(),repositionFlag:`${s.width}x${s.height}`,unmountOnClose:!0,...t,align:i,instanceRef:a,containerProps:{onClick:c=>{c.target===c.currentTarget&&a.current?.closeMenu?.(),e?.onClick?.(c)},...e}})}function ro({subMenu:t=!1,confirm:e=!0,confirmLabel:n,menuItemClassName:r,menuFooter:s,menuExtras:a,...i}){const{children:c,onClick:u,...d}=i;return e?o(t?ya:Mr,{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:[o(lt,{className:r,onClick:u,children:n}),a,s]}):t?o(lt,{...i}):u?xc(c,{onClick:u}):c}var be={},Jo={},we={},ns;function ba(){if(ns)return we;ns=1,Object.defineProperty(we,"__esModule",{value:!0}),we.loop=we.conditional=we.parse=void 0;var t=function r(s,a){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:i;if(Array.isArray(a))a.forEach(function(d){return r(s,d,i,c)});else if(typeof a=="function")a(s,i,c,r);else{var u=Object.keys(a)[0];Array.isArray(a[u])?(c[u]={},r(s,a[u],i,c[u])):c[u]=a[u](s,i,c,r)}return i};we.parse=t;var e=function(s,a){return function(i,c,u,d){a(i,c,u)&&d(i,s,c,u)}};we.conditional=e;var n=function(s,a){return function(i,c,u,d){for(var h=[],l=i.pos;a(i,c,u);){var f={};if(d(i,s,c,f),i.pos===l)break;l=i.pos,h.push(f)}return h}};return we.loop=n,we}var Tt={},os;function wa(){if(os)return Tt;os=1,Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.readBits=Tt.readArray=Tt.readUnsigned=Tt.readString=Tt.peekBytes=Tt.readBytes=Tt.peekByte=Tt.readByte=Tt.buildStream=void 0;var t=function(l){return{data:l,pos:0}};Tt.buildStream=t;var e=function(){return function(l){return l.data[l.pos++]}};Tt.readByte=e;var n=function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(f){return f.data[f.pos+l]}};Tt.peekByte=n;var r=function(l){return function(f){return f.data.subarray(f.pos,f.pos+=l)}};Tt.readBytes=r;var s=function(l){return function(f){return f.data.subarray(f.pos,f.pos+l)}};Tt.peekBytes=s;var a=function(l){return function(f){return Array.from(r(l)(f)).map(function(p){return String.fromCharCode(p)}).join("")}};Tt.readString=a;var i=function(l){return function(f){var p=r(2)(f);return l?(p[1]<<8)+p[0]:(p[0]<<8)+p[1]}};Tt.readUnsigned=i;var c=function(l,f){return function(p,m,g){for(var v=typeof f=="function"?f(p,m,g):f,b=r(l),_=new Array(v),S=0;S<v;S++)_[S]=b(p);return _}};Tt.readArray=c;var u=function(l,f,p){for(var m=0,g=0;g<p;g++)m+=l[f+g]&&Math.pow(2,p-g-1);return m},d=function(l){return function(f){for(var p=e()(f),m=new Array(8),g=0;g<8;g++)m[7-g]=!!(p&1<<g);return Object.keys(l).reduce(function(v,b){var _=l[b];return _.length?v[b]=u(m,_.index,_.length):v[b]=m[_.index],v},{})}};return Tt.readBits=d,Tt}var rs;function gu(){return rs||(rs=1,(function(t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=ba(),n=wa(),r={blocks:function(f){for(var p=0,m=[],g=f.data.length,v=0,b=(0,n.readByte)()(f);b!==p&&b;b=(0,n.readByte)()(f)){if(f.pos+b>=g){var _=g-f.pos;m.push((0,n.readBytes)(_)(f)),v+=_;break}m.push((0,n.readBytes)(b)(f)),v+=b}for(var S=new Uint8Array(v),C=0,w=0;w<m.length;w++)S.set(m[w],C),C+=m[w].length;return S}},s=(0,e.conditional)({gce:[{codes:(0,n.readBytes)(2)},{byteSize:(0,n.readByte)()},{extras:(0,n.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,n.readUnsigned)(!0)},{transparentColorIndex:(0,n.readByte)()},{terminator:(0,n.readByte)()}]},function(l){var f=(0,n.peekBytes)(2)(l);return f[0]===33&&f[1]===249}),a=(0,e.conditional)({image:[{code:(0,n.readByte)()},{descriptor:[{left:(0,n.readUnsigned)(!0)},{top:(0,n.readUnsigned)(!0)},{width:(0,n.readUnsigned)(!0)},{height:(0,n.readUnsigned)(!0)},{lct:(0,n.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,e.conditional)({lct:(0,n.readArray)(3,function(l,f,p){return Math.pow(2,p.descriptor.lct.size+1)})},function(l,f,p){return p.descriptor.lct.exists}),{data:[{minCodeSize:(0,n.readByte)()},r]}]},function(l){return(0,n.peekByte)()(l)===44}),i=(0,e.conditional)({text:[{codes:(0,n.readBytes)(2)},{blockSize:(0,n.readByte)()},{preData:function(f,p,m){return(0,n.readBytes)(m.text.blockSize)(f)}},r]},function(l){var f=(0,n.peekBytes)(2)(l);return f[0]===33&&f[1]===1}),c=(0,e.conditional)({application:[{codes:(0,n.readBytes)(2)},{blockSize:(0,n.readByte)()},{id:function(f,p,m){return(0,n.readString)(m.blockSize)(f)}},r]},function(l){var f=(0,n.peekBytes)(2)(l);return f[0]===33&&f[1]===255}),u=(0,e.conditional)({comment:[{codes:(0,n.readBytes)(2)},r]},function(l){var f=(0,n.peekBytes)(2)(l);return f[0]===33&&f[1]===254}),d=[{header:[{signature:(0,n.readString)(3)},{version:(0,n.readString)(3)}]},{lsd:[{width:(0,n.readUnsigned)(!0)},{height:(0,n.readUnsigned)(!0)},{gct:(0,n.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,n.readByte)()},{pixelAspectRatio:(0,n.readByte)()}]},(0,e.conditional)({gct:(0,n.readArray)(3,function(l,f){return Math.pow(2,f.lsd.gct.size+1)})},function(l,f){return f.lsd.gct.exists}),{frames:(0,e.loop)([s,c,u,a,i],function(l){var f=(0,n.peekByte)()(l);return f===33||f===44})}],h=d;t.default=h})(Jo)),Jo}var Cn={},is;function vu(){if(is)return Cn;is=1,Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.deinterlace=void 0;var t=function(n,r){for(var s=new Array(n.length),a=n.length/r,i=function(p,m){var g=n.slice(m*r,(m+1)*r);s.splice.apply(s,[p*r,r].concat(g))},c=[0,4,2,1],u=[8,8,4,2],d=0,h=0;h<4;h++)for(var l=c[h];l<a;l+=u[h])i(l,d),d++;return s};return Cn.deinterlace=t,Cn}var En={},ss;function yu(){if(ss)return En;ss=1,Object.defineProperty(En,"__esModule",{value:!0}),En.lzw=void 0;var t=function(n,r,s){var a=4096,i=-1,c=s,u,d,h,l,f,p,m,A,g,v,T,b,x,k,O,R,_=new Array(s),S=new Array(a),C=new Array(a),w=new Array(a+1);for(b=n,d=1<<b,f=d+1,u=d+2,m=i,l=b+1,h=(1<<l)-1,g=0;g<d;g++)S[g]=0,C[g]=g;var T,A,I,x,k,R,O;for(T=A=I=x=k=R=O=0,v=0;v<c;){if(k===0){if(A<l){T+=r[O]<<A,A+=8,O++;continue}if(g=T&h,T>>=l,A-=l,g>u||g==f)break;if(g==d){l=b+1,h=(1<<l)-1,u=d+2,m=i;continue}if(m==i){w[k++]=C[g],m=g,x=g;continue}for(p=g,g==u&&(w[k++]=x,g=m);g>d;)w[k++]=C[g],g=S[g];x=C[g]&255,w[k++]=x,u<a&&(S[u]=m,C[u]=x,u++,(u&h)===0&&u<a&&(l++,h+=u)),m=p}k--,_[R++]=w[k],v++}for(v=R;v<c;v++)_[v]=0;return _};return En.lzw=t,En}var as;function bu(){if(as)return be;as=1,Object.defineProperty(be,"__esModule",{value:!0}),be.decompressFrames=be.decompressFrame=be.parseGIF=void 0;var t=a(gu()),e=ba(),n=wa(),r=vu(),s=yu();function a(h){return h&&h.__esModule?h:{default:h}}var i=function(l){var f=new Uint8Array(l);return(0,e.parse)((0,n.buildStream)(f),t.default)};be.parseGIF=i;var c=function(l){for(var f=l.pixels.length,p=new Uint8ClampedArray(f*4),m=0;m<f;m++){var g=m*4,v=l.pixels[m],b=l.colorTable[v]||[0,0,0];p[g]=b[0],p[g+1]=b[1],p[g+2]=b[2],p[g+3]=v!==l.transparentIndex?255:0}return p},u=function(l,f,p){if(!l.image){console.warn("gif frame does not have associated image.");return}var m=l.image,g=m.descriptor.width*m.descriptor.height,v=(0,s.lzw)(m.data.minCodeSize,m.data.blocks,g);m.descriptor.lct.interlaced&&(v=(0,r.deinterlace)(v,m.descriptor.width));var b={pixels:v,dims:{top:l.image.descriptor.top,left:l.image.descriptor.left,width:l.image.descriptor.width,height:l.image.descriptor.height}};return m.descriptor.lct&&m.descriptor.lct.exists?b.colorTable=m.lct:b.colorTable=f,l.gce&&(b.delay=(l.gce.delay||10)*10,b.disposalType=l.gce.extras.disposal,l.gce.extras.transparentColorGiven&&(b.transparentIndex=l.gce.transparentColorIndex)),p&&(b.patch=c(b)),b};be.decompressFrame=u;var d=function(l,f){return l.frames.filter(function(p){return p.image}).map(function(p){return u(p,l.gct,f)})};return be.decompressFrames=d,be}var cs=bu();async function wu(t){try{const n=await(await fetch(t)).arrayBuffer(),r=cs.parseGIF(n),s=cs.decompressFrames(r,!0);if(!s?.length)return null;const{dims:a,patch:i}=s[0],{width:c,height:u}=a,d=document.createElement("canvas");d.width=c,d.height=u;const h=d.getContext("2d"),l=new ImageData(i,c,u);h.putImageData(l,0,0);const f=await new Promise(p=>{d.toBlob(p,"image/png")});return URL.createObjectURL(f)}catch{return null}}function Ir({staticUrl:t,alt:e,url:n}){return o("picture",{children:[t&&o("source",{srcset:t,media:"(prefers-reduced-motion: reduce)"}),o("img",{src:n,alt:e,class:"shortcode-emoji emoji",width:"16",height:"16",loading:"lazy",decoding:"async",fetchPriority:"low",onLoad:r=>{try{r.target.dataset.isLarger=r.target.naturalWidth>r.target.width*2||r.target.naturalHeight>r.target.height*2}catch{}}},e||n)]})}const _u=new Zr({concurrency:2,interval:1e3,intervalCap:2}),ku=(t,...e)=>_u.add(()=>fetch(...e),{signal:t}),ls=/(\:(\w|\+|\-)+\:)(?=|[\!\.\?]|$)/g,Su=Zt(t=>new RegExp(`:(${t.join("|")}):`,"g")),Le=new Map,Tu=30,Cu=async t=>{if(Le.has(t))return Le.get(t);try{const r=(await(await ku(null,t,{headers:{accept:"application/activity+json"},referrerPolicy:"no-referrer"})).json()).tag?.filter(a=>a.type==="Emoji")||[],s=r.length?await Promise.all(r.map(async a=>{const i={shortcode:a.name.replace(/^:|:$/g,""),url:a.icon.url};if(a.icon?.mediaType==="image/gif"){const c=await wu(i.url);c&&(i.staticUrl=c)}return i})):[];if(Le.size>=Tu){const a=Le.keys().next().value;Le.delete(a)}return Le.set(t,s),s}catch{return[]}},Eu=Zt((t,e,n)=>{if(!t)return"";if(!t.includes(":")||!e.length)return t;const r=Su(e.map(a=>a.shortcode));return t.split(r).map((a,i)=>{const c=e.find(u=>u.shortcode===a);if(c){const{url:u,staticUrl:d}=c;return o(Ir,{staticUrl:n?void 0:d,url:n&&d||u,alt:a},`${a}-${i}`)}return a})});function hn({text:t,emojis:e=[],staticEmoji:n,resolverURL:r}){const[s,a]=F(()=>Le.get(r)||[]),[i,c]=F(!1);if(V(()=>{if(!r||!t?.includes(":"))return;const d=t.match(ls);!d||!d.some(l=>{const f=l.slice(1,-1);return!e.some(p=>p.shortcode===f)})||Le.has(r)||(c(!0),(async()=>{const l=await Cu(r);a(l),c(!1)})())},[r,t,e?.length]),!t)return"";if(!t.includes(":"))return t;if(r&&i)return t.replace(ls,"");const u=[...s.filter(d=>!e.some(h=>h.shortcode===d.shortcode)),...e];return Eu(t,u,n)}function Lr({roles:t,accountId:e,accountUrl:n,hideSelf:r=!1}){if(!t?.length)return null;const s=e&&e===Gr();if(r&&s)return null;const a=wr(n);return t?.map(i=>o(N,{children:[" ",o("span",{class:"tag collapsed tag-role",children:[i.name,!!a&&o(N,{children:[" ",o("span",{class:"more-insignificant",children:a})]})]})]}))}const Au=Zt(t=>{const e={sensitivity:"base"};try{return new Intl.Collator(t||void 0,e)}catch{return new Intl.Collator(void 0,e)}}),xu=/([^@]+)(@.+)/i,Mu=/(\:(\w|\+|\-)+\:)(?=|[\!\.\?]|$)/g,Iu=/\s+/g,Lu=/[^a-z0-9@\.]/gi;function he({account:t,instance:e,showAvatar:n,showAcct:r,short:s,external:a,onClick:i}){const{i18n:c}=$t();if(!t)return null;const{acct:u,avatar:d,avatarStatic:h,id:l,url:f,displayName:p,emojis:m,bot:g,username:v,roles:b}=t,[_,S,C]=u.match(xu)||[,u];e||(e=De().instance);const w=v.toLowerCase().trim(),T=(p||"").toLowerCase().trim(),A=T.replace(Mu,"").replace(Iu,""),I=A.replace(Lu,""),x=!s&&(w===T||w===A||w===I||Au(c.locale).compare(w,A)===0)||I===u.toLowerCase();return o("a",{class:`name-text ${r?"show-acct":""} ${s?"short":""}`,href:f,target:a?"_blank":null,title:p?`${p} (${C?"":"@"}${u})`:`${C?"":"@"}${u}`,onClick:k=>{if(!a&&!k.shiftKey){if(k.preventDefault(),k.stopPropagation(),i)return i(k);if(k.metaKey||k.ctrlKey||k.shiftKey||k.which===2){const R=`#/${e}/a/${l}`;window.open(R,"_blank");return}z.showAccount={account:t,instance:e}}},children:[n&&o(N,{children:[o(re,{url:h||d,squircle:g})," "]}),p&&!s?o(N,{children:[o("b",{dir:"auto",children:o(hn,{text:p,emojis:m,resolverURL:t.url,staticEmoji:!0})}),!r&&!x&&o(N,{children:[" ",o("i",{class:"bidi-isolate",children:["@",v]}),o(Lr,{roles:b,accountId:l,accountUrl:f,hideSelf:!0})]})]}):s?o("i",{children:v}):o("b",{children:v}),r&&o(N,{children:[o("br",{}),o("i",{class:"bidi-isolate",children:[C?"":"@",S,!!C&&o("span",{class:"ib",children:C})]}),o(Lr,{roles:b,accountUrl:f})]})]})}const Pu="Аҧсшәа",Du="Acèh",Ru="Lëbacoli",$u="Afár",Nu="Afrikaans",Ou="Shqip",Fu="Dhalur",Bu="አማርኛ",zu="العربية",qu="Հայերեն",Hu="অসমীয়া",Ku="Авар мацӀ",ju="अवधी",Uu="Aymar aru",Wu="Azərbaycanca",Zu="Basa Bali",Gu="بلوچی",Vu="Bamanankan",Yu="Baoulé",Qu="Башҡортса",Xu="Euskara",Ju="Batak Karo",td="Batak Simalungun",ed="Batak Toba",nd="Беларуская",od="Ichibemba",rd="বাংলা",id="Betawi",sd="भोजपुरी",ad="Bikol",cd="Bosanski",ld="Brezhoneg",ud="Български",dd="Буряад",hd="粵語",fd="Català",pd="Cebuano",md="Chamoru",gd="Нохчийн мотт",vd="Chichewa",yd="Kapasen Chuuk",bd="Чӑвашла",wd="Corsu",_d="Qırımtatarca (Кирилл)",kd="Hrvatski",Sd="Čeština",Td="Dansk",Cd="ދިވެހި",Ed="Thuɔŋjäŋ",Ad="डोगरी",xd="Dombe",Md="Nederlands",Id="Jula",Ld="རྫོང་ཁ",Pd="English",Dd="Esperanto",Rd="Eesti",$d="Eʋegbe",Nd="Føroyskt",Od="Vosa Vakaviti",Fd="Tagalog",Bd="Suomi",zd="Fon",qd="Français",Hd="Frysk",Kd="Furlan",jd="Fulfulde",Ud="Gã",Wd="Galego",Zd="ქართული",Gd="Deutsch",Vd="Ελληνικά",Yd="Avañe'ẽ",Qd="ગુજરાતી",Xd="Kreyòl ayisyen",Jd="Hakha Chin",th="Hausa",eh="ʻŌlelo Hawaiʻi",nh="עברית",oh="Hiligaynon",rh="हिन्दी",ih="Hmoob",sh="Magyar",ah="Hunsrik",ch="Iban",lh="Íslenska",uh="Igbo",dh="Iloko",hh="Bahasa Indonesia",fh="ᐃᓄᒃᑎᑐᑦ",ph="Gaeilge",mh="Italiano",gh="Patwa",vh="日本語",yh="Basa Jawa",bh="Jinghpaw",wh="Kalaallisut",_h="ಕನ್ನಡ",kh="Kanuri",Sh="Kapampangan",Th="Қазақша",Ch="Khasi",Eh="ភាសាខ្មែរ",Ah="Rukiga",xh="Kikongo",Mh="Kinyarwanda",Ih="Kituba",Lh="Kokborok",Ph="Коми кыв",Dh="कोंकणी",Rh="한국어",$h="Krio",Nh="Kurdî (Kurmancî)",Oh="کوردی (سۆرانی)",Fh="Кыргызча",Bh="ລາວ",zh="Latgaļu",qh="Latina",Hh="Latviešu",Kh="Ligure",jh="Limburgs",Uh="Lingála",Wh="Lietuvių",Zh="Lombard",Gh="Luganda",Vh="Dholuo",Yh="Lëtzebuergesch",Qh="Македонски",Xh="Madhurâ",Jh="मैथिली",tf="Makassar",ef="Malagasy",nf="Bahasa Melayu",of="മലയാളം",rf="Malti",sf="Mam",af="Gaelg",cf="Te Reo Māori",lf="मराठी",uf="Kajin M̧ajeļ",df="मारवाड़ी",hf="Kreol Morisien",ff="Олык марий",pf="Baso Minang",mf="Mizo ṭawng",gf="Монгол",vf="မြန်မာစာ",yf="Náhuatl",bf="isiNdebele",wf="नेपाली",_f="Norsk",kf="Thok Nath",Sf="Occitan",Tf="ଓଡ଼ିଆ",Cf="Afaan Oromoo",Ef="Ирон æвзаг",Af="Pangasinan",xf="Papiamentu",Mf="پښتو",If="فارسی",Lf="Polski",Pf="Português (Brasil)",Df="ਪੰਜਾਬੀ",Rf="Runa Simi",$f="Qʼeqchiʼ",Nf="Romani čhib",Of="Română",Ff="Ikirundi",Bf="Русский",zf="Davvisámegiella",qf="Gagana Samoa",Hf="Sängö",Kf="संस्कृतम्",jf="ᱥᱟᱱᱛᱟᱲᱤ",Uf="Gàidhlig",Wf="Sepedi",Zf="Српски",Gf="Sesotho",Vf="Kreol seselwa",Yf="လိၵ်ႈတႆး",Qf="chiShona",Xf="Sicilianu",Jf="Ślōnskŏ",tp="سنڌي",ep="සිංහල",np="Slovenčina",op="Slovenščina",rp="Soomaali",ip="Español",sp="Basa Sunda",ap="Susu",cp="Kiswahili",lp="siSwati",up="Svenska",dp="Reo Tahiti",hp="Тоҷикӣ",fp="ⵜⴰⵎⴰⵣⵉⵖⵜ",pp="தமிழ்",mp="Татарча",gp="తెలుగు",vp="Tetun",yp="ไทย",bp="བོད་ཡིག",wp="ትግርኛ",_p="Tiv",kp="Tok Pisin",Sp="Lea fakatonga",Tp="Tshiluba",Cp="Xitsonga",Ep="Setswana",Ap="ತುಳು",xp="chiTumbuka",Mp="Türkçe",Ip="Türkmençe",Lp="Тыва дыл",Pp="Akankasa",Dp="Удмурт кыл",Rp="Українська",$p="اردو",Np="ئۇيغۇرچە",Op="Oʻzbekcha",Fp="Tshivenḓa",Bp="Vèneto",zp="Tiếng Việt",qp="Winaray",Hp="Cymraeg",Kp="Wolof",jp="isiXhosa",Up="Саха тыла",Wp="ייִדיש",Zp="Yorùbá",Gp="Màaya T'àan",Vp="Didxazá",Yp="isiZulu",Qp={ab:Pu,ace:Du,ach:Ru,aa:$u,af:Nu,sq:Ou,alz:Fu,am:Bu,ar:zu,hy:qu,as:Hu,av:Ku,awa:ju,ay:Uu,az:Wu,ban:Zu,bal:Gu,bm:Vu,bci:Yu,ba:Qu,eu:Xu,btx:Ju,bts:td,bbc:ed,be:nd,bem:od,bn:rd,bew:id,bho:sd,bik:ad,bs:cd,br:ld,bg:ud,bua:dd,yue:hd,ca:fd,ceb:pd,ch:md,ce:gd,ny:vd,"zh-CN":"简体中文","zh-TW":"繁體中文",chk:yd,cv:bd,co:wd,crh:_d,"crh-Latn":"Qırımtatarca (Latin)",hr:kd,cs:Sd,da:Td,"fa-AF":"درى",dv:Cd,din:Ed,doi:Ad,dov:xd,nl:Md,dyu:Id,dz:Ld,en:Pd,eo:Dd,et:Rd,ee:$d,fo:Nd,fj:Od,tl:Fd,fi:Bd,fon:zd,fr:qd,"fr-CA":"Français (Canada)",fy:Hd,fur:Kd,ff:jd,gaa:Ud,gl:Wd,ka:Zd,de:Gd,el:Vd,gn:Yd,gu:Qd,ht:Xd,cnh:Jd,ha:th,haw:eh,iw:nh,hil:oh,hi:rh,hmn:ih,hu:sh,hrx:ah,iba:ch,is:lh,ig:uh,ilo:dh,id:hh,"iu-Latn":"Inuktitut (Latin)",iu:fh,ga:ph,it:mh,jam:gh,ja:vh,jw:yh,kac:bh,kl:wh,kn:_h,kr:kh,pam:Sh,kk:Th,kha:Ch,km:Eh,cgg:Ah,kg:xh,rw:Mh,ktu:Ih,trp:Lh,kv:Ph,gom:Dh,ko:Rh,kri:$h,ku:Nh,ckb:Oh,ky:Fh,lo:Bh,ltg:zh,la:qh,lv:Hh,lij:Kh,li:jh,ln:Uh,lt:Wh,lmo:Zh,lg:Gh,luo:Vh,lb:Yh,mk:Qh,mad:Xh,mai:Jh,mak:tf,mg:ef,ms:nf,"ms-Arab":"بهاس ملايو",ml:of,mt:rf,mam:sf,gv:af,mi:cf,mr:lf,mh:uf,mwr:df,mfe:hf,chm:ff,"mni-Mtei":"ꯃꯤꯇꯩꯂꯣꯟ",min:pf,lus:mf,mn:gf,my:vf,nhe:yf,"ndc-ZW":"Ndau",nr:bf,new:"नेपाल भाषा",ne:wf,"bm-Nkoo":"ߒߞߏ",no:_f,nus:kf,oc:Sf,or:Tf,om:Cf,os:Ef,pag:Af,pap:xf,ps:Mf,fa:If,pl:Lf,pt:Pf,"pt-PT":"Português (Portugal)",pa:Df,"pa-Arab":"پنجابی",qu:Rf,kek:$f,rom:Nf,ro:Of,rn:Ff,ru:Bf,se:zf,sm:qf,sg:Hf,sa:Kf,"sat-Latn":"Santali (Latin)",sat:jf,gd:Uf,nso:Wf,sr:Zf,st:Gf,crs:Vf,shn:Yf,sn:Qf,scn:Xf,szl:Jf,sd:tp,si:ep,sk:np,sl:op,so:rp,es:ip,su:sp,sus:ap,sw:cp,ss:lp,sv:up,ty:dp,tg:hp,"ber-Latn":"Tamazight (Latin)",ber:fp,ta:pp,tt:mp,te:gp,tet:vp,th:yp,bo:bp,ti:wp,tiv:_p,tpi:kp,to:Sp,lua:Tp,ts:Cp,tn:Ep,tcy:Ap,tum:xp,tr:Mp,tk:Ip,tyv:Lp,ak:Pp,udm:Dp,uk:Rp,ur:$p,ug:Np,uz:Op,ve:Fp,vec:Bp,vi:zp,war:qp,cy:Hp,wo:Kp,xh:jp,sah:Up,yi:Wp,yo:Zp,yua:Gp,zap:Vp,zu:Yp},io={"zh-YUE":"YUE",zh_HANT:"zh-Hant"},tr=Zt(t=>new Intl.DisplayNames(t||void 0,{type:"language"}));function Xp(t){let e,n;typeof t=="object"&&({code:t,locale:e,fallback:n}=t);try{const r=tr(e||Pt.locale).of(t);if(r!==t)return r;if(!n){const s=tr(t).of(t);if(s!==t)return s;const a=Qp?.[e];if(a!==t)return a}return n||""}catch{if(io[t])try{const s=tr(io[e]||e||Pt.locale).of(io[t]);return s!==io[t]?s:n||""}catch{}return n||""}}const An=Zt(Xp),Jp={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"},tm={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"},em={},_a={sl:Jp,tl:tm,al:em},nm=Object.entries(_a.tl).map(([t,{name:e}])=>({code:t,name:e})),Pr=[...navigator.languages],er=fa();er&&!Pr.includes(er)&&Pr.unshift(er);const om=()=>_o(Pr,nm.map(t=>t.code.replace("_","-")),"en");function ka(t=!1){if(t){const{contentTranslationTargetLanguage:e}=z.settings;if(e)return e}return om()}const us=["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte"];function Hy(t){const e=Math.min(Math.floor(Math.log2(t)/10),us.length-1),n=t/1024**e;return Pt.number(n,{style:"unit",unit:us[e],unitDisplay:"narrow",maximumFractionDigits:0})}function Yt(){return Mc()?.mastodon>=7}function rm(t){return t?.[t?.currentUser]?.[0]||"nobody"}const im=/[.*+?^${}()|[\]\\]/g,sm={"&":"&amp;",'"':"&quot;","<":"&lt;",">":"&gt;"},am=/[&"<>]/g;function cm(t){return t.replace(im,"\\$&")}function lm(t){return t.replace(am,e=>sm[e])}function Dr(t,e=[]){if(!t)return"";if(!e.length||!t.includes(":"))return t;const n=new Map;for(let i=0;i<e.length;i++){const c=e[i];c?.shortcode&&c?.url&&n.set(c.shortcode,c)}if(n.size===0)return t;const s=Array.from(n.keys()).map(i=>`:${cm(i)}:`).join("|"),a=new RegExp(s,"g");return t.replace(a,i=>{const c=i.slice(1,-1),u=n.get(c);if(!u)return i;const{staticUrl:d,url:h}=u,l=lm(i);return`<picture>${d?`<source srcset="${d}" media="(prefers-reduced-motion: reduce)"></source>`:""}<img class="shortcode-emoji emoji" src="${h}" alt="${l}" title="${c}" width="16" height="16" loading="lazy" decoding="async" fetchPriority="low" onload="try { this.dataset.isLarger = this.naturalWidth > (this.width * 2) || this.naturalHeight > (this.height * 2) } catch (e) {}" /></picture>`})}const um=/[&<>"']/g,dm={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;"};function nr(t){return t.replace(um,e=>dm[e])}const on=document.createElement("div"),hm=["u-url","mention","hashtag"],fm=/<a/i,pm=/^https?:\/\//i,mm=/^[@][^@]+(@[^@]+)?$/,gm=/^[#][^#]+$/,vm=/^```[^]+```$/,ym=/^```/,bm=/```$/,wm=/`[^`]+`/,_m=/(twitter|x)\.com/i,km=/@[a-zA-Z0-9_]+@(twitter|x)\.com/,Sm=/(@([a-zA-Z0-9_]+)@(twitter|x)\.com)/g,Tm=/(`[^]+?`)/g;function Cm(t,e){if(e){const n=document.createElement("template");return n.innerHTML=t,n.content}else{const n=document.createElement("div");return n.innerHTML=t,n}}function Em(t,e={}){if(!t)return"";const{emojis:n,returnDOM:r,postEnhanceDOM:s=()=>{}}=e;let a=t;const i=Cm(a,r),c=fm.test(a),u=a.includes("```");if(c){const h=i.querySelectorAll('a:not([target="_blank"])');for(const f of h)f.setAttribute("target","_blank");const l=i.querySelectorAll("a[class]");for(const f of l)for(const p of f.classList)hm.includes(p)||f.classList.remove(p)}if(c){const h=i.querySelectorAll("a[href]");for(const l of h)pm.test(l.textContent.trim())&&(l.classList.add("has-url-text"),Im(l))}if(c){const h=i.querySelectorAll("a[href]"),l=[];for(const f of h){const p=f.innerText.trim(),m=f.querySelector("*");if(mm.test(p)){const g=p[0],[v,b,_]=p.split(/[@]/);m||(!l.some(([S])=>S===b)||l.some(([S,C])=>S===b&&C===_)?(f.innerHTML=`${g}<span>${b}</span>`,l.push([b,_])):f.innerHTML=`${g}<span>${b}@${_}</span>`),f.classList.add("mention")}if(gm.test(p)){const g=p[0];m||(f.innerHTML=`${g}<span>${p.slice(1)}</span>`),f.classList.add("mention","hashtag")}}}let d;if(a.includes(":")&&n?.length){d=rr(i);for(const h of d){let l=nr(h.nodeValue);l=Dr(l,n),on.innerHTML=l,h.replaceWith(...on.childNodes)}}if(u){const h=[...i.querySelectorAll("p")].filter(l=>vm.test(l.innerText.trim()));for(const l of h){const f=document.createElement("pre");for(const p of l.querySelectorAll("br"))p.replaceWith(`
`);f.innerHTML=`<code>${l.innerHTML.trim()}</code>`,l.replaceWith(f)}}if(u){const l=[...i.querySelectorAll("p")].filter(f=>ym.test(f.innerText));for(const f of l){const p=[f];let m=!1,g=f;for(;g.nextElementSibling;){const v=g.nextElementSibling;if(v&&v.tagName==="P")if(bm.test(v.innerText)){p.push(v),m=!0;break}else p.push(v);else break;g=v}if(m){const v=document.createElement("pre");for(const _ of p)for(const S of _.querySelectorAll("br"))S.replaceWith(`
`);const b=p.map(_=>_.innerHTML).join(`
`);v.innerHTML=`<code tabindex="0">${b}</code>`,f.replaceWith(v);for(const _ of p)_.remove()}}}if(a.includes("`")){d=rr(i);for(const h of d){let l=nr(h.nodeValue);wm.test(l)&&(l=l.replaceAll(Tm,"<code>$1</code>")),on.innerHTML=l,h.replaceWith(...on.childNodes)}}if(_m.test(a)){d=rr(i,{rejectFilter:["A"]});for(const h of d){let l=nr(h.nodeValue);km.test(l)&&(l=l.replaceAll(Sm,'<a href="https://twitter.com/$2" rel="nofollow noopener" target="_blank">$1</a>')),on.innerHTML=l,h.replaceWith(...on.childNodes)}}if(a.includes("#")||a.includes("")){let h=null;const l=[...i.querySelectorAll("p")].filter((f,p)=>{let m=0;for(let g=0;g<f.childNodes.length;g++){const v=f.childNodes[g];if(v.nodeType===Node.TEXT_NODE){if(v.textContent.trim()!=="")return!1}else if(v.tagName!=="BR")if(v.tagName==="A"){const b=v.textContent.trim();if(!b||!(b.startsWith("#")||b.startsWith("")))return!1;m++}else return!1}if(m>3||m>1&&h&&p===h+1)return h=p,!0});if(l?.length)for(const f of l)f.classList.add("hashtag-stuffing"),f.title=f.innerText}if(a.includes("<img")){const h=i.querySelectorAll("img");for(let l=0;l<h.length;l++){const f=h[l],p=f.getAttribute("width")||f.naturalWidth,m=f.getAttribute("height")||f.naturalHeight;p&&m&&f.style.setProperty("--original-aspect-ratio",`${p}/${m}`)}}for(const h of i.childNodes)if(h.nodeType===Node.TEXT_NODE&&h.textContent.trim?.()){const l=document.createElement("span");l.textContent=h.textContent,i.replaceChild(l,h)}return s&&queueMicrotask(()=>s(i)),r?i:i.innerHTML}const Sa=Zt(Em),Am=["STYLE","IMG","VIDEO","AUDIO","AREA","MAP","TRACK","EMBED","IFRAME","OBJECT","PICTURE","PORTAL","SOURCE","SVG","MATH","CANVAS","NOSCRIPT","SCRIPT","INPUT","OPTION","TEXTAREA","SLOT","TEMPLATE"],xm=Object.fromEntries(Am.map(t=>[t,!0])),Mm=/^(https?:\/\/(www\.)?|xmpp:)/,or=30;function Im(t){if(!(!t||t.querySelector?.("*")))try{const e=t.innerText.trim(),n=(e.match(Mm)||[])[0]||"";if(!n)return;const r=e.slice(n.length,n.length+or),s=e.slice(n.length+or),a=e.slice(n.length).length>or;t.innerHTML=`<span class="invisible">${n}</span><span class=${a?"ellipsis":""}>${r}</span><span class="invisible">${s}</span>`}catch{}}function rr(t,e={}){const n=[],r=Object.assign({},xm,e.rejectFilter?.reduce((i,c)=>(i[c]=!0,i),{})),s=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode(i){return r[i.parentNode.nodeName]?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}},!1);let a;for(;a=s.nextNode();)n.push(a);return n}const Lm=window.matchMedia("(hover: hover)").matches;function Pm(t){const{mentions:e=[],instance:n,previewMode:r,statusURL:s}=t||{};return a=>{if(a.metaKey||a.ctrlKey||a.shiftKey||a.altKey||a.which===2)return;let{target:i}=a;if(i.closest(".shortcode-emoji")){const{naturalWidth:l,naturalHeight:f,width:p,height:m}=i,g=2;if(l>p*g||f>m*g){a.preventDefault(),a.stopPropagation(),z.showMediaModal={mediaAttachments:[{type:"image",url:i.src,description:i.title||i.alt}]};return}}if(i=i.closest("a"),!i||!a.currentTarget.contains(i))return;const{href:c}=i,u=i.previousSibling?.textContent,d=u?.endsWith("@")||u?.endsWith(""),h=i.innerText.startsWith("@")||i.innerText.startsWith("");if((i.classList.contains("u-url")||i.classList.contains("mention"))&&h||d&&!h){const l=(i.querySelector("span")||i).innerText.trim(),f=l.replace(/^[@]/,""),p=e.find(m=>m.url===c)||e.find(m=>m.acct===f||m.username===f);if(p){a.preventDefault(),a.stopPropagation(),z.showAccount={account:p.acct,instance:n};return}else if(!/^http/i.test(l)){a.preventDefault(),a.stopPropagation(),z.showAccount={account:c,instance:n};return}}else if(!r){const l=u?.endsWith("#")||u?.endsWith("");if(i.classList.contains("hashtag")||l){a.preventDefault(),a.stopPropagation();const f=i.innerText.replace(/^[#]/,"").trim(),p=n?`#/${n}/t/${f}`:`#/t/${f}`;location.hash=p;return}else if(z.unfurledLinks[c]?.url&&s!==c){a.preventDefault(),a.stopPropagation(),z.prevLocation={pathname:location.hash.replace(/^#/,"")},location.hash=`#${z.unfurledLinks[c].url}`;return}}try{const f=URL.parse(c).hostname.replace(/^www\./i,"");if(!i.innerText.toLowerCase().includes(f.toLowerCase())&&!Lm){a.preventDefault(),a.stopPropagation();const m=i.innerText.trim();z.showOpenLink={url:c,linkText:m}}}catch{}}}function Qt(t){try{return Pt.number(t,{notation:"compact",roundingMode:"floor"})}catch{return t}}const Dm={"@mastodon/list-exclusive":">=4.2","@gotosocial/list-exclusive":">=0.17","@gotosocial/edit-media-attributes":">=0.18","@mastodon/filtered-notifications":"~4.3 || >=4.3","@mastodon/fetch-multiple-statuses":"~4.3 || >=4.3","@mastodon/trending-link-posts":"~4.3 || >=4.3","@mastodon/annual-report":"~4.4 || >=4.4","@mastodon/endorsements":"~4.4 || >=4.4"},ir=/pixelfed/i,de=/^(?!.*pixelfed).*$/i,Rm=/pleroma/i,$m=/akkoma/i;const ds={"@mastodon/lists":de,"@mastodon/filters":de,"@mastodon/mentions":de,"@mastodon/trending-hashtags":de,"@mastodon/trending-links":de,"@mastodon/post-bookmark":de,"@mastodon/post-edit":de,"@mastodon/profile-edit":de,"@mastodon/profile-private-note":de,"@mastodon/pinned-posts":de,"@pixelfed/trending":ir,"@pixelfed/home-include-reblogs":ir,"@pixelfed/global-feed":ir,"@pleroma/local-visibility-post":Rm,"@akkoma/local-visibility-post":$m},xn={},Nm=/^\d+\.\d+(\.\d+)?/,Om=/^@([a-z]+)\//i;function so(t){try{let{version:e,domain:n}=Ic(),r=Lc()?.software?.name||"mastodon";r==="hometown"&&(r="mastodon");const s=`${n}-${t}`;if(xn[s])return xn[s];if(ds[t])return xn[s]=ds[t].test(e);const a=t.match(Om);if(!a){const h=t.replace(/^@/,"");return xn[s]=r===h}const i=Dm[t];if(!i)return!1;const u=a[1]===r.toLowerCase();let d=Fi(e,i,{includePrerelease:!0,loose:!0});if(!d)try{d=Fi(e.match(Nm)?.[0],i,{includePrerelease:!0,loose:!1})}catch{}return xn[s]=u&&d}catch{return!1}}function Ky({skeleton:t,account:e,avatarSize:n="xl",useAvatarStatic:r=!1,instance:s,external:a,internal:i,onClick:c,showActivity:u=!1,showStats:d=!1,accountInstance:h,hideDisplayName:l=!1,relationship:f={},excludeRelationshipAttrs:p=[]}){const{_:m}=$t();if(t)return o("div",{class:"account-block skeleton",children:[o(re,{size:n}),o("span",{children:[o("b",{children:"████████"}),o("br",{}),o("span",{class:"account-block-acct",children:"██████"})]})]});if(!e)return null;const{id:g,acct:v,avatar:b,avatarStatic:_,displayName:S,username:C,emojis:w,url:T,statusesCount:A,lastStatusAt:I,bot:x,fields:k,note:R,group:O,followersCount:D,createdAt:E,locked:Q,roles:G}=e;let[rt,H,Y]=v.match(/([^@]+)(@.+)/i)||[,v];h&&(Y=`@${h}`);const nt=k?.find(U=>!!U.verifiedAt&&!!U.value),mt={};for(const U in f)p.includes(U)||(mt[U]=f[U]);const at=mt.following||mt.followedBy||mt.requested;return o("a",{class:"account-block",href:T,target:a?"_blank":null,title:Y?v:`@${v}`,onClick:U=>{if(!a){if(U.preventDefault(),c)return c(U);i?location.hash=`/${s}/a/${g}`:z.showAccount={account:e,instance:s}}},children:[o("div",{class:"avatar-container",children:o(re,{url:r?_:b||_,staticUrl:r?void 0:_,size:n,squircle:x})}),o("span",{class:"account-block-content",children:[!l&&o(N,{children:S?o("b",{children:o(hn,{text:S,emojis:w,resolverURL:T})}):o("b",{children:C})})," ",o("span",{class:"account-block-acct bidi-isolate",children:[Y?"":"@",H,o("wbr",{}),Y,Q&&o(N,{children:[" ",o(L,{icon:"lock",size:"s",alt:m({id:"G2fuEb"})})]})]}),o(Lr,{roles:G,accountUrl:T}),u&&o("div",{class:"account-block-stats",children:[o(M,{id:"ajzDof",values:{0:Qt(A)}}),!!I&&o(N,{children:[" ","·"," ",o(M,{id:"f8bJ3C",values:{0:qn(I,{hideTime:!0})}})]})]}),d&&o("div",{class:"account-block-stats",children:[x&&o(N,{children:o("span",{class:"tag collapsed",children:[o(L,{icon:"bot"})," ",o(M,{id:"9Vdq+j"})]})}),!!O&&o(N,{children:o("span",{class:"tag collapsed",children:[o(L,{icon:"group"})," ",o(M,{id:"L8fEEm"})]})}),at&&o("div",{class:"shazam-container-horizontal",children:o("div",{class:"shazam-container-inner",children:mt.following&&mt.followedBy?o("span",{class:"tag minimal",children:o(M,{id:"7oRLbi"})}):mt.requested?o("span",{class:"tag minimal",children:o(M,{id:"Yx0Ud8"})}):mt.following?o("span",{class:"tag minimal",children:o(M,{id:"y6sq5j"})}):mt.followedBy?o("span",{class:"tag minimal",children:o(M,{id:"p3UO/y"})}):null})},f.id),!!D&&o("span",{class:"ib",children:o(M,{id:"Mn1E9C",values:{followersCount:D}})}),!!nt&&o("span",{class:"verified-field",children:[o(L,{icon:"check-circle",size:"s",alt:m({id:"QDEWii"})})," ",o("span",{dangerouslySetInnerHTML:{__html:Sa(nt.value,{emojis:w})}})]}),!x&&!O&&!at&&!D&&!nt&&!!E&&o("span",{class:"created-at",children:o(M,{id:"PCcEFZ",values:{0:qn(E,{hideTime:!0})},components:{0:o("time",{datetime:E})}})})]})]})]})}async function jy(t,e={}){if(!t?.length)return;const{masto:n}=De(),r=Gr(),s=t.reduce((a,i)=>(!a.includes(i.id)&&!e[i.id]&&i.id!==r&&a.push(i.id),a),[]);if(!s.length)return null;try{return(await n.v1.accounts.relationships.fetch({id:s})).reduce((c,u)=>(c[u.id]=u,c),{})}catch{return null}}function Uy(t,e){return()=>Pt.number(t,{style:"unit",unit:e,unitDisplay:"long"})}const Fm=Object.prototype.toString,Bm=t=>Fm.call(t)==="[object Error]",zm=new Set(["network error","Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed","fetch failed","terminated"," A network error occurred.","Network connection lost"]);function qm(t){if(!(t&&Bm(t)&&t.name==="TypeError"&&typeof t.message=="string"))return!1;const{message:n,stack:r}=t;return n==="Load failed"?r===void 0||"__sentry_captured__"in t:n.startsWith("error sending request for url")?!0:zm.has(n)}function Hm(t){if(typeof t=="number"){if(t<0)throw new TypeError("Expected `retries` to be a non-negative number.");if(Number.isNaN(t))throw new TypeError("Expected `retries` to be a valid number or Infinity, got NaN.")}else if(t!==void 0)throw new TypeError("Expected `retries` to be a number or Infinity.")}function ao(t,e,{min:n=0,allowInfinity:r=!1}={}){if(e!==void 0){if(typeof e!="number"||Number.isNaN(e))throw new TypeError(`Expected \`${t}\` to be a number${r?" or Infinity":""}.`);if(!r&&!Number.isFinite(e))throw new TypeError(`Expected \`${t}\` to be a finite number.`);if(e<n)throw new TypeError(`Expected \`${t}\` to be ≥ ${n}.`)}}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}}function jm(t,e){const n=Math.max(1,t+1),r=e.randomize?Math.random()+1:1;let s=Math.round(r*e.minTimeout*e.factor**(n-1));return s=Math.min(s,e.maxTimeout),s}function hs(t,e){return Number.isFinite(e)?e-(performance.now()-t):e}async function Um({error:t,attemptNumber:e,retriesConsumed:n,startTime:r,options:s}){const a=t instanceof Error?t:new TypeError(`Non-error was thrown: "${t}". You should only throw errors.`);if(a instanceof Km)throw a.originalError;const i=Number.isFinite(s.retries)?Math.max(0,s.retries-n):s.retries,c=s.maxRetryTime??Number.POSITIVE_INFINITY,u=Object.freeze({error:a,attemptNumber:e,retriesLeft:i,retriesConsumed:n});if(await s.onFailedAttempt(u),hs(r,c)<=0)throw a;const d=await s.shouldConsumeRetry(u),h=hs(r,c);if(h<=0||i<=0)throw a;if(a instanceof TypeError&&!qm(a)){if(d)throw a;return s.signal?.throwIfAborted(),!1}if(!await s.shouldRetry(u))throw a;if(!d)return s.signal?.throwIfAborted(),!1;const l=jm(n,s),f=Math.min(l,h);return s.signal?.throwIfAborted(),f>0&&await new Promise((p,m)=>{const g=()=>{clearTimeout(v),s.signal?.removeEventListener("abort",g),m(s.signal.reason)},v=setTimeout(()=>{s.signal?.removeEventListener("abort",g),p()},f);s.unref&&v.unref?.(),s.signal?.addEventListener("abort",g,{once:!0})}),s.signal?.throwIfAborted(),!0}async function Wm(t,e={}){if(e={...e},Hm(e.retries),Object.hasOwn(e,"forever"))throw new Error("The `forever` option is no longer supported. For many use-cases, you can set `retries: Infinity` instead.");e.retries??=10,e.factor??=2,e.minTimeout??=1e3,e.maxTimeout??=Number.POSITIVE_INFINITY,e.maxRetryTime??=Number.POSITIVE_INFINITY,e.randomize??=!1,e.onFailedAttempt??=()=>{},e.shouldRetry??=()=>!0,e.shouldConsumeRetry??=()=>!0,ao("factor",e.factor,{min:0,allowInfinity:!1}),ao("minTimeout",e.minTimeout,{min:0,allowInfinity:!1}),ao("maxTimeout",e.maxTimeout,{min:0,allowInfinity:!0}),ao("maxRetryTime",e.maxRetryTime,{min:0,allowInfinity:!0}),e.factor>0||(e.factor=1),e.signal?.throwIfAborted();let n=0,r=0;const s=performance.now();for(;!Number.isFinite(e.retries)||r<=e.retries;){n++;try{e.signal?.throwIfAborted();const a=await t(n);return e.signal?.throwIfAborted(),a}catch(a){await Um({error:a,attemptNumber:n,retriesConsumed:r,startTime:s,options:e})&&r++}}throw new Error("Retry attempts exhausted without throwing an error.")}const Ta="LanguageDetector"in self,Zm=Ta&&"Translator"in self;let Ge;Ta&&(async()=>{try{const t=await LanguageDetector.availability();if(t==="unavailable")return;t==="available"?Ge=await LanguageDetector.create():(Ge=await LanguageDetector.create({monitor(e){e.addEventListener("downloadprogress",n=>{})}}),await Ge.ready)}catch{}})();const Gm=async(t,e,n)=>{let r;const s=e;if(e==="auto"){if(!Ge?.detect)return{error:"No language detector"};try{e=(await Ge.detect(t))[0].detectedLanguage,r=e}catch(i){return{error:i}}}const a=`💬 BROWSER TRANSLATE ${t}`;console.groupCollapsed(a);try{const i=await Translator.availability({sourceLanguage:e,targetLanguage:n});if(i==="unavailable")return console.groupEnd(a),{error:`Unsupported language pair: ${e} -> ${n}`};let c;i==="available"?c=await Translator.create({sourceLanguage:e,targetLanguage:n}):(c=await Translator.create({sourceLanguage:e,targetLanguage:n,monitor(d){d.addEventListener("downloadprogress",h=>{})}}),await c.ready);const u=await c.translate(t);return console.groupEnd(a),{content:u,detectedSourceLanguage:r,provider:"browser"}}catch(i){return console.groupEnd(a),{error:i}}};var Vm=Object.defineProperty,Ym=(t,e,n)=>e in t?Vm(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Mn=(t,e,n)=>Ym(t,typeof e!="symbol"?e+"":e,n),Rr=new Map,co=new WeakMap,fs=0,Qm;function Xm(t){return t?(co.has(t)||(fs+=1,co.set(t,fs.toString())),co.get(t)):"0"}function Jm(t){return Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>`${e}_${e==="root"?Xm(t.root):t[e]}`).toString()}function tg(t){const e=Jm(t);let n=Rr.get(e);if(!n){const r=new Map;let s;const a=new IntersectionObserver(i=>{i.forEach(c=>{var u;const d=c.isIntersecting&&s.some(h=>c.intersectionRatio>=h);t.trackVisibility&&typeof c.isVisible>"u"&&(c.isVisible=d),(u=r.get(c.target))==null||u.forEach(h=>{h(d,c)})})},t);s=a.thresholds||(Array.isArray(t.threshold)?t.threshold:[t.threshold||0]),n={id:e,observer:a,elements:r},Rr.set(e,n)}return n}function Ca(t,e,n={},r=Qm){if(typeof window.IntersectionObserver>"u"&&r!==void 0){const u=t.getBoundingClientRect();return e(r,{isIntersecting:r,target:t,intersectionRatio:typeof n.threshold=="number"?n.threshold:0,time:0,boundingClientRect:u,intersectionRect:u,rootBounds:u}),()=>{}}const{id:s,observer:a,elements:i}=tg(n),c=i.get(t)||[];return i.has(t)||i.set(t,c),c.push(e),a.observe(t),function(){c.splice(c.indexOf(e),1),c.length===0&&(i.delete(t),a.unobserve(t)),i.size===0&&(a.disconnect(),Rr.delete(s))}}function eg(t){return typeof t.children!="function"}var Wy=class extends Zs{constructor(t){super(t),Mn(this,"node",null),Mn(this,"_unobserveCb",null),Mn(this,"lastInView"),Mn(this,"handleNode",e=>{this.node&&(this.unobserve(),!e&&!this.props.triggerOnce&&!this.props.skip&&(this.setState({inView:!!this.props.initialInView,entry:void 0}),this.lastInView=this.props.initialInView)),this.node=e||null,this.observeNode()}),Mn(this,"handleChange",(e,n)=>{const r=this.lastInView;this.lastInView=e,!(r===void 0&&!e)&&(e&&this.props.triggerOnce&&this.unobserve(),eg(this.props)||this.setState({inView:e,entry:n}),this.props.onChange&&this.props.onChange(e,n))}),this.state={inView:!!t.initialInView,entry:void 0},this.lastInView=t.initialInView}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:r,delay:s,fallbackInView:a}=this.props;this.lastInView===void 0&&(this.lastInView=this.props.initialInView),this._unobserveCb=Ca(this.node,this.handleChange,{threshold:t,root:e,rootMargin:n,trackVisibility:r,delay:s},a)}unobserve(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)}render(){const{children:t}=this.props;if(typeof t=="function"){const{inView:p,entry:m}=this.state;return t({inView:p,entry:m,ref:this.handleNode})}const{as:e,triggerOnce:n,threshold:r,root:s,rootMargin:a,onChange:i,skip:c,trackVisibility:u,delay:d,initialInView:h,fallbackInView:l,...f}=this.props;return Pc(e||"div",{ref:this.handleNode,...f},t)}};var ps,ms,ng=(ms=(ps=Dc)!=null?ps:me)!=null?ms:V,og=(t,{threshold:e,root:n,rootMargin:r,trackVisibility:s,delay:a,triggerOnce:i,skip:c}={})=>{const u=$(t),d=$(null),h=$(void 0),l=$(void 0);return ng(()=>{u.current=t},[t]),yt(f=>{const p=()=>{if(h.current){const b=h.current;h.current=void 0,b()}};if(f===d.current)return h.current;if(!f||c){p(),d.current=null,l.current=void 0;return}p(),d.current=f;let m=!1;const g=Ca(f,(b,_)=>{const S=l.current;l.current=b,!(S===void 0&&!b)&&(u.current(b,_),i&&b&&v())},{threshold:e,root:n,rootMargin:r,trackVisibility:s,delay:a});function v(){m||(m=!0,g(),d.current=null,h.current=void 0,l.current=void 0)}return h.current=v,h.current},[Array.isArray(e)?e.toString():e,n,r,s,a,i,c])};const gs=48,sr={};function Ea({id:t,children:e}){const n=$(),[r,s]=F(!!sr[t]),a=yt(c=>{c&&n.current&&(n.current.hidden=!1,t&&(sr[t]=!0))},[t]),i=og(a,{rootMargin:`-${gs}px 0px 0px 0px`,trackVisibility:!0,delay:1e3,triggerOnce:!0,skip:r});return me(()=>{if(!n.current)return;const c=n.current.getBoundingClientRect();c.bottom>gs&&(c.top<window.innerHeight?n.current.hidden=!1:s(!0),t&&(sr[t]=!0))},[]),r?e:o("div",{ref:n,class:"shazam-container no-animation",hidden:!0,children:o("div",{ref:i,class:"shazam-container-inner",children:e})})}const rg={BASE_URL:"./",DEV:!1,MODE:"production",PHANPY_CLIENT_NAME:"Phanpy",PHANPY_PRIVACY_POLICY_URL:"https://github.com/cheeaun/phanpy/blob/main/PRIVACY.MD",PHANPY_TRANSLANG_INSTANCES:"translang.phanpy.social",PROD:!0,SSR:!1,VITE_APP_ENV:"production"},ig=Object.entries(_a.sl).map(([t,e])=>({code:t,name:e})),{PHANPY_TRANSLANG_INSTANCES:vs}=rg,$r=vs?vs.split(/\s+/):[],Aa=new Zr({concurrency:1,interval:2e3,intervalCap:1}),xa=1e3*60*60;let ar=0;function sg(t,e,n){return Wm(()=>{let s=$r[ar];const a=t.length>2e3;let i;return a?i=fetch(`https://${s}/api/v1/translate`,{method:"POST",priority:"low",referrerPolicy:"no-referrer",headers:{"Content-Type":"application/json"},body:JSON.stringify({sl:e,tl:n,text:t})}):i=fetch(`https://${s}/api/v1/translate?sl=${encodeURIComponent(e)}&tl=${encodeURIComponent(n)}&text=${encodeURIComponent(t)}`,{priority:"low",referrerPolicy:"no-referrer"}),i.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:s=>{ar=(ar+1)%$r.length}})}const Ma=xo(sg,{expires:xa}),ag=xo(({signal:t,text:e,source:n,target:r})=>Aa.add(()=>Ma(e,n,r),{signal:t}),{expires:xa}),cg=({text:t,source:e,target:n,signal:r})=>Aa.add(()=>Gm(t,e,n),{signal:r});function lg({forceTranslate:t,sourceLanguage:e,onTranslate:n,text:r="",mini:s,autoDetected:a}){const{_:i}=$t(),c=ka(!0),[u,d]=F("default"),[h,l]=F(null),[f,p]=F(null),[m,g]=F(null),v=$(),b=$(),_=e?An(e):null,S=An(c),C=$("auto");n||(n=async({text:T,source:A,target:I,signal:x})=>{if(Zm){const k=await cg({text:T,source:A,target:I,signal:x});if(k&&!k.error)return k}return s?await ag({signal:x,text:T,source:A,target:I}):await Ma(T,A,I)});const w=async()=>{d("loading");try{const{content:T,detectedSourceLanguage:A,provider:I,error:x,...k}=await n({text:r,source:C.current,target:c,signal:b.current?.signal});if(T){if(A){const R=An(A);g(R)}if(I==="translang"){const R=k?.pronunciation;R&&l(R)}p(T),d("default"),!s&&T.trim()!==r.trim()&&v.current&&(v.current.open=!0,v.current.scrollIntoView({behavior:"smooth",block:"nearest"}))}else d("error")}catch(T){T.name!=="AbortError"&&d("error")}};return V(()=>{t&&w()},[t]),V(()=>(b.current=new AbortController,()=>{b.current.abort()}),[]),s?f&&f.trim()!==r.trim()&&m!==S?o(Ea,{children:o("div",{class:"status-translation-block-mini",children:[o(L,{icon:"translate",alt:i({id:"zVJKbG",values:{sourceLangText:_}})}),o("output",{lang:c,dir:"auto",title:h||"",children:f})]})}):null:o("div",{class:"status-translation-block",onClick:T=>{T.preventDefault()},children:o("details",{ref:v,children:[o("summary",{children:o("button",{type:"button",class:u==="loading"?"loading-mask":"",onClick:async T=>{T.preventDefault(),T.stopPropagation(),v.current.open=!v.current.open,u!=="loading"&&(f||w())},children:[o(L,{icon:"translate"})," ",o("span",{children:i(u==="loading"?{id:"Zxkt/v"}:e&&_&&!m?a?{id:"R20Yf9",values:{sourceLangText:_}}:{id:"h8zDAI",values:{sourceLangText:_}}:{id:"pi8x/S"})})]})}),o("div",{class:"translated-block",children:[o("div",{class:"translation-info insignificant",children:[o("select",{class:"translated-source-select",disabled:u==="loading",onChange:T=>{C.current=T.target.value,w()},children:ig.map(T=>{const A=An({code:T.code,fallback:T.name}),I=An({code:T.code,locale:T.code}),x=I&&A!==I;return o("option",{value:T.code,children:T.code==="auto"?i({id:"Bze3gr",values:{0:m??"…"}}):x?`${I} - ${A}`:A})})})," ",o("span",{children:["→ ",S]}),o(Fn,{abrupt:!0,hidden:u!=="loading"})]}),u==="error"?o("p",{class:"ui-state",children:o(M,{id:"m5LihO"})}):!!f&&o(N,{children:[o("output",{class:"translated-content",lang:c,dir:"auto",children:f}),!!h&&o("output",{class:"translated-pronunciation-content",tabIndex:-1,onClick:T=>{T.target.classList.toggle("expand")},children:h})]})]})]})})}const ug=$r?.length?lg:()=>null;function Ce(t){return new Promise((e,n)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>n(t.error)})}function Ia(t,e){let n;const r=()=>{if(n)return n;const s=indexedDB.open(t);return s.onupgradeneeded=()=>s.result.createObjectStore(e),n=Ce(s),n.then(a=>{a.onclose=()=>n=void 0},()=>{}),n};return(s,a)=>r().then(i=>a(i.transaction(e,s).objectStore(e)))}let cr;function Qe(){return cr||(cr=Ia("keyval-store","keyval")),cr}function dg(t,e=Qe()){return e("readonly",n=>Ce(n.get(t)))}function hg(t,e,n=Qe()){return n("readwrite",r=>(r.put(e,t),Ce(r.transaction)))}function fg(t,e=Qe()){return e("readonly",n=>Promise.all(t.map(r=>Ce(n.get(r)))))}function pg(t,e=Qe()){return e("readwrite",n=>(n.delete(t),Ce(n.transaction)))}function mg(t,e=Qe()){return e("readwrite",n=>(t.forEach(r=>n.delete(r)),Ce(n.transaction)))}function gg(t=Qe()){return t("readwrite",e=>(e.clear(),Ce(e.transaction)))}function vg(t,e){return t.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},Ce(t.transaction)}function yg(t=Qe()){return t("readonly",e=>{if(e.getAllKeys)return Ce(e.getAllKeys());const n=[];return vg(e,r=>n.push(r.key)).then(()=>n)})}function lr(t,e){const n=Ia(t,e);return{set:(r,s)=>hg(r,s,n),get:r=>dg(r,n),getMany:r=>fg(r,n),del:r=>pg(r,n),delMany:r=>mg(r,n),clear:()=>gg(n),keys:()=>yg(n)}}const Zy={drafts:lr("drafts-db","drafts-store"),catchup:lr("catchup-db","catchup-store"),yearInPosts:lr("year-in-posts-db","year-in-posts-store")},La=ie({}),bg=!!document.startViewTransition;function Gy({children:t,statusID:e}){const n=$([]),[r,s]=F(!1),[a,i]=F(0);function c(p){p!==a&&(bg?document.startViewTransition(()=>{i(p)}):i(p))}async function u(){const{masto:p}=De(),m=await p.v1.statuses.$select(e).history.list();m.sort((g,v)=>Date.parse(v.createdAt)-Date.parse(g.createdAt)),n.current=m}async function d(){try{await u(),s(!0),c(0)}catch{s(!1)}}function h(){n.current=[],s(!1),c(0)}function l(){c(p=>Math.min(p+1,n.current.length-1))}function f(){c(p=>Math.max(p-1,0))}return o(La.Provider,{value:{editHistoryRef:n,initEditHistory:d,exitEditHistory:h,editHistoryMode:r,editedAtIndex:a,prevEditedAt:l,nextEditedAt:f},children:t})}function wg(){return Lt(La)}const ai=ie();function _g(t,e){if(!t?.length)return!1;const n=t.filter(i=>{const{filter:c}=i,u=c.context.includes(e);return u?c.expiresAt?Date.parse(c.expiresAt)>Date.now():u:!1});if(!n.length)return!1;if(n.some(i=>i.filter.filterAction==="hide"))return{action:"hide"};if(n.every(i=>i.filter.filterAction==="blur")){const i=n.map(c=>c.filter.title);return{action:"blur",titles:i,titlesStr:i.join(" • ")}}if(n.some(i=>!!i.filter.filterAction)){const i=n.map(c=>c.filter.title);return{action:"warn",titles:i,titlesStr:i.join(" • ")}}return!1}const Lo=Zt(_g);function kg(t,e,n){const{filtered:r}=t;if(!r?.length||n&&t.account?.id===n)return!0;const a=Lo(r,e);return a?a.action!=="hide":!0}function Vy(t,e){if(!t?.length)return[];if(!e)return t;const n=Gr();return t.filter(r=>kg(r,e,n))}const lo=document.createElement("template");function Sg(t){if(!t)return 0;lo.innerHTML=t;const e=lo.content.querySelectorAll(".invisible");for(let r=0;r<e.length;r++)e[r].remove();let n="";for(let r=0;r<lo.content.childNodes.length;r++){const s=lo.content.childNodes[r];n+=s.innerText||s.textContent||""}return n.length}const Nr="speechSynthesis"in window;function Tg(t,e){if(Nr)try{speechSynthesis.speaking&&speechSynthesis.cancel();const n=new SpeechSynthesisUtterance(t);e&&(n.lang=e),speechSynthesis.speak(n)}catch(n){alert(n)}}function Cg(t,e,n,r){var s=this,a=$(null),i=$(0),c=$(0),u=$(null),d=$([]),h=$(),l=$(),f=$(t),p=$(!0);f.current=t;var m=typeof window<"u",g=!e&&e!==0&&m;if(typeof t!="function")throw new TypeError("Expected a function");e=+e||0;var v=!!(n=n||{}).leading,b=!("trailing"in n)||!!n.trailing,_="maxWait"in n,S="debounceOnServer"in n&&!!n.debounceOnServer,C=_?Math.max(+n.maxWait||0,e):null;V(function(){return p.current=!0,function(){p.current=!1}},[]);var w=st(function(){var T=function(D){var E=d.current,Q=h.current;return d.current=h.current=null,i.current=D,c.current=c.current||D,l.current=f.current.apply(Q,E)},A=function(D,E){g&&cancelAnimationFrame(u.current),u.current=g?requestAnimationFrame(D):setTimeout(D,E)},I=function(D){if(!p.current)return!1;var E=D-a.current;return!a.current||E>=e||E<0||_&&D-i.current>=C},x=function(D){return u.current=null,b&&d.current?T(D):(d.current=h.current=null,l.current)},k=function D(){var E=Date.now();if(v&&c.current===i.current&&R(),I(E))return x(E);if(p.current){var Q=e-(E-a.current),G=_?Math.min(Q,C-(E-i.current)):Q;A(D,G)}},R=function(){r&&r({})},O=function(){if(m||S){var D=Date.now(),E=I(D);if(d.current=[].slice.call(arguments),h.current=s,a.current=D,E){if(!u.current&&p.current)return i.current=a.current,A(k,e),v?T(a.current):l.current;if(_)return A(k,e),T(a.current)}return u.current||A(k,e),l.current}};return O.cancel=function(){var D=u.current;D&&(g?cancelAnimationFrame(u.current):clearTimeout(u.current)),i.current=0,d.current=a.current=h.current=u.current=null,D&&r&&r({})},O.isPending=function(){return!!u.current},O.flush=function(){return u.current?x(Date.now()):l.current},O},[v,_,e,C,b,g,m,S,r]);return w}function Eg(t,e,n){var r=n===void 0?{}:n,s=r.leading,a=r.trailing;return Cg(t,e,{maxWait:e,leading:s===void 0||s,trailing:a===void 0||a})}function Ag(t,e){var n=$(null),r=$(null);r.current=e;var s=$(null);V(function(){a()});var a=yt(function(){var i=s.current,c=r.current,u=i||(c?c instanceof Element?c:c.current:null);n.current&&n.current.element===u&&n.current.subscriber===t||(n.current&&n.current.cleanup&&n.current.cleanup(),n.current={element:u,subscriber:t,cleanup:u?t(u):void 0})},[t]);return V(function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}},[]),yt(function(i){s.current=i,a()},[a])}function ys(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 xg(t){t===void 0&&(t={});var e=t.onResize,n=$(void 0);n.current=e;var r=t.round||Math.round,s=$(),a=F({width:void 0,height:void 0}),i=a[0],c=a[1],u=$(!1);V(function(){return u.current=!1,function(){u.current=!0}},[]);var d=$({width:void 0,height:void 0}),h=Ag(yt(function(l){return(!s.current||s.current.box!==t.box||s.current.round!==r)&&(s.current={box:t.box,round:r,instance:new ResizeObserver(function(f){var p=f[0],m=t.box==="border-box"?"borderBoxSize":t.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",g=ys(p,m,"inlineSize"),v=ys(p,m,"blockSize"),b=g?r(g):void 0,_=v?r(v):void 0;if(d.current.width!==b||d.current.height!==_){var S={width:b,height:_};d.current.width=b,d.current.height=_,n.current?n.current(S):u.current||c(S)}})}),s.current.instance.observe(l,{box:t.box}),function(){s.current&&s.current.instance.unobserve(l)}},[t.box,r]),t.ref);return st(function(){return{ref:h,width:i.width,height:i.height}},[h,i.width,i.height])}function Mg(t={}){const e=Eg(t.onResize,300);return xg({...t,onResize:e})}function ln({className:t="truncated"}={}){const e=$();return Mg({ref:e,box:"border-box",onResize:({height:r})=>{if(e.current){const{scrollHeight:s}=e.current;let a=s>r;if(a){const{height:i,maxHeight:c}=getComputedStyle(e.current),u=parseInt(c||i,10);a=s>u}e.current.classList.toggle(t,a)}}}),e}const Nn={public:"earth",unlisted:"group",private:"lock",direct:"message",local:"building"},Ze={public:{id:"7d1a0d"},local:{id:"d5zxa4"},unlisted:{id:"pPYeIN"},private:{id:"x5LEuB"},direct:{id:"IV4QaU"}},Ig=["\\\\\\[[\\s\\S]*?\\\\\\]","\\\\\\([\\s\\S]*?\\\\\\)"],bs=new RegExp(Ig.join("|"),"g");function Lg(t){const e=["\\\\\\[","\\\\\\("],n=new RegExp(`(${e.join("|")})`),r=document.createTreeWalker(t,NodeFilter.SHOW_TEXT),s=[];let a;for(;a=r.nextNode();)s.push(a);for(const i of s){const c=i.textContent,u=c.match(n);if(!u)continue;const h=u[0]==="\\["?"\\]":"\\)",l=[i];let f=i,p=!1,m=c;if(c.includes(h))p=!0;else for(;f.nextSibling&&!p;){const g=f.nextSibling;if(g.nodeType===Node.TEXT_NODE)l.push(g),m+=g.textContent,g.textContent.includes(h)&&(p=!0);else if(g.nodeType===Node.ELEMENT_NODE&&g.tagName==="BR")l.push(g),m+=`
`;else break;f=g}if(p&&l.length>1){i.textContent=m;for(let g=1;g<l.length;g++)l[g].remove()}}}const Pg=({content:t,contentRef:e,onRevert:n})=>{if(bs.lastIndex=0,!bs.test(t))return null;const{_:s}=$t(),[a,i]=F(!1),c=yt(async u=>{if(u.preventDefault(),u.stopPropagation(),a)i(!1),n();else try{const d=window.temml||(window.temml=(await Gs(async()=>{const{default:p}=await import("./temml-BQUKR1fw.js");return{default:p}},[],import.meta.url))?.default);Lg(e.current);const h=e.current.innerHTML;d.renderMathInElement(e.current,{fences:"(",annotate:!0,throwOnError:!0,errorCallback:p=>{}});const l=e.current.querySelector("math"),f=e.current.innerHTML!==h;l&&f?i(!0):(pt(s({id:"HBIZeo"})),i(!1),n())}catch{}},[a]);return o("div",{class:"math-block",children:[o(L,{icon:"formula",size:"s"})," ",o("span",{children:s({id:"/nf2x7"})})," ",o("button",{type:"button",class:"light small",onClick:c,children:s(a?{id:"AJqQb+"}:{id:"dP6iYK"})})]})},Pa=new Uint8Array(128);for(let t=0;t<83;t++)Pa["0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~".charCodeAt(t)]=t;const bo=(t,e,n)=>{let r=0;for(;e<n;)r*=83,r+=Pa[t.charCodeAt(e++)];return r},Da=Math.pow,Hn=Math.PI,Dg=Hn*2,Ra=3294.6,$a=269.025,Rg=t=>t>10.31475?Da(t/$a+.052132,2.4):t/Ra,ur=t=>~~(t>1227e-8?$a*Da(t,.416666)-13.025:t*Ra+1),On=t=>(t<0?-1:1)*t*t,ws=t=>{for(t+=Hn/2;t>Hn;)t-=Dg;const e=1.27323954*t-.405284735*On(t);return .225*(On(e)-e)+e};function ci(t){const e=bo(t,2,6);return[e>>16,e>>8&255,e&255]}function $g(t,e,n,r){const s=bo(t,0,1),a=s%9+1,i=~~(s/9)+1,c=a*i;let u=0,d=0,h=0,l=0,f=0,p=0,m=0,g=0,v=0,b=0,_=0,S=0;const C=(bo(t,1,2)+1)/13446*(r|1),w=new Float64Array(c*3),T=ci(t);for(u=0;u<3;u++)w[u]=Rg(T[u]);for(u=1;u<c;u++)S=bo(t,4+u*2,6+u*2),w[u*3]=On(~~(S/361)-9)*C,w[u*3+1]=On(~~(S/19)%19-9)*C,w[u*3+2]=On(S%19-9)*C;const A=new Float64Array(i*n),I=new Float64Array(a*e);for(d=0;d<i;d++)for(l=0;l<n;l++)A[d*n+l]=ws(Hn*l*d/n);for(u=0;u<a;u++)for(h=0;h<e;h++)I[u*e+h]=ws(Hn*h*u/e);const x=e*4,k=new Uint8ClampedArray(x*n);for(l=0;l<n;l++)for(h=0;h<e;h++){for(f=p=m=0,d=0;d<i;d++)for(v=A[d*n+l],u=0;u<a;u++)g=I[u*e+h]*v,b=(u+d*a)*3,f+=w[b]*g,p+=w[b+1]*g,m+=w[b+2]*g;_=4*h+l*x,k[_]=ur(f),k[_+1]=ur(p),k[_+2]=ur(m),k[_+3]=255}return k}var Na="kvfysmfp",Oa="ufhsfnkm",Ng=".".concat(Na,"{overflow:hidden;touch-action:none}.").concat(Oa,"{transform-origin: 0 0}"),Og=typeof window>"u",Fg=function(){return!Og&&("ontouchstart"in window||navigator.maxTouchPoints>0)};var Bg=function(t){var e=t.x,n=t.y,r=t.scale;return"scale3d(".concat(r,",").concat(r,", 1) translate3d(").concat(e,"px, ").concat(n,"px, 0)")};var zg=Math.min,qg=Math.max;function _s(t){var e=t.containerDimension,n=t.childDimension,r=t.padding,s=t.centerContained,a=n-e;return a+2*r<=0&&s?[a/2,a/2]:[zg(a+r,0)-r,qg(0,a+r)]}var ks=function(t,e){return e?"".concat(t," ").concat(e):t},uo=Math.abs,Hg=Math.min,Kg=Math.sqrt,Fa=typeof window>"u",jg=Fa?!1:/(Mac)/i.test(navigator.platform),rn=function(t){return t==="drag"},In=function(t){return t==="zoom"},Ug=function(t){return jg&&t.ctrlKey},Ln=function(t){t.stopPropagation(),t.preventDefault()},Ss=function(t,e){var n=t.x-e.x,r=t.y-e.y;return Kg(n*n+r*r)},Wg=function(t,e){var n=Ss(t[0],t[1]),r=Ss(e[0],e[1]);return r/n},Zg=function(t,e){return t>e-.01&&t<e+.01},Gg=function(t){return-Math.cos(t*Math.PI)/2+.5},Vg=function(t){return{x:t.pageX,y:t.pageY}},ho=function(t){return Array.from(t).map(Vg)},Ts=function(t,e){return t+e},Yg=function(t){return{x:t.map(function(e){var n=e.x;return n}).reduce(Ts,0)/t.length,y:t.map(function(e){var n=e.y;return n}).reduce(Ts,0)/t.length}},dr=function(t,e,n){return n<t?t:n>e?e:n},Qg=function(t){return!(t.ctrlKey||t.metaKey)},Xg=function(t){if(t){var e=t.offsetWidth,n=t.offsetHeight;if(e&&n)return{width:e,height:n};var r=getComputedStyle(t),s=parseFloat(r.width),a=parseFloat(r.height);if(a&&s)return{width:s,height:a}}return{width:0,height:0}},Jg=function(t,e){return{x:e.x-t.x,y:e.y-t.y}},tv=function(t,e){return t.x===e.x&&t.y===e.y},He=function(){},fo={x:0,y:0},Cs=(function(t){Rc(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=Ot({},fo),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=Ot({},fo),n._startOffset=Ot({},fo),n._startTouches=null,n._updatePlaned=!1,n._wheelTimeOut=null,n._zoomFactor=1,n._initialZoomFactor=1,n._draggingPoint=Ot({},fo),n._ignoreNextClick=!1,n._containerRef=$c(),n._handleClick=function(r){n._ignoreNextClick&&(n._ignoreNextClick=!1,r.stopPropagation())},n._onResize=function(){var r;!((r=n._containerRef)===null||r===void 0)&&r.current&&(n._updateInitialZoomFactor(),n._setupOffsets(),n._update())},n._handlerOnTouchEnd=n._handlerIfEnable(function(r){n._fingers=r.touches.length,n.props.shouldCancelHandledTouchEndEvents&&(In(n._interaction)||rn(n._interaction)&&(n._startOffset.x!==n._offset.x||n._startOffset.y!==n._offset.y))&&Ln(r),rn(n._interaction)&&!n._enoughToDrag()&&n._handleClick(r),n._updateInteraction(r)}),n._handlerOnTouchStart=n._handlerIfEnable(function(r){n._firstMove=!0,n._fingers=r.touches.length,n._detectDoubleTap(r)}),n._handlerOnTouchMove=n._handlerIfEnable(function(r){n._isDoubleTap||(n._collectInertia(r),n._firstMove?(n._updateInteraction(r),n._interaction&&Ln(r),n._startOffset=Ot({},n._offset),n._startTouches=ho(r.touches)):(In(n._interaction)?n._startTouches&&n._startTouches.length===2&&r.touches.length===2&&n._handleZoom(r,Wg(n._startTouches,ho(r.touches))):rn(n._interaction)&&n._handleDrag(r),n._interaction&&(Ln(r),n._update())),n._firstMove=!1)}),n._handlerWheel=function(r){if(!n.props.shouldInterceptWheel(r)){Ln(r);var s=r.pageX,a=r.pageY,i=r.deltaY,c=r.deltaMode,u=1;(Ug(r)||c===1)&&(u=15);var d={touches:[{pageX:s,pageY:a}]},h=n._getOffsetByFirstTouch(d),l=i*u;n._stopAnimation(),n._scaleTo(n._zoomFactor-l/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 r=this._getOffsetByFirstTouch(n);this._enoughToDrag()?this._drag(r,this._lastDragPosition):this._virtualDrag(r,this._lastDragPosition),this._offset=this._sanitizeOffset(this._offset),this._lastDragPosition=r},e.prototype._resetInertia=function(){this._velocity=null,this._prevDragMovePoint=null},e.prototype._realizeInertia=function(){var n=this,r=this.props,s=r.inertiaFriction,a=r.inertia;if(!(!a||!this._velocity)){var i=this._velocity,c=i.x,u=i.y;if(c||u){this._stopAnimation(),this._resetInertia();var d=function(){if(c*=s,u*=s,!c&&!u)return n._stopAnimation();var h=Ot({},n._offset);if(n._addOffset({x:c,y:u}),n._offset=n._sanitizeOffset(n._offset),tv(h,n._offset))return n._stopAnimation();n._update({isAnimation:!0})};this._animate(d,{duration:9999})}}},e.prototype._collectInertia=function(n){var r=n.touches;if(this.props.inertia){var s=ho(r)[0],a=this._prevDragMovePoint;a&&(this._velocity=Jg(s,a)),this._prevDragMovePoint=s}},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,r){var s=Yg(this._getOffsetTouches(n)),a=r/this._lastScale;this._lastScale=r,this._nthZoom+=1,this._nthZoom>3&&(this._scale(a,s),this._drag(s,this._lastZoomCenter),this.props.enforceBoundsDuringZoom&&(this._offset=this._sanitizeOffset(this._offset))),this._lastZoomCenter=s},e.prototype._handleZoomEnd=function(){this.props.onZoomEnd(),this._end()},e.prototype._handleDoubleTap=function(n){var r=this;if(!(this._hasInteraction||this.props.tapZoomFactor===0)){var s=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,i=this._zoomFactor,c=function(d){r._scaleTo(i+d*(a-i),u)},u=this._getOffsetByFirstTouch(n);this._isDoubleTap=!0,i>a&&(u=this._getCurrentZoomCenter()),s?this._zoomOutAnimation():this._animate(c)}},e.prototype._computeInitialOffset=function(){var n=this._getContainerRect(),r=this._getChildSize(),s=r.width,a=r.height,i=-uo(s*this._getInitialZoomFactor()-n.width)/2,c=-uo(a*this._getInitialZoomFactor()-n.height)/2;this._initialOffset={x:i,y:c}},e.prototype._resetOffset=function(){this._offset=Ot({},this._initialOffset)},e.prototype._setupOffsets=function(){this.props.setOffsetsOnce&&this._isOffsetsSet||(this._isOffsetsSet=!0,this._computeInitialOffset(),this._resetOffset())},e.prototype._sanitizeOffset=function(n){var r=this._getContainerRect(),s=this._getChildSize(),a=s.width,i=s.height,c=a*this._getInitialZoomFactor()*this._zoomFactor,u=i*this._getInitialZoomFactor()*this._zoomFactor,d=_s({containerDimension:r.width,childDimension:c,padding:this.props.horizontalPadding,centerContained:this.props.centerContained}),h=d[0],l=d[1],f=_s({containerDimension:r.height,childDimension:u,padding:this.props.verticalPadding,centerContained:this.props.centerContained}),p=f[0],m=f[1];return{x:dr(h,l,n.x),y:dr(p,m,n.y)}},e.prototype.alignCenter=function(n){var r=this,s=Ot({duration:250,animated:!0},n),a=s.x,i=s.y,c=s.scale,u=s.animated,d=s.duration,h=a*this._initialZoomFactor,l=i*this._initialZoomFactor,f=this._zoomFactor,p=Ot({},this._offset),m=this._getContainerRect(),g={x:m.width/2,y:m.height/2};if(this._zoomFactor=1,this._offset={x:-(g.x-h),y:-(g.y-l)},this._scaleTo(c,g),this._stopAnimation(),!u)return this._update();var v=this._zoomFactor-f,b={x:this._offset.x-p.x,y:this._offset.y-p.y};this._zoomFactor=f,this._offset=Ot({},p);var _=function(S){var C=p.x+b.x*S,w=p.y+b.y*S;r._zoomFactor=f+v*S,r._offset=r._sanitizeOffset({x:C,y:w}),r._update()};this._animate(_,{callback:function(){return r._sanitize()},duration:d})},e.prototype.scaleTo=function(n){var r=this,s=Ot({duration:250,animated:!0},n),a=s.x,i=s.y,c=s.scale,u=s.animated,d=s.duration,h=this._zoomFactor,l=Ot({},this._offset);if(this._zoomFactor=1,this._offset={x:0,y:0},this._scaleTo(c,{x:a,y:i}),this._stopAnimation(),!u)return this._update();var f=this._zoomFactor-h,p={x:this._offset.x-l.x,y:this._offset.y-l.y};this._zoomFactor=h,this._offset=Ot({},l);var m=function(g){var v=l.x+p.x*g,b=l.y+p.y*g;r._zoomFactor=h+f*g,r._offset={x:v,y:b},r._update()};this._animate(m,{callback:function(){return r._sanitize()},duration:d})},e.prototype._scaleTo=function(n,r){this._scale(n/this._zoomFactor,r),this._offset=this._sanitizeOffset(this._offset)},e.prototype._scale=function(n,r){n=this._scaleZoomFactor(n),this._addOffset({x:(n-1)*(r.x+this._offset.x),y:(n-1)*(r.y+this._offset.y)}),this.props.onZoomUpdate()},e.prototype._scaleZoomFactor=function(n){var r=this._zoomFactor;return this._zoomFactor*=n,this._zoomFactor=dr(this.props.minZoom,this.props.maxZoom,this._zoomFactor),this._zoomFactor/r},e.prototype._canDrag=function(){return this.props.draggableUnZoomed||!Zg(this._zoomFactor,1)},e.prototype._drag=function(n,r){if(r){var s=-(n.y-r.y),a=-(n.x-r.x);this.props.lockDragAxis?uo(a)>uo(s)?this._addOffset({x:a,y:0}):this._addOffset({y:s,x:0}):this._addOffset({x:a,y:s}),this.props.onDragUpdate()}},e.prototype._virtualDrag=function(n,r){if(r){var s=-(n.y-r.y),a=-(n.x-r.x);this._draggingPoint={x:a+this._draggingPoint.x,y:s+this._draggingPoint.y}}},e.prototype._addOffset=function(n){var r=this._offset,s=r.x,a=r.y;this._offset={x:s+n.x,y:a+n.y}},e.prototype._sanitize=function(){this._zoomFactor<this.props.zoomOutFactor?(this._resetInertia(),this._zoomOutAnimation()):this._isInsaneOffset()&&this._sanitizeOffsetAnimation()},e.prototype._isInsaneOffset=function(){var n=this._offset,r=this._sanitizeOffset(n);return r.x!==n.x||r.y!==n.y},e.prototype._sanitizeOffsetAnimation=function(){var n=this,r=this._sanitizeOffset(this._offset),s=Ot({},this._offset),a=function(i){var c=s.x+i*(r.x-s.x),u=s.y+i*(r.y-s.y);n._offset={x:c,y:u},n._update()};this._animate(a)},e.prototype._zoomOutAnimation=function(){var n=this;if(this._zoomFactor!==1){var r=this._zoomFactor,s=1,a=this._getCurrentZoomCenter(),i=function(c){var u=r+c*(s-r);n._scaleTo(u,a)};this._animate(i)}},e.prototype._getInitialZoomFactor=function(){return this._initialZoomFactor},e.prototype._getCurrentZoomCenter=function(){var n=this._offset,r=n.x,s=n.y,a=r-this._initialOffset.x,i=s-this._initialOffset.y;return{x:-1*r-a/(1/this._zoomFactor-1),y:-1*s-i/(1/this._zoomFactor-1)}},e.prototype._getOffsetByFirstTouch=function(n){return this._getOffsetTouches(n)[0]},e.prototype._getOffsetTouches=function(n){var r=this.props._document,s=r.documentElement,a=r.body,i=this._getContainerRect(),c=i.top,u=i.left,d=s.scrollTop||a.scrollTop,h=s.scrollLeft||a.scrollLeft,l=c+d,f=u+h;return ho(n.touches).map(function(p){var m=p.x,g=p.y;return{x:m-f,y:g-l}})},e.prototype._animate=function(n,r){var s=this,a=new Date().getTime(),i=Ot({timeFn:Gg,callback:function(){},duration:this.props.animationDuration},r),c=i.timeFn,u=i.callback,d=i.duration,h=function(){if(s._inAnimation){var l=new Date().getTime()-a,f=l/d;l>=d?(n(1),s._stopAnimation(),u(),s._update()):(f=c(f),n(f),s._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 Xg(n?.firstElementChild)},e.prototype._updateInitialZoomFactor=function(){var n=this._getContainerRect(),r=this._getChildSize(),s=n.width/r.width,a=n.height/r.height;this._initialZoomFactor=Hg(s,a)},e.prototype._bindEvents=function(){var n=this,r=this._containerRef.current;window.ResizeObserver?(this._containerObserver=new ResizeObserver(this._onResize),this._containerObserver.observe(r)):window.addEventListener("resize",this._onResize),this._handlers.forEach(function(s){var a=s[0],i=s[1],c=s[2];(c||r).addEventListener(a,i,!0)}),Array.from(r.querySelectorAll("img")).forEach(function(s){return s.addEventListener("load",n._onResize)})},e.prototype._unSubscribe=function(){var n=this,r=this._containerRef.current;this._containerObserver&&(this._containerObserver.disconnect(),this._containerObserver=null),window.removeEventListener("resize",this._onResize),this._handlers.forEach(function(s){var a=s[0],i=s[1],c=s[2];(c||r).removeEventListener(a,i,!0)}),Array.from(r.querySelectorAll("img")).forEach(function(s){return s.removeEventListener("load",n._onResize)})},e.prototype._update=function(n){var r=this;if(!this._updatePlaned){var s=function(){var a=r._getInitialZoomFactor()*r._zoomFactor,i=-r._offset.x/a,c=-r._offset.y/a;r.props.onUpdate({scale:a,x:i,y:c})};if(n?.isAnimation)return s();this._updatePlaned=!0,requestAnimationFrame(function(){r._updatePlaned=!1,s()})}},e.prototype._handlerIfEnable=function(n){var r=this;return function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];r.props.enabled&&n.apply(void 0,s)}},e.prototype._setInteraction=function(n,r){var s=this._interaction;s!==n&&(s&&!n&&(In(s)?this._handleZoomEnd():rn(s)&&this._handleDragEnd()),In(n)?this._handleZoomStart():rn(n)&&this._handleDragStart(r)),this._interaction=n},e.prototype._distanceBetweenNumbers=function(n,r){return n>r?n-r:r-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 r=this._fingers;if(r===2)return this._setInteraction("zoom",n);if(r===1&&this._canDrag())return this._setInteraction("drag",n);this._setInteraction(null,n)},e.prototype._detectDoubleTap=function(n){var r=new Date().getTime();this._fingers>1&&(this._lastTouchStart=0),r-this._lastTouchStart<300?(Ln(n),this._handleDoubleTap(n),In(this._interaction)?this._handleZoomEnd():rn(this._interaction)&&this._handleDragEnd()):this._isDoubleTap=!1,this._fingers===1&&(this._lastTouchStart=r)},e.prototype.simulate=function(n){var r=this;return function(s){var a=s.pageX,i=s.pageY,c=s.type,u=c==="mouseup",d=c==="mousedown";d&&(s.preventDefault(),r._listenMouseMove=!0),r._listenMouseMove&&(s.touches=u?[]:[{pageX:a,pageY:i}],n(s)),u&&(r._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,r=n.children,s=n.containerProps,a=n.nonce,i=Nc.only(r),c=s||{};return no.createElement(no.Fragment,null,no.createElement("style",{nonce:a},Ng),no.createElement("div",Ot({},c,{ref:this._containerRef,className:ks(Na,c.className)}),Us(i,{className:ks(Oa,i.props.className)})))},e.defaultProps={animationDuration:250,draggableUnZoomed:!0,enforceBoundsDuringZoom:!1,centerContained:!1,enabled:!0,inertia:!0,inertiaFriction:.96,horizontalPadding:0,isTouch:Fg,lockDragAxis:!1,maxZoom:5,minZoom:.5,onDoubleTap:He,onDragEnd:He,onDragStart:He,onDragUpdate:He,onZoomEnd:He,onZoomStart:He,onZoomUpdate:He,setOffsetsOnce:!1,shouldInterceptWheel:Qg,shouldCancelHandledTouchEndEvents:!1,tapZoomFactor:1,verticalPadding:0,wheelScaleFactor:1500,zoomOutFactor:1.3,doubleTapZoomOutOnMaxScale:!1,doubleTapToggleZoom:!1,_document:Fa?null:window.document},e})(Zs);if(0)var Yy,Qy,Xy,Jy,tb,eb,nb,ob;function hr(t){if(!t)return;let e=Math.floor(t/3600),n=Math.floor(t%3600/60),r=Math.round(t%60);return e===0?`${n}:${r.toString().padStart(2,"0")}`:`${e}:${n.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`}const ev=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),nv="ALT",fr=t=>{const{_:e}=$t(),{alt:n,lang:r,index:s,...a}=t;return!n||!n.trim()?null:o("button",{type:"button",class:"alt-badge clickable",...a,onClick:i=>{i.stopPropagation(),i.preventDefault(),z.showMediaAlt={alt:n,lang:r}},title:e({id:"5gfDMm"}),children:[nv,!!s&&o("sup",{children:s})]})},ov=140,rv=280,Ba=Zt(t=>t?.length?t.length>ov||/[\n\r].*[\n\r]/.test(t.trim()):!1);function iv({class:t="",media:e,to:n,lang:r,showOriginal:s,autoAnimate:a,showCaption:i,allowLongerCaption:c,altIndex:u,checkAspectRatio:d=!0,onClick:h}){let{id:l,blurhash:f,description:p,meta:m,previewRemoteUrl:g,previewUrl:v,remoteUrl:b,url:_,type:S}=e;/no\-preview\./i.test(v)&&(v=null);const C=sv(l||f||_),{original:w={},small:T,focus:A}=m||{},I=s?w?.width:T?.width||w?.width,x=s?w?.height:T?.height||w?.height,k=s?_:v||_,R=s?b:g||b,O=T?.width&&T?.height,E=I&&x?I>x?"landscape":"portrait":null,Q=f?ci(f):null,G=$();let rt;if(A){const B=(A.x+1)/2*100,K=(1-A.y)/2*100;rt=`${B.toFixed(0)}% ${K.toFixed(0)}%`}const H=$(),Y=yt(({x:B,y:K,scale:q})=>{const{current:gt}=H;if(gt){const Vt=Bg({x:B,y:K,scale:q});q===1?gt.style.removeProperty("transform"):gt.style.setProperty("transform",Vt),gt.closest(".media-zoom").style.touchAction=q<=1.01?"pan-x":""}},[]),[nt,mt]=F(!1),at={enabled:nt,draggableUnZoomed:!1,inertiaFriction:.9,tapZoomFactor:2,doubleTapToggleZoom:!0,containerProps:{className:"media-zoom",style:{overflow:"visible"}},onUpdate:Y},[U,Et]=F(!1),Nt=st(()=>n&&!U?B=>o(Re,{to:n,...B}):"div",[n,U]),At=R?Es(R):null,Bt=S==="unknown"&&At&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(At.pathname),ne=S==="unknown"&&At&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test(At.pathname),vt=S==="image"||S==="unknown"&&v&&!Bt&&!ne,se=v&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(Es(v).pathname),qt=$(),[Gt,Z]=F(!1);me(()=>{if(!vt||!s||!qt.current)return;const{offsetWidth:B,offsetHeight:K}=qt.current,q=I<B&&x<K;q&&Z(q)},[I,x]);const ht=window.innerHeight*(E==="portrait"?.45:.33),xt=E==="portrait"?0:160,Mt={"--average-color":Q&&`rgb(${Q.join(",")})`},X=I&&x?{"--width":`${I}px`,"--height":`${x}px`,"--aspectWidth":`${I/x*Math.max(xt,ht)}px`,aspectRatio:`${I} / ${x}`,...Mt}:{...Mt},ut=Ba(p);let ot=!!i&&!s&&!!p&&!ut;c&&!ot&&p?.length<=rv&&(ot=!0);const dt=ot?B=>{const{children:K,...q}=B;return o("figure",{...q,children:[K,o("figcaption",{class:"media-caption",lang:r,dir:"auto",onClick:gt=>{gt.preventDefault(),gt.stopPropagation(),z.showMediaAlt={alt:p,lang:r}},children:p})]})}:N,Ht=()=>window.matchMedia("(min-width: calc(40em + 350px))").matches?"large":"small",ae=yt(B=>{const K=B.target.closest(".status-deck");if(s||Ht()==="large"&&K||!document.startViewTransition){h?.(B);return}const q=B.target.closest("[data-view-transition-name]")||B.target.querySelector("[data-view-transition-name]");if(q)if(h)h(B);else if(B.preventDefault(),q.dataset.viewTransitioned){q.style.viewTransitionName=C;try{document.startViewTransition(()=>{q.style.viewTransitionName="",location.hash=`#${n}`})}catch{q.style.viewTransitionName="",location.hash=`#${n}`}}else location.hash=`#${n}`;else h?.(B)},[C,s,h]);if(vt)return at.containerProps.style.display="inherit",me(()=>{ev&&s&&(async()=>{try{await fetch(k,{mode:"no-cors"}),H.current.src=k}catch{}})()},[k]),o(dt,{children:[o(Nt,{ref:qt,class:`media media-image ${t}`,onClick:ae,"data-orientation":E,"data-has-alt":!ot||void 0,style:s?{backgroundImage:`url(${v})`,"--bg-image":`url(${v})`,backgroundSize:Gt?`${I}px ${x}px`:void 0,...Mt}:X,children:s?o(Cs,{...at,children:o("img",{ref:H,src:k,alt:p,width:I,height:x,"data-orientation":E,loading:"eager",decoding:"sync",style:{"view-transition-name":C},onLoad:B=>{const K=B.target,q=K.closest(".media-image");q&&(q.style.backgroundImage=`url(${K.src})`,q.style.removeProperty("--bg-image")),K.closest(".media-zoom").style.display="",mt(!0)},onError:B=>{const{src:K}=B.target;K===k&&R&&k!==R&&(B.target.src=R)}})}):o(N,{children:[o("img",{src:k,alt:ot?"":p,width:I,height:x,"data-orientation":E,loading:"lazy","data-view-transition-name":C,style:{objectPosition:rt||"center","--anim-duration":`${Math.min(Math.max(Math.max(I,x)/100,5),120)}s`},onLoad:B=>{B.target.dataset.loaded=!0;const K=B.target.closest(".media");if(!O&&K){const{naturalWidth:q,naturalHeight:gt}=B.target;K.dataset.orientation=q>gt?"landscape":"portrait",K.style.setProperty("--width",`${q}px`),K.style.setProperty("--height",`${gt}px`),K.style.aspectRatio=`${q}/${gt}`}if(d&&K){const{target:q}=B;setTimeout(()=>{const{clientWidth:gt,clientHeight:Vt,naturalWidth:_t,naturalHeight:kt}=q;if(gt&&Vt&&_t&&kt)if(_t<88||kt<88)K.dataset.hasSmallDimension=!0;else{const Dt=kt*gt/_t;if(Math.abs(Dt-Vt)<5){const tt=K.closest(".media");tt&&(tt.dataset.hasNaturalAspectRatio=!0)}}},300)}},onError:B=>{const{src:K}=B.target;K===k&&R&&k!==R?B.target.src=R:Et(!0)}}),!ot&&o(fr,{alt:p,lang:r,index:u})]})}),U&&o("div",{children:o("a",{href:b,class:"button plain6 small",target:"_blank",children:[o(L,{icon:"external"})," ",o("span",{children:o(M,{id:"9npOH9"})})]})})]});if(S==="gifv"||S==="video"||Bt){const B=w.duration>0,K=w.duration<31,q=S==="gifv"&&K,gt=w.duration<61,Vt=hr(w.duration),_t=!s&&!a&&q,kt=!s&&a&&q,ce=w.duration>5,Dt=`
<video
src="${_}"
poster="${v}"
width="${I}"
height="${x}"
data-orientation="${E}"
style="view-transition-name: ${C}"
preload="auto"
autoplay
muted
playsinline
${gt?"loop":""}
ondblclick="this.paused ? this.play() : this.pause()"
${ce?"ontimeupdate=\"this.closest('.media-gif') && this.closest('.media-gif').style.setProperty('--progress', `${~~((this.currentTime / this.duration) * 100)}%`)\"":""}
></video>
`,It=`
<video
src="${_}"
poster="${v}"
width="${I}"
height="${x}"
data-orientation="${E}"
style="view-transition-name: ${C}"
preload="auto"
autoplay
playsinline
${gt?"loop":""}
controls
></video>
`;return o(dt,{children:o(Nt,{ref:qt,class:`media ${t} media-${q?"gif":"video"} ${kt?"media-contain":""} ${_t?"media-hover-animate":""}`,"data-orientation":E,"data-formatted-duration":s?void 0:Vt,"data-label":q&&!s&&!kt?"GIF":void 0,"data-has-alt":!ot||void 0,style:!s&&X,onClick:tt=>{if(_t)try{G.current.pause()}catch{}ae(tt)},onMouseEnter:()=>{if(_t)try{G.current.play()}catch{}},onMouseLeave:()=>{if(_t)try{G.current.pause()}catch{}},onFocus:()=>{if(_t)try{G.current.play()}catch{}},onBlur:()=>{if(_t)try{G.current.pause()}catch{}},children:[s||kt?q&&s?o(Cs,{...at,enabled:!0,children:o("div",{ref:H,dangerouslySetInnerHTML:{__html:Dt}})}):q?o("div",{class:"video-container",dangerouslySetInnerHTML:{__html:Dt}}):o("div",{class:"video-container",dangerouslySetInnerHTML:{__html:It}}):q?o("video",{ref:G,src:_,poster:v,width:I,height:x,"data-orientation":E,"data-view-transition-name":C,preload:"auto",playsinline:!0,loop:!0,muted:!0,onTimeUpdate:ce?tt=>{const{target:bt}=tt,et=bt?.closest(".media-gif");if(et){const Rt=bt.currentTime/bt.duration*100;et.style.setProperty("--progress",`${Rt}%`)}}:void 0}):o(N,{children:[v&&!se?o("img",{src:v,alt:ot?"":p,width:I,height:x,"data-orientation":E,loading:"lazy",decoding:"async","data-view-transition-name":C,onLoad:tt=>{if(!O){const bt=tt.target.closest(".media");if(bt){const{naturalHeight:et,naturalWidth:Rt}=tt.target;bt.dataset.orientation=Rt>et?"landscape":"portrait",bt.style.setProperty("--width",`${Rt}px`),bt.style.setProperty("--height",`${et}px`),bt.style.aspectRatio=`${Rt}/${et}`}}}}):o("video",{src:_+"#t=0.1",width:I,height:x,"data-orientation":E,"data-view-transition-name":C,preload:"metadata",muted:!0,disablePictureInPicture:!0,onLoadedMetadata:tt=>{if(!B){const{duration:bt}=tt.target;if(bt){const et=hr(bt),Rt=tt.target.closest(".media-video");Rt&&(Rt.dataset.formattedDuration=et)}}}}),o("div",{class:"media-play",children:o(L,{icon:"play",size:"xl",alt:"▶"})})]}),!s&&!ot&&o(fr,{alt:p,lang:r,index:u})]})})}else if(S==="audio"||ne){const B=hr(w.duration);return o(dt,{children:o(Nt,{class:`media media-audio ${t}`,"data-formatted-duration":s?void 0:B,"data-has-alt":!ot||void 0,onClick:h,style:!s&&X,children:[s?v?o("video",{src:(b||_)+"#t=0.1",width:I,height:x,"data-orientation":E,poster:v,style:{background:`url(${v}) center/cover`,aspectRatio:`${I}/${x}`},preload:"metadata",controls:!0,controlsList:"nofullscreen",autoPlay:!0,playsInline:!0}):o("audio",{src:b||_,preload:"none",controls:!0,autoPlay:!0}):v?o("img",{src:v,alt:ot?"":p,width:I,height:x,"data-orientation":E,loading:"lazy",onError:K=>{try{K.target?.remove?.()}catch{}}}):null,!s&&o(N,{children:[o("div",{class:"media-play",children:o(L,{icon:"play",size:"xl",alt:"▶"})}),!ot&&o(fr,{alt:p,lang:r,index:u})]})]})})}}function Es(t){return URL.parse(t,location.origin)}function sv(t){let e=t.replace(/[^a-zA-Z0-9_-]/g,"-");return e.match(/^[0-9-]/)&&(e="vt-"+e),e}const Or=Ne(iv,(t,e)=>{const n=t.media||{},r=e.media||{};return n?.id===r?.id&&n.url===r.url&&t.to===e.to&&t.class===e.class});function av(t){const{mediaAttachments:e,language:n,postID:r,instance:s}=t,a=e.length>1,i=$(),[c,u]=F(0);return V(()=>{let d=()=>{const{clientWidth:h,scrollLeft:l}=i.current,f=Math.round(Math.abs(l)/h);u(f)};return i.current&&i.current.addEventListener("scroll",d,{passive:!0}),()=>{i.current&&i.current.removeEventListener("scroll",d)}},[]),o(N,{children:[o("div",{class:"media-first-container",children:[o("div",{class:"media-first-carousel",ref:i,children:e.map((d,h)=>o("div",{class:"media-first-item",children:o(Or,{media:d,lang:n,to:`/${s}/s/${r}?media=${h+1}`})},d.id))}),a&&o("div",{class:"media-carousel-controls",children:[o("div",{class:"carousel-indexer",children:[c+1,"/",e.length]}),o("label",{class:"media-carousel-button",children:o("button",{type:"button",class:"carousel-button",hidden:c===0,onClick:d=>{d.preventDefault(),d.stopPropagation(),i.current.focus(),i.current.scrollTo({left:i.current.clientWidth*(c-1)*(xr()?-1:1),behavior:"smooth"})},children:o(L,{icon:"arrow-left"})})}),o("label",{class:"media-carousel-button",children:o("button",{type:"button",class:"carousel-button",hidden:c===e.length-1,onClick:d=>{d.preventDefault(),d.stopPropagation(),i.current.focus(),i.current.scrollTo({left:i.current.clientWidth*(c+1)*(xr()?-1:1),behavior:"smooth"})},children:o(L,{icon:"arrow-right"})})})]})]}),a&&o("div",{class:"media-carousel-dots",style:{"--dots-count":e.length},children:e.map((d,h)=>o("span",{class:`carousel-dot ${h===c?"active":""}`},d.id))})]})}function cv(t){const{enabled:e,children:n,lang:r,captionChildren:s}=t;return!e||!s?n:o("figure",{class:"media-figure-multiple",children:[n,o("figcaption",{lang:r,dir:"auto",children:s})]})}function lv({poll:t,lang:e,readOnly:n,refresh:r=()=>{},votePoll:s=()=>{}}){const{_:a}=$t(),[i,c]=F("default"),{expired:u,expiresAt:d,id:h,multiple:l,options:f,ownVotes:p,voted:m,votersCount:g,votesCount:v=0,emojis:b}=t,_=!!d&&new Date(d),S=l&&g||v;let C=0;S<=1e3?C=0:S<=1e4?C=1:S<=1e5&&(C=2);const[w,T]=F(!1),A=f.every(I=>I.votesCount!==null);return o("div",{lang:e,dir:"auto",class:`poll ${n?"read-only":""} ${i==="loading"?"loading":""}`,children:[w&&A||m||u?o(N,{children:[o("div",{class:"poll-options",children:f.map((I,x)=>{const{title:k,votesCount:R}=I,O=S?R/S:0,D=O?O.toLocaleString(Pt.locale||void 0,{style:"percent",maximumFractionDigits:C}):"0%",E=R>0&&R===Math.max(...f.map(Q=>Q.votesCount));return o("div",{class:`poll-option poll-result ${E?"poll-option-leading":""}`,style:{"--percentage":`${O*100}%`},children:[o("div",{class:"poll-option-title",children:[o("span",{children:o(hn,{text:k,emojis:b})}),m&&p.includes(x)&&o(N,{children:[" ",o(L,{icon:"check-circle",alt:a({id:"IeO7us"})})]})]}),o("div",{class:"poll-option-votes",title:Pt._({id:"+syLpm",values:{optionVotesCount:R}}),children:D})]},`${x}-${k}-${R}`)})}),!u&&!m&&o("button",{class:"poll-vote-button plain2",disabled:i==="loading",onClick:I=>{I.preventDefault(),T(!1)},children:[o(L,{icon:"arrow-left",size:"s"})," ",o(M,{id:"L96xSt"})]})]}):o("form",{onSubmit:async I=>{I.preventDefault();const x=I.target,k=new FormData(x),R=[];k.forEach((O,D)=>{D==="poll"&&R.push(O)}),R.length&&(c("loading"),await s(R),c("default"))},children:[o("div",{class:"poll-options",children:f.map((I,x)=>{const{title:k}=I;return o("div",{class:"poll-option",children:o("label",{class:"poll-label",children:[o("input",{type:l?"checkbox":"radio",name:"poll",value:x,disabled:i==="loading",readOnly:n}),o("span",{class:"poll-option-title",children:o(hn,{text:k,emojis:b})})]})})})}),!n&&o("button",{class:"poll-vote-button",type:"submit",disabled:i==="loading",children:o(M,{id:"lQXQKs"})})]}),o("p",{class:"poll-meta",children:[o("span",{class:"spacer",children:[o("span",{class:"ib",children:o(M,{id:"k7v0Rh",values:{0:Qt(v),1:Qt(v),votesCount:v},components:{0:o("span",{title:v}),1:o("span",{title:v})}})}),!!g&&g!==v&&o(N,{children:[" ","•"," ",o("span",{class:"ib",children:o(M,{id:"jf1i1L",values:{0:Qt(g),1:Qt(g),votersCount:g},components:{0:o("span",{title:g}),1:o("span",{title:g})}})})]})," ","•"," ",u?_?o("span",{class:"ib",children:o(M,{id:"5LwCCI",components:{0:o(Se,{datetime:_})}})}):a({id:"237hSL"}):_?o("span",{class:"ib",children:o(M,{id:"ooHDPY",components:{0:o(Se,{datetime:_})}})}):a({id:"O2tNG0"})]}),!m&&!u&&!n&&A&&o("button",{type:"button",class:"plain small",disabled:i==="loading",onClick:I=>{I.preventDefault(),T(!w)},title:a(w?{id:"L96xSt"}:{id:"zCjei3"}),children:[o(L,{icon:w?"eye-open":"eye-close",alt:a(w?{id:"L96xSt"}:{id:"zCjei3"})})," "]}),!u&&!n&&o("button",{type:"button",class:"plain small",disabled:i==="loading",onClick:I=>{I.preventDefault(),c("loading"),(async()=>(await r(),c("default")))()},title:a({id:"lCF0wC"}),children:o(L,{icon:"refresh",alt:a({id:"lCF0wC"})})})]})]})}const uv=/^http/i,As=(({post:t,instance:e,previewMode:n})=>{const{content:r,emojis:s,language:a,mentions:i,url:c}=t,u=Ye(z),d=Jt(t.id,e),h=u.statusQuotes[d],l=$();return me(()=>{if(!l.current)return;const f=Sa(r,{emojis:s,returnDOM:!0});for(const p of f.querySelectorAll('a.u-url[target="_blank"]'))uv.test(p.innerText.trim())||p.removeAttribute("target");l.current.replaceChildren(f.cloneNode(!0))},[r,s?.length]),V(()=>{if(h?.length)for(const f of l.current.querySelectorAll("a"))h.some(p=>p?.originalURL===f.href)&&f.classList.add("is-quote")},[h?.length]),o("div",{ref:l,lang:a,dir:"auto",class:"inner-content",onClick:Pm({mentions:i,instance:e,previewMode:n,statusURL:c})})});var pr,xs;function dv(){return xs||(xs=1,pr=(e,n={})=>{const r=n.char||" ",s=n.count||2;let a=0;const i=[];return e.reverse().reduce((c,u)=>{i.length&&a&&i[a]&&i[a]===u.substring(1,i[a].length+1)&&(i.splice(a,1),a--);const h=[`${r.repeat(a?a*s:0)}${u}`,...c];return u.substring(0,2)==="</"&&(a++,i[a]=u.substring(2,u.length-1)),h},[]).join(`
`)}),pr}var mr,Ms;function hv(){if(Ms)return mr;Ms=1;const t=n=>n.trim().replace(/(^(\s|\t)+|(( |\t)+)$)/gm,"");return mr={mergeAttributesWithElements:n=>{const r=t(n).split(`
`),s=[];let a="";for(let i=0;i<r.length;i+=1){const c=r[i];if(c.endsWith("/>")){s.push(`${a}${c.slice(0,-2)} />`),a="";continue}if(c.endsWith(">")){s.push(`${a}${c.startsWith(">")||c.startsWith("<")?"":" "}${c}`),a="";continue}a+=a.length?` ${c}`:c}return s},removeEmptyLines:t},mr}var gr,Is;function fv(){if(Is)return gr;Is=1;const t=dv(),{mergeAttributesWithElements:e}=hv();return gr=(r,s={})=>{const a=e(r);return t(a,s)},gr}var pv=fv();const mv=js(pv);function za(t,e,n=0){const{account:{url:r,displayName:s,acct:a,username:i,emojis:c,bot:u,group:d},id:h,poll:l,spoilerText:f,language:p,editedAt:m,createdAt:g,content:v,mediaAttachments:b,url:_,emojis:S}=t,C=Jt(h,e),T=(z.statusQuotes[C]||[]).filter((R,O,D)=>D.findIndex(E=>E.url===R.url)===O),A=T.length&&n<=2?T.map(R=>{const{id:O,instance:D}=R,E=Jt(O,D),Q=z.statuses[E];if(Q)return za(Q,D,++n)}).join(""):"",I=new Date(g),x=Dr(v,S)+`
`+A+`
`+(l?.options?.length?`
<p>📊:</p>
<ul>
${l.options.map(R=>`
<li>
${R.title}
${R.votesCount>=0?` (${R.votesCount})`:""}
</li>
`).join("")}
</ul>`:"")+(b.length>0?`
`+b.map(R=>{const{description:O,meta:D,previewRemoteUrl:E,previewUrl:Q,remoteUrl:G,url:rt,type:H}=R,{original:Y={},small:nt}=D||{},mt=nt?.width||Y?.width,at=nt?.height||Y?.height,U=G||rt,Et=E||Q,Nt=Et||U,At=U?URL.parse(U):null,Bt=H==="unknown"&&At&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(At.pathname),ne=H==="unknown"&&At&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test(At.pathname),vt=H==="image"||H==="unknown"&&Et&&!Bt&&!ne,se=H==="gifv"||H==="video"||Bt,qt=H==="audio"||ne;let Gt="";return vt?Gt=`<img src="${Nt}" width="${mt}" height="${at}" alt="${O}" loading="lazy" />`:se?Gt=`
<video src="${U}" width="${mt}" height="${at}" controls preload="auto" poster="${Et}" loading="lazy"></video>
${O?`<figcaption>${O}</figcaption>`:""}
`:qt?Gt=`
<audio src="${U}" controls preload="auto"></audio>
${O?`<figcaption>${O}</figcaption>`:""}
`:Gt=`
<a href="${U}">📄 ${O||U}</a>
`,`<figure>${Gt}</figure>`}).join(`
`):""),k=`
<blockquote lang="${p}" cite="${_}" data-source="fediverse">
${f?`
<details>
<summary>${f}</summary>
${x}
</details>
`:x}
<footer>
${Dr(s,c)} (@${a}) ${g?`<a href="${_}"><time datetime="${I.toISOString()}">${I.toLocaleString()}</time></a>`:""}
</footer>
</blockquote>
`;return mv(k)}function gv({post:t,instance:e,onClose:n}){const{_:r}=$t(),{account:{url:s,displayName:a,username:i,emojis:c,bot:u,group:d},id:h,poll:l,spoilerText:f,language:p,editedAt:m,createdAt:g,content:v,mediaAttachments:b,url:_,emojis:S}=t,C=za(t,e);return o("div",{id:"embed-post",class:"sheet",children:[!!n&&o("button",{type:"button",class:"sheet-close",onClick:n,children:o(L,{icon:"x",alt:r({id:"yz7wBu"})})}),o("header",{children:o("h2",{children:o(M,{id:"jdVwsS"})})}),o("main",{tabIndex:"-1",children:[o("h3",{children:o(M,{id:"GkS6YG"})}),o("textarea",{class:"embed-code",readonly:!0,onClick:w=>{w.target.select()},dir:"auto",children:C}),o("button",{type:"button",onClick:()=>{try{navigator.clipboard.writeText(C),pt(r({id:"bl7nrg"}))}catch{pt(r({id:"/KEBaP"}))}},children:[o(L,{icon:"clipboard"})," ",o("span",{children:o(M,{id:"he3ygx"})})]}),!!b?.length&&o("section",{children:[o("p",{children:o(M,{id:"/2mUza"})}),o("ol",{class:"links-list",children:b.map(w=>o("li",{children:o("a",{href:w.remoteUrl||w.url,target:"_blank",download:!0,children:w.remoteUrl||w.url})},w.id))})]}),!!c?.length&&o("section",{children:[o("p",{children:o(M,{id:"AeM/di"})}),o("ul",{children:c.map(w=>o("li",{children:[o("picture",{children:[o("source",{srcset:w.staticUrl,media:"(prefers-reduced-motion: reduce)"}),o("img",{class:"shortcode-emoji emoji",src:w.url,alt:`:${w.shortcode}:`,width:"16",height:"16",loading:"lazy",decoding:"async"})]})," ",o("code",{children:[":",w.shortcode,":"]})," (",o("a",{href:w.url,target:"_blank",download:!0,children:"URL"}),")",w.staticUrl?o(N,{children:[" ","(",o("a",{href:w.staticUrl,target:"_blank",download:!0,children:o(M,{id:"xiropL"})}),")"]}):null]},w.shortcode))})]}),!!S?.length&&o("section",{children:[o("p",{children:o(M,{id:"jzjjJh"})}),o("ul",{children:S.map(w=>o("li",{children:[o("picture",{children:[o("source",{srcset:w.staticUrl,media:"(prefers-reduced-motion: reduce)"}),o("img",{class:"shortcode-emoji emoji",src:w.url,alt:`:${w.shortcode}:`,width:"16",height:"16",loading:"lazy",decoding:"async"})]})," ",o("code",{children:[":",w.shortcode,":"]})," (",o("a",{href:w.url,target:"_blank",download:!0,children:"URL"}),")",w.staticUrl?o(N,{children:[" ","(",o("a",{href:w.staticUrl,target:"_blank",download:!0,children:o(M,{id:"xiropL"})}),")"]}):null]},w.shortcode))})]}),o("section",{children:o("small",{children:[o("p",{children:o(M,{id:"TnJgwX"})}),o("ul",{children:[o("li",{children:o(M,{id:"0OHPem"})}),o("li",{children:o(M,{id:"AzZ5zv"})}),o("li",{children:o(M,{id:"NU7wa/"})}),o("li",{children:o(M,{id:"R4PmPA"})})]})]})}),o("h3",{children:o(M,{id:"rdUucN"})}),o("output",{class:"embed-preview",dangerouslySetInnerHTML:{__html:C},dir:"auto"}),o("p",{children:o("small",{children:o(M,{id:"j0kZfi"})})})]})]})}function vv(t){const{_:e}=$t(),n=ln();return o(Re,{...t,"data-read-more":e({id:"8fZueG"}),ref:n})}const yv=500,Ls=30;function bv({statusId:t,instance:e,onClose:n=()=>{}}){const{_:r}=$t(),{masto:s}=De(),[a,i]=F([]),[c,u]=F("default"),[d,h]=F(null),l=$(null),f=async p=>{l.current=new AbortController;const m=l.current.signal;u("loading");let g=0,v=p;for(;v&&!m.aborted&&g<Ls&&!a.some(S=>S.id===v);){let b=Vr(v,e);const _=!!b;if(!_)try{b=await s.v1.statuses.$select(v).fetch(),g++}catch{u("error");break}i(S=>[...S,b]),v=b.quote?.quotedStatusId||b.quote?.quotedStatus?.id,!_&&v&&!m.aborted&&g<Ls&&await new Promise(S=>setTimeout(S,yv))}m.aborted||(h(v||null),u("default"))};return V(()=>(f(t),()=>{l.current?.abort()}),[t]),o("div",{id:"quote-chain-modal",class:"sheet",tabindex:"-1",children:[n&&o("button",{type:"button",class:"sheet-close",onClick:n,children:o(L,{icon:"x",alt:r({id:"yz7wBu"})})}),o("header",{children:[o("b",{children:o(M,{id:"BHObg8"})})," ",a.length>0&&o("small",{class:"tag insignificant collapsed",children:[a.length,(!!d||c==="loading")&&"+"]})]}),o("main",{children:[o("ul",{class:"quoted-posts-list",children:a.map(p=>o("li",{class:"quoted-post-item",children:o(vv,{to:e?`/${e}/s/${p.id}`:`/s/${p.id}`,class:"status-link",onContextMenu:m=>{const g=m.target.querySelector(".status");if(g){if(m.metaKey)return;m.preventDefault(),g.dispatchEvent(new MouseEvent("contextmenu",{clientX:m.clientX,clientY:m.clientY}))}},children:o(li,{status:p,instance:e,size:"s",readOnly:!0,showCommentCount:!0,showQuoteCount:m=>m>1})})},p.id))}),c==="error"?o("p",{class:"ui-state",children:o(M,{id:"Ni40GV"})}):c==="loading"?o("p",{class:"ui-state",children:o(Fn,{abrupt:!0})}):d?o("button",{type:"button",class:"light block",onClick:()=>{f(d)},children:[o(L,{icon:"arrow-down"})," ",o(M,{id:"UQR9OT"})]}):o("p",{class:"ui-state insignificant",children:o(M,{id:"2EYeAZ"})})]})]})}function wv({onClose:t,post:e,currentPolicy:n}){const{_:r}=$t(),{masto:s}=De(),[a,i]=F("default"),[c,u]=F(n||"public"),d=async h=>{h.preventDefault();const f=new FormData(h.target).get("quoteApprovalPolicy");u(f),i("loading");try{const p=await s.v1.statuses.$select(e.id).interactionPolicy.update({quote_approval_policy:f});t(!0),pt(r({id:"3P1r1z"})),i("default"),_e(p,e.instance,{skipThreading:!0,skipUnfurling:!0})}catch{pt(r({id:"hEe3YR"})),i("error")}};return o("div",{class:"sheet",id:"quote-settings-container",children:[!!t&&o("button",{type:"button",class:"sheet-close",onClick:t,disabled:a==="loading",children:o(L,{icon:"x",alt:r({id:"yz7wBu"})})}),o("header",{children:o("h2",{children:o(M,{id:"UWSCwN"})})}),o("main",{children:[!!e&&o("div",{class:"post-preview",children:o(li,{status:e,size:"s",readOnly:!0})}),o("form",{onSubmit:d,children:[o("select",{value:c,name:"quoteApprovalPolicy",disabled:a==="loading",children:[o("option",{value:"public",children:o(M,{id:"hDWXuG"})}),o("option",{value:"followers",children:o(M,{id:"9Ko+Xp"})}),o("option",{value:"nobody",children:o(M,{id:"+bAQ3S"})})]})," ",o("button",{disabled:a==="loading",children:o(M,{id:"tfDRzk"})})]})]})]})}const Ps=20;function _v({statusId:t,instance:e,onClose:n=()=>{}}){const{_:r}=$t(),{masto:s}=De(),[a,i]=F([]),[c,u]=F("default"),[d,h]=F(!1),l=$(),f=$(!0),p=(m=!1)=>{(m||!l.current)&&(l.current=s.v1.statuses.$select(t).quotes.list({limit:Ps}).values()),u("loading"),(async()=>{try{let{done:g,value:v}=await l.current.next();Array.isArray(v)?(i(m?v:b=>[...b,...v]),v.length<Ps&&(g=!0),h(!g)):h(!1),u("default")}catch{u("error")}})()};return V(()=>{p(!0),f.current=!1},[t]),o("div",{id:"quotes-modal",class:"sheet",tabindex:"-1",children:[n&&o("button",{type:"button",class:"sheet-close",onClick:n,children:o(L,{icon:"x",alt:r({id:"yz7wBu"})})}),o("header",{children:o("h2",{children:o(M,{id:"eWLklq"})})}),o("main",{children:a.length>0?o(N,{children:[o("ul",{class:"quoted-posts-list",children:a.map(m=>o("li",{class:"quoted-post-item",children:o(Re,{to:e?`/${e}/s/${m.id}`:`/s/${m.id}`,class:"status-link",onContextMenu:g=>{const v=g.target.querySelector(".status");if(v){if(g.metaKey)return;g.preventDefault(),v.dispatchEvent(new MouseEvent("contextmenu",{clientX:g.clientX,clientY:g.clientY}))}},children:o(li,{status:m,instance:e,size:"s",readOnly:!0,showCommentCount:!0,showQuoteCount:!0})})},m.id))}),c==="default"?d?o("button",{type:"button",class:"plain block",onClick:()=>p(),children:o(M,{id:"uXRAkV"})}):o("p",{class:"ui-state insignificant",children:o(M,{id:"2EYeAZ"})}):c==="loading"&&o("p",{class:"ui-state",children:o(Fn,{abrupt:!0})})]}):c==="loading"?o("p",{class:"ui-state",children:o(Fn,{abrupt:!0})}):c==="error"?o("p",{class:"ui-state",children:o(M,{id:"3Uoj83"})}):o("p",{class:"ui-state insignificant",children:o(M,{id:"/Xg6f6"})})})]})}const Ke=$e((t,e)=>{let{checked:n,count:r,extraCount:s,class:a,title:i,alt:c,size:u,icon:d,iconSize:h="l",onClick:l,...f}=t;typeof i=="string"&&(i=[i,i]),typeof c=="string"&&(c=[c,c]);const[p,m]=F(i[0]||""),[g,v]=F(c[0]||"");return V(()=>{n?(m(i[1]||""),v(c[1]||"")):(m(i[0]||""),v(c[0]||""))},[n,i,c]),o("button",{ref:e,type:"button",title:p,class:`plain ${u?"small":""} ${a} ${n?"checked":""}`,onClick:b=>{l&&(b.preventDefault(),b.stopPropagation(),l(b))},...f,children:[o(L,{icon:d,size:h,alt:g}),(!!r||!!s)&&o(N,{children:[" ",!!r&&o("small",{title:r,children:Qt(r)}),!!r&&!!s&&o("small",{children:"+"}),!!s&&o("small",{title:s,children:Qt(s)})]})]})});class Ut extends HTMLElement{constructor(){super(),this.isIframeLoaded=!1,this.isPlaylistThumbnailLoaded=!1,this.setupDom()}static get observedAttributes(){return["videoid","playlistid","videoplay","videotitle"]}connectedCallback(){this.addEventListener("pointerover",()=>Ut.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=`
<style ${n}>
:host {
--aspect-ratio: var(--lite-youtube-aspect-ratio, 16 / 9);
--aspect-ratio-short: var(--lite-youtube-aspect-ratio-short, 9 / 16);
--frame-shadow-visible: var(--lite-youtube-frame-shadow-visible, yes);
contain: content;
display: block;
position: relative;
width: 100%;
aspect-ratio: var(--aspect-ratio);
}
@media (max-width: 40em) {
:host([short]) {
aspect-ratio: var(--aspect-ratio-short);
}
}
#frame, #fallbackPlaceholder, iframe {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
}
#frame {
cursor: pointer;
}
#fallbackPlaceholder, slot[name=image]::slotted(*) {
object-fit: cover;
width: 100%;
height: 100%;
}
@container style(--frame-shadow-visible: yes) {
#frame::before {
content: '';
display: block;
position: absolute;
top: 0;
background-image: linear-gradient(180deg, #111 -20%, transparent 90%);
height: 60px;
width: 100%;
z-index: 1;
}
}
#playButton {
width: 68px;
height: 48px;
background-color: transparent;
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68 48"><path d="M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55c-2.93.78-4.63 3.26-5.42 6.19C.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26z" fill="red"/><path d="M45 24 27 14v20" fill="white"/></svg>');
z-index: 1;
border: 0;
border-radius: inherit;
}
#playButton:before {
content: '';
border-style: solid;
border-width: 11px 0 11px 19px;
border-color: transparent transparent transparent #fff;
}
#playButton,
#playButton:before {
position: absolute;
top: 50%;
left: 50%;
transform: translate3d(-50%, -50%, 0);
cursor: inherit;
}
/* Post-click styles */
.activated {
cursor: unset;
}
#frame.activated::before,
#frame.activated > #playButton {
display: none;
}
</style>
<div id="frame">
<picture>
<slot name="image">
<source id="webpPlaceholder" type="image/webp">
<source id="jpegPlaceholder" type="image/jpeg">
<img id="fallbackPlaceholder" referrerpolicy="origin" loading="lazy">
</slot>
</picture>
<button id="playButton" part="playButton"></button>
</div>
`,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,r){n!==r&&(e==="playlistid"&&n!==null&&n!==r&&(this.isPlaylistThumbnailLoaded=!1),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,r=this.autoPause?"&enablejsapi=1":"";const s=this.noCookie?"-nocookie":"";let a;return this.playlistId?a=`?listType=playlist&list=${this.playlistId}&`:a=`${this.videoId}?`,this.isYouTubeShort()&&(this.params=`loop=1&mute=1&modestbranding=1&playsinline=1&rel=0&enablejsapi=1&playlist=${this.videoId}`,n=1),`
<iframe credentialless frameborder="0" title="${this.videoTitle}"
referrerpolicy="strict-origin-when-cross-origin"
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen
src="https://www.youtube${s}.com/embed/${a}autoplay=${n}${r}&${this.params}"
></iframe>`}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(){this.playlistId&&!this.videoId?this.loadPlaylistThumbnail():this.testPosterImage(),this.domRefImg.fallback.setAttribute("aria-label",`${this.videoPlay}: ${this.videoTitle}`),this.domRefImg?.fallback?.setAttribute("alt",`${this.videoPlay}: ${this.videoTitle}`)}async loadPlaylistThumbnail(){if(!this.isPlaylistThumbnailLoaded){this.isPlaylistThumbnailLoaded=!0;try{const e=`https://www.youtube.com/oembed?url=https://www.youtube.com/playlist?list=${this.playlistId}&format=json`,n=await fetch(e);if(!n.ok)throw new Error(`Failed to fetch playlist thumbnail: ${n.status}`);const r=await n.json();if(r.thumbnail_url){const s=r.thumbnail_url,a=s.match(/\/vi\/([^\/]+)\//);if(a){const i=a[1];this.loadThumbnailImages(i)}else this.domRefImg.fallback.src=s,this.domRefImg.fallback.loading=this.posterLoading}}catch(e){console.warn("Failed to load playlist thumbnail:",e)}}}loadThumbnailImages(e){const n=`https://i.ytimg.com/vi_webp/${e}/${this.posterQuality}.webp`;this.domRefImg.webp.srcset=n;const r=`https://i.ytimg.com/vi/${e}/${this.posterQuality}.jpg`;this.domRefImg.jpeg.srcset=r,this.domRefImg.fallback.src=r,this.domRefImg.fallback.loading=this.posterLoading}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 r=>{const s=r.target;s?.naturalHeight==90&&s?.naturalWidth==120&&(this.posterQuality="hqdefault"),this.loadThumbnailImages(this.videoId)}},100)}initIntersectionObserver(){const e={root:null,rootMargin:"0px",threshold:0};new IntersectionObserver((r,s)=>{r.forEach(a=>{a.isIntersecting&&!this.isIframeLoaded&&(Ut.warmConnections(this),this.addIframe(!0),s.unobserve(this))})},e).observe(this),this.autoPause&&new IntersectionObserver((s,a)=>{s.forEach(i=>{i.intersectionRatio!==1&&this.shadowRoot.querySelector("iframe")?.contentWindow?.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")})},{threshold:1}).observe(this)}attemptShortAutoPlay(){this.isYouTubeShort()&&setTimeout(()=>{this.shadowRoot.querySelector("iframe")?.contentWindow?.postMessage('{"event":"command","func":"playVideo","args":""}',"*")},2e3)}isYouTubeShort(){return this.getAttribute("short")===""&&window.matchMedia("(max-width: 40em)").matches}static addPrefetch(e,n){const r=document.createElement("link");r.rel=e,r.href=n,r.crossOrigin="true",document.head.append(r)}static warmConnections(e){Ut.isPreconnected||window.liteYouTubeIsPreconnected||(Ut.addPrefetch("preconnect","https://i.ytimg.com/"),Ut.addPrefetch("preconnect","https://s.ytimg.com"),e.noCookie?Ut.addPrefetch("preconnect","https://www.youtube-nocookie.com"):(Ut.addPrefetch("preconnect","https://www.youtube.com"),Ut.addPrefetch("preconnect","https://www.google.com"),Ut.addPrefetch("preconnect","https://googleads.g.doubleclick.net"),Ut.addPrefetch("preconnect","https://static.doubleclick.net")),Ut.isPreconnected=!0,window.liteYouTubeIsPreconnected=!0)}}Ut.isPreconnected=!1;customElements.define("lite-youtube",Ut);function kv({authors:t,hidden:e,children:n}){if(e||!t?.[0]?.account?.id)return n;const r=t[0].account;return o("div",{class:"card-byline",children:[n,o("div",{class:"card-byline-author",children:[o(L,{icon:"link",size:"s"})," ",o("small",{children:o(M,{id:"4LHHK6",components:{0:o(he,{account:r,showAvatar:!0})}})})]})]})}function Ds(t){return["x.com","twitter.com","threads.net","bsky.app","bsky.brid.gy","fed.brid.gy"].includes(t)}function Sv({card:t,selfReferential:e,selfAuthor:n,instance:r}){const s=Ye(z),{blurhash:a,title:i,description:c,html:u,providerName:d,providerUrl:h,authorName:l,authorUrl:f,width:p,height:m,image:g,imageDescription:v,url:b,type:_,embedUrl:S,language:C,publishedAt:w,authors:T}=t,A=i||d||l,x=p/m>=1.2?"large":"",[k,R]=F(null);if(V(()=>{if(!A||!g||e||!Oc(b))return;const G=new AbortController;return Fc(r,b,G.signal).then(rt=>{if(!rt)return;const{id:H,url:Y}=rt;R("#"+Y)}),()=>{G.abort()}},[A,g,e]),s.unfurledLinks[b])return null;const O=/<iframe/i.test(u),D=yt(G=>{O&&(G.preventDefault(),z.showEmbedModal={html:u,url:b||S,width:p,height:m})},[O]),[E,Q]=F(null);if(A&&(g||_==="photo"&&a)){const G=wr(b),rt=g&&a?ci(a):null;if(!g){const mt=$g(a,44,44),at=window.OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas");at.width=44,at.height=44;const U=at.getContext("2d");U.imageSmoothingEnabled=!1;const Et=U.createImageData(44,44);Et.data.set(mt),U.putImageData(Et,0,0);try{window.OffscreenCanvas?at.convertToBlob().then(Nt=>{Q(URL.createObjectURL(Nt))}):Q(at.toDataURL())}catch{}}const H=Ds(G);return o(kv,{hidden:!!n,authors:T,children:o("a",{href:k||b,target:k?null:"_blank",rel:"nofollow noopener",class:`card link ${H?"card-post":""} ${E?"":x} ${O?"can-show-embed":""}`,style:{"--average-color":rt&&`rgb(${rt.join(",")})`},onClick:D,children:[o("div",{class:"card-image",children:o("img",{src:g||E,width:p,height:m,loading:"lazy",decoding:"async",fetchPriority:"low",alt:v||"",onError:Y=>{try{Y.target.style.display="none"}catch{}},style:{"--anim-duration":p&&m&&`${Math.min(Math.max(Math.max(p,m)/100,5),120)}s`}})}),o("div",{class:"meta-container",lang:C,children:[o("p",{class:"meta domain",children:[o("span",{class:"domain",children:G})," ",!!w&&o(N,{children:"· "}),!!w&&o(N,{children:o(Se,{datetime:w,format:"micro"})})]}),o("p",{class:"title",dir:"auto",title:i,children:i}),o("p",{class:"meta",dir:"auto",title:c,children:c||!!w&&o(Se,{datetime:w,format:"micro"})})]})]})})}else{if(_==="photo")return o("a",{href:b,target:"_blank",rel:"nofollow noopener",class:"card photo",onClick:D,children:o("img",{src:S,width:p,height:m,alt:i||c,loading:"lazy",style:{height:"auto",aspectRatio:`${p}/${m}`}})});if(_==="video"&&/youtube/i.test(d)){const G=b.match(/watch\?v=([^&]+)/)?.[1];if(G)return o("a",{class:"card video",onClick:D,children:o("lite-youtube",{videoid:G,nocookie:!0,autoPause:!0})})}if(A&&!g){const G=wr(b),rt=Ds(G);return o("a",{href:k||b,target:k?null:"_blank",rel:"nofollow noopener",class:`card link ${rt?"card-post":""} no-image`,lang:C,dir:"auto",onClick:D,children:o("div",{class:"meta-container",children:[o("p",{class:"meta domain",children:[o("span",{class:"domain",children:[o(L,{icon:"link",size:"s"})," ",o("span",{children:G})]})," ",!!w&&o(N,{children:"· "}),!!w&&o(N,{children:o(Se,{datetime:w,format:"micro"})})]}),o("p",{class:"title",title:i,children:i}),o("p",{class:"meta",title:c||d||l,children:c||d||l})]})})}}}function Tv({sKey:t}){const n=Ye(z).statusReply[t];if(!n)return null;const{id:r,instance:s}=n,a=Vr(r,s);if(!a)return null;const{account:{id:i},sensitive:c,spoilerText:u,account:{avatar:d,avatarStatic:h,bot:l}={},visibility:f,content:p,language:m,filtered:g}=a;if(c||u||!p)return null;const v=Jt(r,s),b=si(a),_=Yr(),S=_&&_===i,C=Lt(ai);let w=!S&&Lo(g,C);if(w?.action==="blur"&&(w=null),w?.action==="hide")return null;const T=w?.titlesStr||"";return o("article",{class:`status compact-reply shazam ${f==="direct"?"visibility-direct":""}`,tabindex:"-1","data-state-post-id":v,children:[o(re,{url:h||d,squircle:l}),o("div",{class:"content-compact",title:b,lang:m,dir:"auto",children:w?o("b",{class:"status-filtered-badge badge-meta",title:T,children:[o("span",{children:o(M,{id:"03Qqf9"})}),o("span",{children:T})]}):o("span",{children:b})})]})}const Cv=ie(0);function Rs({alt:t}){return o(L,{icon:"thread",size:"s",alt:t})}function $s({index:t,showIcon:e,showText:n}){const{_:r}=$t(),s=Lt(Cv),a=t>0,i=s>0;return o("div",{class:"status-thread-badge",children:[e&&o(N,{children:[o(Rs,{alt:n?"":r({id:"e66y2Z"})})," "]}),n?a?i?o(M,{id:"A05Pj6",values:{index:t,total:s}}):o(M,{id:"fYeATS",values:{index:t}}):r({id:"e66y2Z"}):a?r(i?{id:"98E0aM",values:{index:t,total:s}}:{id:"NNrlf5",values:{index:t}}):!e&&o(Rs,{alt:r({id:"e66y2Z"})})]})}const Ev={BASE_URL:"./",DEV:!1,MODE:"production",PHANPY_CLIENT_NAME:"Phanpy",PHANPY_PRIVACY_POLICY_URL:"https://github.com/cheeaun/phanpy/blob/main/PRIVACY.MD",PHANPY_TRANSLANG_INSTANCES:"translang.phanpy.social",PROD:!0,SSR:!1,VITE_APP_ENV:"production"},Av=280,xv=140,Mv=new Zr({concurrency:1,interval:1e3,intervalCap:1});function Iv(t,e,n){return Mv.add(()=>e.v1.accounts.$select(t).fetch(),{signal:n})}const Lv=xo(Iv),Pv=window.ontouchstart!==void 0&&/iPad|iPhone|iPod/.test(navigator.userAgent),Ns=80;function Dv(t){return t?.options?.length?`📊:
${t.options.map(e=>`- ${e.title}`).join(`
`)}`:""}function vr(t,e){const{maskCustomEmojis:n,maskURLs:r,hideInlineQuote:s,htmlTextOpts:a={}}=e||{},{spoilerText:i,poll:c,emojis:u}=t;let{content:d}=t;if(n&&u?.length){const l=new RegExp(`:(${u.map(f=>f.shortcode).join("|")}):`,"g");d=d.replace(l,"⬚")}return[i||"",ii(d,{...a,preProcess:(r||s)&&(l=>{if(r)for(const f of l.querySelectorAll("a")){const p=f.innerText.trim();/^https?:\/\//i.test(p)&&f.replaceWith("«🔗»")}if(s){const f=l.querySelector(".quote-inline");f&&f.remove()}})}),Dv(c)].join(`
`).trim()}function Rv(t=[],e=document){for(const n of t)try{return e.querySelectorAll(n)}catch{}return[]}const qa=Zt((t,e)=>{if(!t)return"";if(e?.length){const n=new RegExp(`:(${e.map(r=>r.shortcode).join("|")}):`,"g");t=t.replace(n,"")}return t=t.trim(),t?ii(t,{preProcess:n=>{for(const r of Rv([".mention, .hashtag, pre, code, a:has(.invisible)",".mention, .hashtag, pre, code"],n))r.remove();for(const r of n.querySelectorAll("a")){const s=r.innerText.trim();(s.startsWith("https://")||s.startsWith("http://"))&&r.remove()}}}):""});function $v(t,e){return!!qa(t,e)}const Nv={s:"small",m:"medium",l:"large"},Ov=xo(async t=>{if(t=t?.trim(),t?.length>500)return null;if(Ge){const s=await Ge.detect(t);console.groupCollapsed("💬 DETECTLANG BROWSER",s.slice(0,3).map(i=>i.detectedLanguage)),console.groupEnd();const a=s[0];if(a?.detectedLanguage&&a?.confidence>.5)return a.detectedLanguage}const{detectAll:e}=await Gs(async()=>{const{detectAll:s}=await import("./tinyld.light.node-D9KYf3Y3.js");return{detectAll:s}},[],import.meta.url),n=e(t);console.groupCollapsed("💬 DETECTLANG TINYLD",n.slice(0,3).map(s=>s.lang)),console.groupEnd();const r=n[0];return r?.lang&&r?.accuracy>.5?r.lang:null}),Ve={id:"8fZueG"},Fr={},Br=(t,e)=>`${t}:${e.join("|")}`,Fv=(t,e=[])=>{if(!t)return!1;const n=Br(t,e),r=ka(!0),s=t!==r&&!_o([t],[r])&&!e.find(a=>t===a||_o([t],[a]));return s&&(Fr[n]=!0),s},Pn={quotePrivate:{id:"0NXzv9"},requestQuote:{id:"awRXyV"},quoteManualReview:{id:"re2mMZ"},quoteFollowersOnly:{id:"NPXprJ"},quoteCannot:{id:"dmiEVR"}},Bv={public:{id:"hDWXuG"},followers:{id:"9Ko+Xp"},nobody:{id:"+bAQ3S"}},zv=/[???︖❓❔⁇⁈⁉¿‽؟]/,{DEV:po}=Ev;function fn({statusID:t,status:e,instance:n,size:r="m",contentTextWeight:s,readOnly:a,enableCommentHint:i,withinContext:c,skeleton:u,enableTranslate:d,forceTranslate:h,previewMode:l,allowFilters:f,onMediaClick:p,quoted:m,quoteDomain:g,onStatusLinkClick:v=()=>{},showFollowedTags:b,allowContextMenu:_,showActionsBar:S,showReplyParent:C,mediaFirst:w,showCommentCount:T,showQuoteCount:A,ghost:I}){const{_:x,_:k,i18n:R}=$t(),O=va(R.locale);if(I){const{inReplyToAccountId:y}=I,P=y?z.accounts[y]:null;return o("article",{class:`status ghost ${w?"status-media-first small":""}`,children:[!w&&o(re,{size:"xxl",url:P?.avatarStatic||P?.avatar,squircle:P?.bot}),o("div",{class:"container",children:[o("div",{class:"meta",children:[(r==="s"||w)&&o(re,{size:"m",url:P?.avatarStatic||P?.avatar,squircle:P?.bot}),P&&o(he,{account:P,showAvatar:!1})]}),o("div",{class:"content-container",children:[w&&o("div",{class:"media-first-container"}),o("div",{class:`content ${w?"media-first-content":""}`,children:o("p",{class:"insignificant",children:o(M,{id:"2C0g0G"})})})]})]})]})}if(u)return o("div",{class:`status skeleton ${w?"status-media-first small":""}`,children:[!w&&o(re,{size:"xxl"}),o("div",{class:"container",children:[o("div",{class:"meta",children:[(r==="s"||w)&&o(re,{size:"m"})," ███ ████████"]}),o("div",{class:"content-container",children:[w&&o("div",{class:"media-first-container"}),o("div",{class:`content ${w?"media-first-content":""}`,children:o("p",{children:"████ ████████"})})]})]})]});const{masto:D,instance:E,authenticated:Q}=De({instance:n}),{instance:G}=De(),rt=E===G;let H=Jt(t||e?.id,E);const Y=Ye(z);if(e||(e=Y.statuses[H]||Y.statuses[t],H=Jt(e?.id,E)),!e)return null;const{editHistoryRef:nt,editHistoryMode:mt,editedAtIndex:at}=wg();if(mt&&e?.editedAt&&nt.current.length){const y=nt.current[at];y&&(e={...e,...y})}const{account:{acct:U,avatar:Et,avatarStatic:Nt,id:At,url:Bt,displayName:ne,username:vt,emojis:se,bot:qt,group:Gt}={},id:Z,repliesCount:ht,reblogged:xt,reblogsCount:Mt,favourited:X,favouritesCount:ut,quotesCount:ot,bookmarked:dt,poll:Ht,muted:ae,sensitive:B,spoilerText:K,visibility:q,language:gt,editedAt:Vt,filtered:_t,card:kt,createdAt:ce,inReplyToId:Dt,inReplyToAccountId:It,content:tt,mentions:bt,mediaAttachments:et=[],reblog:Rt,quote:Fe,uri:Po,url:W,emojis:wt,tags:te,pinned:zt,quoteApproval:ft,_deleted:oe,_pinned:jn,emojiReactions:Un}=e,[Ee,Do]=F(null);V(()=>{if(!tt||gt||Ee)return;let y;return y=setTimeout(async()=>{let P=await Ov(qa(tt,wt));Do(P)},1e3),()=>clearTimeout(y)},[tt,gt]);const St=gt||Ee,Xe=!!et?.length;w&&Xe&&(r="s");const ve=Yr(),le=ve&&ve===At,Be=Lt(ai),Kt=!le&&(!a&&!l||f)&&Lo(_t,Be);if(Kt?.action==="hide")return null;const ye=y=>{y.shiftKey};if((f||r!=="l")&&Kt&&Kt.action!=="blur")return o(Zv,{status:e,filterInfo:Kt,instance:E,containerProps:{onMouseEnter:ye},showFollowedTags:!0,quoted:m});const jt=new Date(ce),di=new Date(Vt);let Ro=bt?.find(y=>y.id===It);!Ro&&It===Z&&(Ro={url:Bt,username:vt,displayName:ne});const[gn,hi]=F(Ro);V(()=>{if(!c&&!gn&&It){const y=z.accounts[It];if(y){hi(y);return}const P=new AbortController;return Lv(It,D,P.signal).then(J=>{hi(J),z.accounts[J.id]=J}).catch(J=>{}),()=>{P.abort()}}},[c,gn,It]);const fi=It&&It===ve||bt?.find(y=>y.id===ve),pi=zc(),Ae=!!pi["reading:expand:spoilers"],Wn=pi["reading:expand:media"]?.toLowerCase()||"default",ue=l||Ae||!!Y.spoilers[Z],vn=l||Wn==="show_all"&&Kt?.action!=="blur"||!!Y.spoilersMedia[Z];if(Rt)return Gt?o("div",{"data-state-post-id":H,class:"status-group",onMouseEnter:ye,children:[o("div",{class:"status-pre-meta",children:[o(L,{icon:"group",size:"l",alt:k({id:"L8fEEm"})})," ",o(he,{account:e.account,instance:E,showAvatar:!0})]}),o(fn,{status:t?null:Rt,statusID:t?Rt.id:null,instance:E,size:r,contentTextWeight:s,readOnly:a,mediaFirst:w})]}):o("div",{"data-state-post-id":H,class:"status-reblog",onMouseEnter:ye,children:[o("div",{class:"status-pre-meta",children:[o(L,{icon:"rocket",size:"l"})," ",o(M,{id:"DlhB4J",components:{0:o(he,{account:e.account,instance:E,showAvatar:!0}),1:o("span",{})}})]}),o(fn,{status:t?null:Rt,statusID:t?Rt.id:null,instance:E,size:r,contentTextWeight:s,readOnly:a,enableCommentHint:!0,mediaFirst:w})]});const Xa=yt(({children:y})=>o("div",{"data-state-post-id":H,class:"status-followed-tags",onMouseEnter:ye,children:[o("div",{class:"status-pre-meta",children:[o(L,{icon:"hashtag",size:"l"})," ",Y.statusFollowedTags[H].slice(0,3).map(P=>o(Re,{to:E?`/${E}/t/${P}`:`/t/${P}`,class:"status-followed-tag-item",children:P},P))]}),y]}),[H,E,Y.statusFollowedTags[H]]),Ja=b&&Y.statusFollowedTags[H]?.length?Xa:N,it=r==="l",xe=st(()=>Sg(tt),[tt]),[$o,tc]=F(h),{contentTranslation:No,contentTranslationAutoInline:mi}=Y.settings;No||(d=!1);const gi=st(()=>!No||!mi||a||c&&!it||l||K||B||Ht||kt?!1:xe>0&&xe<=xv,[No,mi,a,c,it,l,K,B,Ht,kt,et,xe]),[Oo,Zn]=F(!1),[ec,Fo]=F(!1),[nc,Bo]=F(!1),[oc,zo]=F(!1),[rc,qo]=F(!1),vi=ln(),Ho=ln(),ic=ln(),Je=$(null),[sc,ac]=Wr(y=>y+1,0),yn=k({id:"7jyUKe"}),yi=yt(()=>Math.max(Math.round(((K?.length||0)+xe)/140)||1,1),[K,xe]),bi=ce&&qn(jt),wi=Vt&&qn(di),tn=["public","unlisted"].includes(q);let bn=Q&&tn;q==="private"&&le&&(bn=!0);let en=!1,wn=k({id:"ZhhOwV"}),Me;if(Yt()){const y=le,P=y&&q==="private",J=ft?.currentUser==="automatic"&&(tn||P),ct=ft?.currentUser==="manual"&&(tn||P),ee=ft?.automatic?.[0]==="followers"||ft?.manual?.[0]==="followers";!tn&&!y?(en=!0,Me=x(Pn.quotePrivate)):J||(ct?(wn=x(Pn.requestQuote),Me=x(Pn.quoteManualReview)):(en=!0,Me=x(ee?Pn.quoteFollowersOnly:Pn.quoteCannot)))}const Gn=Yt()&&!en,_i=rm(ft),ze=(y,P="all")=>{if(!rt||!Q)return alert(yn);(y?.shiftKey||y?.syntheticEvent?.shiftKey)&&Yl({replyToStatus:e,replyMode:P})||Ie({replyToStatus:e,replyMode:P})},cc=st(()=>et.some(y=>!y.description?.trim?.()),[et]),ki=st(()=>Math.floor((new Date-jt)/(1e3*60*60*24*30)),[jt]),Ko=async()=>{if(!rt||!Q)return alert(yn),!1;try{if(z.statuses[H]={...e,reblogged:!xt,reblogsCount:Mt+(xt?-1:1)},xt){const y=await D.v1.statuses.$select(Z).unreblog();_e(y,E)}else{const y=await D.v1.statuses.$select(Z).reblog();_e(y,E)}return!0}catch{return z.statuses[H]=e,!1}},Si=async()=>{if(!rt||!Q)return alert(yn),!1;try{if(z.statuses[H]={...e,favourited:!X,favouritesCount:ut+(X?-1:1)},X){const y=await D.v1.statuses.$select(Z).unfavourite();_e(y,E)}else{const y=await D.v1.statuses.$select(Z).favourite();_e(y,E)}return!0}catch{return z.statuses[H]=e,!1}},jo=async()=>{try{const y=await Si();!it&&y&&pt(k(X?{id:"sZvpIt",values:{0:vt||U}}:{id:"yUngDO",values:{0:vt||U}}))}catch{}},Ti=async()=>{if(so("@mastodon/post-bookmark")){if(!rt||!Q)return alert(yn),!1;try{if(z.statuses[H]={...e,bookmarked:!dt},dt){const y=await D.v1.statuses.$select(Z).unbookmark();_e(y,E)}else{const y=await D.v1.statuses.$select(Z).bookmark();_e(y,E)}return!0}catch{return z.statuses[H]=e,!1}}},Ci=async()=>{try{const y=await Ti();!it&&y&&pt(k(dt?{id:"lWQguj",values:{0:vt||U}}:{id:"Fb2K8h",values:{0:vt||U}}))}catch{}},Uo=Y.settings.contentTranslationHideLanguages||[],[qe,Ei]=F(Fr[Br(St,Uo)]);V(()=>{if(!St||qe)return;if(!qe&&Fr[Br(St,Uo)]){Ei(!0);return}let y=setTimeout(()=>{const P=Fv(St,Uo);P&&Ei(P)},100);return()=>clearTimeout(y)},[St,qe]);const Ai=$(),xi=$();async function lc(y){y&&(Ai.current=D.v1.statuses.$select(t).rebloggedBy.list({limit:Ns}).values(),xi.current=D.v1.statuses.$select(t).favouritedBy.list({limit:Ns}).values());const[{value:P},{value:J}]=await Promise.allSettled([Ai.current.next(),xi.current.next()]);if(P.value?.length||J.value?.length){const ct=[];return P.value?.length&&ct.push(...P.value.map(ee=>(ee._types=["reblog"],ee))),J.value?.length&&ct.push(...J.value.map(ee=>(ee._types=["favourite"],ee))),{value:ct,done:P.done&&J.done}}return{value:[],done:!0}}const uc=Fe?.state==="accepted"&&Fe?.quotedStatus?.account?.id===ve,dc=$(),hc=["public","unlisted","private"].includes(q),Mi=cc&&!xt?o("div",{class:"footer",children:[o(L,{icon:"alert"}),o(M,{id:"MB+wJL"})]}):ki>=3&&o("div",{class:"footer",children:[o(L,{icon:"info"}),o("span",{children:o(M,{id:"dBme/4",values:{0:O.format(-ki,"month")},components:{0:o("strong",{})}})})]}),Wo=st(()=>bt?.length?[...new Set([At,...bt.map(P=>P.id)])].filter(P=>P!==ve).length:!1,[At,bt?.length,ve]),Vn=Wo>3,Ii=()=>o(N,{children:[o(L,{icon:"comment"}),o("span",{children:ht>0?Qt(ht):k(Vn?{id:"MmYpxT"}:{id:"ImOQa9"})})]}),Li=o(N,{children:[o(lt,{onClick:y=>ze(y,"all"),children:o("small",{children:[o(M,{id:"5ykMJ1"}),o("br",{}),o("span",{class:"more-insignificant",children:o(M,{id:"rtCQ2N",values:{mentionsCount:Wo}})})]})}),o(lt,{onClick:y=>ze(y,"author-first"),children:o("small",{children:[o(M,{id:"5ykMJ1"}),o("br",{}),o("span",{class:"more-insignificant",children:o(M,{id:"4UOm4A",values:{0:Wo-1,1:vt||U},components:{0:o("span",{class:"bidi-isolate"})}})})]})}),o(lt,{onClick:y=>ze(y,"author-only"),children:o("small",{children:[o(M,{id:"ImOQa9"}),o("br",{}),o("span",{class:"more-insignificant",children:o(M,{id:"zcKxuj",values:{0:vt||U},components:{0:o("span",{class:"bidi-isolate"})}})})]})})]}),Pi=o(N,{children:[!it&&rt&&o(N,{children:o("div",{class:"menu-control-group-horizontal status-menu",children:[Vn?o(ya,{openTrigger:"clickOnly",direction:"bottom",overflow:"auto",gap:-8,shift:8,menuClassName:"menu-emphasized",label:o(Ii,{}),children:Li}):o(lt,{onClick:ze,children:o(Ii,{})}),o(ro,{subMenu:!0,confirmLabel:o(N,{children:[o(L,{icon:"rocket"}),o("span",{children:k(xt?{id:"QzzGsY"}:{id:"kulphB"})})]}),className:`menu-reblog ${xt?"checked":""}`,menuExtras:o(N,{children:[Yt()&&o(lt,{disabled:en,onClick:()=>{Ie({quoteStatus:e})},children:[o(L,{icon:"quote"}),Me?o("small",{children:[wn,o("br",{}),Me]}):o("span",{children:wn})]}),(po||!Yt())&&o(lt,{onClick:()=>{Ie({draftStatus:{status:`
${W}`}})},children:[o(L,{icon:"quote"}),o("span",{children:o(M,{id:"ygxzZR"})}),Yt()&&po&&o("small",{class:"tag collapsed",children:"DEV"})]})]}),menuFooter:Mi,disabled:!bn,onClick:async()=>{try{const y=await Ko();!it&&y&&pt(k(xt?{id:"bpDheH",values:{0:vt||U}}:{id:"dbNZdP",values:{0:vt||U}}))}catch{}},children:[Gn?o("span",{class:"icon",children:[o(L,{icon:"rocket"}),o(L,{icon:"quote"})]}):o(L,{icon:"rocket"}),o("span",{children:Mt>0||ot>0?`${Mt>0?Qt(Mt):""}${Mt>0&&ot>0?"+":""}${ot>0?Qt(ot):""}`:k(xt?{id:"QzzGsY"}:Gn?{id:"n1PNla"}:{id:"PiVIlD"})})]}),o(lt,{onClick:jo,className:`menu-favourite ${X?"checked":""}`,children:[o(L,{icon:"heart"}),o("span",{children:ut>0?Qt(ut):k(X?{id:"OcUmcH"}:{id:"W9FRBT"})})]}),so("@mastodon/post-bookmark")&&o(lt,{onClick:Ci,className:`menu-bookmark ${dt?"checked":""}`,children:[o(L,{icon:"bookmark"}),o("span",{children:k(dt?{id:"q8EQYI"}:{id:"PZlHt8"})})]})]})}),!it&&rt&&(it||S)&&o(Sn,{}),(it||S)&&o(N,{children:[o(lt,{onClick:()=>{z.showGenericAccounts={heading:k({id:"+XOeb+"}),fetchAccounts:lc,instance:E,showReactions:!0,postID:H}},children:[o(L,{icon:"react"}),o("span",{children:o(M,{id:"+XOeb+"})})]}),Yt()&&o(lt,{onClick:()=>{zo(!0)},children:[o(L,{icon:"quote"}),o("span",{children:o(M,{id:"5t4KSs"})})]}),Fe?.quotedStatus?.quote&&o(lt,{onClick:()=>{qo(!0)},children:[o(L,{icon:"quote"}),o("span",{children:o(M,{id:"e2cs+Z"})})]})]}),(it||!w&&(d||!St||qe))&&o(Sn,{}),!w&&(d||!St||qe)&&o("div",{class:Nr?"menu-horizontal":"",children:[d?o(lt,{disabled:$o,onClick:()=>tc(!0),children:[o(L,{icon:"translate"}),o("span",{children:o(M,{id:"pi8x/S"})})]}):o(Xi,{to:`${E?`/${E}`:""}/s/${Z}?translate=1`,children:[o(L,{icon:"translate"}),o("span",{children:o(M,{id:"pi8x/S"})})]}),Nr&&o(lt,{onClick:()=>{try{const y=vr(e,{hideInlineQuote:Yt()});y&&Tg(y,St)}catch{}},children:[o(L,{icon:"speak"}),o("span",{children:o(M,{id:"yIBLq8"})})]})]}),it&&o(lt,{onClick:()=>{try{const y=vr(e,{hideInlineQuote:Yt(),htmlTextOpts:{truncateLinks:!1}});navigator.clipboard.writeText(y),pt(k({id:"iSRQvy"}))}catch{pt(k({id:"N1MyiN"}))}},children:[o(L,{icon:"clipboard"}),o("span",{children:o(M,{id:"iQgJaz"})})]}),(!it&&rt||d||!St||qe)&&o(Sn,{}),!it&&o(N,{children:o(Xi,{to:E?`/${E}/s/${Z}`:`/s/${Z}`,onClick:y=>{v(y,e)},children:[o(L,{icon:"arrows-right"}),o("small",{children:[o(M,{id:"8MkSAW",values:{0:vt||U},components:{0:o("span",{class:"bidi-isolate"})}}),o("br",{}),o("span",{class:"more-insignificant",children:[x(Ze[q])," • ",bi]})]})]})}),!!Vt&&o(N,{children:o(lt,{onClick:()=>{Zn(Z)},children:[o(L,{icon:"history"}),o("small",{children:[o(M,{id:"QL+7Jw"}),o("br",{}),o("span",{class:"more-insignificant",children:o(M,{id:"DuJJm9",values:{editedDateText:wi}})})]})]})}),o(lt,{href:W,target:"_blank",children:[o(L,{icon:"external"}),o("small",{class:"menu-double-lines should-cloak",style:{maxWidth:"16em"},children:qv(W)})]}),o("div",{class:"menu-horizontal",children:[o(lt,{onClick:()=>{try{navigator.clipboard.writeText(W),pt(k({id:"edWbV6"}))}catch{pt(k({id:"W1ewR0"}))}},children:[o(L,{icon:"link"}),o("span",{children:o(M,{id:"he3ygx"})})]}),tn&&navigator?.share&&navigator?.canShare?.({url:W})&&o(lt,{onClick:()=>{try{navigator.share({url:W})}catch{alert(k({id:"TtG3Uh"}))}},children:[o(L,{icon:"share"}),o("span",{children:o(M,{id:"LFKLqp"})})]})]}),tn&&it&&o(lt,{onClick:()=>{Fo(!0)},children:[o(L,{icon:"code"}),o("span",{children:o(M,{id:"jdVwsS"})})]}),Q&&o(N,{children:[(le||fi)&&o(Sn,{}),(le||fi)&&o(lt,{onClick:async()=>{try{const y=await D.v1.statuses.$select(Z)[ae?"unmute":"mute"]();_e(y,E),pt(k(ae?{id:"Pm+5jw"}:{id:"ywB7JM"}))}catch{pt(k(ae?{id:"c6jxNY"}:{id:"8SN9kN"}))}},children:ae?o(N,{children:[o(L,{icon:"unmute"}),o("span",{children:o(M,{id:"i51zUR"})})]}):o(N,{children:[o(L,{icon:"mute"}),o("span",{children:o(M,{id:"OiUYO5"})})]})}),le&&hc&&o(lt,{onClick:async()=>{try{const y=await D.v1.statuses.$select(Z)[zt?"unpin":"pin"]();_e(y,E),pt(k(zt?{id:"Yx809+"}:{id:"S6P6E+"}))}catch{pt(k(zt?{id:"A6cs15"}:{id:"vgUfWO"}))}},children:zt?o(N,{children:[o(L,{icon:"unpin"}),o("span",{children:o(M,{id:"XQMQZw"})})]}):o(N,{children:[o(L,{icon:"pin"}),o("span",{children:o(M,{id:"lfHLsx"})})]})}),le&&o(N,{children:[Yt()&&!["private","direct"].includes(q)&&o(lt,{onClick:()=>Bo(!0),children:[o(L,{icon:"quote2"}),o("small",{children:[o(M,{id:"eKInue"}),o("br",{}),o("span",{class:"more-insignificant",children:x(Bv[_i])})]})]}),o("div",{class:"menu-horizontal",children:[so("@mastodon/post-edit")&&o(lt,{onClick:()=>{Ie({editStatus:e,quoteStatus:e.quote?.quotedStatus})},children:[o(L,{icon:"pencil"}),o("span",{children:o(M,{id:"ePK91l"})})]}),it&&o(ro,{subMenu:!0,confirmLabel:o(N,{children:[o(L,{icon:"trash"}),o("span",{children:o(M,{id:"FbPNuJ"})})]}),itemProps:{className:"danger"},menuItemClassName:"danger",onClick:()=>{(async()=>{try{await D.v1.statuses.$select(Z).remove();const y=Vr(Z,E);y._deleted=!0,pt(k({id:"KiyvHV"}))}catch{pt(k({id:"Yb6p2q"}))}})()},children:[o(L,{icon:"trash"}),o("span",{children:o(M,{id:"Jb6/SB"})})]})]})]}),!le&&it&&o(N,{children:[o(Sn,{}),uc&&o(ro,{subMenu:!0,confirmLabel:o(N,{children:[o(L,{icon:"quote"}),o("span",{children:o(M,{id:"FMGfUd",values:{0:vt||U},components:{0:o("span",{class:"bidi-isolate"})}})})]}),itemProps:{className:"danger"},menuItemClassName:"danger",onClick:()=>{(async()=>{try{const y=Fe.quotedStatus.id;await D.v1.statuses.$select(y).quotes.$select(Z).revoke.create(),pt(k({id:"YgM2yU"})),z.reloadStatusPage++}catch{pt(k({id:"VzLGaA"}))}})()},children:[o(L,{icon:"quote"}),o(M,{id:"ukL58r"})]}),o(lt,{className:"danger",onClick:()=>{z.showReportModal={account:e.account,post:e}},children:[o(L,{icon:"flag"}),o("span",{children:o(M,{id:"7PQAMY"})})]})]})]})]}),Di=$(),[Yn,_n]=F(!1),[Ri,Qn]=F({}),Xn=_||!it&&!l&&!oe&&!m,fc=ha(Pv&&Xn?y=>{if(y.pointerType==="mouse")return;const{clientX:P,clientY:J}=y.touches?.[0]||y,ct=y.target.closest("a");ct&&Je.current.contains(ct)&&!ct.getAttribute("href").startsWith("#")||(y.preventDefault(),Qn({anchorPoint:{x:P,y:J},direction:"right"}),_n(!0))}:null,{threshold:600,captureEvent:!0,detect:"touch",cancelOnMovement:2}),kn=!a&&!l&&!m,pc=je("r, shift+r",(y,P)=>{y.shiftKey===P.shift&&ze(y)},{enabled:kn,useKey:!0,ignoreEventWhen:y=>y.metaKey||y.ctrlKey||y.altKey}),mc=je("f, l",jo,{enabled:kn,ignoreEventWhen:y=>y.metaKey||y.ctrlKey||y.altKey||y.shiftKey,useKey:!0}),gc=je("d",Ci,{enabled:kn,useKey:!0,ignoreEventWhen:y=>y.metaKey||y.ctrlKey||y.altKey||y.shiftKey}),vc=je("shift+b",y=>{y.shiftKey&&(async()=>{try{const P=await Ko();!it&&P&&pt(k(xt?{id:"bpDheH",values:{0:vt||U}}:{id:"dbNZdP",values:{0:vt||U}}))}catch{}})()},{enabled:kn&&bn,useKey:!0,ignoreEventWhen:y=>y.metaKey||y.ctrlKey||y.altKey}),yc=je("x",y=>{const P=document.activeElement.closest(".status-link, .status-focus");if(P){const J=P.querySelector(".spoiler-button:not(.spoiling)");if(J)y.stopPropagation(),J.click();else{const ct=P.querySelector(".spoiler-media-button:not(.spoiling)");ct&&(y.stopPropagation(),ct.click())}}},{useKey:!0,ignoreEventWhen:y=>y.metaKey||y.ctrlKey||y.altKey||y.shiftKey}),bc=je("q",y=>{if(!rt||!Q)return alert(yn);Yt()?en?pt(Me):Ie({quoteStatus:e}):Ie({draftStatus:{status:`
${W}`}})},{enabled:kn,useKey:!0,ignoreEventWhen:y=>y.metaKey||y.ctrlKey||y.altKey||y.shiftKey}),Jn=et.slice(0,it?void 0:4),to=et.length>1&&Jn.some(y=>!!y.description&&!Ba(y.description)),wc=st(()=>{if(!to)return null;const y=[];return Jn.forEach((P,J)=>{if(!P.description)return;const ct=y.findIndex(ee=>ee.media.description===P.description);ct===-1?y.push({media:P,indices:[J]}):y[ct].indices.push(J)}),y.map(({media:P,indices:J})=>o("div",{"data-caption-index":J.map(ct=>ct+1).join(" "),onClick:ct=>{ct.preventDefault(),ct.stopPropagation(),z.showMediaAlt={alt:P.description,lang:St}},title:P.description,children:[o("sup",{children:J.map(ct=>ct+1).join(" ")})," ",P.description]},P.id))},[to,Jn,St]),nn=st(()=>!!Dt&&It===e.account?.id||!!Y.statusThreadNumber[H],[Dt,It,e.account?.id,Y.statusThreadNumber[H]]),$i=st(()=>i&&!nn&&!c&&!Dt&&q==="public"&&ht>0,[i,nn,c,Dt,ht,q]),eo=st(()=>{if(T&&ht>0)return!0;if(kt||Ht||B||K||et?.length||nn||c||Dt||ht<=0||!zv.test(tt))return!1;if(xe>0&&xe<=Av)return!0},[T,kt,Ht,B,K,et,Rt,nn,c,Dt,ht,tt,xe]),Ni=typeof A=="function"?A(ot):A&&ot>0;return o(Ja,{children:[C&&!!(Dt&&It)&&o(Tv,{sKey:H}),o("article",{"data-state-post-id":H,ref:y=>{Je.current=y;const P=y?.closest?.(".timeline-item, .timeline-item-alt, .status-link, .status-focus")||y;pc.current=P,mc.current=P,gc.current=P,vc.current=P,yc.current=P,bc.current=P},tabindex:"-1",class:`status ${!c&&Dt&&gn?"status-reply-to":""} visibility-${q} ${jn?"status-pinned":""} ${Nv[r]} ${oe?"status-deleted":""} ${m?"status-card":""} ${Yn?"status-menu-open":""} ${w&&Xe?"status-media-first":""}`,onMouseEnter:ye,onContextMenu:y=>{if(!Xn||y.metaKey)return;const P=y.target.closest("a");if(P&&Je.current.contains(P)&&!P.getAttribute("href").startsWith("#"))return;const J=window.getSelection?.();if(J.toString().length>0){const{anchorNode:ct}=J;if(Je.current?.contains(ct))return}y.preventDefault(),Qn({anchorPoint:{x:y.clientX,y:y.clientY},direction:"right"}),_n(!0)},...Xn?fc():{},children:[Xn&&o(ra,{ref:Di,state:Yn?"open":void 0,...Ri,onClose:y=>{_n(!1),y?.reason==="click"&&Je.current?.closest("[tabindex]")?.focus?.()},portal:{target:document.body},containerProps:{style:{zIndex:1001},onClick:()=>{Di.current?.closeMenu?.()}},overflow:"auto",boundingBoxPadding:ga(),unmountOnClose:!0,children:Pi}),S&&r!=="l"&&!l&&!a&&!oe&&!m&&o("div",{class:`status-actions ${Yn==="actions-bar"?"open":""}`,ref:dc,children:[o(Ke,{size:"s",title:k({id:"ImOQa9"}),alt:k({id:"ImOQa9"}),class:"reply-button",icon:"comment",iconSize:"m",onClick:y=>ze(y,Vn?"author-first":"all")}),o(Ke,{size:"s",checked:X,title:[k({id:"W9FRBT"}),k({id:"OcUmcH"})],alt:[k({id:"W9FRBT"}),k({id:"8ab1sR"})],class:"favourite-button",icon:"heart",iconSize:"m",count:ut,onClick:jo}),o("button",{type:"button",title:k({id:"2FYpfJ"}),class:"plain more-button",onClick:y=>{y.preventDefault(),y.stopPropagation(),Qn({anchorRef:{current:y.currentTarget},align:"start",direction:"left",gap:0,shift:-8}),_n("actions-bar")},children:o(L,{icon:"more2",size:"m",alt:k({id:"2FYpfJ"})})})]}),r!=="l"&&o("div",{class:"status-badge",children:[xt&&o(L,{class:"reblog",icon:"rocket",size:"s",alt:k({id:"b7T5Zj"})}),X&&o(L,{class:"favourite",icon:"heart",size:"s",alt:k({id:"8ab1sR"})}),dt&&o(L,{class:"bookmark",icon:"bookmark",size:"s",alt:k({id:"1C/9Sa"})}),jn&&o(L,{class:"pin",icon:"pin",size:"s",alt:k({id:"kNiQp6"})})]}),r!=="s"&&o("a",{href:Bt,tabindex:"-1",title:`@${U}`,onClick:y=>{y.preventDefault(),y.stopPropagation(),z.showAccount={account:e.account,instance:E}},children:o(re,{url:Nt||Et,size:"xxl",squircle:qt})}),o("div",{class:"container",children:[!!g&&o("div",{class:"status-quote-meta",children:o("span",{class:"domain",children:g})}),!!(e.account||ce)&&o("div",{class:"meta",children:[o("span",{class:"meta-name",children:o(he,{account:e.account,instance:E,showAvatar:r==="s",showAcct:it})}),c&&nn&&o($s,{showIcon:it,index:Y.statusThreadNumber[H]})," ",r!=="l"&&(oe?o("span",{class:"status-deleted-tag",children:o(M,{id:"vGjmyl"})}):W&&!l&&!a&&!m?o(Re,{to:E?`/${E}/s/${Z}`:`/s/${Z}`,onClick:y=>{y.metaKey||y.ctrlKey||y.shiftKey||y.altKey||y.which===2||(y.preventDefault(),y.stopPropagation(),v?.(y,e),Qn({anchorRef:{current:y.currentTarget},align:"end",direction:"bottom",gap:4}),_n(!0))},class:`time ${Yn&&Ri?.anchorRef?"is-open":""}`,children:[$i&&!eo?o(L,{icon:"comment2",size:"s",alt:Pt._({id:"RXmXDR",values:{repliesCount:ht}})}):q!=="public"&&q!=="direct"&&o(L,{icon:Nn[q],alt:x(Ze[q]),size:"s"})," ",o(Se,{datetime:jt,format:"micro"}),!l&&!a&&o(L,{icon:"more2",class:"more",alt:k({id:"2FYpfJ"})})]}):o("span",{class:"time",children:[$i&&!eo?o(L,{icon:"comment2",size:"s",alt:Pt._({id:"RXmXDR",values:{repliesCount:ht}})}):q!=="public"&&q!=="direct"&&o(L,{icon:Nn[q],alt:x(Ze[q]),size:"s"})," ",o(Se,{datetime:jt,format:"micro"})]}))]}),q==="direct"&&o(N,{children:[o("div",{class:"status-direct-badge",children:o(M,{id:"IV4QaU"})})," "]}),!c&&o(N,{children:nn?o($s,{showIcon:!0,showText:!0,index:Y.statusThreadNumber[H]}):!!Dt&&!!gn&&(!!K||!bt.find(y=>y.id===It))&&o("div",{class:"status-reply-badge",children:[o(L,{icon:"reply"})," ",o(he,{account:gn,instance:E,short:!0})]})}),o("div",{class:`content-container ${K||B||Kt?.action==="blur"||Wn==="hide_all"?"has-spoiler":""} ${ue?"show-spoiler":""} ${vn?"show-media":""}`,"data-content-text-weight":s?yi():null,style:(it||s)&&{"--content-text-weight":yi()},children:w&&Xe?o(N,{children:[(!!K||!!B)&&!Ae&&o(N,{children:[!!K&&o("span",{class:"spoiler-content media-first-spoiler-content",lang:St,dir:"auto",ref:vi,"data-read-more":x(Ve),children:[o(hn,{text:K,emojis:wt})," "]}),o("button",{class:`light spoiler-button media-first-spoiler-button ${ue?"spoiling":""}`,type:"button",onClick:y=>{y.preventDefault(),y.stopPropagation(),ue?(delete z.spoilers[Z],Ae||delete z.spoilersMedia[Z]):(z.spoilers[Z]=!0,Ae||(z.spoilersMedia[Z]=!0))},children:[o(L,{icon:ue?"eye-open":"eye-close"})," ",k(ue?{id:"6lGV3K"}:{id:"lqBX03"})]})]}),o(av,{mediaAttachments:et,language:St,postID:Z,instance:E}),!!tt&&o("div",{class:"media-first-content content",ref:Ho,children:o(As,{post:e,instance:E,previewMode:l})})]}):o(N,{children:[!!K&&o(N,{children:[o("div",{class:"content spoiler-content",lang:St,dir:"auto",ref:vi,"data-read-more":x(Ve),children:o("p",{children:o(hn,{text:K,emojis:wt})})}),Ae||l?o("div",{class:"spoiler-divider",children:[o(L,{icon:"eye-open"})," ",o(M,{id:"gnKo7f"})]}):o("button",{class:`light spoiler-button ${ue?"spoiling":""}`,type:"button",onClick:y=>{y.preventDefault(),y.stopPropagation(),ue?(delete z.spoilers[Z],Ae||delete z.spoilersMedia[Z]):(z.spoilers[Z]=!0,Ae||(z.spoilersMedia[Z]=!0))},children:[o(L,{icon:ue?"eye-open":"eye-close"})," ",k(ue?{id:"6lGV3K"}:{id:"lqBX03"})]})]}),!!tt&&o("div",{class:"content",ref:Ho,"data-read-more":x(Ve),inert:K&&!ue?!0:void 0,children:o(As,{post:e,instance:E,previewMode:l},sc)}),!!tt&&o(Pg,{content:tt,contentRef:Ho,onRevert:ac}),!!Ht&&o(lv,{lang:St,poll:Ht,readOnly:a||!rt||!Q,onUpdate:y=>{z.statuses[H].poll=y},refresh:()=>D.v1.polls.$select(Ht.id).fetch().then(y=>{z.statuses[H].poll=y}).catch(y=>{}),votePoll:y=>D.v1.polls.$select(Ht.id).votes.create({choices:y}).then(P=>{z.statuses[H].poll=P}).catch(P=>{})}),((d||gi)&&$v(tt,wt)&&qe||$o)&&o(ug,{forceTranslate:$o||gi,mini:!it&&!c,sourceLanguage:St,autoDetected:Ee,text:vr(e,{maskCustomEmojis:!0,maskURLs:!0,hideInlineQuote:!0})}),!l&&(B||Kt?.action==="blur"||Wn==="hide_all")&&!!et.length&&(Wn!=="show_all"||Kt?.action==="blur")&&o("button",{class:`plain spoiler-media-button ${vn?"spoiling":""}`,type:"button",hidden:!Ae&&!!K,onClick:y=>{y.preventDefault(),y.stopPropagation(),vn?delete z.spoilersMedia[Z]:z.spoilersMedia[Z]=!0},children:[o(L,{icon:vn?"eye-open":"eye-close"})," ",o("span",{children:[Kt?.action==="blur"&&o("small",{children:[o(M,{id:"suKjh3",values:{0:Kt?.titlesStr}}),o("br",{})]}),k(vn?{id:"6lGV3K"}:{id:"9ZCilh"})]})]}),!!et.length&&(et.length>1&&(it||c&&r==="m")?o("div",{class:"media-large-container",children:et.map((y,P)=>o("div",{class:"media-container media-eq1",children:o(Or,{media:y,autoAnimate:!0,showCaption:!0,allowLongerCaption:!tt||it,lang:St,to:`/${E}/s/${Z}?${c?"media":"media-only"}=${P+1}`,onClick:p?J=>p(J,P,y,e):void 0})},y.id))}):o(cv,{lang:St,enabled:to,captionChildren:wc,children:o("div",{ref:ic,class:`media-container media-eq${et.length} ${et.length>2?"media-gt2":""} ${et.length>4?"media-gt4":""}`,children:Jn.map((y,P)=>o(Or,{media:y,autoAnimate:it,showCaption:et.length===1,allowLongerCaption:!tt&&et.length===1,lang:St,altIndex:to&&!!y.description&&P+1,to:`/${E}/s/${Z}?${c?"media":"media-only"}=${P+1}`,onClick:p?J=>{p(J,P,y,e)}:void 0,checkAspectRatio:et.length===1},y.id))})})),o(Uv,{id:Z,instance:E,level:m,collapsed:!it&&!c,fallbackQuote:Fe}),!!kt&&/^https/i.test(kt?.url)&&!B&&!K&&!Ht&&!et.length&&!Y.statusQuotes[H]&&o(Sv,{card:kt,selfReferential:kt?.url===e.url||kt?.url===e.uri,selfAuthor:kt?.authors?.some(y=>y.account?.url===Bt),instance:G})]})}),!it&&(eo||Ni)&&o("div",{class:"content-comment-hint insignificant",children:[eo&&o(N,{children:[o(L,{icon:"comment2",alt:k({id:"N8UzTV"})})," ",ht]})," ",Ni&&o(N,{children:[o(L,{icon:"quote",alt:k({id:"eWLklq"})})," ",ot]})]}),it&&o(N,{children:[o("div",{class:"extra-meta",children:oe?o("span",{class:"status-deleted-tag",children:o(M,{id:"vGjmyl"})}):o(N,{children:[o("span",{children:x(Ze[q])})," •"," ",o("a",{href:W,target:"_blank",rel:"noopener",children:[Date.now()-jt.getTime()<864e5&&o(N,{children:[o(Se,{datetime:jt,format:"micro"})," ",""," "]}),!!ce&&o("time",{class:"created",datetime:jt.toISOString(),title:jt.toLocaleString(),children:bi})]}),Vt&&o("span",{class:"edited-container",children:[" ","• ",o(L,{icon:"pencil",alt:k({id:"MRZxAn"})})," ",o("time",{tabIndex:"0",class:"edited",datetime:di.toISOString(),onClick:()=>{Zn(Z)},children:wi})]})]})}),!!Un?.length&&o("div",{class:"emoji-reactions",children:Un.map(y=>{const{name:P,count:J,me:ct,url:ee,staticUrl:_c}=y;if(ee)return o("span",{class:`emoji-reaction tag ${ct?"":"insignificant"}`,children:[o(Ir,{alt:P,url:ee,staticUrl:_c})," ",J]});if(/^:.+?:$/.test(P)){const Zo=wt.find(kc=>kc.shortcode===P.replace(/^:/,"").replace(/:$/,""));if(Zo)return o("span",{class:`emoji-reaction tag ${ct?"":"insignificant"}`,children:[o(Ir,{alt:P,url:Zo.url,staticUrl:Zo.staticUrl})," ",J]})}return o("span",{class:`emoji-reaction tag ${ct?"":"insignificant"}`,children:[P," ",J]})})}),o("div",{class:`actions ${oe?"disabled":""}`,children:[o("div",{class:"action has-count",children:Vn?o(Mr,{openTrigger:"clickOnly",direction:"bottom",overflow:"auto",gap:-8,shift:8,menuClassName:"menu-emphasized",menuButton:o(Ke,{title:k({id:"ImOQa9"}),alt:k({id:"VbyRUy"}),class:"reply-button",icon:"comment",count:ht}),children:Li}):o(Ke,{title:k({id:"ImOQa9"}),alt:k({id:"VbyRUy"}),class:"reply-button",icon:"comment",count:ht,onClick:ze})}),o("div",{class:`action ${Gn&&Mt>0&&ot>0?"has-counts":"has-count"}`,children:o(ro,{disabled:!bn,onClick:Ko,confirmLabel:o(N,{children:[o(L,{icon:"rocket"}),o("span",{class:"menu-grow",children:k(xt?{id:"QzzGsY"}:{id:"kulphB"})}),Mt>0&&o("small",{class:"more-insignificant",children:Qt(Mt)})]}),menuExtras:o(N,{children:[Yt()&&o(lt,{disabled:en,onClick:()=>{Ie({quoteStatus:e})},children:[o(L,{icon:"quote"}),Me?o("small",{children:[wn,o("br",{}),Me]}):o("span",{class:"menu-grow",children:wn}),ot>0&&o("small",{class:"more-insignificant",children:Qt(ot)})]}),(po||!Yt())&&o(lt,{onClick:()=>{Ie({draftStatus:{status:`
${W}`}})},children:[o(L,{icon:"quote"}),o("span",{children:o(M,{id:"ygxzZR"})}),Yt()&&po&&o("small",{class:"tag collapsed",children:"DEV"})]})]}),menuFooter:Mi,children:o(Ke,{checked:xt,title:[k(Gn?{id:"n1PNla"}:{id:"PiVIlD"}),k({id:"QzzGsY"})],alt:[k({id:"kulphB"}),k({id:"b7T5Zj"})],class:"reblog-button",icon:Mt<=0&&ot>0?"quote":"rocket",count:Mt,extraCount:ot,disabled:!bn})})}),o("div",{class:"action has-count",children:o(Ke,{checked:X,title:[k({id:"W9FRBT"}),k({id:"OcUmcH"})],alt:[k({id:"W9FRBT"}),k({id:"8ab1sR"})],class:"favourite-button",icon:"heart",count:ut,onClick:Si})}),so("@mastodon/post-bookmark")&&o("div",{class:"action",children:o(Ke,{checked:dt,title:[k({id:"PZlHt8"}),k({id:"q8EQYI"})],alt:[k({id:"PZlHt8"}),k({id:"1C/9Sa"})],class:"bookmark-button",icon:"bookmark",onClick:Ti})}),o(Mr,{portal:{target:document.querySelector(".status-deck")||document.body},align:"end",gap:4,overflow:"auto",viewScroll:"close",menuButton:o("div",{class:"action",children:o("button",{type:"button",title:k({id:"2FYpfJ"}),class:"plain more-button",children:o(L,{icon:"more2",size:"l",alt:k({id:"2FYpfJ"})})})}),children:[Pi," "]})]})]})]}),!!Oo&&o(sn,{onClick:y=>{y.target===y.currentTarget&&Zn(!1)},children:o(Wv,{statusID:Oo,instance:E,fetchStatusHistory:()=>D.v1.statuses.$select(Oo).history.list(),onClose:()=>{Zn(!1),Je.current?.focus()}})}),!!ec&&o(sn,{onClose:()=>{Fo(!1)},children:o(gv,{post:e,instance:E,onClose:()=>{Fo(!1)}})}),!!nc&&o(sn,{onClose:()=>{Bo(!1),z.reloadStatusPage++},children:o(wv,{onClose:()=>{Bo(!1),z.reloadStatusPage++},post:e,currentPolicy:_i})}),!!oc&&o(sn,{onClose:()=>{zo(!1)},children:o(_v,{statusId:Z,instance:E,onClose:()=>{zo(!1)}})}),!!rc&&o(sn,{onClose:()=>{qo(!1)},children:o(bv,{statusId:Z,instance:E,onClose:()=>{qo(!1)}})})]})]})}function qv(t){if(!t)return;const e=URL.parse(t);if(!e)return;const{host:n,pathname:r}=e,s=r.replace(/\/$/,""),[a,i,c]=s.match(/\/(@[^\/]+)\/(.*)/)||[];return o(N,{children:[qc.toUnicode(n),i?o(N,{children:["/",i,o("wbr",{}),o("span",{class:"more-insignificant",children:["/",c]})]}):o("span",{class:"more-insignificant",children:s})]})}const Hv=["deleted","unauthorized","pending","rejected","revoked","blocked_account","blocked_domain","muted_account"],Kv=["blocked_account","blocked_domain","muted_account"],mo={filterHidden:{id:"XC9Jpz"},pending:{id:"ptPep5"},deleted:{id:"2C0g0G"},unauthorized:{id:"2C0g0G"},rejected:{id:"2C0g0G"},revoked:{id:"5bAOta"},blocked_account:t=>({id:"aLvZxR",values:{name:t}}),blocked_domain:t=>({id:"+RZyRm",values:{domain:t}}),muted_account:t=>({id:"bQ4oy8",values:{name:t}})},Os=Ne(({quote:t,level:e=0})=>{const{_:n}=$t(),r=Ye(z),s=Lt(ai),a=Yr(),i=t;let c;const u=!!i.quoteStatus,d=r.statuses[Jt(i.id,i.instance)]||i.quoteStatus;d&&(!(a&&a===d.account?.id)&&Lo(d.filtered,s))?.action==="hide"&&(c="filterHidden"),c||(c=Hv.find(m=>i.state===m));const h=Kv.includes(c),l=i.id?Jt(i.id,i.instance):null,f=l&&r.revealedQuotes[l];if(c&&(!h||!f)){const g=d?.account?.acct,v=g?.split("@")[1];let b;return h?c==="blocked_account"?b=n(mo.blocked_account(g)):c==="blocked_domain"?b=n(mo.blocked_domain(v)):c==="muted_account"&&(b=n(mo.muted_account(g))):b=n(mo[c]),o("div",{class:`status-card-unfulfilled ${c==="filterHidden"||h?"status-card-ghost":""} ${i.native?"quote-post-native":""}`,children:[o(L,{icon:"quote"}),o("i",{children:b}),h&&l&&o("button",{type:"button",class:"textual",onClick:()=>{z.revealedQuotes[l]=!0},children:o(M,{id:"aWAdCb"})})]},l)}const p=i.native?N:Ea;return o(p,{id:i.instance+i.id,children:o(Re,{to:`${i.instance?`/${i.instance}`:""}/s/${i.id}`,class:`status-card-link ${i.native?"quote-post-native":""}`,"data-read-more":n(Ve),children:o(fn,{statusID:i.id,status:u?d:void 0,instance:i.instance,size:"s",quoted:e+1,quoteDomain:i.originalDomain,enableCommentHint:!0})},i.instance+i.id)},i.instance+i.id)}),jv=({quote:t}={})=>{const{account:e,native:n,instance:r}=t||{};return e?o("div",{class:"status-card-container",children:o("div",{class:n?"quote-post-native":"",children:o("div",{class:"status-card status-shallow-card",children:[o(he,{account:e,instance:r,showAvatar:!0})," ",o("span",{class:"insignificant",children:"…"})]})})}):null},Uv=Ne(({id:t,instance:e,level:n=0,collapsed:r=!1,fallbackQuote:s})=>{if(!t||!e)return;const{_:a}=$t(),i=Ye(z),c=Jt(t,e);let d=i.statusQuotes[c]?.filter((l,f,p)=>l.native||p.findIndex(m=>m.url===l.url)===f);const h=ln();if(!d?.length&&s?.quotedStatus)return o("div",{class:"status-card-container",ref:h,"data-read-more":a(Ve),"data-quote-container-static":!0,children:o(Os,{quote:{id:t,instance:e,state:s.state,native:!0,quoteStatus:s.quotedStatus}})});if(d?.length)return n>2?o(jv,{quote:d[0]}):(r&&(d=[d[0]]),o("div",{class:"status-card-container",ref:h,"data-read-more":a(Ve),children:d.map(l=>{const f=l.id?Jt(l.id,l.instance):`${l.instance||""}-${l.state}`;return o(Os,{quote:l,level:n},f)})}))});function Wv({statusID:t,instance:e,fetchStatusHistory:n=()=>{},onClose:r}){const{_:s}=$t(),[a,i]=F("default"),[c,u]=F([]);return V(()=>{i("loading"),(async()=>{try{const d=await n();u(d),i("default")}catch{i("error")}})()},[]),o("div",{id:"edit-history",class:"sheet",children:[!!r&&o("button",{type:"button",class:"sheet-close",onClick:r,children:o(L,{icon:"x",alt:s({id:"yz7wBu"})})}),o("header",{children:[o("h2",{children:o(M,{id:"OKiofn"})}),a==="error"&&o("p",{children:o(M,{id:"EANWES"})}),a==="loading"&&o("p",{children:[o(Fn,{abrupt:!0})," ",o(M,{id:"Pwqkdw"})]})]}),o("main",{tabIndex:"-1",children:c.length>0&&o("ol",{children:c.map(d=>{const{createdAt:h}=d,l=new Date(h);return o("li",{class:"history-item",children:[o("h3",{children:o("time",{children:qn(l,{formatOpts:{weekday:"short",second:"numeric"}})})}),o(fn,{status:d,instance:e,size:"s",withinContext:!0,readOnly:!0,previewMode:!0})]},h)})})})]})}function Zv({status:t,filterInfo:e,instance:n,containerProps:r={},showFollowedTags:s,quoted:a}){const{_:i,_:c}=$t(),u=Ye(z),{id:d,account:{avatar:h,avatarStatic:l,bot:f,group:p},createdAt:m,visibility:g,reblog:v}=t,b=!!v,_=e?.titlesStr||"",S=new Date(m),C=si(t.reblog||t),[w,T]=F(!1),A=ha(()=>{T(!0)},{threshold:600,captureEvent:!0,detect:"touch",cancelOnMovement:2}),I=ln(),x=Jt(t.id,n),k=Jt(t.id,n)+" "+(Jt(v?.id,n)||""),R=v?.id||d,O=n?`/${n}/s/${R}`:`/s/${R}`,D=s&&!!u.statusFollowedTags[x]?.length;return o("div",{class:`${a?"":b?p?"status-group":"status-reblog":D?"status-followed-tags":""} visibility-${g}`,...r,onContextMenu:E=>{E.preventDefault(),T(!0)},...A(),children:[o("article",{"data-state-post-id":k,class:`status filtered ${a?"status-card":""}`,tabindex:"-1",children:[o("b",{class:"status-filtered-badge clickable badge-meta",title:_,onClick:E=>{E.preventDefault(),T(!0)},children:[o("span",{children:o(M,{id:"03Qqf9"})}),o("span",{children:_})]})," ",o(re,{url:l||h,squircle:f}),o("span",{class:"status-filtered-info",children:[o("span",{class:"status-filtered-info-1",children:b?o(M,{id:"zJyf/5",components:{0:o(he,{account:t.account,instance:n}),1:o(L,{icon:Nn[g],alt:i(Ze[g]),size:"s"})}}):D?o(N,{children:[o(he,{account:t.account,instance:n})," ",o(L,{icon:Nn[g],alt:i(Ze[g]),size:"s"})," ",o("span",{children:u.statusFollowedTags[x].slice(0,3).map(E=>o("span",{class:"status-followed-tag-item",children:["#",E]},E))})]}):o(N,{children:[o(he,{account:t.account,instance:n})," ",o(L,{icon:Nn[g],alt:i(Ze[g]),size:"s"})," ",o(Se,{datetime:S,format:"micro"})]})}),o("span",{class:"status-filtered-info-2",children:[b&&o(N,{children:[o(re,{url:v.account.avatarStatic||v.account.avatar,squircle:f})," "]}),C]})]})]}),!!w&&o(sn,{onClick:E=>{E.target===E.currentTarget&&T(!1)},children:o("div",{id:"filtered-status-peek",class:"sheet",children:[o("button",{type:"button",class:"sheet-close",onClick:()=>T(!1),children:o(L,{icon:"x",alt:c({id:"yz7wBu"})})}),o("header",{children:[o("b",{class:"status-filtered-badge",children:o(M,{id:"03Qqf9"})})," ",_]}),o("main",{tabIndex:"-1",children:o(Re,{ref:I,class:"status-link",to:O,onClick:()=>{T(!1)},"data-read-more":i(Ve),children:o(fn,{status:t,instance:n,size:"s",readOnly:!0})})})]})})]})}const li=Ne(fn,(t,e)=>{const{status:n,...r}=t,{status:s,...a}=e;return n?.id===s?.id&&Bc(r,a)});var Fs=36,Ha="";for(;Fs--;)Ha+=Fs.toString(36);function rb(t){for(var e="",n=t||11;n--;)e+=Ha[Math.random()*36|0];return e}function Te(t){return Array.isArray?Array.isArray(t):Ua(t)==="[object Array]"}const Gv=1/0;function Vv(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-Gv?"-0":e}function Yv(t){return t==null?"":Vv(t)}function fe(t){return typeof t=="string"}function Ka(t){return typeof t=="number"}function Qv(t){return t===!0||t===!1||Xv(t)&&Ua(t)=="[object Boolean]"}function ja(t){return typeof t=="object"}function Xv(t){return ja(t)&&t!==null}function Xt(t){return t!=null}function yr(t){return!t.trim().length}function Ua(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const Jv="Incorrect 'index' type",ty=t=>`Invalid value for key ${t}`,ey=t=>`Pattern length exceeds max of ${t}.`,ny=t=>`Missing ${t} property in key`,oy=t=>`Property 'weight' in key '${t}' must be a positive integer`,Bs=Object.prototype.hasOwnProperty;class ry{constructor(e){this._keys=[],this._keyMap={};let n=0;e.forEach(r=>{let s=Wa(r);this._keys.push(s),this._keyMap[s.id]=s,n+=s.weight}),this._keys.forEach(r=>{r.weight/=n})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Wa(t){let e=null,n=null,r=null,s=1,a=null;if(fe(t)||Te(t))r=t,e=zs(t),n=zr(t);else{if(!Bs.call(t,"name"))throw new Error(ny("name"));const i=t.name;if(r=i,Bs.call(t,"weight")&&(s=t.weight,s<=0))throw new Error(oy(i));e=zs(i),n=zr(i),a=t.getFn}return{path:e,id:n,weight:s,src:r,getFn:a}}function zs(t){return Te(t)?t:t.split(".")}function zr(t){return Te(t)?t.join("."):t}function iy(t,e){let n=[],r=!1;const s=(a,i,c)=>{if(Xt(a))if(!i[c])n.push(a);else{let u=i[c];const d=a[u];if(!Xt(d))return;if(c===i.length-1&&(fe(d)||Ka(d)||Qv(d)))n.push(Yv(d));else if(Te(d)){r=!0;for(let h=0,l=d.length;h<l;h+=1)s(d[h],i,c+1)}else i.length&&s(d,i,c+1)}};return s(t,fe(e)?e.split("."):e,0),r?n:n[0]}const sy={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},ay={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1},cy={location:0,threshold:.6,distance:100},ly={useExtendedSearch:!1,getFn:iy,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var j={...ay,...sy,...cy,...ly};const uy=/[^ ]+/g;function dy(t=1,e=3){const n=new Map,r=Math.pow(10,e);return{get(s){const a=s.match(uy).length;if(n.has(a))return n.get(a);const i=1/Math.pow(a,.5*t),c=parseFloat(Math.round(i*r)/r);return n.set(a,c),c},clear(){n.clear()}}}class ui{constructor({getFn:e=j.getFn,fieldNormWeight:n=j.fieldNormWeight}={}){this.norm=dy(n,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((n,r)=>{this._keysMap[n.id]=r})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,fe(this.docs[0])?this.docs.forEach((e,n)=>{this._addString(e,n)}):this.docs.forEach((e,n)=>{this._addObject(e,n)}),this.norm.clear())}add(e){const n=this.size();fe(e)?this._addString(e,n):this._addObject(e,n)}removeAt(e){this.records.splice(e,1);for(let n=e,r=this.size();n<r;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(e,n){return e[this._keysMap[n]]}size(){return this.records.length}_addString(e,n){if(!Xt(e)||yr(e))return;let r={v:e,i:n,n:this.norm.get(e)};this.records.push(r)}_addObject(e,n){let r={i:n,$:{}};this.keys.forEach((s,a)=>{let i=s.getFn?s.getFn(e):this.getFn(e,s.path);if(Xt(i)){if(Te(i)){let c=[];const u=[{nestedArrIndex:-1,value:i}];for(;u.length;){const{nestedArrIndex:d,value:h}=u.pop();if(Xt(h))if(fe(h)&&!yr(h)){let l={v:h,i:d,n:this.norm.get(h)};c.push(l)}else Te(h)&&h.forEach((l,f)=>{u.push({nestedArrIndex:f,value:l})})}r.$[a]=c}else if(fe(i)&&!yr(i)){let c={v:i,n:this.norm.get(i)};r.$[a]=c}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function Za(t,e,{getFn:n=j.getFn,fieldNormWeight:r=j.fieldNormWeight}={}){const s=new ui({getFn:n,fieldNormWeight:r});return s.setKeys(t.map(Wa)),s.setSources(e),s.create(),s}function hy(t,{getFn:e=j.getFn,fieldNormWeight:n=j.fieldNormWeight}={}){const{keys:r,records:s}=t,a=new ui({getFn:e,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(s),a}function go(t,{errors:e=0,currentLocation:n=0,expectedLocation:r=0,distance:s=j.distance,ignoreLocation:a=j.ignoreLocation}={}){const i=e/t.length;if(a)return i;const c=Math.abs(r-n);return s?i+c/s:c?1:i}function fy(t=[],e=j.minMatchCharLength){let n=[],r=-1,s=-1,a=0;for(let i=t.length;a<i;a+=1){let c=t[a];c&&r===-1?r=a:!c&&r!==-1&&(s=a-1,s-r+1>=e&&n.push([r,s]),r=-1)}return t[a-1]&&a-r>=e&&n.push([r,a-1]),n}const We=32;function py(t,e,n,{location:r=j.location,distance:s=j.distance,threshold:a=j.threshold,findAllMatches:i=j.findAllMatches,minMatchCharLength:c=j.minMatchCharLength,includeMatches:u=j.includeMatches,ignoreLocation:d=j.ignoreLocation}={}){if(e.length>We)throw new Error(ey(We));const h=e.length,l=t.length,f=Math.max(0,Math.min(r,l));let p=a,m=f;const g=c>1||u,v=g?Array(l):[];let b;for(;(b=t.indexOf(e,m))>-1;){let A=go(e,{currentLocation:b,expectedLocation:f,distance:s,ignoreLocation:d});if(p=Math.min(A,p),m=b+h,g){let I=0;for(;I<h;)v[b+I]=1,I+=1}}m=-1;let _=[],S=1,C=h+l;const w=1<<h-1;for(let A=0;A<h;A+=1){let I=0,x=C;for(;I<x;)go(e,{errors:A,currentLocation:f+x,expectedLocation:f,distance:s,ignoreLocation:d})<=p?I=x:C=x,x=Math.floor((C-I)/2+I);C=x;let k=Math.max(1,f-x+1),R=i?l:Math.min(f+x,l)+h,O=Array(R+2);O[R+1]=(1<<A)-1;for(let E=R;E>=k;E-=1){let Q=E-1,G=n[t.charAt(Q)];if(g&&(v[Q]=+!!G),O[E]=(O[E+1]<<1|1)&G,A&&(O[E]|=(_[E+1]|_[E])<<1|1|_[E+1]),O[E]&w&&(S=go(e,{errors:A,currentLocation:Q,expectedLocation:f,distance:s,ignoreLocation:d}),S<=p)){if(p=S,m=Q,m<=f)break;k=Math.max(1,2*f-m)}}if(go(e,{errors:A+1,currentLocation:f,expectedLocation:f,distance:s,ignoreLocation:d})>p)break;_=O}const T={isMatch:m>=0,score:Math.max(.001,S)};if(g){const A=fy(v,c);A.length?u&&(T.indices=A):T.isMatch=!1}return T}function my(t){let e={};for(let n=0,r=t.length;n<r;n+=1){const s=t.charAt(n);e[s]=(e[s]||0)|1<<r-n-1}return e}const Eo=String.prototype.normalize?(t=>t.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"")):(t=>t);class Ga{constructor(e,{location:n=j.location,threshold:r=j.threshold,distance:s=j.distance,includeMatches:a=j.includeMatches,findAllMatches:i=j.findAllMatches,minMatchCharLength:c=j.minMatchCharLength,isCaseSensitive:u=j.isCaseSensitive,ignoreDiacritics:d=j.ignoreDiacritics,ignoreLocation:h=j.ignoreLocation}={}){if(this.options={location:n,threshold:r,distance:s,includeMatches:a,findAllMatches:i,minMatchCharLength:c,isCaseSensitive:u,ignoreDiacritics:d,ignoreLocation:h},e=u?e:e.toLowerCase(),e=d?Eo(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const l=(p,m)=>{this.chunks.push({pattern:p,alphabet:my(p),startIndex:m})},f=this.pattern.length;if(f>We){let p=0;const m=f%We,g=f-m;for(;p<g;)l(this.pattern.substr(p,We),p),p+=We;if(m){const v=f-We;l(this.pattern.substr(v),v)}}else l(this.pattern,0)}searchIn(e){const{isCaseSensitive:n,ignoreDiacritics:r,includeMatches:s}=this.options;if(e=n?e:e.toLowerCase(),e=r?Eo(e):e,this.pattern===e){let g={isMatch:!0,score:0};return s&&(g.indices=[[0,e.length-1]]),g}const{location:a,distance:i,threshold:c,findAllMatches:u,minMatchCharLength:d,ignoreLocation:h}=this.options;let l=[],f=0,p=!1;this.chunks.forEach(({pattern:g,alphabet:v,startIndex:b})=>{const{isMatch:_,score:S,indices:C}=py(e,g,v,{location:a+b,distance:i,threshold:c,findAllMatches:u,minMatchCharLength:d,includeMatches:s,ignoreLocation:h});_&&(p=!0),f+=S,_&&C&&(l=[...l,...C])});let m={isMatch:p,score:p?f/this.chunks.length:1};return p&&s&&(m.indices=l),m}}class Oe{constructor(e){this.pattern=e}static isMultiMatch(e){return qs(e,this.multiRegex)}static isSingleMatch(e){return qs(e,this.singleRegex)}search(){}}function qs(t,e){const n=t.match(e);return n?n[1]:null}class gy extends Oe{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const n=e===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class vy extends Oe{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const r=e.indexOf(this.pattern)===-1;return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class yy extends Oe{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const n=e.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class by extends Oe{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const n=!e.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class wy extends Oe{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const n=e.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class _y extends Oe{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const n=!e.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class Va extends Oe{constructor(e,{location:n=j.location,threshold:r=j.threshold,distance:s=j.distance,includeMatches:a=j.includeMatches,findAllMatches:i=j.findAllMatches,minMatchCharLength:c=j.minMatchCharLength,isCaseSensitive:u=j.isCaseSensitive,ignoreDiacritics:d=j.ignoreDiacritics,ignoreLocation:h=j.ignoreLocation}={}){super(e),this._bitapSearch=new Ga(e,{location:n,threshold:r,distance:s,includeMatches:a,findAllMatches:i,minMatchCharLength:c,isCaseSensitive:u,ignoreDiacritics:d,ignoreLocation:h})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class Ya extends Oe{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let n=0,r;const s=[],a=this.pattern.length;for(;(r=e.indexOf(this.pattern,n))>-1;)n=r+a,s.push([r,n-1]);const i=!!s.length;return{isMatch:i,score:i?0:1,indices:s}}}const qr=[gy,Ya,yy,by,_y,wy,vy,Va],Hs=qr.length,ky=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Sy="|";function Ty(t,e={}){return t.split(Sy).map(n=>{let r=n.trim().split(ky).filter(a=>a&&!!a.trim()),s=[];for(let a=0,i=r.length;a<i;a+=1){const c=r[a];let u=!1,d=-1;for(;!u&&++d<Hs;){const h=qr[d];let l=h.isMultiMatch(c);l&&(s.push(new h(l,e)),u=!0)}if(!u)for(d=-1;++d<Hs;){const h=qr[d];let l=h.isSingleMatch(c);if(l){s.push(new h(l,e));break}}}return s})}const Cy=new Set([Va.type,Ya.type]);class Ey{constructor(e,{isCaseSensitive:n=j.isCaseSensitive,ignoreDiacritics:r=j.ignoreDiacritics,includeMatches:s=j.includeMatches,minMatchCharLength:a=j.minMatchCharLength,ignoreLocation:i=j.ignoreLocation,findAllMatches:c=j.findAllMatches,location:u=j.location,threshold:d=j.threshold,distance:h=j.distance}={}){this.query=null,this.options={isCaseSensitive:n,ignoreDiacritics:r,includeMatches:s,minMatchCharLength:a,findAllMatches:c,ignoreLocation:i,location:u,threshold:d,distance:h},e=n?e:e.toLowerCase(),e=r?Eo(e):e,this.pattern=e,this.query=Ty(this.pattern,this.options)}static condition(e,n){return n.useExtendedSearch}searchIn(e){const n=this.query;if(!n)return{isMatch:!1,score:1};const{includeMatches:r,isCaseSensitive:s,ignoreDiacritics:a}=this.options;e=s?e:e.toLowerCase(),e=a?Eo(e):e;let i=0,c=[],u=0;for(let d=0,h=n.length;d<h;d+=1){const l=n[d];c.length=0,i=0;for(let f=0,p=l.length;f<p;f+=1){const m=l[f],{isMatch:g,indices:v,score:b}=m.search(e);if(g){if(i+=1,u+=b,r){const _=m.constructor.type;Cy.has(_)?c=[...c,...v]:c.push(v)}}else{u=0,i=0,c.length=0;break}}if(i){let f={isMatch:!0,score:u/i};return r&&(f.indices=c),f}}return{isMatch:!1,score:1}}}const Hr=[];function Ay(...t){Hr.push(...t)}function Kr(t,e){for(let n=0,r=Hr.length;n<r;n+=1){let s=Hr[n];if(s.condition(t,e))return new s(t,e)}return new Ga(t,e)}const Ao={AND:"$and",OR:"$or"},jr={PATH:"$path",PATTERN:"$val"},Ur=t=>!!(t[Ao.AND]||t[Ao.OR]),xy=t=>!!t[jr.PATH],My=t=>!Te(t)&&ja(t)&&!Ur(t),Ks=t=>({[Ao.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function Qa(t,e,{auto:n=!0}={}){const r=s=>{let a=Object.keys(s);const i=xy(s);if(!i&&a.length>1&&!Ur(s))return r(Ks(s));if(My(s)){const u=i?s[jr.PATH]:a[0],d=i?s[jr.PATTERN]:s[u];if(!fe(d))throw new Error(ty(u));const h={keyId:zr(u),pattern:d};return n&&(h.searcher=Kr(d,e)),h}let c={children:[],operator:a[0]};return a.forEach(u=>{const d=s[u];Te(d)&&d.forEach(h=>{c.children.push(r(h))})}),c};return Ur(t)||(t=Ks(t)),r(t)}function Iy(t,{ignoreFieldNorm:e=j.ignoreFieldNorm}){t.forEach(n=>{let r=1;n.matches.forEach(({key:s,norm:a,score:i})=>{const c=s?s.weight:null;r*=Math.pow(i===0&&c?Number.EPSILON:i,(c||1)*(e?1:a))}),n.score=r})}function Ly(t,e){const n=t.matches;e.matches=[],Xt(n)&&n.forEach(r=>{if(!Xt(r.indices)||!r.indices.length)return;const{indices:s,value:a}=r;let i={indices:s,value:a};r.key&&(i.key=r.key.src),r.idx>-1&&(i.refIndex=r.idx),e.matches.push(i)})}function Py(t,e){e.score=t.score}function Dy(t,e,{includeMatches:n=j.includeMatches,includeScore:r=j.includeScore}={}){const s=[];return n&&s.push(Ly),r&&s.push(Py),t.map(a=>{const{idx:i}=a,c={item:e[i],refIndex:i};return s.length&&s.forEach(u=>{u(a,c)}),c})}class Kn{constructor(e,n={},r){this.options={...j,...n},this.options.useExtendedSearch,this._keyStore=new ry(this.options.keys),this.setCollection(e,r)}setCollection(e,n){if(this._docs=e,n&&!(n instanceof ui))throw new Error(Jv);this._myIndex=n||Za(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){Xt(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const n=[];for(let r=0,s=this._docs.length;r<s;r+=1){const a=this._docs[r];e(a,r)&&(this.removeAt(r),r-=1,s-=1,n.push(a))}return n}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:n=-1}={}){const{includeMatches:r,includeScore:s,shouldSort:a,sortFn:i,ignoreFieldNorm:c}=this.options;let u=fe(e)?fe(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return Iy(u,{ignoreFieldNorm:c}),a&&u.sort(i),Ka(n)&&n>-1&&(u=u.slice(0,n)),Dy(u,this._docs,{includeMatches:r,includeScore:s})}_searchStringList(e){const n=Kr(e,this.options),{records:r}=this._myIndex,s=[];return r.forEach(({v:a,i,n:c})=>{if(!Xt(a))return;const{isMatch:u,score:d,indices:h}=n.searchIn(a);u&&s.push({item:a,idx:i,matches:[{score:d,value:a,norm:c,indices:h}]})}),s}_searchLogical(e){const n=Qa(e,this.options),r=(c,u,d)=>{if(!c.children){const{keyId:l,searcher:f}=c,p=this._findMatches({key:this._keyStore.get(l),value:this._myIndex.getValueForItemAtKeyId(u,l),searcher:f});return p&&p.length?[{idx:d,item:u,matches:p}]:[]}const h=[];for(let l=0,f=c.children.length;l<f;l+=1){const p=c.children[l],m=r(p,u,d);if(m.length)h.push(...m);else if(c.operator===Ao.AND)return[]}return h},s=this._myIndex.records,a={},i=[];return s.forEach(({$:c,i:u})=>{if(Xt(c)){let d=r(n,c,u);d.length&&(a[u]||(a[u]={idx:u,item:c,matches:[]},i.push(a[u])),d.forEach(({matches:h})=>{a[u].matches.push(...h)}))}}),i}_searchObjectList(e){const n=Kr(e,this.options),{keys:r,records:s}=this._myIndex,a=[];return s.forEach(({$:i,i:c})=>{if(!Xt(i))return;let u=[];r.forEach((d,h)=>{u.push(...this._findMatches({key:d,value:i[h],searcher:n}))}),u.length&&a.push({idx:c,item:i,matches:u})}),a}_findMatches({key:e,value:n,searcher:r}){if(!Xt(n))return[];let s=[];if(Te(n))n.forEach(({v:a,i,n:c})=>{if(!Xt(a))return;const{isMatch:u,score:d,indices:h}=r.searchIn(a);u&&s.push({score:d,key:e,value:a,idx:i,norm:c,indices:h})});else{const{v:a,n:i}=n,{isMatch:c,score:u,indices:d}=r.searchIn(a);c&&s.push({score:u,key:e,value:a,norm:i,indices:d})}return s}}Kn.version="7.1.0";Kn.createIndex=Za;Kn.parseIndex=hy;Kn.config=j;Kn.parseQuery=Qa;Ay(Ey);const Ry=360*1e3,$y=2160*60*60*1e3;function ib({scheduledAt:t,setScheduledAt:e}){if(!t||!t?.getTime)return;const[n,r]=F(),[s,a]=F(),i=t.getTimezoneOffset();V(()=>{function u(){const l=new Date(Date.now()+Ry),f=new Date(l.getTime()-i*6e4).toISOString().slice(0,16);r(f)}u();function d(){const l=new Date(Date.now()+$y),f=new Date(l.getTime()-i*6e4).toISOString().slice(0,16);a(f)}d();const h=setInterval(()=>{u(),d()},1e3*10);return()=>clearInterval(h)},[]);const c=t?new Date(t.getTime()-t.getTimezoneOffset()*6e4).toISOString().slice(0,16):null;return o("input",{type:"datetime-local",name:"scheduledAt",defaultValue:c,min:n,max:s,required:!0,onChange:u=>{e(new Date(u.target.value))}})}function sb(){const t=new Date;return new Intl.DateTimeFormat(void 0,{timeZoneName:"long"}).formatToParts(t).find(s=>s.type==="timeZoneName")?.value}export{$s as $,re as A,Qt as B,ra as C,Zy as D,hn as E,li as F,Wy as G,Nr as H,L as I,Tg as J,xr as K,Re as L,Xi as M,he as N,ci as O,Or as P,Ir as Q,Se as R,ya as S,ug as T,Lo as U,ha as V,ln as W,Eg as X,ai as Y,Cg as Z,Vy as _,Yl as a,rb as a0,Sg as a1,Dr as a2,zy as a3,Bl as a4,qy as a5,Kn as a6,sb as a7,ib as a8,wg as a9,sv as aa,Gy as ab,Wm as ac,Cv as ad,al as ae,Er as af,nr as ag,Ge as ah,Mg as ai,fa as aj,Ry as ak,va as al,rm as am,uu as an,Ze as ao,Nn as ap,Ie as b,Sn as c,lt as d,si as e,je as f,ga as g,sn as h,Mr as i,ro as j,_a as k,An as l,ka as m,qn as n,Xl as o,Yt as p,Hy as q,so as r,pt as s,jy as t,By as u,Ky as v,ii as w,Uy as x,Sa as y,Pm as z};
//# sourceMappingURL=ScheduledAtField-C2dSuh6f.js.map