Files
phanpy-cz/assets/ScheduledAtField-BOlu1KST.js
2025-11-09 08:49:49 +01:00

195 lines
216 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{as as ce,Y as It,e as o,d as H,q as yt,A as N,_ as _e,y as q,K as $s,at as gc,m as it,V as Re,h as Hr,au as vc,av as vo,aw as yc,ax as Ns,X as Os,k as F,M as $e,l as pr,$ as Wt,I as yo,G as Rt,s as z,ay as bc,az as Mi,x as wc,aA as _c,aB as Kr,g as jr,F as mr,u as Kt,a as Ve,w as kc,J as Tc,aC as Sc,aD as Ii,T as x,aE as Fs,aF as Cc,aG as Ec,p as Eo,B as bo,aa as Bs,aH as Ac,aI as Bt,aJ as xc,aK as Mc,aL as Qn,c as Ge,R as Qt,aM as Ic,aN as Lc,a2 as zs,aO as Ur,aP as Pc,t as Dc,b as Me,z as Rc}from"./pwa-viewport-CZFc0vUU.js";import{ICONS as $c}from"./ICONS-BzjICR_A.js";const Hs=["shift","alt","meta","mod","ctrl","control"],Nc={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 De(t){return(Nc[t.trim()]||t.trim()).toLowerCase().replace(/key|digit|numpad/,"")}function Ks(t){return Hs.includes(t)}function Uo(t,e=","){return t.toLowerCase().split(e)}function qo(t,e="+",n=">",r=!1,s){let a=[],i=!1;t=t.trim(),t.includes(n)?(i=!0,a=t.toLocaleLowerCase().split(n).map(h=>De(h))):a=t.toLocaleLowerCase().split(e).map(h=>De(h));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},l=a.filter(h=>!Hs.includes(h));return{...c,keys:l,description:s,isSequence:i,hotkey:t}}typeof document<"u"&&(document.addEventListener("keydown",t=>{t.code!==void 0&&js([De(t.code)])}),document.addEventListener("keyup",t=>{t.code!==void 0&&Us([De(t.code)])})),typeof window<"u"&&(window.addEventListener("blur",()=>{ye.clear()}),window.addEventListener("contextmenu",()=>{setTimeout(()=>{ye.clear()},0)}));const ye=new Set;function qr(t){return Array.isArray(t)}function Oc(t,e=","){return(qr(t)?t:t.split(e)).every(n=>ye.has(n.trim().toLowerCase()))}function js(t){const e=Array.isArray(t)?t:[t];ye.has("meta")&&ye.forEach(n=>!Ks(n)&&ye.delete(n.toLowerCase())),e.forEach(n=>ye.add(n.toLowerCase()))}function Us(t){const e=Array.isArray(t)?t:[t];t==="meta"?ye.clear():e.forEach(n=>ye.delete(n.toLowerCase()))}function Fc(t,e,n){(typeof n=="function"&&n(t,e)||n===!0)&&t.preventDefault()}function Bc(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 Hc(t){return qs(t,zc)}function qs(t,e=!1){const{target:n,composed:r}=t;let s,a;return Kc(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 Kc(t){return!!t.tagName&&!t.tagName.startsWith("-")&&t.tagName.includes("-")}function jc(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 Uc=(t,e,n=!1)=>{const{alt:r,meta:s,mod:a,shift:i,ctrl:c,keys:l,useKey:h}=e,{code:d,key:u,ctrlKey:f,metaKey:p,shiftKey:m,altKey:g}=t,v=De(d);if(h&&l?.length===1&&l.includes(u))return!0;if(!l?.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 l&&l.length===1&&l.includes(v)?!0:l?Oc(l):!l},qc=ce(void 0),Wc=()=>It(qc);function Ws(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&&Ws(t[r],e[r]),!0):t===e}const Vc=ce({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),Zc=()=>It(Vc);function Gc(t){const e=N(void 0);return Ws(e.current,t)||(e.current=t),e.current}const Li=t=>{t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation()},Yc=typeof window<"u"?_e:q;function Ke(t,e,n,r){const s=N(null),a=N(!1),i=Array.isArray(n)?Array.isArray(r)?void 0:r:n,c=qr(t)?t.join(i?.delimiter):t,l=Array.isArray(n)?n:Array.isArray(r)?r:void 0,h=yt(e,l??[]),d=N(h);l?d.current=h:d.current=e;const u=Gc(i),{activeScopes:f}=Zc(),p=Wc();return Yc(()=>{if(u?.enabled===!1||!jc(f,u?.scopes))return;let m=[],g;const v=(C,_=!1)=>{if(!(Hc(C)&&!qs(C,u?.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)){Li(C);return}}C.target?.isContentEditable&&!u?.enableOnContentEditable||Uo(c,u?.delimiter).forEach(T=>{if(T.includes(u?.splitKey??"+")&&T.includes(u?.sequenceSplitKey??">")){console.warn(`Hotkey ${T} contains both ${u?.splitKey??"+"} and ${u?.sequenceSplitKey??">"} which is not supported.`);return}const E=qo(T,u?.splitKey,u?.sequenceSplitKey,u?.useKey,u?.description);if(E.isSequence){g=setTimeout(()=>{m=[]},u?.sequenceTimeoutMs??1e3);const w=E.useKey?C.key:De(C.code);if(Ks(w.toLowerCase()))return;m.push(w);const M=E.keys?.[m.length-1];if(w!==M){m=[],g&&clearTimeout(g);return}m.length===E.keys?.length&&(d.current(C,E),g&&clearTimeout(g),m=[])}else if(Uc(C,E,u?.ignoreModifiers)||E.keys?.includes("*")){if(u?.ignoreEventWhen?.(C)||_&&a.current)return;if(Fc(C,E,u?.preventDefault),!Bc(C,E,u?.enabled)){Li(C);return}d.current(C,E),_||(a.current=!0)}})}},b=C=>{C.code!==void 0&&(js(De(C.code)),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&v(C))},k=C=>{C.code!==void 0&&(Us(De(C.code)),a.current=!1,u?.keyup&&v(C,!0))},S=s.current||i?.document||document;return S.addEventListener("keyup",k,i?.eventListenerOptions),S.addEventListener("keydown",b,i?.eventListenerOptions),p&&Uo(c,u?.delimiter).forEach(C=>p.addHotkey(qo(C,u?.splitKey,u?.sequenceSplitKey,u?.useKey,u?.description))),()=>{S.removeEventListener("keyup",k,i?.eventListenerOptions),S.removeEventListener("keydown",b,i?.eventListenerOptions),p&&Uo(c,u?.delimiter).forEach(C=>p.removeHotkey(qo(C,u?.splitKey,u?.sequenceSplitKey,u?.useKey,u?.description))),m=[],g&&clearTimeout(g)}},[c,u,f]),s}var po={exports:{}};var Xc=po.exports,Pi;function Qc(){return Pi||(Pi=1,function(t){(function(e,n){t.exports?t.exports=n():e.Toastify=n()})(Xc,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 l=document.createElement("img");l.src=this.options.avatar,l.className="toastify-avatar",this.options.position=="left"||this.options.positionLeft===!0?i.appendChild(l):i.insertAdjacentElement("afterbegin",l)}if(this.options.close===!0){var h=document.createElement("button");h.type="button",h.setAttribute("aria-label","Close"),h.className="toast-close",h.innerHTML="&#10006;",h.addEventListener("click",(function(v){v.stopPropagation(),this.removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)}).bind(this));var d=window.innerWidth>0?window.innerWidth:screen.width;(this.options.position=="left"||this.options.positionLeft===!0)&&d>360?i.insertAdjacentElement("afterbegin",h):i.appendChild(h)}if(this.options.stopOnFocus&&this.options.duration>0){var u=this;i.addEventListener("mouseover",function(v){window.clearTimeout(i.timeOutValue)}),i.addEventListener("mouseleave",function(){i.timeOutValue=window.setTimeout(function(){u.removeElement(i)},u.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},l={top:15,bottom:15},h=document.getElementsByClassName("toastify"),d,u=0;u<h.length;u++){a(h[u],"toastify-top")===!0?d="toastify-top":d="toastify-bottom";var f=h[u].offsetHeight;d=d.substr(9,d.length-1);var p=15,m=window.innerWidth>0?window.innerWidth:screen.width;m<=360?(h[u].style[d]=l[d]+"px",l[d]+=f+p):a(h[u],"toastify-left")===!0?(h[u].style[d]=i[d]+"px",i[d]+=f+p):(h[u].style[d]=c[d]+"px",c[d]+=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})}(po)),po.exports}var Jc=Qc();const tl=$s(Jc);window._showToast=ht;function ht(t){typeof t=="string"&&(t={text:t});const{onClick:e,delay:n,...r}=t,s=tl({className:`${e||t.destination?"shiny-pill":""}`,gravity:"bottom",position:"center",...r,onClick:()=>{e?.(s)}});return n?setTimeout(()=>{s.showToast()},n):s.showToast(),s}function xy(t,e,n,r){const s=N(t);q(()=>{s.current=t},[t,n]),q(()=>{!r||e===null||e===!1||s.current()},[r]),q(()=>{if(e===null||e===!1)return;const i=setInterval(()=>s.current(),e);return()=>clearInterval(i)},[e])}const Wr=t=>!!t&&t[0]==="o",gr=gc,Bn=(t,e)=>t===!0||!!(t&&t[e]),qt=(t,e)=>typeof t=="function"?t(e):t,el="_szhsinMenu",nl=t=>t[el];const hn=(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),ol=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]}},Wo=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 Ao(t,e){return{"aria-disabled":t||void 0,tabIndex:e?0:-1}}function Di(t,e){for(let n=0;n<t.length;n++)if(t[n]===e)return n;return-1}const pe=({block:t,element:e,modifiers:n,className:r})=>it(()=>{const s=e?`${t}__${e}`:t;let a=s;n&&Object.keys(n).forEach(c=>{const l=n[c];l&&(a+=` ${s}--${l===!0?c:`${c}-${l}`}`)});let i=typeof r=="function"?r(n):r;return typeof i=="string"&&(i=i.trim(),i&&(a+=` ${i}`)),a},[t,e,n,r]),rl="szh-menu-container",fe="szh-menu";const il="arrow",Vr="item",sl="divider",al="header",cl="group",ll="submenu";const Vs=ce(),Zr=ce({}),wo=ce({}),Gr=ce({}),ul=ce({}),xo=ce({}),zt=Object.freeze({ENTER:"Enter",ESC:"Escape",SPACE:" ",HOME:"Home",END:"End",LEFT:"ArrowLeft",RIGHT:"ArrowRight",UP:"ArrowUp",DOWN:"ArrowDown"}),Et=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"}),rn=Object.freeze({FIRST:"first",LAST:"last"}),dl=Object.freeze({entering:"opening",entered:"open",exiting:"closing",exited:"closed"}),Ri="absolute",Yr="none",Xr="menuitem",vr={preventScroll:!0};const hl=({className:t,containerRef:e,containerProps:n,children:r,isOpen:s,theming:a,transition:i,onClose:c})=>{const l=Bn(i,"item");return o("div",{...hn({onKeyDown:({key:u})=>{switch(u){case zt.ESC:qt(c,{key:u,reason:zn.CANCEL});break}},onBlur:u=>{s&&!u.currentTarget.contains(u.relatedTarget)&&qt(c,{reason:zn.BLUR})}},n),className:pe({block:rl,modifiers:it(()=>({theme:a,itemTransition:l}),[a,l]),className:t}),style:{position:"absolute",...n?.style},ref:e,children:r})},fl=()=>{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)}}},pl=t=>{const[e,n]=H(),s=N({items:[],hoverIndex:-1,sorted:!1}).current,a=yt((c,l)=>{const{items:h}=s;if(!c)s.items=[];else if(l)h.push(c);else{const d=h.indexOf(c);d>-1&&(h.splice(d,1),c.contains(document.activeElement)&&(t.current.focus(vr),n()))}s.hoverIndex=-1,s.sorted=!1},[s,t]),i=yt((c,l,h)=>{const{items:d,hoverIndex:u}=s,f=()=>{if(s.sorted)return;const g=t.current.querySelectorAll(".szh-menu__item");d.sort((v,b)=>Di(g,v)-Di(g,b)),s.sorted=!0};let p=-1,m;switch(c){case Et.RESET:break;case Et.SET:m=l;break;case Et.UNSET:m=g=>g===l?void 0:g;break;case Et.FIRST:f(),p=0,m=d[p];break;case Et.LAST:f(),p=d.length-1,m=d[p];break;case Et.SET_INDEX:f(),p=h,m=d[p];break;case Et.INCREASE:f(),p=u,p<0&&(p=d.indexOf(l)),p++,p>=d.length&&(p=0),m=d[p];break;case Et.DECREASE:f(),p=u,p<0&&(p=d.indexOf(l)),p--,p<0&&(p=d.length-1),m=d[p];break;default:}m||(p=-1),n(m),s.hoverIndex=p},[t,s]);return{hoverItem:e,dispatch:i,updateItems:a}},$i=(t,e)=>Math.round(t)===e?t:e,Zs=t=>{const e=t.getBoundingClientRect();return e.width=$i(e.width,t.offsetWidth),e.height=$i(e.height,t.offsetHeight),e},ml=(t,e,n,r)=>{const s=Zs(e),a=t.getBoundingClientRect(),i=n===window?{left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight}:n.getBoundingClientRect(),c=ol(r),l=m=>m+a.left-i.left-c.left,h=m=>m+a.left+s.width-i.right+c.right,d=m=>m+a.top-i.top-c.top,u=m=>m+a.top+s.height-i.bottom+c.bottom;return{menuRect:s,containerRect:a,getLeftOverflow:l,getRightOverflow:h,getTopOverflow:d,getBottomOverflow:u,confineHorizontally:m=>{let g=l(m);if(g<0)m-=g;else{const v=h(m);v>0&&(m-=v,g=l(m),g<0&&(m-=g))}return m},confineVertically:m=>{let g=d(m);if(g<0)m-=g;else{const v=u(m);v>0&&(m-=v,g=d(m),g<0&&(m-=g))}return m}}},gl=({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},vl=({anchorRect:t,containerRect:e,menuRect:n,placeLeftorRightY:r,placeLeftX:s,placeRightX:a,getLeftOverflow:i,getRightOverflow:c,confineHorizontally:l,confineVertically:h,arrowRef:d,arrow:u,direction:f,position:p})=>{let m=f,g=r;p!=="initial"&&(g=h(g),p==="anchor"&&(g=Math.min(g,t.bottom-e.top),g=Math.max(g,t.top-e.top-n.height)));let v,b,k;return m==="left"?(v=s,p!=="initial"&&(b=i(v),b<0&&(k=c(a),(k<=0||-b>k)&&(v=a,m="right")))):(v=a,p!=="initial"&&(k=c(v),k>0&&(b=i(s),(b>=0||-b<k)&&(v=s,m="left")))),p==="auto"&&(v=l(v)),{arrowY:u?gl({menuY:g,arrowRef:d,anchorRect:t,containerRect:e,menuRect:n}):void 0,x:v,y:g,computedDirection:m}},yl=({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},bl=({anchorRect:t,containerRect:e,menuRect:n,placeToporBottomX:r,placeTopY:s,placeBottomY:a,getTopOverflow:i,getBottomOverflow:c,confineHorizontally:l,confineVertically:h,arrowRef:d,arrow:u,direction:f,position:p})=>{let m=f==="top"?"top":"bottom",g=r;p!=="initial"&&(g=l(g),p==="anchor"&&(g=Math.min(g,t.right-e.left),g=Math.max(g,t.left-e.left-n.width)));let v,b,k;return m==="top"?(v=s,p!=="initial"&&(b=i(v),b<0&&(k=c(a),(k<=0||-b>k)&&(v=a,m="bottom")))):(v=a,p!=="initial"&&(k=c(v),k>0&&(b=i(s),(b>=0||-b<k)&&(v=s,m="top")))),p==="auto"&&(v=h(v)),{arrowX:u?yl({menuX:g,arrowRef:d,anchorRect:t,containerRect:e,menuRect:n}):void 0,x:g,y:v,computedDirection:m}},wl=({arrow:t,align:e,direction:n,gap:r,shift:s,position:a,anchorRect:i,arrowRef:c,positionHelpers:l})=>{const{menuRect:h,containerRect:d}=l,u=n==="left"||n==="right";let f=u?r:s,p=u?s:r;if(t){const _=c.current;u?f+=_.offsetWidth:p+=_.offsetHeight}const m=i.left-d.left-h.width-f,g=i.right-d.left+f,v=i.top-d.top-h.height-p,b=i.bottom-d.top+p;let k,S;e==="end"?(k=i.right-d.left-h.width,S=i.bottom-d.top-h.height):e==="center"?(k=i.left-d.left-(h.width-i.width)/2,S=i.top-d.top-(h.height-i.height)/2):(k=i.left-d.left,S=i.top-d.top),k+=f,S+=p;const C={...l,anchorRect:i,placeLeftX:m,placeRightX:g,placeLeftorRightY:S,placeTopY:v,placeBottomY:b,placeToporBottomX:k,arrowRef:c,arrow:t,direction:n,position:a};switch(n){case"left":case"right":return vl(C);case"top":case"bottom":default:return bl(C)}},sn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?_e:q;function Ni(t,e){typeof t=="function"?t(e):t.current=e}const fn=(t,e)=>it(()=>t?e?n=>{Ni(t,n),Ni(e,n)}:t:e,[t,e]),Oi=-9999,Gs=({ariaLabel:t,menuClassName:e,menuStyle:n,arrow:r,arrowProps:s={},anchorPoint:a,anchorRef:i,containerRef:c,containerProps:l,externalRef:h,parentScrollingRef:d,align:u="start",direction:f="bottom",position:p="auto",overflow:m="visible",setDownOverflow:g,repositionFlag:v,captureFocus:b=!0,state:k,endTransition:S,isDisabled:C,menuItemFocus:_,gap:T=0,shift:E=0,children:w,onClose:M,focusProps:P,...L})=>{const[A,$]=H({x:Oi,y:Oi}),[R,W]=H({}),[B,Y]=H(),[et,ct]=H(f),[nt]=H(fl),[Z,st]=Hr(X=>X+1,1),{transition:J,boundingBoxRef:Tt,boundingBoxPadding:Lt,rootMenuRef:$t,rootAnchorRef:dt,scrollNodesRef:le,reposition:ne,viewScroll:oe,submenuCloseDelay:K}=It(xo),{submenuCtx:mt,reposSubmenu:Pt=v}=It(wo),At=N(),Ft=N(),jt=N(!1),{hoverItem:tt,dispatch:ot,updateItems:lt}=pl(At),gt=Wr(k),Vt=Bn(J,"open"),bt=Bn(J,"close"),O=le.current,G=X=>{switch(X.key){case zt.HOME:ot(Et.FIRST);break;case zt.END:ot(Et.LAST);break;case zt.UP:ot(Et.DECREASE,tt);break;case zt.DOWN:ot(Et.INCREASE,tt);break;case zt.SPACE:X.target&&X.target.className.indexOf(fe)!==-1&&X.preventDefault();return;default:return}X.preventDefault(),X.stopPropagation()},U=()=>{k==="closing"&&Y(),qt(S)},wt=X=>{X.stopPropagation(),nt.on(K,()=>{ot(Et.RESET),At.current.focus(vr)})},Mt=X=>{X.target===X.currentTarget&&nt.off()},ft=yt(X=>{const St=At.current,Nt=c.current;if(!St||!Nt)return;const Ot=i?i.current?.getBoundingClientRect():a?{left:a.x,right:a.x,top:a.y,bottom:a.y,width:0,height:0}:null;if(!Ot)return;O.menu||(O.menu=(Tt?Tt.current:Wo($t.current))||window);const kt=ml(Nt,St,O.menu,Lt);let{arrowX:Oe,arrowY:pn,x:Io,y:pt,computedDirection:mn}=wl({arrow:r,align:u,direction:f,gap:T,shift:E,position:p,anchorRect:Ot,arrowRef:Ft,positionHelpers:kt});const{menuRect:me}=kt,ie=me.height;if(!X&&m!=="visible"){const{getTopOverflow:Lo,getBottomOverflow:te}=kt;let se,Gt;const Xe=te(pt);if(Xe>0)se=ie-Xe,Gt=Xe;else{const Ce=Lo(pt);Ce<0&&(se=ie+Ce,Gt=0-Ce,se>=0&&(pt-=Ce))}se>=0&&Y({height:se,overflowAmt:Gt})}r&&W({x:Oe,y:pn}),$({x:Io,y:pt}),ct(mn)},[r,u,Lt,f,T,E,p,m,a,i,c,Tt,$t,O]);sn(()=>{gt&&(ft(),jt.current&&st()),jt.current=gt},[gt,ft,Pt]),sn(()=>{B&&!g&&(At.current.scrollTop=0)},[B,g]),sn(()=>lt,[lt]),q(()=>{let{menu:X}=O;if(!gt||!X)return;if(X=X.addEventListener?X:window,!O.anchors){O.anchors=[];let kt=Wo(dt&&dt.current);for(;kt&&kt!==X;)O.anchors.push(kt),kt=Wo(kt)}let St=oe;if(O.anchors.length&&St==="initial"&&(St="auto"),St==="initial")return;const Nt=()=>{St==="auto"?gr(()=>ft(!0)):qt(M,{reason:zn.SCROLL})},Ot=O.anchors.concat(oe!=="initial"?X:[]);return Ot.forEach(kt=>kt.addEventListener("scroll",Nt)),()=>Ot.forEach(kt=>kt.removeEventListener("scroll",Nt))},[dt,O,gt,M,oe,ft]);const xt=!!B&&B.overflowAmt>0;q(()=>{if(xt||!gt||!d)return;const X=()=>gr(ft),St=d.current;return St.addEventListener("scroll",X),()=>St.removeEventListener("scroll",X)},[gt,xt,d,ft]),q(()=>{if(!gt||typeof ResizeObserver!="function"||ne==="initial")return;const X=[],St=new ResizeObserver(kt=>kt.forEach(({target:Oe})=>{X.indexOf(Oe)<0?X.push(Oe):vc(()=>{ft(),st()})})),Nt={box:"border-box"};St.observe(At.current,Nt);const Ot=i?.current;return Ot&&St.observe(Ot,Nt),()=>St.disconnect()},[gt,ne,i,ft]),q(()=>{if(!gt){ot(Et.RESET),bt||Y();return}const{position:X,alwaysUpdate:St}=_||{},Nt=()=>{X===rn.FIRST?ot(Et.FIRST):X===rn.LAST?ot(Et.LAST):X>=-1&&ot(Et.SET_INDEX,void 0,X)};if(St)Nt();else if(b){const Ot=setTimeout(()=>{const kt=At.current;kt&&!kt.contains(document.activeElement)&&(kt.focus(vr),Nt())},Vt?170:100);return()=>clearTimeout(Ot)}},[gt,Vt,bt,b,_,ot]);const Dt=it(()=>({isParentOpen:gt,submenuCtx:nt,dispatch:ot,updateItems:lt}),[gt,nt,ot,lt]);let vt,Zt;B&&(g?Zt=B.overflowAmt:vt=B.height);const V=it(()=>({reposSubmenu:Z,submenuCtx:nt,overflow:m,overflowAmt:Zt,parentMenuRef:At,parentDir:et}),[Z,nt,m,Zt,et]),_t=vt>=0?{maxHeight:vt,overflow:m}:void 0,Ht=it(()=>({state:k,align:u,dir:et}),[k,u,et]),re=it(()=>({dir:et}),[et]),Jt=pe({block:fe,element:il,modifiers:re,className:s.className}),Se=o("ul",{role:"menu","aria-label":t,...Ao(C),...hn({onPointerEnter:mt?.off,onPointerMove:wt,onPointerLeave:Mt,onKeyDown:G,onAnimationEnd:U},L),ref:fn(h,At),className:pe({block:fe,modifiers:Ht,className:e}),style:{...n,..._t,margin:0,display:k==="closed"?"none":void 0,position:Ri,left:A.x,top:A.y},children:[r&&o("li",{"aria-hidden":!0,...s,className:Jt,style:{display:"block",position:Ri,left:R.x,top:R.y,...s.style},ref:Ft}),o(wo.Provider,{value:V,children:o(Zr.Provider,{value:Dt,children:o(Vs.Provider,{value:tt,children:qt(w,Ht)})})})]});return l?o(hl,{...l,isOpen:gt,children:Se}):Se},Ys=Re(function({"aria-label":e,className:n,containerProps:r,initialMounted:s,unmountOnClose:a,transition:i,transitionTimeout:c,boundingBoxRef:l,boundingBoxPadding:h,reposition:d="auto",submenuOpenDelay:u=300,submenuCloseDelay:f=150,viewScroll:p="initial",portal:m,theming:g,onItemClick:v,...b},k){const S=N(null),C=N({}),{anchorRef:_,state:T,onClose:E}=b,w=it(()=>({initialMounted:s,unmountOnClose:a,transition:i,transitionTimeout:c,boundingBoxRef:l,boundingBoxPadding:h,rootMenuRef:S,rootAnchorRef:_,scrollNodesRef:C,reposition:d,viewScroll:p,submenuOpenDelay:u,submenuCloseDelay:f}),[s,a,i,c,_,l,h,d,p,u,f]),M=it(()=>({handleClick(L,A){L.stopPropagation||qt(v,L);let $=L.keepOpen;$===void 0&&($=A&&L.key===zt.SPACE),$||qt(E,{value:L.value,key:L.key,reason:zn.CLICK})},handleClose(L){qt(E,{key:L,reason:zn.CLICK})}}),[v,E]);if(!T)return null;const P=o(xo.Provider,{value:w,children:o(Gr.Provider,{value:M,children:o(Gs,{...b,ariaLabel:e||"Menu",externalRef:k,containerRef:S,containerProps:{className:n,containerRef:S,containerProps:r,theming:g,transition:i,onClose:E}})})});return m===!0&&typeof document<"u"?vo(P,document.body):m?m.target?vo(P,m.target):m.stablePosition?null:P:P}),yr=0,br=1,_o=2,ko=3,To=4,_l=5,Xs=6,kl=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],Qs=t=>({_s:t,status:kl[t],isEnter:t<ko,isMounted:t!==Xs,isResolved:t===_o||t>To}),wr=t=>t?Xs:_l,Tl=(t,e)=>{switch(t){case br:case yr:return _o;case To:case ko:return wr(e)}},Sl=t=>typeof t=="object"?[t.enter,t.exit]:[t,t],Cl=(t,e)=>setTimeout(()=>{isNaN(document.body.offsetTop)||t(e+1)},0),Fi=(t,e,n,r,s)=>{clearTimeout(r.current);const a=Qs(t);e(a),n.current=a,s&&s({current:a})},El=({enter:t=!0,exit:e=!0,preEnter:n,preExit:r,timeout:s,initialEntered:a,mountOnEnter:i,unmountOnExit:c,onStateChange:l}={})=>{const[h,d]=H(()=>Qs(a?_o:wr(i))),u=N(h),f=N(),[p,m]=Sl(s),g=yt(()=>{const b=Tl(u.current._s,c);b&&Fi(b,d,u,f,l)},[l,c]),v=yt(b=>{const k=C=>{switch(Fi(C,d,u,f,l),C){case br:p>=0&&(f.current=setTimeout(g,p));break;case To:m>=0&&(f.current=setTimeout(g,m));break;case yr:case ko:f.current=Cl(k,C);break}},S=u.current.isEnter;typeof b!="boolean"&&(b=!S),b?!S&&k(t?n?yr:br:_o):S&&k(e?r?ko:To:wr(c))},[g,l,t,e,n,r,p,m,c]);return[h,v,g]};const Al=({initialOpen:t,initialMounted:e,unmountOnClose:n,transition:r,transitionTimeout:s=500,onMenuChange:a}={})=>{const i=Bn(r,"open"),c=Bn(r,"close"),[{status:l},h,d]=El({initialEntered:t,mountOnEnter:!e,unmountOnExit:n,timeout:s,enter:i,exit:c,onStateChange:yt(({current:{isEnter:u,isResolved:f}})=>{!a||u&&i&&f||!u&&c&&f||a({open:u})},[a,i,c])});return[{state:dl[l],endTransition:d},h]},Js=t=>{const[e,n]=Al(t),[r,s]=H(),a=(i,c)=>{s({position:i,alwaysUpdate:c}),n(!0)};return[{menuItemFocus:r,...e},n,a]},xl=(t,e)=>{const[n]=H({});return{onMouseDown:()=>{n.v=t&&t!=="closed"},onClick:r=>n.v?n.v=!1:e(!0,r)}},Ml=parseInt(yc)<19,Il=Re(function({"aria-label":e,captureFocus:n,initialOpen:r,menuButton:s,instanceRef:a,onMenuChange:i,...c},l){const[h,d,u]=Js({...c,onMenuChange:i}),{state:f}=h,p=Wr(f),m=N(null),g=xl(f,(_,T)=>u(T.detail?void 0:rn.FIRST)),v=yt(_=>{d(!1),_.key&&m.current.focus()},[d]),b=_=>{switch(_.key){case zt.UP:u(rn.LAST);break;case zt.DOWN:u(rn.FIRST);break;default:return}_.preventDefault()},k=qt(s,{open:p});if(!k||!k.type)throw new Error("Menu requires a menuButton prop.");const S={...hn({onKeyDown:b,...g},k.props),ref:fn(Ml?k.ref:k.props.ref,m)};nl(k.type)==="MenuButton"&&(S.isOpen=p);const C=Ns(k,S);return Os(a,()=>({openMenu:u,closeMenu:()=>d(!1)})),o(F,{children:[C,o(Ys,{...c,...h,"aria-label":e||(typeof k.props.children=="string"?k.props.children:"Menu"),anchorRef:m,ref:l,onClose:v})]})}),Qr=(t,e)=>{const n=$e(e),r=Re((s,a)=>{const i=N(null);return o(n,{...s,itemRef:i,externalRef:a,isHovering:It(Vs)===i.current})});return r.displayName=`WithHovering(${t})`,r},ta=t=>{const[e,n]=H(!1);return q(()=>{!t&&n(!1)},[t]),[e,()=>!e&&n(!0),()=>n(!1)]},ea=(t,e,n)=>{sn(()=>{if(t)return;const r=e.current;return n(r,!0),()=>{n(r)}},[t,e,n])},Ll=Qr("SubMenu",function({"aria-label":e,className:n,disabled:r,direction:s,label:a,openTrigger:i,onMenuChange:c,isHovering:l,instanceRef:h,itemRef:d,captureFocus:u,repositionFlag:f,itemProps:p={},portal:m=!1,...g}){const v=It(xo),{rootMenuRef:b,submenuOpenDelay:k,submenuCloseDelay:S}=v,{parentMenuRef:C,parentDir:_,overflow:T}=It(wo),{isParentOpen:E,submenuCtx:w,dispatch:M,updateItems:P}=It(Zr),L=m||T!=="visible",[A,$,R]=Js({...v,onMenuChange:c}),[W,B,Y]=ta(l),{state:et}=A,ct=!!r,nt=Wr(et),Z=N(null),[st]=H({v:0}),J=()=>{w.off(),st.v&&(clearTimeout(st.v),st.v=0)},Tt=(...tt)=>{J(),Lt(),!ct&&R(...tt)},Lt=()=>!l&&!ct&&M(Et.SET,d.current),$t=tt=>{Lt(),i||(st.v=setTimeout(()=>gr(Tt),Math.max(tt,0)))},dt=tt=>{ct||(tt.stopPropagation(),B(),!(st.v||nt)&&w.on(S,()=>$t(k-S),()=>$t(k)))},le=()=>{Y(),J(),nt||M(Et.UNSET,d.current)},ne=tt=>{if(l)switch(tt.key){case zt.ENTER:tt.preventDefault();case zt.SPACE:case zt.RIGHT:i!=="none"&&Tt(rn.FIRST)}},oe=tt=>{let ot=!1;switch(tt.key){case zt.LEFT:nt&&(d.current.focus(),$(!1),ot=!0);break;case zt.RIGHT:nt||(ot=!0);break}ot&&(tt.preventDefault(),tt.stopPropagation())};ea(ct,d,P),q(()=>w.toggle(nt),[w,nt]),q(()=>()=>{clearTimeout(st.v),w.toggle(!1)},[st,w]),q(()=>{l&&E?d.current.focus():$(!1)},[l,E,$,d]),Os(h,()=>({openMenu:(...tt)=>{E&&Tt(...tt)},closeMenu:()=>{nt&&(d.current.focus(),$(!1))}}));const K=it(()=>({open:nt,hover:W||l,disabled:ct,submenu:!0}),[nt,l,ct,W]),{ref:mt,className:Pt,...At}=p,Ft=hn({onPointerEnter:w.off,onPointerMove:dt,onPointerLeave:le,onKeyDown:ne,onClick:()=>i!=="none"&&Tt()},At),jt=()=>{const tt=o(Gs,{...g,...A,ariaLabel:e||(typeof a=="string"?a:"Submenu"),anchorRef:d,containerRef:L?b:Z,direction:s||(_==="right"||_==="left"?_:"right"),parentScrollingRef:L&&C,isDisabled:ct}),ot=b.current;return L&&ot?vo(tt,ot):tt};return o("li",{className:pe({block:fe,element:ll,className:n}),style:{position:"relative"},role:Yr,ref:Z,onKeyDown:oe,children:[o("div",{role:Xr,"aria-haspopup":!0,"aria-expanded":nt,...Ao(ct,l),...Ft,ref:fn(mt,d),className:pe({block:fe,element:Vr,modifiers:K,className:Pt}),children:it(()=>qt(a,K),[a,K])}),et&&jt()]})}),na=(t,e,n,r)=>{const[s,a,i]=ta(n),{submenuCloseDelay:c}=It(xo),{isParentOpen:l,submenuCtx:h,dispatch:d,updateItems:u}=It(Zr),f=()=>{!n&&!r&&d(Et.SET,t.current)},p=()=>{!r&&d(Et.UNSET,t.current)},m=b=>{n&&!b.currentTarget.contains(b.relatedTarget)&&p()},g=b=>{r||(b.stopPropagation(),a(),h.on(c,f,f))},v=(b,k)=>{i(),h.off(),!k&&p()};return ea(r,t,u),q(()=>{n&&l&&e.current&&e.current.focus()},[e,n,l]),{mouseOver:s,setHover:f,onBlur:m,onPointerMove:g,onPointerLeave:v}},ut=Qr("MenuItem",function({className:e,value:n,href:r,type:s,checked:a,disabled:i,children:c,onClick:l,isHovering:h,itemRef:d,externalRef:u,...f}){const p=!!i,{mouseOver:m,setHover:g,...v}=na(d,d,h,p),b=It(Gr),k=It(ul),S=s==="radio",C=s==="checkbox",_=!!r&&!p&&!S&&!C,T=S?k.value===n:C?!!a:!1,E=A=>{if(p){A.stopPropagation(),A.preventDefault();return}const $={value:n,syntheticEvent:A};A.key!==void 0&&($.key=A.key),C&&($.checked=!T),S&&($.name=k.name),qt(l,$),S&&qt(k.onRadioChange,$),b.handleClick($,C||S)},w=A=>{if(h)switch(A.key){case zt.ENTER:A.preventDefault();case zt.SPACE:_?d.current.click():E(A)}},M=it(()=>({type:s,disabled:p,hover:m||h,checked:T,anchor:_}),[s,p,m,h,T,_]),P=hn({...v,onPointerDown:g,onKeyDown:w,onClick:E},f),L={role:S?"menuitemradio":C?"menuitemcheckbox":Xr,"aria-checked":S||C?T:void 0,...Ao(p,h),...P,ref:fn(u,d),className:pe({block:fe,element:Vr,modifiers:M,className:e}),children:it(()=>qt(c,M),[c,M])};return _?o("li",{role:Yr,children:o("a",{href:r,...L})}):o("li",{...L})}),Pl=Qr("FocusableItem",function({className:e,disabled:n,children:r,isHovering:s,itemRef:a,externalRef:i,...c}){const l=!!n,h=N(null),{mouseOver:d,setHover:u,onPointerLeave:f,...p}=na(a,h,s,l),{handleClose:m}=It(Gr),g=it(()=>({disabled:l,hover:d||s,focusable:!0}),[l,s,d]),v=it(()=>qt(r,{...g,ref:h,closeMenu:m}),[r,g,m]),b=hn({...p,onPointerLeave:k=>f(k,!0),onFocus:u},c);return o("li",{role:Xr,...Ao(l),...b,ref:fn(i,a),className:pe({block:fe,element:Vr,modifiers:g,className:e}),children:v})}),Tn=$e(Re(function({className:e,...n},r){return o("li",{role:"separator",...n,ref:r,className:pe({block:fe,element:sl,className:e})})})),My=$e(Re(function({className:e,...n},r){return o("li",{role:Yr,...n,ref:r,className:pe({block:fe,element:al,className:e})})})),Iy=Re(function({className:e,style:n,takeOverflow:r,...s},a){const i=N(null),[c,l]=H(),{overflow:h,overflowAmt:d}=It(wo);return sn(()=>{let u;r&&d>=0&&(u=Zs(i.current).height-d,u<0&&(u=0)),l(u>=0?{maxHeight:u,overflow:h}:void 0)},[r,h,d]),sn(()=>{c&&(i.current.scrollTop=0)},[c]),o("div",{...s,ref:fn(a,i),className:pe({block:fe,element:cl,className:e}),style:{...n,...c}})});var Pn=(t=>(t.Mouse="mouse",t.Touch="touch",t.Pointer="pointer",t))(Pn||{}),Dn=(t=>(t.CancelledByMovement="cancelled-by-movement",t.CancelledByRelease="cancelled-by-release",t.CancelledOutsideElement="cancelled-outside-element",t))(Dn||{});const Dl=["mousedown","mousemove","mouseup","mouseleave","mouseout"],Rl=["touchstart","touchmove","touchend","touchcancel"],$l=["pointerdown","pointermove","pointerup","pointerleave","pointerout"];function Nl(t){return typeof t=="object"&&t!==null&&"pageX"in t&&typeof t.pageX=="number"&&"pageY"in t&&typeof t.pageY=="number"}function Ol(t){var e;return Dl.includes((e=t?.nativeEvent)==null?void 0:e.type)}function oa(t){var e;return Rl.includes((e=t?.nativeEvent)==null?void 0:e.type)||"touches"in t}function Fl(t){const{nativeEvent:e}=t;return e?$l.includes(e?.type)||"pointerId"in e:!1}function Vo(t){return Ol(t)||oa(t)||Fl(t)}function Bi(t){var e;const n=oa(t)?(e=t?.touches)==null?void 0:e[0]:t;return Nl(n)?{x:n.pageX,y:n.pageY}:null}function Bl(t){return{target:t.target,currentTarget:t.currentTarget,nativeEvent:t,persist:()=>{}}}function ra(t,{threshold:e=400,captureEvent:n=!1,detect:r=Pn.Pointer,cancelOnMovement:s=!1,cancelOutsideElement:a=!0,filterEvents:i,onStart:c,onMove:l,onFinish:h,onCancel:d}={}){const u=N(!1),f=N(!1),p=N(),m=N(),g=N(t),v=N(null),b=yt(_=>T=>{f.current||Vo(T)&&(i!==void 0&&!i(T)||(n&&T.persist(),c?.(T,{context:_}),v.current=Bi(T),f.current=!0,p.current=T.currentTarget,m.current=setTimeout(()=>{g.current&&(g.current(T,{context:_}),u.current=!0)},e)))},[n,i,c,e]),k=yt(_=>(T,E)=>{Vo(T)&&f.current&&(v.current=null,n&&T.persist(),u.current?h?.(T,{context:_}):f.current&&d?.(T,{context:_,reason:E??Dn.CancelledByRelease}),u.current=!1,f.current=!1,m.current!==void 0&&clearTimeout(m.current))},[n,h,d]),S=yt(_=>T=>{if(Vo(T)&&(l?.(T,{context:_}),s!==!1&&v.current)){const E=Bi(T);if(E){const w=s===!0?25:s,M={x:Math.abs(E.x-v.current.x),y:Math.abs(E.y-v.current.y)};(M.x>w||M.y>w)&&k(_)(T,Dn.CancelledByMovement)}}},[k,s,l]),C=yt(_=>{if(t===null)return{};switch(r){case Pn.Mouse:{const T={onMouseDown:b(_),onMouseMove:S(_),onMouseUp:k(_)};return a&&(T.onMouseLeave=E=>{k(_)(E,Dn.CancelledOutsideElement)}),T}case Pn.Touch:return{onTouchStart:b(_),onTouchMove:S(_),onTouchEnd:k(_)};case Pn.Pointer:{const T={onPointerDown:b(_),onPointerMove:S(_),onPointerUp:k(_)};return a&&(T.onPointerLeave=E=>k(_)(E,Dn.CancelledOutsideElement)),T}}},[t,k,a,r,S,b]);return q(()=>{function _(T){const E=Bl(T);k()(E)}return window.addEventListener("mouseup",_),window.addEventListener("touchend",_),window.addEventListener("pointerup",_),()=>{window.removeEventListener("mouseup",_),window.removeEventListener("touchend",_),window.removeEventListener("pointerup",_)}},[k]),q(()=>()=>{m.current!==void 0&&clearTimeout(m.current)},[]),q(()=>{g.current=t},[t]),C}const zi="dtflocale";function zl(){try{const t=pr.session.get(zi);if(t)return t;const e=new Intl.DateTimeFormat().resolvedOptions().locale;return pr.session.set(zi,e),e}catch{return null}}const ia=Wt(zl);function Hl(){const t=[...navigator.languages],e=ia();return e&&!t.includes(e)&&t.unshift(e),t}let Hi=Hl();const Zo=Wt((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,l=s.length>0?`-${s.join("-")}-`:"-",h=i.region;return h?`${c}${l}${h}`:c}};return i}}),Kl=(t,e)=>{const n=e,r=Zo(t);let s=null;for(const c of Hi){const l=Zo(c)?.region;if(l){s=l;break}}const a=s&&r&&r.region!==s?Zo(r.language,{...r,region:s})?.toString():null,i=yo([a,t,t?.replace(/-[a-z]+$/i,"")],Hi,t);try{return new Intl.DateTimeFormat(i,n)}catch{return new Intl.DateTimeFormat(void 0,n)}},_r=Wt(Kl);function Hn(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 _r(Rt.locale,i).format(t)}function jl(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),l=t?.uid||Math.random(),h=window.open(e,"compose"+l,`width=${i},height=${c},left=${s},top=${a}`);return h?h.__COMPOSE__=t:alert(Rt._({id:"4S86wI"})),h}const Ul=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);function ql(){if(Ul){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 Wl=document.documentElement,Jn=getComputedStyle(Wl),Vl=8;let sa=[0,0,0,0];function aa(){const t=Jn.getPropertyValue("--sai-top"),e=Jn.getPropertyValue("--sai-right"),n=Jn.getPropertyValue("--sai-bottom"),r=Jn.getPropertyValue("--sai-left");sa=[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(aa);function ca(t=[]){return sa.map((n,r)=>(n||Vl)+(t[r]||0)).join(" ")}CSS.supports("top: env(safe-area-inset-top)")&&window.addEventListener("resize",aa,{passive:!0});const Ki=5e3;function Ie(t){if(t||(t=!0),z.showCompose){z.composerState.minimized?ht({duration:Ki,text:Rt._({id:"/4fHR1"})}):ht({duration:Ki,text:Rt._({id:"vvl08N"})});return}ql(),z.showCompose=t}const ji=document.createElement("template"),Zl=/<\/p>/g,Gl=/<\/li>/g,Yl=/[\r\n]{3,}/g;function Jr(t,e){if(!t)return"";const{preProcess:n,truncateLinks:r=!0}=e||{};ji.innerHTML=t.replace(Zl,`</p>
`).replace(Gl,`</li>
`);const s=ji.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 h=0;h<c.length;h++)c[h].remove();const l=s.querySelectorAll(".ellipsis");for(let h=0;h<l.length;h++)l[h].append("…")}let i="";for(let c=0;c<s.childNodes.length;c++){const l=s.childNodes[c];i+=l.innerText||l.textContent||""}return i.replace(Yl,`
`).trim()}function ti(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+=Jr(n,{preProcess:l=>{if(c){const h=l.querySelector(".quote-inline");h&&h.remove()}}}),i=i.trim(),r?.options?.length&&(i+=`
📊:
${r.options.map(l=>`${r.multiple?"▪️":"•"} ${l.title}`).join(`
`)}`),s?.length&&(i+=" "+s.map(l=>({image:"🖼️",gifv:"🎞️",video:"📹",audio:"🎵",unknown:""})[l.type]||"").join("")),c){const l=ti(a.quotedStatus);i+=`
${l}
`}return i}const Xl={xs:8,s:12,m:16,l:20,xl:24,xxl:32},Ql=/[^a-zA-Z0-9]/g;function Jl({icon:t,size:e="m",alt:n,title:r,class:s="",style:a={}}){r=r||n;const{loadIcon:i,isIconLoaded:c}=bc();if(!t)return null;const l=Xl[e];let h=$c[t];if(!h)return null;let d,u,f=!1;Array.isArray(h)?[h,d,u]=h:typeof h=="object"&&({rotate:d,flip:u,rtl:f}=h,h=h.module);const p=r?.replace(Ql,"-"),m=`${Mi}-title-${t}-${p}`;q(()=>{c(t)||i(t)},[t]);const g=c(t);return o("span",{class:`icon ${s} ${f?"rtl-flip":""}`,style:{width:`${l}px`,height:`${l}px`,...a},"data-icon":t,title:g?void 0:r||void 0,children:g&&o("svg",{width:l,height:l,role:r?"img":"presentation","aria-labelledby":m,style:{transform:`${d?`rotate(${d})`:""} ${u?"scaleX(-1)":""}`},children:[r?o("title",{id:m,children:r}):null,o("use",{href:`#${Mi}-${t}`})]})})}const I=$e(Jl,(t,e)=>t.icon===e.icon&&t.title===e.title&&t.alt===e.alt),Ze=Re((t,e)=>{let n;try{n=wc()}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 l=Array.from(c.searchParams.entries()).map(([h,d])=>`${h}=${encodeURIComponent(d)}`).join("&");r=c.pathname+"?"+l}}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 Ui(t){const{className:e,disabled:n,...r}=t;return o(Pl,{className:e,disabled:n,children:({ref:s,closeMenu:a})=>o(Ze,{...r,ref:s,onClick:({detail:i})=>a(i===0?"Enter":void 0)})})}const la=Wt(t=>new Intl.RelativeTimeFormat(t||void 0));function qi(t){if(t instanceof Date)return!isNaN(t.getTime());{const e=new Date(t);return!isNaN(e.getTime())}}const cn=60,ln=60*cn,je=24*ln,tu=t=>{const e=la(Rt.locale),n=(t.getTime()-Date.now())/1e3,r=Math.abs(n);return r<cn?e.format(Math.floor(n),"second"):r<ln?e.format(Math.floor(n/cn),"minute"):r<je?e.format(Math.floor(n/ln),"hour"):r<30*je?e.format(Math.floor(n/je),"day"):r<365*je?e.format(Math.floor(n/je/30),"month"):e.format(Math.floor(n/je/365),"year")},eu=t=>{const e=(Date.now()-t.getTime())/1e3;return e<cn?Rt._({id:"NnRCUm",values:{0:e<1?1:Math.floor(e)}}):e<ln?Rt._({id:"ZSWUwq",values:{0:Math.floor(e/cn)}}):Rt._({id:"NSSJsj",values:{0:Math.floor(e/ln)}})};function be({datetime:t,format:e}){if(!t)return null;const[n,r]=Hr(l=>l+1,0),s=it(()=>new Date(t),[t]),[a,i,c]=it(()=>{if(!qi(s))return[""+(typeof t=="string"?t:""),"",""];let l;if(e==="micro"){const h=new Date;(h.getTime()-s.getTime())/1e3/je<=1?l=eu(s):h.getFullYear()===s.getFullYear()?l=_r(Rt.locale,{year:void 0,month:"short",day:"numeric"}).format(s):l=_r(Rt.locale,{dateStyle:"short"}).format(s)}return l||(l=tu(s)),[l,s.toISOString(),s.toLocaleString()]},[s,e,n]);return q(()=>{if(!qi(s))return;let l,h;function d(){h=requestAnimationFrame(()=>{r(),u()})}function u(){const f=(Date.now()-s.getTime())/1e3;f<cn?l=setTimeout(d,1e4):f<ln&&(l=setTimeout(d,6e4))}return u(),()=>{clearTimeout(l),cancelAnimationFrame(h)}},[]),o("time",{datetime:i,title:c,children:a})}function ua(t){const e=N();return o(Ll,{...t,instanceRef:e,itemProps:{onPointerMove:n=>{n.pointerType==="touch"&&e.current?.openMenu?.()},onPointerLeave:n=>{n.pointerType==="touch"&&e.current?.openMenu?.()},...t.itemProps}})}function nu(t,e=[]){!t||typeof t!="function"||q(()=>{const n=new CloseWatcher;return n.addEventListener("close",t),()=>{n.destroy()}},e)}const ou=window.CloseWatcher?nu:()=>{},ru=document.getElementById("modal-container");function Wi(){return getComputedStyle(document.documentElement).getPropertyValue("--backdrop-theme-color")}function Rn({children:t,onClose:e,onClick:n,class:r,minimized:s}){if(!t)return null;const a=N();q(()=>{let u=setTimeout(()=>{const f=a.current?.querySelector('[tabindex="-1"]');f&&f.focus()},100);return()=>clearTimeout(u)},[]);const i=window.CloseWatcher,c=Ke("esc",()=>{setTimeout(()=>{e?.()},0)},{enabled:!i&&!!e,keydown:!1,keyup:!0,useKey:!0,ignoreEventWhen:u=>u.metaKey||u.ctrlKey||u.altKey||u.shiftKey},[e]);ou(e,[e]),q(()=>{const u=document.querySelectorAll(".deck-container");if(s){const f=u[u.length-1];f&&f.tabIndex===-1&&f.focus()}else t?u.forEach(f=>{f.setAttribute("inert","")}):u.forEach(f=>{f.removeAttribute("inert")});return()=>{u.forEach(f=>{f.removeAttribute("inert")})}},[t,s]);const l=N(),h=N();_e(()=>{if(t&&!s)if(pr.local.get("theme")){const f=Wi();l.current=document.querySelector('meta[name="theme-color"][data-theme-setting="manual"]'),l.current&&(h.current=l.current.content,l.current.content=f)}else{const f=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",p=Wi();l.current=document.querySelector(`meta[name="theme-color"][media*="${f}"]`),l.current&&(h.current=l.current.content,l.current.content=p)}else l.current&&h.current&&(l.current.content=h.current);return()=>{l.current&&h.current&&(l.current.content=h.current)}},[t,s]);const d=o("div",{ref:u=>{a.current=u,c.current=u?.querySelector?.('[tabindex="-1"]')||u},className:r,onClick:u=>{n?.(u),u.target===u.currentTarget&&e?.(u)},tabIndex:s?0:"-1",inert:s,onFocus:u=>{try{if(u.target===u.currentTarget){const f=a.current?.querySelector('[tabindex="-1"]'),p=!!f&&getComputedStyle(f)?.pointerEvents!=="none";f&&p&&f.focus()}}catch{}},children:t});return vo(d,ru)}const Vi={s:16,m:20,l:24,xl:32,xxl:50,xxxl:64},Sn={},$n=window.OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas"),mo=$n.getContext("2d",{willReadFrequently:!0});mo.imageSmoothingEnabled=!1;const iu=/missing\.png$/;function su({url:t,staticUrl:e,size:n,alt:r="",squircle:s,...a}){n=Vi[n]||n||Vi.m;const i=N(),c=iu.test(t);return o("picture",{ref:i,class:`avatar ${s?"squircle":""} ${Sn[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:Sn[t]===void 0&&!c?"anonymous":void 0,onError:l=>{l.target.crossOrigin&&(l.target.crossOrigin=null,l.target.src=t)},onLoad:l=>{i.current&&(i.current.dataset.loaded=!0),Sn[t]===void 0&&(c||setTimeout(()=>{try{const{width:h,height:d}=l.target;$n.width!==h&&($n.width=h),$n.height!==d&&($n.height=d),mo.drawImage(l.target,0,0);const u=mo.getImageData(0,0,h,d),f=u.data.filter((p,m)=>m%4===3&&p<=128).length/(u.data.length/4)>.1;f&&i.current.classList.add("has-alpha"),Sn[t]=f,mo.clearRect(0,0,h,d)}catch{Sn[t]=!1}},1))}})]})}const we=Wt(su);let kr=!1;const au=new MutationObserver(t=>{t.forEach(e=>{if(e.type==="attributes"){const{dir:n}=e.target;n==="rtl"?kr=!0:kr=!1}})});au.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});function Tr(){return kr}function cu(){const[t,e]=H({width:null,height:null});return _e(()=>{const n=()=>{e({width:window.innerWidth,height:window.innerHeight})};return n(),window.addEventListener("resize",n,{passive:!0}),()=>{window.removeEventListener("resize",n)}},[]),t}function Sr(t){const{containerProps:e,instanceRef:n,align:r}=t,s=cu(),a=n?.current?n:N(),i=Tr()?r==="end"?"start":r==="start"?"end":r:r;return o(Il,{boundingBoxPadding:ca(),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 to({subMenu:t=!1,confirm:e=!0,confirmLabel:n,menuItemClassName:r,menuFooter:s,menuExtras:a,...i}){const{children:c,onClick:l,...h}=i;return e?o(t?ua:Sr,{openTrigger:"clickOnly",direction:"bottom",overflow:"auto",gap:-8,shift:8,menuClassName:"menu-emphasized",...h,menuButton:t?void 0:c,label:t?c:void 0,children:[o(ut,{className:r,onClick:l,children:n}),a,s]}):t?o(ut,{...i}):l?_c(c,{onClick:l}):c}var ge={},Go={},ve={},Zi;function da(){if(Zi)return ve;Zi=1,Object.defineProperty(ve,"__esModule",{value:!0}),ve.loop=ve.conditional=ve.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(h){return r(s,h,i,c)});else if(typeof a=="function")a(s,i,c,r);else{var l=Object.keys(a)[0];Array.isArray(a[l])?(c[l]={},r(s,a[l],i,c[l])):c[l]=a[l](s,i,c,r)}return i};ve.parse=t;var e=function(s,a){return function(i,c,l,h){a(i,c,l)&&h(i,s,c,l)}};ve.conditional=e;var n=function(s,a){return function(i,c,l,h){for(var d=[],u=i.pos;a(i,c,l);){var f={};if(h(i,s,c,f),i.pos===u)break;u=i.pos,d.push(f)}return d}};return ve.loop=n,ve}var Ct={},Gi;function ha(){if(Gi)return Ct;Gi=1,Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.readBits=Ct.readArray=Ct.readUnsigned=Ct.readString=Ct.peekBytes=Ct.readBytes=Ct.peekByte=Ct.readByte=Ct.buildStream=void 0;var t=function(u){return{data:u,pos:0}};Ct.buildStream=t;var e=function(){return function(u){return u.data[u.pos++]}};Ct.readByte=e;var n=function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(f){return f.data[f.pos+u]}};Ct.peekByte=n;var r=function(u){return function(f){return f.data.subarray(f.pos,f.pos+=u)}};Ct.readBytes=r;var s=function(u){return function(f){return f.data.subarray(f.pos,f.pos+u)}};Ct.peekBytes=s;var a=function(u){return function(f){return Array.from(r(u)(f)).map(function(p){return String.fromCharCode(p)}).join("")}};Ct.readString=a;var i=function(u){return function(f){var p=r(2)(f);return u?(p[1]<<8)+p[0]:(p[0]<<8)+p[1]}};Ct.readUnsigned=i;var c=function(u,f){return function(p,m,g){for(var v=typeof f=="function"?f(p,m,g):f,b=r(u),k=new Array(v),S=0;S<v;S++)k[S]=b(p);return k}};Ct.readArray=c;var l=function(u,f,p){for(var m=0,g=0;g<p;g++)m+=u[f+g]&&Math.pow(2,p-g-1);return m},h=function(u){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(u).reduce(function(v,b){var k=u[b];return k.length?v[b]=l(m,k.index,k.length):v[b]=m[k.index],v},{})}};return Ct.readBits=h,Ct}var Yi;function lu(){return Yi||(Yi=1,function(t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=da(),n=ha(),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 k=g-f.pos;m.push((0,n.readBytes)(k)(f)),v+=k;break}m.push((0,n.readBytes)(b)(f)),v+=b}for(var S=new Uint8Array(v),C=0,_=0;_<m.length;_++)S.set(m[_],C),C+=m[_].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(u){var f=(0,n.peekBytes)(2)(u);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(u,f,p){return Math.pow(2,p.descriptor.lct.size+1)})},function(u,f,p){return p.descriptor.lct.exists}),{data:[{minCodeSize:(0,n.readByte)()},r]}]},function(u){return(0,n.peekByte)()(u)===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(u){var f=(0,n.peekBytes)(2)(u);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(u){var f=(0,n.peekBytes)(2)(u);return f[0]===33&&f[1]===255}),l=(0,e.conditional)({comment:[{codes:(0,n.readBytes)(2)},r]},function(u){var f=(0,n.peekBytes)(2)(u);return f[0]===33&&f[1]===254}),h=[{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(u,f){return Math.pow(2,f.lsd.gct.size+1)})},function(u,f){return f.lsd.gct.exists}),{frames:(0,e.loop)([s,c,l,a,i],function(u){var f=(0,n.peekByte)()(u);return f===33||f===44})}],d=h;t.default=d}(Go)),Go}var Cn={},Xi;function uu(){if(Xi)return Cn;Xi=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],l=[8,8,4,2],h=0,d=0;d<4;d++)for(var u=c[d];u<a;u+=l[d])i(u,h),h++;return s};return Cn.deinterlace=t,Cn}var En={},Qi;function du(){if(Qi)return En;Qi=1,Object.defineProperty(En,"__esModule",{value:!0}),En.lzw=void 0;var t=function(n,r,s){var a=4096,i=-1,c=s,l,h,d,u,f,p,m,E,g,v,T,b,M,P,A,L,k=new Array(s),S=new Array(a),C=new Array(a),_=new Array(a+1);for(b=n,h=1<<b,f=h+1,l=h+2,m=i,u=b+1,d=(1<<u)-1,g=0;g<h;g++)S[g]=0,C[g]=g;var T,E,w,M,P,L,A;for(T=E=w=M=P=L=A=0,v=0;v<c;){if(P===0){if(E<u){T+=r[A]<<E,E+=8,A++;continue}if(g=T&d,T>>=u,E-=u,g>l||g==f)break;if(g==h){u=b+1,d=(1<<u)-1,l=h+2,m=i;continue}if(m==i){_[P++]=C[g],m=g,M=g;continue}for(p=g,g==l&&(_[P++]=M,g=m);g>h;)_[P++]=C[g],g=S[g];M=C[g]&255,_[P++]=M,l<a&&(S[l]=m,C[l]=M,l++,(l&d)===0&&l<a&&(u++,d+=l)),m=p}P--,k[L++]=_[P],v++}for(v=L;v<c;v++)k[v]=0;return k};return En.lzw=t,En}var Ji;function hu(){if(Ji)return ge;Ji=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.decompressFrames=ge.decompressFrame=ge.parseGIF=void 0;var t=a(lu()),e=da(),n=ha(),r=uu(),s=du();function a(d){return d&&d.__esModule?d:{default:d}}var i=function(u){var f=new Uint8Array(u);return(0,e.parse)((0,n.buildStream)(f),t.default)};ge.parseGIF=i;var c=function(u){for(var f=u.pixels.length,p=new Uint8ClampedArray(f*4),m=0;m<f;m++){var g=m*4,v=u.pixels[m],b=u.colorTable[v]||[0,0,0];p[g]=b[0],p[g+1]=b[1],p[g+2]=b[2],p[g+3]=v!==u.transparentIndex?255:0}return p},l=function(u,f,p){if(!u.image){console.warn("gif frame does not have associated image.");return}var m=u.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:u.image.descriptor.top,left:u.image.descriptor.left,width:u.image.descriptor.width,height:u.image.descriptor.height}};return m.descriptor.lct&&m.descriptor.lct.exists?b.colorTable=m.lct:b.colorTable=f,u.gce&&(b.delay=(u.gce.delay||10)*10,b.disposalType=u.gce.extras.disposal,u.gce.extras.transparentColorGiven&&(b.transparentIndex=u.gce.transparentColorIndex)),p&&(b.patch=c(b)),b};ge.decompressFrame=l;var h=function(u,f){return u.frames.filter(function(p){return p.image}).map(function(p){return l(p,u.gct,f)})};return ge.decompressFrames=h,ge}var ts=hu();async function fu(t){try{const n=await(await fetch(t)).arrayBuffer(),r=ts.parseGIF(n),s=ts.decompressFrames(r,!0);if(!s?.length)return null;const{dims:a,patch:i}=s[0],{width:c,height:l}=a,h=document.createElement("canvas");h.width=c,h.height=l;const d=h.getContext("2d"),u=new ImageData(i,c,l);d.putImageData(u,0,0);const f=await new Promise(p=>{h.toBlob(p,"image/png")});return URL.createObjectURL(f)}catch{return null}}function Cr({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 pu=new Kr({concurrency:2,interval:1e3,intervalCap:2}),mu=(t,...e)=>pu.add(()=>fetch(...e),{signal:t}),es=/(\:(\w|\+|\-)+\:)(?=|[\!\.\?]|$)/g,gu=Wt(t=>new RegExp(`:(${t.join("|")}):`,"g")),Le=new Map,vu=30,yu=async t=>{if(Le.has(t))return Le.get(t);try{const r=(await(await mu(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 fu(i.url);c&&(i.staticUrl=c)}return i})):[];if(Le.size>=vu){const a=Le.keys().next().value;Le.delete(a)}return Le.set(t,s),s}catch{return[]}},bu=Wt((t,e,n)=>{if(!t)return"";if(!t.includes(":")||!e.length)return t;const r=gu(e.map(a=>a.shortcode));return t.split(r).map((a,i)=>{const c=e.find(l=>l.shortcode===a);if(c){const{url:l,staticUrl:h}=c;return o(Cr,{staticUrl:n?void 0:h,url:n&&h||l,alt:a},`${a}-${i}`)}return a})});function un({text:t,emojis:e=[],staticEmoji:n,resolverURL:r}){const[s,a]=H(()=>Le.get(r)||[]),[i,c]=H(!1);if(q(()=>{if(!r||!t?.includes(":"))return;const h=t.match(es);!h||!h.some(u=>{const f=u.slice(1,-1);return!e.some(p=>p.shortcode===f)})||Le.has(r)||(c(!0),(async()=>{const u=await yu(r);a(u),c(!1)})())},[r,t,e?.length]),!t)return"";if(!t.includes(":"))return t;if(r&&i)return t.replace(es,"");const l=[...s.filter(h=>!e.some(d=>d.shortcode===h.shortcode)),...e];return bu(t,l,n)}function Er({roles:t,accountId:e,accountUrl:n,hideSelf:r=!1}){if(!t?.length)return null;const s=e&&e===jr();if(r&&s)return null;const a=mr(n);return t?.map(i=>o(F,{children:[" ",o("span",{class:"tag collapsed tag-role",children:[i.name,!!a&&o(F,{children:[" ",o("span",{class:"more-insignificant",children:a})]})]})]}))}const wu=Wt(t=>{const e={sensitivity:"base"};try{return new Intl.Collator(t||void 0,e)}catch{return new Intl.Collator(void 0,e)}}),_u=/([^@]+)(@.+)/i,ku=/(\:(\w|\+|\-)+\:)(?=|[\!\.\?]|$)/g,Tu=/\s+/g,Su=/[^a-z0-9@\.]/gi;function Pe({account:t,instance:e,showAvatar:n,showAcct:r,short:s,external:a,onClick:i}){const{i18n:c}=Kt();if(!t)return null;const{acct:l,avatar:h,avatarStatic:d,id:u,url:f,displayName:p,emojis:m,bot:g,username:v,roles:b}=t,[k,S,C]=l.match(_u)||[,l];e||(e=Ve().instance);const _=v.toLowerCase().trim(),T=(p||"").toLowerCase().trim(),E=T.replace(ku,"").replace(Tu,""),w=E.replace(Su,""),M=!s&&(_===T||_===E||_===w||wu(c.locale).compare(_,E)===0)||w===l.toLowerCase();return o("a",{class:`name-text ${r?"show-acct":""} ${s?"short":""}`,href:f,target:a?"_blank":null,title:p?`${p} (${C?"":"@"}${l})`:`${C?"":"@"}${l}`,onClick:P=>{if(!a&&!P.shiftKey){if(P.preventDefault(),P.stopPropagation(),i)return i(P);if(P.metaKey||P.ctrlKey||P.shiftKey||P.which===2){const L=`#/${e}/a/${u}`;window.open(L,"_blank");return}z.showAccount={account:t,instance:e}}},children:[n&&o(F,{children:[o(we,{url:d||h,squircle:g})," "]}),p&&!s?o(F,{children:[o("b",{dir:"auto",children:o(un,{text:p,emojis:m,resolverURL:t.url,staticEmoji:!0})}),!r&&!M&&o(F,{children:[" ",o("i",{class:"bidi-isolate",children:["@",v]}),o(Er,{roles:b,accountId:u,accountUrl:f,hideSelf:!0})]})]}):s?o("i",{children:v}):o("b",{children:v}),r&&o(F,{children:[o("br",{}),o("i",{class:"bidi-isolate",children:[C?"":"@",S,!!C&&o("span",{class:"ib",children:C})]}),o(Er,{roles:b,accountUrl:f})]})]})}const Cu="Аҧсшәа",Eu="Acèh",Au="Lëbacoli",xu="Afár",Mu="Afrikaans",Iu="Shqip",Lu="Dhalur",Pu="አማርኛ",Du="العربية",Ru="Հայերեն",$u="অসমীয়া",Nu="Авар мацӀ",Ou="अवधी",Fu="Aymar aru",Bu="Azərbaycanca",zu="Basa Bali",Hu="بلوچی",Ku="Bamanankan",ju="Baoulé",Uu="Башҡортса",qu="Euskara",Wu="Batak Karo",Vu="Batak Simalungun",Zu="Batak Toba",Gu="Беларуская",Yu="Ichibemba",Xu="বাংলা",Qu="Betawi",Ju="भोजपुरी",td="Bikol",ed="Bosanski",nd="Brezhoneg",od="Български",rd="Буряад",id="粵語",sd="Català",ad="Cebuano",cd="Chamoru",ld="Нохчийн мотт",ud="Chichewa",dd="Kapasen Chuuk",hd="Чӑвашла",fd="Corsu",pd="Qırımtatarca (Кирилл)",md="Hrvatski",gd="Čeština",vd="Dansk",yd="ދިވެހި",bd="Thuɔŋjäŋ",wd="डोगरी",_d="Dombe",kd="Nederlands",Td="Jula",Sd="རྫོང་ཁ",Cd="English",Ed="Esperanto",Ad="Eesti",xd="Eʋegbe",Md="Føroyskt",Id="Vosa Vakaviti",Ld="Tagalog",Pd="Suomi",Dd="Fon",Rd="Français",$d="Frysk",Nd="Furlan",Od="Fulfulde",Fd="Gã",Bd="Galego",zd="ქართული",Hd="Deutsch",Kd="Ελληνικά",jd="Avañe'ẽ",Ud="ગુજરાતી",qd="Kreyòl ayisyen",Wd="Hakha Chin",Vd="Hausa",Zd="ʻŌlelo Hawaiʻi",Gd="עברית",Yd="Hiligaynon",Xd="हिन्दी",Qd="Hmoob",Jd="Magyar",th="Hunsrik",eh="Iban",nh="Íslenska",oh="Igbo",rh="Iloko",ih="Bahasa Indonesia",sh="ᐃᓄᒃᑎᑐᑦ",ah="Gaeilge",ch="Italiano",lh="Patwa",uh="日本語",dh="Basa Jawa",hh="Jinghpaw",fh="Kalaallisut",ph="ಕನ್ನಡ",mh="Kanuri",gh="Kapampangan",vh="Қазақша",yh="Khasi",bh="ភាសាខ្មែរ",wh="Rukiga",_h="Kikongo",kh="Kinyarwanda",Th="Kituba",Sh="Kokborok",Ch="Коми кыв",Eh="कोंकणी",Ah="한국어",xh="Krio",Mh="Kurdî (Kurmancî)",Ih="کوردی (سۆرانی)",Lh="Кыргызча",Ph="ລາວ",Dh="Latgaļu",Rh="Latina",$h="Latviešu",Nh="Ligure",Oh="Limburgs",Fh="Lingála",Bh="Lietuvių",zh="Lombard",Hh="Luganda",Kh="Dholuo",jh="Lëtzebuergesch",Uh="Македонски",qh="Madhurâ",Wh="मैथिली",Vh="Makassar",Zh="Malagasy",Gh="Bahasa Melayu",Yh="മലയാളം",Xh="Malti",Qh="Mam",Jh="Gaelg",tf="Te Reo Māori",ef="मराठी",nf="Kajin M̧ajeļ",of="मारवाड़ी",rf="Kreol Morisien",sf="Олык марий",af="Baso Minang",cf="Mizo ṭawng",lf="Монгол",uf="မြန်မာစာ",df="Náhuatl",hf="isiNdebele",ff="नेपाली",pf="Norsk",mf="Thok Nath",gf="Occitan",vf="ଓଡ଼ିଆ",yf="Afaan Oromoo",bf="Ирон æвзаг",wf="Pangasinan",_f="Papiamentu",kf="پښتو",Tf="فارسی",Sf="Polski",Cf="Português (Brasil)",Ef="ਪੰਜਾਬੀ",Af="Runa Simi",xf="Qʼeqchiʼ",Mf="Romani čhib",If="Română",Lf="Ikirundi",Pf="Русский",Df="Davvisámegiella",Rf="Gagana Samoa",$f="Sängö",Nf="संस्कृतम्",Of="ᱥᱟᱱᱛᱟᱲᱤ",Ff="Gàidhlig",Bf="Sepedi",zf="Српски",Hf="Sesotho",Kf="Kreol seselwa",jf="လိၵ်ႈတႆး",Uf="chiShona",qf="Sicilianu",Wf="Ślōnskŏ",Vf="سنڌي",Zf="සිංහල",Gf="Slovenčina",Yf="Slovenščina",Xf="Soomaali",Qf="Español",Jf="Basa Sunda",tp="Susu",ep="Kiswahili",np="siSwati",op="Svenska",rp="Reo Tahiti",ip="Тоҷикӣ",sp="ⵜⴰⵎⴰⵣⵉⵖⵜ",ap="தமிழ்",cp="Татарча",lp="తెలుగు",up="Tetun",dp="ไทย",hp="བོད་ཡིག",fp="ትግርኛ",pp="Tiv",mp="Tok Pisin",gp="Lea fakatonga",vp="Tshiluba",yp="Xitsonga",bp="Setswana",wp="ತುಳು",_p="chiTumbuka",kp="Türkçe",Tp="Türkmençe",Sp="Тыва дыл",Cp="Akankasa",Ep="Удмурт кыл",Ap="Українська",xp="اردو",Mp="ئۇيغۇرچە",Ip="Oʻzbekcha",Lp="Tshivenḓa",Pp="Vèneto",Dp="Tiếng Việt",Rp="Winaray",$p="Cymraeg",Np="Wolof",Op="isiXhosa",Fp="Саха тыла",Bp="ייִדיש",zp="Yorùbá",Hp="Màaya T'àan",Kp="Didxazá",jp="isiZulu",Up={ab:Cu,ace:Eu,ach:Au,aa:xu,af:Mu,sq:Iu,alz:Lu,am:Pu,ar:Du,hy:Ru,as:$u,av:Nu,awa:Ou,ay:Fu,az:Bu,ban:zu,bal:Hu,bm:Ku,bci:ju,ba:Uu,eu:qu,btx:Wu,bts:Vu,bbc:Zu,be:Gu,bem:Yu,bn:Xu,bew:Qu,bho:Ju,bik:td,bs:ed,br:nd,bg:od,bua:rd,yue:id,ca:sd,ceb:ad,ch:cd,ce:ld,ny:ud,"zh-CN":"简体中文","zh-TW":"繁體中文",chk:dd,cv:hd,co:fd,crh:pd,"crh-Latn":"Qırımtatarca (Latin)",hr:md,cs:gd,da:vd,"fa-AF":"درى",dv:yd,din:bd,doi:wd,dov:_d,nl:kd,dyu:Td,dz:Sd,en:Cd,eo:Ed,et:Ad,ee:xd,fo:Md,fj:Id,tl:Ld,fi:Pd,fon:Dd,fr:Rd,"fr-CA":"Français (Canada)",fy:$d,fur:Nd,ff:Od,gaa:Fd,gl:Bd,ka:zd,de:Hd,el:Kd,gn:jd,gu:Ud,ht:qd,cnh:Wd,ha:Vd,haw:Zd,iw:Gd,hil:Yd,hi:Xd,hmn:Qd,hu:Jd,hrx:th,iba:eh,is:nh,ig:oh,ilo:rh,id:ih,"iu-Latn":"Inuktitut (Latin)",iu:sh,ga:ah,it:ch,jam:lh,ja:uh,jw:dh,kac:hh,kl:fh,kn:ph,kr:mh,pam:gh,kk:vh,kha:yh,km:bh,cgg:wh,kg:_h,rw:kh,ktu:Th,trp:Sh,kv:Ch,gom:Eh,ko:Ah,kri:xh,ku:Mh,ckb:Ih,ky:Lh,lo:Ph,ltg:Dh,la:Rh,lv:$h,lij:Nh,li:Oh,ln:Fh,lt:Bh,lmo:zh,lg:Hh,luo:Kh,lb:jh,mk:Uh,mad:qh,mai:Wh,mak:Vh,mg:Zh,ms:Gh,"ms-Arab":"بهاس ملايو",ml:Yh,mt:Xh,mam:Qh,gv:Jh,mi:tf,mr:ef,mh:nf,mwr:of,mfe:rf,chm:sf,"mni-Mtei":"ꯃꯤꯇꯩꯂꯣꯟ",min:af,lus:cf,mn:lf,my:uf,nhe:df,"ndc-ZW":"Ndau",nr:hf,new:"नेपाल भाषा",ne:ff,"bm-Nkoo":"ߒߞߏ",no:pf,nus:mf,oc:gf,or:vf,om:yf,os:bf,pag:wf,pap:_f,ps:kf,fa:Tf,pl:Sf,pt:Cf,"pt-PT":"Português (Portugal)",pa:Ef,"pa-Arab":"پنجابی",qu:Af,kek:xf,rom:Mf,ro:If,rn:Lf,ru:Pf,se:Df,sm:Rf,sg:$f,sa:Nf,"sat-Latn":"Santali (Latin)",sat:Of,gd:Ff,nso:Bf,sr:zf,st:Hf,crs:Kf,shn:jf,sn:Uf,scn:qf,szl:Wf,sd:Vf,si:Zf,sk:Gf,sl:Yf,so:Xf,es:Qf,su:Jf,sus:tp,sw:ep,ss:np,sv:op,ty:rp,tg:ip,"ber-Latn":"Tamazight (Latin)",ber:sp,ta:ap,tt:cp,te:lp,tet:up,th:dp,bo:hp,ti:fp,tiv:pp,tpi:mp,to:gp,lua:vp,ts:yp,tn:bp,tcy:wp,tum:_p,tr:kp,tk:Tp,tyv:Sp,ak:Cp,udm:Ep,uk:Ap,ur:xp,ug:Mp,uz:Ip,ve:Lp,vec:Pp,vi:Dp,war:Rp,cy:$p,wo:Np,xh:Op,sah:Fp,yi:Bp,yo:zp,yua:Hp,zap:Kp,zu:jp},eo={"zh-YUE":"YUE",zh_HANT:"zh-Hant"},Yo=Wt(t=>new Intl.DisplayNames(t||void 0,{type:"language"}));function qp(t){let e,n;typeof t=="object"&&({code:t,locale:e,fallback:n}=t);try{const r=Yo(e||Rt.locale).of(t);if(r!==t)return r;if(!n){const s=Yo(t).of(t);if(s!==t)return s;const a=Up?.[e];if(a!==t)return a}return n||""}catch{if(eo[t])try{const s=Yo(eo[e]||e||Rt.locale).of(eo[t]);return s!==eo[t]?s:n||""}catch{}return n||""}}const An=Wt(qp),Wp={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"},Vp={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"},Zp={},fa={sl:Wp,tl:Vp,al:Zp},Gp=Object.entries(fa.tl).map(([t,{name:e}])=>({code:t,name:e})),Ar=[...navigator.languages],Xo=ia();Xo&&!Ar.includes(Xo)&&Ar.unshift(Xo);const Yp=()=>yo(Ar,Gp.map(t=>t.code.replace("_","-")),"en");function pa(t=!1){if(t){const{contentTranslationTargetLanguage:e}=z.settings;if(e)return e}return Yp()}const ns=["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte"];function Ly(t){const e=Math.min(Math.floor(Math.log2(t)/10),ns.length-1),n=t/1024**e;return Rt.number(n,{style:"unit",unit:ns[e],unitDisplay:"narrow",maximumFractionDigits:0})}function Yt(){return kc()?.mastodon>=7}function Xp(t){return t?.[t?.currentUser]?.[0]||"nobody"}const Qp=/[.*+?^${}()|[\]\\]/g,Jp={"&":"&amp;",'"':"&quot;","<":"&lt;",">":"&gt;"},tm=/[&"<>]/g;function em(t){return t.replace(Qp,"\\$&")}function nm(t){return t.replace(tm,e=>Jp[e])}function xr(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=>`:${em(i)}:`).join("|"),a=new RegExp(s,"g");return t.replace(a,i=>{const c=i.slice(1,-1),l=n.get(c);if(!l)return i;const{staticUrl:h,url:d}=l,u=nm(i);return`<picture>${h?`<source srcset="${h}" media="(prefers-reduced-motion: reduce)"></source>`:""}<img class="shortcode-emoji emoji" src="${d}" alt="${u}" 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 om=/[&<>"']/g,rm={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;"};function Qo(t){return t.replace(om,e=>rm[e])}const nn=document.createElement("div"),im=["u-url","mention","hashtag"],sm=/<a/i,am=/^https?:\/\//i,cm=/^[@][^@]+(@[^@]+)?$/,lm=/^[#][^#]+$/,um=/^```[^]+```$/,dm=/^```/,hm=/```$/,fm=/`[^`]+`/,pm=/(twitter|x)\.com/i,mm=/@[a-zA-Z0-9_]+@(twitter|x)\.com/,gm=/(@([a-zA-Z0-9_]+)@(twitter|x)\.com)/g,vm=/(`[^]+?`)/g;function ym(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 bm(t,e={}){if(!t)return"";const{emojis:n,returnDOM:r,postEnhanceDOM:s=()=>{}}=e;let a=t;const i=ym(a,r),c=sm.test(a),l=a.includes("```");if(c){const d=i.querySelectorAll('a:not([target="_blank"])');for(const f of d)f.setAttribute("target","_blank");const u=i.querySelectorAll("a[class]");for(const f of u)for(const p of f.classList)im.includes(p)||f.classList.remove(p)}if(c){const d=i.querySelectorAll("a[href]");for(const u of d)am.test(u.textContent.trim())&&(u.classList.add("has-url-text"),Tm(u))}if(c){const d=i.querySelectorAll("a[href]"),u=[];for(const f of d){const p=f.innerText.trim(),m=f.querySelector("*");if(cm.test(p)){const g=p[0],[v,b,k]=p.split(/[@]/);m||(!u.some(([S])=>S===b)||u.some(([S,C])=>S===b&&C===k)?(f.innerHTML=`${g}<span>${b}</span>`,u.push([b,k])):f.innerHTML=`${g}<span>${b}@${k}</span>`),f.classList.add("mention")}if(lm.test(p)){const g=p[0];m||(f.innerHTML=`${g}<span>${p.slice(1)}</span>`),f.classList.add("mention","hashtag")}}}let h;if(a.includes(":")&&n?.length){h=tr(i);for(const d of h){let u=Qo(d.nodeValue);u=xr(u,n),nn.innerHTML=u,d.replaceWith(...nn.childNodes)}}if(l){const d=[...i.querySelectorAll("p")].filter(u=>um.test(u.innerText.trim()));for(const u of d){const f=document.createElement("pre");for(const p of u.querySelectorAll("br"))p.replaceWith(`
`);f.innerHTML=`<code>${u.innerHTML.trim()}</code>`,u.replaceWith(f)}}if(l){const u=[...i.querySelectorAll("p")].filter(f=>dm.test(f.innerText));for(const f of u){const p=[f];let m=!1,g=f;for(;g.nextElementSibling;){const v=g.nextElementSibling;if(v&&v.tagName==="P")if(hm.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 k of p)for(const S of k.querySelectorAll("br"))S.replaceWith(`
`);const b=p.map(k=>k.innerHTML).join(`
`);v.innerHTML=`<code tabindex="0">${b}</code>`,f.replaceWith(v);for(const k of p)k.remove()}}}if(a.includes("`")){h=tr(i);for(const d of h){let u=Qo(d.nodeValue);fm.test(u)&&(u=u.replaceAll(vm,"<code>$1</code>")),nn.innerHTML=u,d.replaceWith(...nn.childNodes)}}if(pm.test(a)){h=tr(i,{rejectFilter:["A"]});for(const d of h){let u=Qo(d.nodeValue);mm.test(u)&&(u=u.replaceAll(gm,'<a href="https://twitter.com/$2" rel="nofollow noopener" target="_blank">$1</a>')),nn.innerHTML=u,d.replaceWith(...nn.childNodes)}}if(a.includes("#")||a.includes("")){let d=null;const u=[...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&&d&&p===d+1)return d=p,!0});if(u?.length)for(const f of u)f.classList.add("hashtag-stuffing"),f.title=f.innerText}if(a.includes("<img")){const d=i.querySelectorAll("img");for(let u=0;u<d.length;u++){const f=d[u],p=f.getAttribute("width")||f.naturalWidth,m=f.getAttribute("height")||f.naturalHeight;p&&m&&f.style.setProperty("--original-aspect-ratio",`${p}/${m}`)}}for(const d of i.childNodes)if(d.nodeType===Node.TEXT_NODE&&d.textContent.trim?.()){const u=document.createElement("span");u.textContent=d.textContent,i.replaceChild(u,d)}return s&&queueMicrotask(()=>s(i)),r?i:i.innerHTML}const ma=Wt(bm),wm=["STYLE","IMG","VIDEO","AUDIO","AREA","MAP","TRACK","EMBED","IFRAME","OBJECT","PICTURE","PORTAL","SOURCE","SVG","MATH","CANVAS","NOSCRIPT","SCRIPT","INPUT","OPTION","TEXTAREA","SLOT","TEMPLATE"],_m=Object.fromEntries(wm.map(t=>[t,!0])),km=/^(https?:\/\/(www\.)?|xmpp:)/,Jo=30;function Tm(t){if(!(!t||t.querySelector?.("*")))try{const e=t.innerText.trim(),n=(e.match(km)||[])[0]||"";if(!n)return;const r=e.slice(n.length,n.length+Jo),s=e.slice(n.length+Jo),a=e.slice(n.length).length>Jo;t.innerHTML=`<span class="invisible">${n}</span><span class=${a?"ellipsis":""}>${r}</span><span class="invisible">${s}</span>`}catch{}}function tr(t,e={}){const n=[],r=Object.assign({},_m,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 Sm=window.matchMedia("(hover: hover)").matches;function Cm(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:u,naturalHeight:f,width:p,height:m}=i,g=2;if(u>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,l=i.previousSibling?.textContent,h=l?.endsWith("@")||l?.endsWith(""),d=i.innerText.startsWith("@")||i.innerText.startsWith("");if((i.classList.contains("u-url")||i.classList.contains("mention"))&&d||h&&!d){const u=(i.querySelector("span")||i).innerText.trim(),f=u.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(u)){a.preventDefault(),a.stopPropagation(),z.showAccount={account:c,instance:n};return}}else if(!r){const u=l?.endsWith("#")||l?.endsWith("");if(i.classList.contains("hashtag")||u){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())&&!Sm){a.preventDefault(),a.stopPropagation();const m=i.innerText.trim();z.showOpenLink={url:c,linkText:m}}}catch{}}}function ae(t){try{return Rt.number(t,{notation:"compact",roundingMode:"floor"})}catch{return t}}const Em={"@mastodon/edit-media-attributes":">=4.1","@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"},er=/pixelfed/i,de=/^(?!.*pixelfed).*$/i,Am=/pleroma/i,xm=/akkoma/i;const os={"@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":er,"@pixelfed/home-include-reblogs":er,"@pixelfed/global-feed":er,"@pleroma/local-visibility-post":Am,"@akkoma/local-visibility-post":xm},no={},Mm=/^\d+\.\d+(\.\d+)?/;function oo(t){try{let{version:e,domain:n}=Tc(),r=Sc()?.software?.name||"mastodon";r==="hometown"&&(r="mastodon");const s=`${n}-${t}`;if(no[s])return no[s];if(os[t])return no[s]=os[t].test(e);const a=Em[t];if(!a)return!1;const c=t.match(/^@([a-z]+)\//)[1]===r.toLowerCase();let l=Ii(e,a,{includePrerelease:!0,loose:!0});if(!l)try{l=Ii(e.match(Mm)?.[0],a,{includePrerelease:!0,loose:!1})}catch{}return no[s]=c&&l}catch{return!1}}function Py({skeleton:t,account:e,avatarSize:n="xl",useAvatarStatic:r=!1,instance:s,external:a,internal:i,onClick:c,showActivity:l=!1,showStats:h=!1,accountInstance:d,hideDisplayName:u=!1,relationship:f={},excludeRelationshipAttrs:p=[]}){const{_:m}=Kt();if(t)return o("div",{class:"account-block skeleton",children:[o(we,{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:k,displayName:S,username:C,emojis:_,url:T,statusesCount:E,lastStatusAt:w,bot:M,fields:P,note:L,group:A,followersCount:$,createdAt:R,locked:W,roles:B}=e;let[Y,et,ct]=v.match(/([^@]+)(@.+)/i)||[,v];d&&(ct=`@${d}`);const nt=P?.find(J=>!!J.verifiedAt&&!!J.value),Z={};for(const J in f)p.includes(J)||(Z[J]=f[J]);const st=Z.following||Z.followedBy||Z.requested;return o("a",{class:"account-block",href:T,target:a?"_blank":null,title:ct?v:`@${v}`,onClick:J=>{if(!a){if(J.preventDefault(),c)return c(J);i?location.hash=`/${s}/a/${g}`:z.showAccount={account:e,instance:s}}},children:[o("div",{class:"avatar-container",children:o(we,{url:r?k:b||k,staticUrl:r?void 0:k,size:n,squircle:M})}),o("span",{class:"account-block-content",children:[!u&&o(F,{children:S?o("b",{children:o(un,{text:S,emojis:_,resolverURL:T})}):o("b",{children:C})})," ",o("span",{class:"account-block-acct bidi-isolate",children:[ct?"":"@",et,o("wbr",{}),ct,W&&o(F,{children:[" ",o(I,{icon:"lock",size:"s",alt:m({id:"G2fuEb"})})]})]}),o(Er,{roles:B,accountUrl:T}),l&&o("div",{class:"account-block-stats",children:[o(x,{id:"ajzDof",values:{0:ae(E)}}),!!w&&o(F,{children:[" ","·"," ",o(x,{id:"f8bJ3C",values:{0:Hn(w,{hideTime:!0})}})]})]}),h&&o("div",{class:"account-block-stats",children:[M&&o(F,{children:o("span",{class:"tag collapsed",children:[o(I,{icon:"bot"})," ",o(x,{id:"9Vdq+j"})]})}),!!A&&o(F,{children:o("span",{class:"tag collapsed",children:[o(I,{icon:"group"})," ",o(x,{id:"L8fEEm"})]})}),st&&o("div",{class:"shazam-container-horizontal",children:o("div",{class:"shazam-container-inner",children:Z.following&&Z.followedBy?o("span",{class:"tag minimal",children:o(x,{id:"7oRLbi"})}):Z.requested?o("span",{class:"tag minimal",children:o(x,{id:"Yx0Ud8"})}):Z.following?o("span",{class:"tag minimal",children:o(x,{id:"y6sq5j"})}):Z.followedBy?o("span",{class:"tag minimal",children:o(x,{id:"p3UO/y"})}):null})},f.id),!!$&&o("span",{class:"ib",children:o(x,{id:"Mn1E9C",values:{followersCount:$}})}),!!nt&&o("span",{class:"verified-field",children:[o(I,{icon:"check-circle",size:"s",alt:m({id:"QDEWii"})})," ",o("span",{dangerouslySetInnerHTML:{__html:ma(nt.value,{emojis:_})}})]}),!M&&!A&&!st&&!$&&!nt&&!!R&&o("span",{class:"created-at",children:o(x,{id:"PCcEFZ",values:{0:Hn(R,{hideTime:!0})},components:{0:o("time",{datetime:R})}})})]})]})]})}async function Dy(t,e={}){if(!t?.length)return;const{masto:n}=Ve(),r=jr(),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,l)=>(c[l.id]=l,c),{})}catch{return null}}function Ry(t,e){return()=>Rt.number(t,{style:"unit",unit:e,unitDisplay:"long"})}const Im=Object.prototype.toString,Lm=t=>Im.call(t)==="[object Error]",Pm=new Set(["network error","Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Load failed","Network request failed","fetch failed","terminated"]);function Dm(t){return t&&Lm(t)&&t.name==="TypeError"&&typeof t.message=="string"?t.message==="Load failed"?t.stack===void 0:Pm.has(t.message):!1}function Rm(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 ro(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 $m 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 Nm(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 rs(t,e){return Number.isFinite(e)?e-(performance.now()-t):e}async function Om({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 $m)throw a.originalError;const i=Number.isFinite(s.retries)?Math.max(0,s.retries-n):s.retries,c=s.maxRetryTime??Number.POSITIVE_INFINITY,l=Object.freeze({error:a,attemptNumber:e,retriesLeft:i,retriesConsumed:n});if(await s.onFailedAttempt(l),rs(r,c)<=0)throw a;const h=await s.shouldConsumeRetry(l),d=rs(r,c);if(d<=0||i<=0)throw a;if(a instanceof TypeError&&!Dm(a)){if(h)throw a;return s.signal?.throwIfAborted(),!1}if(!await s.shouldRetry(l))throw a;if(!h)return s.signal?.throwIfAborted(),!1;const u=Nm(n,s),f=Math.min(u,d);return 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 Fm(t,e={}){if(e={...e},Rm(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,ro("factor",e.factor,{min:0,allowInfinity:!1}),ro("minTimeout",e.minTimeout,{min:0,allowInfinity:!1}),ro("maxTimeout",e.maxTimeout,{min:0,allowInfinity:!0}),ro("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 Om({error:a,attemptNumber:n,retriesConsumed:r,startTime:s,options:e})&&r++}}throw new Error("Retry attempts exhausted without throwing an error.")}const ga="LanguageDetector"in self,Bm=ga&&"Translator"in self;let We;ga&&(async()=>{try{const t=await LanguageDetector.availability();if(t==="unavailable")return;t==="available"?We=await LanguageDetector.create():(We=await LanguageDetector.create({monitor(e){e.addEventListener("downloadprogress",n=>{})}}),await We.ready)}catch{}})();const zm=async(t,e,n)=>{let r;const s=e;if(e==="auto"){if(!We?.detect)return{error:"No language detector"};try{e=(await We.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(h){h.addEventListener("downloadprogress",d=>{})}}),await c.ready);const l=await c.translate(t);return console.groupEnd(a),{content:l,detectedSourceLanguage:r,provider:"browser"}}catch(i){return console.groupEnd(a),{error:i}}};var Hm=Object.defineProperty,Km=(t,e,n)=>e in t?Hm(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,xn=(t,e,n)=>Km(t,typeof e!="symbol"?e+"":e,n),Mr=new Map,io=new WeakMap,is=0,jm;function Um(t){return t?(io.has(t)||(is+=1,io.set(t,is.toString())),io.get(t)):"0"}function qm(t){return Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>`${e}_${e==="root"?Um(t.root):t[e]}`).toString()}function Wm(t){const e=qm(t);let n=Mr.get(e);if(!n){const r=new Map;let s;const a=new IntersectionObserver(i=>{i.forEach(c=>{var l;const h=c.isIntersecting&&s.some(d=>c.intersectionRatio>=d);t.trackVisibility&&typeof c.isVisible>"u"&&(c.isVisible=h),(l=r.get(c.target))==null||l.forEach(d=>{d(h,c)})})},t);s=a.thresholds||(Array.isArray(t.threshold)?t.threshold:[t.threshold||0]),n={id:e,observer:a,elements:r},Mr.set(e,n)}return n}function va(t,e,n={},r=jm){if(typeof window.IntersectionObserver>"u"&&r!==void 0){const l=t.getBoundingClientRect();return e(r,{isIntersecting:r,target:t,intersectionRatio:typeof n.threshold=="number"?n.threshold:0,time:0,boundingClientRect:l,intersectionRect:l,rootBounds:l}),()=>{}}const{id:s,observer:a,elements:i}=Wm(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(),Mr.delete(s))}}function Vm(t){return typeof t.children!="function"}var $y=class extends Fs{constructor(t){super(t),xn(this,"node",null),xn(this,"_unobserveCb",null),xn(this,"lastInView"),xn(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()}),xn(this,"handleChange",(e,n)=>{const r=this.lastInView;this.lastInView=e,!(r===void 0&&!e)&&(e&&this.props.triggerOnce&&this.unobserve(),Vm(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=va(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:l,delay:h,initialInView:d,fallbackInView:u,...f}=this.props;return Cc(e||"div",{ref:this.handleNode,...f},t)}};var ss,as,Zm=(as=(ss=Ec)!=null?ss:_e)!=null?as:q,Gm=(t,{threshold:e,root:n,rootMargin:r,trackVisibility:s,delay:a,triggerOnce:i,skip:c}={})=>{const l=N(t),h=N(null),d=N(void 0),u=N(void 0);return Zm(()=>{l.current=t},[t]),yt(f=>{const p=()=>{if(d.current){const b=d.current;d.current=void 0,b()}};if(f===h.current)return d.current;if(!f||c){p(),h.current=null,u.current=void 0;return}p(),h.current=f;let m=!1;const g=va(f,(b,k)=>{const S=u.current;u.current=b,!(S===void 0&&!b)&&(l.current(b,k),i&&b&&v())},{threshold:e,root:n,rootMargin:r,trackVisibility:s,delay:a});function v(){m||(m=!0,g(),h.current=null,d.current=void 0,u.current=void 0)}return d.current=v,d.current},[Array.isArray(e)?e.toString():e,n,r,s,a,i,c])};const cs=48,nr={};function ya({id:t,children:e}){const n=N(),[r,s]=H(!!nr[t]),a=yt(c=>{c&&n.current&&(n.current.hidden=!1,t&&(nr[t]=!0))},[t]),i=Gm(a,{rootMargin:`-${cs}px 0px 0px 0px`,trackVisibility:!0,delay:1e3,triggerOnce:!0,skip:r});return _e(()=>{if(!n.current)return;const c=n.current.getBoundingClientRect();c.bottom>cs&&(c.top<window.innerHeight?n.current.hidden=!1:s(!0),t&&(nr[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 Ym={BASE_URL:"./",DEV:!1,MODE:"production",PHANPY_CLIENT_NAME:"Phanpy",PHANPY_LINGVA_INSTANCES:"lingva.phanpy.social lingva.lunar.icu lingva.garudalinux.org translate.plausibility.cloud",PHANPY_PRIVACY_POLICY_URL:"https://github.com/cheeaun/phanpy/blob/main/PRIVACY.MD",PHANPY_TRANSLANG_INSTANCES:"translang.phanpy.social",PHANPY_WEBSITE:"https://phanpy.social",PROD:!0,SSR:!1,VITE_APP_ENV:"production"},Xm=Object.entries(fa.sl).map(([t,e])=>({code:t,name:e})),{PHANPY_TRANSLANG_INSTANCES:ls}=Ym,Ir=ls?ls.split(/\s+/):[],ba=new Kr({concurrency:1,interval:2e3,intervalCap:1}),wa=1e3*60*60;let or=0;function Qm(t,e,n){return Fm(()=>{let s=Ir[or];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=>{or=(or+1)%Ir.length}})}const _a=Eo(Qm,{maxAge:wa}),Jm=Eo(({signal:t,text:e,source:n,target:r})=>ba.add(()=>_a(e,n,r),{signal:t}),{maxAge:wa}),tg=({text:t,source:e,target:n,signal:r})=>ba.add(()=>zm(t,e,n),{signal:r});function eg({forceTranslate:t,sourceLanguage:e,onTranslate:n,text:r="",mini:s,autoDetected:a}){const{_:i}=Kt(),c=pa(!0),[l,h]=H("default"),[d,u]=H(null),[f,p]=H(null),[m,g]=H(null),v=N(),b=N(),k=e?An(e):null,S=An(c),C=N("auto");n||(n=async({text:T,source:E,target:w,signal:M})=>{if(Bm){const P=await tg({text:T,source:E,target:w,signal:M});if(P&&!P.error)return P}return s?await Jm({signal:M,text:T,source:E,target:w}):await _a(T,E,w)});const _=async()=>{h("loading");try{const{content:T,detectedSourceLanguage:E,provider:w,error:M,...P}=await n({text:r,source:C.current,target:c,signal:b.current?.signal});if(T){if(E){const L=An(E);g(L)}if(w==="translang"){const L=P?.pronunciation;L&&u(L)}p(T),h("default"),!s&&T.trim()!==r.trim()&&v.current&&(v.current.open=!0,v.current.scrollIntoView({behavior:"smooth",block:"nearest"}))}else h("error")}catch(T){T.name!=="AbortError"&&h("error")}};return q(()=>{t&&_()},[t]),q(()=>(b.current=new AbortController,()=>{b.current.abort()}),[]),s?f&&f.trim()!==r.trim()&&m!==S?o(ya,{children:o("div",{class:"status-translation-block-mini",children:[o(I,{icon:"translate",alt:i({id:"zVJKbG",values:{sourceLangText:k}})}),o("output",{lang:c,dir:"auto",title:d||"",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:l==="loading"?"loading-mask":"",onClick:async T=>{T.preventDefault(),T.stopPropagation(),v.current.open=!v.current.open,l!=="loading"&&(f||_())},children:[o(I,{icon:"translate"})," ",o("span",{children:i(l==="loading"?{id:"Zxkt/v"}:e&&k&&!m?a?{id:"R20Yf9",values:{sourceLangText:k}}:{id:"h8zDAI",values:{sourceLangText:k}}:{id:"pi8x/S"})})]})}),o("div",{class:"translated-block",children:[o("div",{class:"translation-info insignificant",children:[o("select",{class:"translated-source-select",disabled:l==="loading",onChange:T=>{C.current=T.target.value,_()},children:Xm.map(T=>{const E=An({code:T.code,fallback:T.name}),w=An({code:T.code,locale:T.code}),M=w&&E!==w;return o("option",{value:T.code,children:T.code==="auto"?i({id:"Bze3gr",values:{0:m??"…"}}):M?`${w} - ${E}`:E})})})," ",o("span",{children:["→ ",S]}),o(bo,{abrupt:!0,hidden:l!=="loading"})]}),l==="error"?o("p",{class:"ui-state",children:o(x,{id:"m5LihO"})}):!!f&&o(F,{children:[o("output",{class:"translated-content",lang:c,dir:"auto",children:f}),!!d&&o("output",{class:"translated-pronunciation-content",tabIndex:-1,onClick:T=>{T.target.classList.toggle("expand")},children:d})]})]})]})})}const ng=Ir?.length?eg:()=>null;function Te(t){return new Promise((e,n)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>n(t.error)})}function ka(t,e){let n;const r=()=>{if(n)return n;const s=indexedDB.open(t);return s.onupgradeneeded=()=>s.result.createObjectStore(e),n=Te(s),n.then(a=>{a.onclose=()=>n=void 0},()=>{}),n};return(s,a)=>r().then(i=>a(i.transaction(e,s).objectStore(e)))}let rr;function Ye(){return rr||(rr=ka("keyval-store","keyval")),rr}function og(t,e=Ye()){return e("readonly",n=>Te(n.get(t)))}function rg(t,e,n=Ye()){return n("readwrite",r=>(r.put(e,t),Te(r.transaction)))}function ig(t,e=Ye()){return e("readonly",n=>Promise.all(t.map(r=>Te(n.get(r)))))}function sg(t,e=Ye()){return e("readwrite",n=>(n.delete(t),Te(n.transaction)))}function ag(t,e=Ye()){return e("readwrite",n=>(t.forEach(r=>n.delete(r)),Te(n.transaction)))}function cg(t=Ye()){return t("readwrite",e=>(e.clear(),Te(e.transaction)))}function lg(t,e){return t.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},Te(t.transaction)}function ug(t=Ye()){return t("readonly",e=>{if(e.getAllKeys)return Te(e.getAllKeys());const n=[];return lg(e,r=>n.push(r.key)).then(()=>n)})}function us(t,e){const n=ka(t,e);return{set:(r,s)=>rg(r,s,n),get:r=>og(r,n),getMany:r=>ig(r,n),del:r=>sg(r,n),delMany:r=>ag(r,n),clear:()=>cg(n),keys:()=>ug(n)}}const Ny={drafts:us("drafts-db","drafts-store"),catchup:us("catchup-db","catchup-store")},Ta=ce({}),dg=!!document.startViewTransition;function Oy({children:t,statusID:e}){const n=N([]),[r,s]=H(!1),[a,i]=H(0);function c(p){p!==a&&(dg?document.startViewTransition(()=>{i(p)}):i(p))}async function l(){const{masto:p}=Ve(),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 h(){try{await l(),s(!0),c(0)}catch{s(!1)}}function d(){n.current=[],s(!1),c(0)}function u(){c(p=>Math.min(p+1,n.current.length-1))}function f(){c(p=>Math.max(p-1,0))}return o(Ta.Provider,{value:{editHistoryRef:n,initEditHistory:h,exitEditHistory:d,editHistoryMode:r,editedAtIndex:a,prevEditedAt:u,nextEditedAt:f},children:t})}function hg(){return It(Ta)}const ei=ce();function fg(t,e){if(!t?.length)return!1;const n=t.filter(i=>{const{filter:c}=i,l=c.context.includes(e);return l?c.expiresAt?Date.parse(c.expiresAt)>Date.now():l:!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 Mo=Wt(fg);function pg(t,e,n){const{filtered:r}=t;if(!r?.length||n&&t.account?.id===n)return!0;const a=Mo(r,e);return a?a.action!=="hide":!0}function Fy(t,e){if(!t?.length)return[];if(!e)return t;const n=jr();return t.filter(r=>pg(r,e,n))}const so=document.createElement("template");function mg(t){if(!t)return 0;so.innerHTML=t;const e=so.content.querySelectorAll(".invisible");for(let r=0;r<e.length;r++)e[r].remove();let n="";for(let r=0;r<so.content.childNodes.length;r++){const s=so.content.childNodes[r];n+=s.innerText||s.textContent||""}return n.length}const Lr="speechSynthesis"in window;function gg(t,e){if(Lr)try{speechSynthesis.speaking&&speechSynthesis.cancel();const n=new SpeechSynthesisUtterance(t);e&&(n.lang=e),speechSynthesis.speak(n)}catch(n){alert(n)}}function vg(t,e,n,r){var s=this,a=N(null),i=N(0),c=N(0),l=N(null),h=N([]),d=N(),u=N(),f=N(t),p=N(!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,k="maxWait"in n,S="debounceOnServer"in n&&!!n.debounceOnServer,C=k?Math.max(+n.maxWait||0,e):null;q(function(){return p.current=!0,function(){p.current=!1}},[]);var _=it(function(){var T=function($){var R=h.current,W=d.current;return h.current=d.current=null,i.current=$,c.current=c.current||$,u.current=f.current.apply(W,R)},E=function($,R){g&&cancelAnimationFrame(l.current),l.current=g?requestAnimationFrame($):setTimeout($,R)},w=function($){if(!p.current)return!1;var R=$-a.current;return!a.current||R>=e||R<0||k&&$-i.current>=C},M=function($){return l.current=null,b&&h.current?T($):(h.current=d.current=null,u.current)},P=function $(){var R=Date.now();if(v&&c.current===i.current&&L(),w(R))return M(R);if(p.current){var W=e-(R-a.current),B=k?Math.min(W,C-(R-i.current)):W;E($,B)}},L=function(){r&&r({})},A=function(){if(m||S){var $=Date.now(),R=w($);if(h.current=[].slice.call(arguments),d.current=s,a.current=$,R){if(!l.current&&p.current)return i.current=a.current,E(P,e),v?T(a.current):u.current;if(k)return E(P,e),T(a.current)}return l.current||E(P,e),u.current}};return A.cancel=function(){var $=l.current;$&&(g?cancelAnimationFrame(l.current):clearTimeout(l.current)),i.current=0,h.current=a.current=d.current=l.current=null,$&&r&&r({})},A.isPending=function(){return!!l.current},A.flush=function(){return l.current?M(Date.now()):u.current},A},[v,k,e,C,b,g,m,S,r]);return _}function yg(t,e,n){var r=n===void 0?{}:n,s=r.leading,a=r.trailing;return vg(t,e,{maxWait:e,leading:s===void 0||s,trailing:a===void 0||a})}function bg(t,e){var n=N(null),r=N(null);r.current=e;var s=N(null);q(function(){a()});var a=yt(function(){var i=s.current,c=r.current,l=i||(c?c instanceof Element?c:c.current:null);n.current&&n.current.element===l&&n.current.subscriber===t||(n.current&&n.current.cleanup&&n.current.cleanup(),n.current={element:l,subscriber:t,cleanup:l?t(l):void 0})},[t]);return q(function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}},[]),yt(function(i){s.current=i,a()},[a])}function ds(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 wg(t){t===void 0&&(t={});var e=t.onResize,n=N(void 0);n.current=e;var r=t.round||Math.round,s=N(),a=H({width:void 0,height:void 0}),i=a[0],c=a[1],l=N(!1);q(function(){return l.current=!1,function(){l.current=!0}},[]);var h=N({width:void 0,height:void 0}),d=bg(yt(function(u){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=ds(p,m,"inlineSize"),v=ds(p,m,"blockSize"),b=g?r(g):void 0,k=v?r(v):void 0;if(h.current.width!==b||h.current.height!==k){var S={width:b,height:k};h.current.width=b,h.current.height=k,n.current?n.current(S):l.current||c(S)}})}),s.current.instance.observe(u,{box:t.box}),function(){s.current&&s.current.instance.unobserve(u)}},[t.box,r]),t.ref);return it(function(){return{ref:d,width:i.width,height:i.height}},[d,i.width,i.height])}function _g(t={}){const e=yg(t.onResize,300);return wg({...t,onResize:e})}function Nn({className:t="truncated"}={}){const e=N();return _g({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),l=parseInt(c||i,10);a=s>l}e.current.classList.toggle(t,a)}}}),e}const On={public:"earth",unlisted:"group",private:"lock",direct:"message",local:"building"},qe={public:{id:"7d1a0d"},local:{id:"d5zxa4"},unlisted:{id:"pPYeIN"},private:{id:"x5LEuB"},direct:{id:"IV4QaU"}},kg=["\\\\\\[[\\s\\S]*?\\\\\\]","\\\\\\([\\s\\S]*?\\\\\\)"],hs=new RegExp(kg.join("|"),"g");function Tg(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,l=c.match(n);if(!l)continue;const d=l[0]==="\\["?"\\]":"\\)",u=[i];let f=i,p=!1,m=c;if(c.includes(d))p=!0;else for(;f.nextSibling&&!p;){const g=f.nextSibling;if(g.nodeType===Node.TEXT_NODE)u.push(g),m+=g.textContent,g.textContent.includes(d)&&(p=!0);else if(g.nodeType===Node.ELEMENT_NODE&&g.tagName==="BR")u.push(g),m+=`
`;else break;f=g}if(p&&u.length>1){i.textContent=m;for(let g=1;g<u.length;g++)u[g].remove()}}}const Sg=({content:t,contentRef:e,onRevert:n})=>{if(hs.lastIndex=0,!hs.test(t))return null;const{_:s}=Kt(),[a,i]=H(!1),c=yt(async l=>{if(l.preventDefault(),l.stopPropagation(),a)i(!1),n();else try{const h=window.temml||(window.temml=(await Bs(async()=>{const{default:p}=await import("./temml-Dns96zBN.js");return{default:p}},[],import.meta.url))?.default);Tg(e.current);const d=e.current.innerHTML;h.renderMathInElement(e.current,{fences:"(",annotate:!0,throwOnError:!0,errorCallback:p=>{}});const u=e.current.querySelector("math"),f=e.current.innerHTML!==d;u&&f?i(!0):(ht(s({id:"HBIZeo"})),i(!1),n())}catch{}},[a]);return o("div",{class:"math-block",children:[o(I,{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"})})]})},Sa=new Uint8Array(128);for(let t=0;t<83;t++)Sa["0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~".charCodeAt(t)]=t;const go=(t,e,n)=>{let r=0;for(;e<n;)r*=83,r+=Sa[t.charCodeAt(e++)];return r},Ca=Math.pow,Kn=Math.PI,Cg=Kn*2,Ea=3294.6,Aa=269.025,Eg=t=>t>10.31475?Ca(t/Aa+.052132,2.4):t/Ea,ir=t=>~~(t>1227e-8?Aa*Ca(t,.416666)-13.025:t*Ea+1),Fn=t=>(t<0?-1:1)*t*t,fs=t=>{for(t+=Kn/2;t>Kn;)t-=Cg;const e=1.27323954*t-.405284735*Fn(t);return .225*(Fn(e)-e)+e};function ni(t){const e=go(t,2,6);return[e>>16,e>>8&255,e&255]}function Ag(t,e,n,r){const s=go(t,0,1),a=s%9+1,i=~~(s/9)+1,c=a*i;let l=0,h=0,d=0,u=0,f=0,p=0,m=0,g=0,v=0,b=0,k=0,S=0;const C=(go(t,1,2)+1)/13446*(r|1),_=new Float64Array(c*3),T=ni(t);for(l=0;l<3;l++)_[l]=Eg(T[l]);for(l=1;l<c;l++)S=go(t,4+l*2,6+l*2),_[l*3]=Fn(~~(S/361)-9)*C,_[l*3+1]=Fn(~~(S/19)%19-9)*C,_[l*3+2]=Fn(S%19-9)*C;const E=new Float64Array(i*n),w=new Float64Array(a*e);for(h=0;h<i;h++)for(u=0;u<n;u++)E[h*n+u]=fs(Kn*u*h/n);for(l=0;l<a;l++)for(d=0;d<e;d++)w[l*e+d]=fs(Kn*d*l/e);const M=e*4,P=new Uint8ClampedArray(M*n);for(u=0;u<n;u++)for(d=0;d<e;d++){for(f=p=m=0,h=0;h<i;h++)for(v=E[h*n+u],l=0;l<a;l++)g=w[l*e+d]*v,b=(l+h*a)*3,f+=_[b]*g,p+=_[b+1]*g,m+=_[b+2]*g;k=4*d+u*M,P[k]=ir(f),P[k+1]=ir(p),P[k+2]=ir(m),P[k+3]=255}return P}var xa="kvfysmfp",Ma="ufhsfnkm",xg=".".concat(xa,"{overflow:hidden;touch-action:none}.").concat(Ma,"{transform-origin: 0 0}"),Mg=typeof window>"u",Ig=function(){return!Mg&&("ontouchstart"in window||navigator.maxTouchPoints>0)};var Lg=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 Pg=Math.min,Dg=Math.max;function ps(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]:[Pg(a+r,0)-r,Dg(0,a+r)]}var ms=function(t,e){return e?"".concat(t," ").concat(e):t},ao=Math.abs,Rg=Math.min,$g=Math.sqrt,Ia=typeof window>"u",Ng=Ia?!1:/(Mac)/i.test(navigator.platform),on=function(t){return t==="drag"},Mn=function(t){return t==="zoom"},Og=function(t){return Ng&&t.ctrlKey},In=function(t){t.stopPropagation(),t.preventDefault()},gs=function(t,e){var n=t.x-e.x,r=t.y-e.y;return $g(n*n+r*r)},Fg=function(t,e){var n=gs(t[0],t[1]),r=gs(e[0],e[1]);return r/n},Bg=function(t,e){return t>e-.01&&t<e+.01},zg=function(t){return-Math.cos(t*Math.PI)/2+.5},Hg=function(t){return{x:t.pageX,y:t.pageY}},co=function(t){return Array.from(t).map(Hg)},vs=function(t,e){return t+e},Kg=function(t){return{x:t.map(function(e){var n=e.x;return n}).reduce(vs,0)/t.length,y:t.map(function(e){var n=e.y;return n}).reduce(vs,0)/t.length}},sr=function(t,e,n){return n<t?t:n>e?e:n},jg=function(t){return!(t.ctrlKey||t.metaKey)},Ug=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}},qg=function(t,e){return{x:e.x-t.x,y:e.y-t.y}},Wg=function(t,e){return t.x===e.x&&t.y===e.y},ze=function(){},lo={x:0,y:0},ys=function(t){Ac(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=Bt({},lo),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=Bt({},lo),n._startOffset=Bt({},lo),n._startTouches=null,n._updatePlaned=!1,n._wheelTimeOut=null,n._zoomFactor=1,n._initialZoomFactor=1,n._draggingPoint=Bt({},lo),n._ignoreNextClick=!1,n._containerRef=xc(),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&&(Mn(n._interaction)||on(n._interaction)&&(n._startOffset.x!==n._offset.x||n._startOffset.y!==n._offset.y))&&In(r),on(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&&In(r),n._startOffset=Bt({},n._offset),n._startTouches=co(r.touches)):(Mn(n._interaction)?n._startTouches&&n._startTouches.length===2&&r.touches.length===2&&n._handleZoom(r,Fg(n._startTouches,co(r.touches))):on(n._interaction)&&n._handleDrag(r),n._interaction&&(In(r),n._update())),n._firstMove=!1)}),n._handlerWheel=function(r){if(!n.props.shouldInterceptWheel(r)){In(r);var s=r.pageX,a=r.pageY,i=r.deltaY,c=r.deltaMode,l=1;(Og(r)||c===1)&&(l=15);var h={touches:[{pageX:s,pageY:a}]},d=n._getOffsetByFirstTouch(h),u=i*l;n._stopAnimation(),n._scaleTo(n._zoomFactor-u/n.props.wheelScaleFactor,d),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,l=i.y;if(c||l){this._stopAnimation(),this._resetInertia();var h=function(){if(c*=s,l*=s,!c&&!l)return n._stopAnimation();var d=Bt({},n._offset);if(n._addOffset({x:c,y:l}),n._offset=n._sanitizeOffset(n._offset),Wg(d,n._offset))return n._stopAnimation();n._update({isAnimation:!0})};this._animate(h,{duration:9999})}}},e.prototype._collectInertia=function(n){var r=n.touches;if(this.props.inertia){var s=co(r)[0],a=this._prevDragMovePoint;a&&(this._velocity=qg(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=Kg(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(h){r._scaleTo(i+h*(a-i),l)},l=this._getOffsetByFirstTouch(n);this._isDoubleTap=!0,i>a&&(l=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=-ao(s*this._getInitialZoomFactor()-n.width)/2,c=-ao(a*this._getInitialZoomFactor()-n.height)/2;this._initialOffset={x:i,y:c}},e.prototype._resetOffset=function(){this._offset=Bt({},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,l=i*this._getInitialZoomFactor()*this._zoomFactor,h=ps({containerDimension:r.width,childDimension:c,padding:this.props.horizontalPadding,centerContained:this.props.centerContained}),d=h[0],u=h[1],f=ps({containerDimension:r.height,childDimension:l,padding:this.props.verticalPadding,centerContained:this.props.centerContained}),p=f[0],m=f[1];return{x:sr(d,u,n.x),y:sr(p,m,n.y)}},e.prototype.alignCenter=function(n){var r=this,s=Bt({duration:250,animated:!0},n),a=s.x,i=s.y,c=s.scale,l=s.animated,h=s.duration,d=a*this._initialZoomFactor,u=i*this._initialZoomFactor,f=this._zoomFactor,p=Bt({},this._offset),m=this._getContainerRect(),g={x:m.width/2,y:m.height/2};if(this._zoomFactor=1,this._offset={x:-(g.x-d),y:-(g.y-u)},this._scaleTo(c,g),this._stopAnimation(),!l)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=Bt({},p);var k=function(S){var C=p.x+b.x*S,_=p.y+b.y*S;r._zoomFactor=f+v*S,r._offset=r._sanitizeOffset({x:C,y:_}),r._update()};this._animate(k,{callback:function(){return r._sanitize()},duration:h})},e.prototype.scaleTo=function(n){var r=this,s=Bt({duration:250,animated:!0},n),a=s.x,i=s.y,c=s.scale,l=s.animated,h=s.duration,d=this._zoomFactor,u=Bt({},this._offset);if(this._zoomFactor=1,this._offset={x:0,y:0},this._scaleTo(c,{x:a,y:i}),this._stopAnimation(),!l)return this._update();var f=this._zoomFactor-d,p={x:this._offset.x-u.x,y:this._offset.y-u.y};this._zoomFactor=d,this._offset=Bt({},u);var m=function(g){var v=u.x+p.x*g,b=u.y+p.y*g;r._zoomFactor=d+f*g,r._offset={x:v,y:b},r._update()};this._animate(m,{callback:function(){return r._sanitize()},duration:h})},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=sr(this.props.minZoom,this.props.maxZoom,this._zoomFactor),this._zoomFactor/r},e.prototype._canDrag=function(){return this.props.draggableUnZoomed||!Bg(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?ao(a)>ao(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=Bt({},this._offset),a=function(i){var c=s.x+i*(r.x-s.x),l=s.y+i*(r.y-s.y);n._offset={x:c,y:l},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 l=r+c*(s-r);n._scaleTo(l,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,l=i.left,h=s.scrollTop||a.scrollTop,d=s.scrollLeft||a.scrollLeft,u=c+h,f=l+d;return co(n.touches).map(function(p){var m=p.x,g=p.y;return{x:m-f,y:g-u}})},e.prototype._animate=function(n,r){var s=this,a=new Date().getTime(),i=Bt({timeFn:zg,callback:function(){},duration:this.props.animationDuration},r),c=i.timeFn,l=i.callback,h=i.duration,d=function(){if(s._inAnimation){var u=new Date().getTime()-a,f=u/h;u>=h?(n(1),s._stopAnimation(),l(),s._update()):(f=c(f),n(f),s._update({isAnimation:!0}),requestAnimationFrame(d))}};this._inAnimation=!0,requestAnimationFrame(d)},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 Ug(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=Rg(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&&(Mn(s)?this._handleZoomEnd():on(s)&&this._handleDragEnd()),Mn(n)?this._handleZoomStart():on(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?(In(n),this._handleDoubleTap(n),Mn(this._interaction)?this._handleZoomEnd():on(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,l=c==="mouseup",h=c==="mousedown";h&&(s.preventDefault(),r._listenMouseMove=!0),r._listenMouseMove&&(s.touches=l?[]:[{pageX:a,pageY:i}],n(s)),l&&(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=Mc.only(r),c=s||{};return Qn.createElement(Qn.Fragment,null,Qn.createElement("style",{nonce:a},xg),Qn.createElement("div",Bt({},c,{ref:this._containerRef,className:ms(xa,c.className)}),Ns(i,{className:ms(Ma,i.props.className)})))},e.defaultProps={animationDuration:250,draggableUnZoomed:!0,enforceBoundsDuringZoom:!1,centerContained:!1,enabled:!0,inertia:!0,inertiaFriction:.96,horizontalPadding:0,isTouch:Ig,lockDragAxis:!1,maxZoom:5,minZoom:.5,onDoubleTap:ze,onDragEnd:ze,onDragStart:ze,onDragUpdate:ze,onZoomEnd:ze,onZoomStart:ze,onZoomUpdate:ze,setOffsetsOnce:!1,shouldInterceptWheel:jg,shouldCancelHandledTouchEndEvents:!1,tapZoomFactor:1,verticalPadding:0,wheelScaleFactor:1500,zoomOutFactor:1.3,doubleTapZoomOutOnMaxScale:!1,doubleTapToggleZoom:!1,_document:Ia?null:window.document},e}(Fs);if(0)var By,zy,Hy,Ky,jy,Uy,qy,Wy;function ar(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 Vg=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Zg="ALT",cr=t=>{const{_:e}=Kt(),{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:[Zg,!!s&&o("sup",{children:s})]})},Gg=140,Yg=280,La=Wt(t=>t?.length?t.length>Gg||/[\n\r].*[\n\r]/.test(t.trim()):!1);function Xg({class:t="",media:e,to:n,lang:r,showOriginal:s,autoAnimate:a,showCaption:i,allowLongerCaption:c,altIndex:l,checkAspectRatio:h=!0,onClick:d}){let{id:u,blurhash:f,description:p,meta:m,previewRemoteUrl:g,previewUrl:v,remoteUrl:b,url:k,type:S}=e;/no\-preview\./i.test(v)&&(v=null);const C=Qg(u||f||k),{original:_={},small:T,focus:E}=m||{},w=s?_?.width:T?.width||_?.width,M=s?_?.height:T?.height||_?.height,P=s?k:v||k,L=s?b:g||b,A=T?.width&&T?.height,R=w&&M?w>M?"landscape":"portrait":null,W=f?ni(f):null,B=N();let Y;if(E){const O=(E.x+1)/2*100,G=(1-E.y)/2*100;Y=`${O.toFixed(0)}% ${G.toFixed(0)}%`}const et=N(),ct=yt(({x:O,y:G,scale:U})=>{const{current:wt}=et;if(wt){const Mt=Lg({x:O,y:G,scale:U});U===1?wt.style.removeProperty("transform"):wt.style.setProperty("transform",Mt),wt.closest(".media-zoom").style.touchAction=U<=1.01?"pan-x":""}},[]),[nt,Z]=H(!1),st={enabled:nt,draggableUnZoomed:!1,inertiaFriction:.9,tapZoomFactor:2,doubleTapToggleZoom:!0,containerProps:{className:"media-zoom",style:{overflow:"visible"}},onUpdate:ct},[J,Tt]=H(!1),Lt=it(()=>n&&!J?O=>o(Ze,{to:n,...O}):"div",[n,J]),$t=L?bs(L):null,dt=S==="unknown"&&$t&&/\.(mp4|m4r|m4v|mov|webm)$/i.test($t.pathname),le=S==="unknown"&&$t&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test($t.pathname),ne=S==="image"||S==="unknown"&&v&&!dt&&!le,oe=v&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(bs(v).pathname),K=N(),[mt,Pt]=H(!1);_e(()=>{if(!ne||!s||!K.current)return;const{offsetWidth:O,offsetHeight:G}=K.current,U=w<O&&M<G;U&&Pt(U)},[w,M]);const At=window.innerHeight*(R==="portrait"?.45:.33),Ft=R==="portrait"?0:160,jt={"--average-color":W&&`rgb(${W.join(",")})`},tt=w&&M?{"--width":`${w}px`,"--height":`${M}px`,"--aspectWidth":`${w/M*Math.max(Ft,At)}px`,aspectRatio:`${w} / ${M}`,...jt}:{...jt},ot=La(p);let lt=!!i&&!s&&!!p&&!ot;c&&!lt&&p?.length<=Yg&&(lt=!0);const gt=lt?O=>{const{children:G,...U}=O;return o("figure",{...U,children:[G,o("figcaption",{class:"media-caption",lang:r,dir:"auto",onClick:wt=>{wt.preventDefault(),wt.stopPropagation(),z.showMediaAlt={alt:p,lang:r}},children:p})]})}:F,Vt=()=>window.matchMedia("(min-width: calc(40em + 350px))").matches?"large":"small",bt=yt(O=>{const G=O.target.closest(".status-deck");if(s||Vt()==="large"&&G||!document.startViewTransition){d?.(O);return}const U=O.target.closest("[data-view-transition-name]")||O.target.querySelector("[data-view-transition-name]");if(U)if(d)d(O);else if(O.preventDefault(),U.dataset.viewTransitioned){U.style.viewTransitionName=C;try{document.startViewTransition(()=>{U.style.viewTransitionName="",location.hash=`#${n}`})}catch{U.style.viewTransitionName="",location.hash=`#${n}`}}else location.hash=`#${n}`;else d?.(O)},[C,s,d]);if(ne)return st.containerProps.style.display="inherit",_e(()=>{Vg&&s&&(async()=>{try{await fetch(P,{mode:"no-cors"}),et.current.src=P}catch{}})()},[P]),o(gt,{children:[o(Lt,{ref:K,class:`media media-image ${t}`,onClick:bt,"data-orientation":R,"data-has-alt":!lt||void 0,style:s?{backgroundImage:`url(${v})`,"--bg-image":`url(${v})`,backgroundSize:mt?`${w}px ${M}px`:void 0,...jt}:tt,children:s?o(ys,{...st,children:o("img",{ref:et,src:P,alt:p,width:w,height:M,"data-orientation":R,loading:"eager",decoding:"sync",style:{"view-transition-name":C},onLoad:O=>{const G=O.target,U=G.closest(".media-image");U&&(U.style.backgroundImage=`url(${G.src})`,U.style.removeProperty("--bg-image")),G.closest(".media-zoom").style.display="",Z(!0)},onError:O=>{const{src:G}=O.target;G===P&&L&&P!==L&&(O.target.src=L)}})}):o(F,{children:[o("img",{src:P,alt:lt?"":p,width:w,height:M,"data-orientation":R,loading:"lazy","data-view-transition-name":C,style:{objectPosition:Y||"center","--anim-duration":`${Math.min(Math.max(Math.max(w,M)/100,5),120)}s`},onLoad:O=>{O.target.dataset.loaded=!0;const G=O.target.closest(".media");if(!A&&G){const{naturalWidth:U,naturalHeight:wt}=O.target;G.dataset.orientation=U>wt?"landscape":"portrait",G.style.setProperty("--width",`${U}px`),G.style.setProperty("--height",`${wt}px`),G.style.aspectRatio=`${U}/${wt}`}if(h&&G){const{target:U}=O;setTimeout(()=>{const{clientWidth:wt,clientHeight:Mt,naturalWidth:ft,naturalHeight:xt}=U;if(wt&&Mt&&ft&&xt)if(ft<88||xt<88)G.dataset.hasSmallDimension=!0;else{const vt=xt*wt/ft;if(Math.abs(vt-Mt)<5){const V=G.closest(".media");V&&(V.dataset.hasNaturalAspectRatio=!0)}}},300)}},onError:O=>{const{src:G}=O.target;G===P&&P!==L?O.target.src=L:Tt(!0)}}),!lt&&o(cr,{alt:p,lang:r,index:l})]})}),J&&o("div",{children:o("a",{href:b,class:"button plain6 small",target:"_blank",children:[o(I,{icon:"external"})," ",o("span",{children:o(x,{id:"9npOH9"})})]})})]});if(S==="gifv"||S==="video"||dt){const O=_.duration>0,G=_.duration<31,U=S==="gifv"&&G,wt=_.duration<61,Mt=ar(_.duration),ft=!s&&!a&&U,xt=!s&&a&&U,Dt=_.duration>5,vt=`
<video
src="${k}"
poster="${v}"
width="${w}"
height="${M}"
data-orientation="${R}"
style="view-transition-name: ${C}"
preload="auto"
autoplay
muted
playsinline
${wt?"loop":""}
ondblclick="this.paused ? this.play() : this.pause()"
${Dt?"ontimeupdate=\"this.closest('.media-gif') && this.closest('.media-gif').style.setProperty('--progress', `${~~((this.currentTime / this.duration) * 100)}%`)\"":""}
></video>
`,Zt=`
<video
src="${k}"
poster="${v}"
width="${w}"
height="${M}"
data-orientation="${R}"
style="view-transition-name: ${C}"
preload="auto"
autoplay
playsinline
${wt?"loop":""}
controls
></video>
`;return o(gt,{children:o(Lt,{ref:K,class:`media ${t} media-${U?"gif":"video"} ${xt?"media-contain":""} ${ft?"media-hover-animate":""}`,"data-orientation":R,"data-formatted-duration":s?void 0:Mt,"data-label":U&&!s&&!xt?"GIF":void 0,"data-has-alt":!lt||void 0,style:!s&&tt,onClick:V=>{if(ft)try{B.current.pause()}catch{}bt(V)},onMouseEnter:()=>{if(ft)try{B.current.play()}catch{}},onMouseLeave:()=>{if(ft)try{B.current.pause()}catch{}},onFocus:()=>{if(ft)try{B.current.play()}catch{}},onBlur:()=>{if(ft)try{B.current.pause()}catch{}},children:[s||xt?U&&s?o(ys,{...st,enabled:!0,children:o("div",{ref:et,dangerouslySetInnerHTML:{__html:vt}})}):U?o("div",{class:"video-container",dangerouslySetInnerHTML:{__html:vt}}):o("div",{class:"video-container",dangerouslySetInnerHTML:{__html:Zt}}):U?o("video",{ref:B,src:k,poster:v,width:w,height:M,"data-orientation":R,"data-view-transition-name":C,preload:"auto",playsinline:!0,loop:!0,muted:!0,onTimeUpdate:Dt?V=>{const{target:_t}=V,Ht=_t?.closest(".media-gif");if(Ht){const re=_t.currentTime/_t.duration*100;Ht.style.setProperty("--progress",`${re}%`)}}:void 0}):o(F,{children:[v&&!oe?o("img",{src:v,alt:lt?"":p,width:w,height:M,"data-orientation":R,loading:"lazy",decoding:"async","data-view-transition-name":C,onLoad:V=>{if(!A){const _t=V.target.closest(".media");if(_t){const{naturalHeight:Ht,naturalWidth:re}=V.target;_t.dataset.orientation=re>Ht?"landscape":"portrait",_t.style.setProperty("--width",`${re}px`),_t.style.setProperty("--height",`${Ht}px`),_t.style.aspectRatio=`${re}/${Ht}`}}}}):o("video",{src:k+"#t=0.1",width:w,height:M,"data-orientation":R,"data-view-transition-name":C,preload:"metadata",muted:!0,disablePictureInPicture:!0,onLoadedMetadata:V=>{if(!O){const{duration:_t}=V.target;if(_t){const Ht=ar(_t),re=V.target.closest(".media-video");re&&(re.dataset.formattedDuration=Ht)}}}}),o("div",{class:"media-play",children:o(I,{icon:"play",size:"xl",alt:"▶"})})]}),!s&&!lt&&o(cr,{alt:p,lang:r,index:l})]})})}else if(S==="audio"||le){const O=ar(_.duration);return o(gt,{children:o(Lt,{class:`media media-audio ${t}`,"data-formatted-duration":s?void 0:O,"data-has-alt":!lt||void 0,onClick:d,style:!s&&tt,children:[s?o("audio",{src:b||k,preload:"none",controls:!0,autoPlay:!0}):v?o("img",{src:v,alt:lt?"":p,width:w,height:M,"data-orientation":R,loading:"lazy",onError:G=>{try{G.target?.remove?.()}catch{}}}):null,!s&&o(F,{children:[o("div",{class:"media-play",children:o(I,{icon:"play",size:"xl",alt:"▶"})}),!lt&&o(cr,{alt:p,lang:r,index:l})]})]})})}}function bs(t){return URL.parse(t,location.origin)}function Qg(t){let e=t.replace(/[^a-zA-Z0-9_-]/g,"-");return e.match(/^[0-9-]/)&&(e="vt-"+e),e}const Pr=$e(Xg,(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 Jg(t){const{mediaAttachments:e,language:n,postID:r,instance:s}=t,a=e.length>1,i=N(),[c,l]=H(0);return q(()=>{let h=()=>{const{clientWidth:d,scrollLeft:u}=i.current,f=Math.round(Math.abs(u)/d);l(f)};return i.current&&i.current.addEventListener("scroll",h,{passive:!0}),()=>{i.current&&i.current.removeEventListener("scroll",h)}},[]),o(F,{children:[o("div",{class:"media-first-container",children:[o("div",{class:"media-first-carousel",ref:i,children:e.map((h,d)=>o("div",{class:"media-first-item",children:o(Pr,{media:h,lang:n,to:`/${s}/s/${r}?media=${d+1}`})},h.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:h=>{h.preventDefault(),h.stopPropagation(),i.current.focus(),i.current.scrollTo({left:i.current.clientWidth*(c-1)*(Tr()?-1:1),behavior:"smooth"})},children:o(I,{icon:"arrow-left"})})}),o("label",{class:"media-carousel-button",children:o("button",{type:"button",class:"carousel-button",hidden:c===e.length-1,onClick:h=>{h.preventDefault(),h.stopPropagation(),i.current.focus(),i.current.scrollTo({left:i.current.clientWidth*(c+1)*(Tr()?-1:1),behavior:"smooth"})},children:o(I,{icon:"arrow-right"})})})]})]}),a&&o("div",{class:"media-carousel-dots",style:{"--dots-count":e.length},children:e.map((h,d)=>o("span",{class:`carousel-dot ${d===c?"active":""}`},h.id))})]})}function tv(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 ev({poll:t,lang:e,readOnly:n,refresh:r=()=>{},votePoll:s=()=>{}}){const{_:a}=Kt(),[i,c]=H("default"),{expired:l,expiresAt:h,id:d,multiple:u,options:f,ownVotes:p,voted:m,votersCount:g,votesCount:v=0,emojis:b}=t,k=!!h&&new Date(h),S=u&&g||v;let C=0;S<=1e3?C=0:S<=1e4?C=1:S<=1e5&&(C=2);const[_,T]=H(!1),E=f.every(w=>w.votesCount!==null);return o("div",{lang:e,dir:"auto",class:`poll ${n?"read-only":""} ${i==="loading"?"loading":""}`,children:[_&&E||m||l?o(F,{children:[o("div",{class:"poll-options",children:f.map((w,M)=>{const{title:P,votesCount:L}=w,A=S?L/S:0,$=A?A.toLocaleString(Rt.locale||void 0,{style:"percent",maximumFractionDigits:C}):"0%",R=L>0&&L===Math.max(...f.map(W=>W.votesCount));return o("div",{class:`poll-option poll-result ${R?"poll-option-leading":""}`,style:{"--percentage":`${A*100}%`},children:[o("div",{class:"poll-option-title",children:[o("span",{children:o(un,{text:P,emojis:b})}),m&&p.includes(M)&&o(F,{children:[" ",o(I,{icon:"check-circle",alt:a({id:"IeO7us"})})]})]}),o("div",{class:"poll-option-votes",title:Rt._({id:"+syLpm",values:{optionVotesCount:L}}),children:$})]},`${M}-${P}-${L}`)})}),!l&&!m&&o("button",{class:"poll-vote-button plain2",disabled:i==="loading",onClick:w=>{w.preventDefault(),T(!1)},children:[o(I,{icon:"arrow-left",size:"s"})," ",o(x,{id:"L96xSt"})]})]}):o("form",{onSubmit:async w=>{w.preventDefault();const M=w.target,P=new FormData(M),L=[];P.forEach((A,$)=>{$==="poll"&&L.push(A)}),L.length&&(c("loading"),await s(L),c("default"))},children:[o("div",{class:"poll-options",children:f.map((w,M)=>{const{title:P}=w;return o("div",{class:"poll-option",children:o("label",{class:"poll-label",children:[o("input",{type:u?"checkbox":"radio",name:"poll",value:M,disabled:i==="loading",readOnly:n}),o("span",{class:"poll-option-title",children:o(un,{text:P,emojis:b})})]})})})}),!n&&o("button",{class:"poll-vote-button",type:"submit",disabled:i==="loading",children:o(x,{id:"lQXQKs"})})]}),o("p",{class:"poll-meta",children:[!l&&!n&&o("button",{type:"button",class:"plain small",disabled:i==="loading",onClick:w=>{w.preventDefault(),c("loading"),(async()=>(await r(),c("default")))()},title:a({id:"lCF0wC"}),children:o(I,{icon:"refresh",alt:a({id:"lCF0wC"})})}),!m&&!l&&!n&&E&&o("button",{type:"button",class:"plain small",disabled:i==="loading",onClick:w=>{w.preventDefault(),T(!_)},title:a(_?{id:"L96xSt"}:{id:"zCjei3"}),children:[o(I,{icon:_?"eye-open":"eye-close",alt:a(_?{id:"L96xSt"}:{id:"zCjei3"})})," "]}),!l&&!n&&" ",o(x,{id:"k7v0Rh",values:{0:ae(v),1:ae(v),votesCount:v},components:{0:o("span",{title:v}),1:o("span",{title:v})}}),!!g&&g!==v&&o(F,{children:[" ","•"," ",o(x,{id:"jf1i1L",values:{0:ae(g),1:ae(g),votersCount:g},components:{0:o("span",{title:g}),1:o("span",{title:g})}})]})," ","•"," ",l?k?o(x,{id:"5LwCCI",components:{0:o(be,{datetime:k})}}):a({id:"237hSL"}):k?o(x,{id:"ooHDPY",components:{0:o(be,{datetime:k})}}):a({id:"O2tNG0"})]})]})}const nv=/^http/i,ws=({post:t,instance:e,previewMode:n})=>{const{content:r,emojis:s,language:a,mentions:i,url:c}=t,l=Ge(z),h=Qt(t.id,e),d=l.statusQuotes[h],u=N();return _e(()=>{if(!u.current)return;const f=ma(r,{emojis:s,returnDOM:!0});for(const p of f.querySelectorAll('a.u-url[target="_blank"]'))nv.test(p.innerText.trim())||p.removeAttribute("target");u.current.replaceChildren(f.cloneNode(!0))},[r,s?.length]),q(()=>{if(d?.length)for(const f of u.current.querySelectorAll("a"))d.some(p=>p?.originalURL===f.href)&&f.classList.add("is-quote")},[d?.length]),o("div",{ref:u,lang:a,dir:"auto",class:"inner-content",onClick:Cm({mentions:i,instance:e,previewMode:n,statusURL:c})})};var lr,_s;function ov(){return _s||(_s=1,lr=(e,n={})=>{const r=n.char||" ",s=n.count||2;let a=0;const i=[];return e.reverse().reduce((c,l)=>{i.length&&a&&i[a]&&i[a]===l.substring(1,i[a].length+1)&&(i.splice(a,1),a--);const d=[`${r.repeat(a?a*s:0)}${l}`,...c];return l.substring(0,2)==="</"&&(a++,i[a]=l.substring(2,l.length-1)),d},[]).join(`
`)}),lr}var ur,ks;function rv(){if(ks)return ur;ks=1;const t=n=>n.trim().replace(/(^(\s|\t)+|(( |\t)+)$)/gm,"");return ur={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},ur}var dr,Ts;function iv(){if(Ts)return dr;Ts=1;const t=ov(),{mergeAttributesWithElements:e}=rv();return dr=(r,s={})=>{const a=e(r);return t(a,s)},dr}var sv=iv();const av=$s(sv);function Pa(t,e,n=0){const{account:{url:r,displayName:s,acct:a,username:i,emojis:c,bot:l,group:h},id:d,poll:u,spoilerText:f,language:p,editedAt:m,createdAt:g,content:v,mediaAttachments:b,url:k,emojis:S}=t,C=Qt(d,e),T=(z.statusQuotes[C]||[]).filter((L,A,$)=>$.findIndex(R=>R.url===L.url)===A),E=T.length&&n<=2?T.map(L=>{const{id:A,instance:$}=L,R=Qt(A,$),W=z.statuses[R];if(W)return Pa(W,$,++n)}).join(""):"",w=new Date(g),M=xr(v,S)+`
`+E+`
`+(u?.options?.length?`
<p>📊:</p>
<ul>
${u.options.map(L=>`
<li>
${L.title}
${L.votesCount>=0?` (${L.votesCount})`:""}
</li>
`).join("")}
</ul>`:"")+(b.length>0?`
`+b.map(L=>{const{description:A,meta:$,previewRemoteUrl:R,previewUrl:W,remoteUrl:B,url:Y,type:et}=L,{original:ct={},small:nt}=$||{},Z=nt?.width||ct?.width,st=nt?.height||ct?.height,J=B||Y,Tt=R||W,Lt=Tt||J,$t=J?URL.parse(J):null,dt=et==="unknown"&&$t&&/\.(mp4|m4r|m4v|mov|webm)$/i.test($t.pathname),le=et==="unknown"&&$t&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test($t.pathname),ne=et==="image"||et==="unknown"&&Tt&&!dt&&!le,oe=et==="gifv"||et==="video"||dt,K=et==="audio"||le;let mt="";return ne?mt=`<img src="${Lt}" width="${Z}" height="${st}" alt="${A}" loading="lazy" />`:oe?mt=`
<video src="${J}" width="${Z}" height="${st}" controls preload="auto" poster="${Tt}" loading="lazy"></video>
${A?`<figcaption>${A}</figcaption>`:""}
`:K?mt=`
<audio src="${J}" controls preload="auto"></audio>
${A?`<figcaption>${A}</figcaption>`:""}
`:mt=`
<a href="${J}">📄 ${A||J}</a>
`,`<figure>${mt}</figure>`}).join(`
`):""),P=`
<blockquote lang="${p}" cite="${k}" data-source="fediverse">
${f?`
<details>
<summary>${f}</summary>
${M}
</details>
`:M}
<footer>
${xr(s,c)} (@${a}) ${g?`<a href="${k}"><time datetime="${w.toISOString()}">${w.toLocaleString()}</time></a>`:""}
</footer>
</blockquote>
`;return av(P)}function cv({post:t,instance:e,onClose:n}){const{_:r}=Kt(),{account:{url:s,displayName:a,username:i,emojis:c,bot:l,group:h},id:d,poll:u,spoilerText:f,language:p,editedAt:m,createdAt:g,content:v,mediaAttachments:b,url:k,emojis:S}=t,C=Pa(t,e);return o("div",{id:"embed-post",class:"sheet",children:[!!n&&o("button",{type:"button",class:"sheet-close",onClick:n,children:o(I,{icon:"x",alt:r({id:"yz7wBu"})})}),o("header",{children:o("h2",{children:o(x,{id:"jdVwsS"})})}),o("main",{tabIndex:"-1",children:[o("h3",{children:o(x,{id:"GkS6YG"})}),o("textarea",{class:"embed-code",readonly:!0,onClick:_=>{_.target.select()},dir:"auto",children:C}),o("button",{type:"button",onClick:()=>{try{navigator.clipboard.writeText(C),ht(r({id:"bl7nrg"}))}catch{ht(r({id:"/KEBaP"}))}},children:[o(I,{icon:"clipboard"})," ",o("span",{children:o(x,{id:"he3ygx"})})]}),!!b?.length&&o("section",{children:[o("p",{children:o(x,{id:"/2mUza"})}),o("ol",{class:"links-list",children:b.map(_=>o("li",{children:o("a",{href:_.remoteUrl||_.url,target:"_blank",download:!0,children:_.remoteUrl||_.url})},_.id))})]}),!!c?.length&&o("section",{children:[o("p",{children:o(x,{id:"AeM/di"})}),o("ul",{children:c.map(_=>o("li",{children:[o("picture",{children:[o("source",{srcset:_.staticUrl,media:"(prefers-reduced-motion: reduce)"}),o("img",{class:"shortcode-emoji emoji",src:_.url,alt:`:${_.shortcode}:`,width:"16",height:"16",loading:"lazy",decoding:"async"})]})," ",o("code",{children:[":",_.shortcode,":"]})," (",o("a",{href:_.url,target:"_blank",download:!0,children:"URL"}),")",_.staticUrl?o(F,{children:[" ","(",o("a",{href:_.staticUrl,target:"_blank",download:!0,children:o(x,{id:"xiropL"})}),")"]}):null]},_.shortcode))})]}),!!S?.length&&o("section",{children:[o("p",{children:o(x,{id:"jzjjJh"})}),o("ul",{children:S.map(_=>o("li",{children:[o("picture",{children:[o("source",{srcset:_.staticUrl,media:"(prefers-reduced-motion: reduce)"}),o("img",{class:"shortcode-emoji emoji",src:_.url,alt:`:${_.shortcode}:`,width:"16",height:"16",loading:"lazy",decoding:"async"})]})," ",o("code",{children:[":",_.shortcode,":"]})," (",o("a",{href:_.url,target:"_blank",download:!0,children:"URL"}),")",_.staticUrl?o(F,{children:[" ","(",o("a",{href:_.staticUrl,target:"_blank",download:!0,children:o(x,{id:"xiropL"})}),")"]}):null]},_.shortcode))})]}),o("section",{children:o("small",{children:[o("p",{children:o(x,{id:"TnJgwX"})}),o("ul",{children:[o("li",{children:o(x,{id:"0OHPem"})}),o("li",{children:o(x,{id:"AzZ5zv"})}),o("li",{children:o(x,{id:"NU7wa/"})}),o("li",{children:o(x,{id:"R4PmPA"})})]})]})}),o("h3",{children:o(x,{id:"rdUucN"})}),o("output",{class:"embed-preview",dangerouslySetInnerHTML:{__html:C},dir:"auto"}),o("p",{children:o("small",{children:o(x,{id:"j0kZfi"})})})]})]})}function lv({onClose:t,post:e,currentPolicy:n}){const{_:r}=Kt(),{masto:s}=Ve(),[a,i]=H("default"),[c,l]=H(n||"public"),h=async d=>{d.preventDefault();const f=new FormData(d.target).get("quoteApprovalPolicy");l(f),i("loading");try{await s.v1.statuses.$select(e.id).interactionPolicy.update({quote_approval_policy:f}),t(!0),ht(r({id:"3P1r1z"})),i("default")}catch{ht(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(I,{icon:"x",alt:r({id:"yz7wBu"})})}),o("header",{children:o("h2",{children:o(x,{id:"UWSCwN"})})}),o("main",{children:[!!e&&o("div",{class:"post-preview",children:o(Ra,{status:e,size:"s",readOnly:!0})}),o("form",{onSubmit:h,children:[o("select",{value:c,name:"quoteApprovalPolicy",disabled:a==="loading",children:[o("option",{value:"public",children:o(x,{id:"hDWXuG"})}),o("option",{value:"followers",children:o(x,{id:"9Ko+Xp"})}),o("option",{value:"nobody",children:o(x,{id:"+bAQ3S"})})]})," ",o("button",{disabled:a==="loading",children:o(x,{id:"tfDRzk"})})]})]})]})}const Ss=20;function uv({statusId:t,instance:e,onClose:n=()=>{}}){const{_:r}=Kt(),{masto:s}=Ve(),[a,i]=H([]),[c,l]=H("default"),[h,d]=H(!1),u=N(),f=N(!0),p=(m=!1)=>{(m||!u.current)&&(u.current=s.v1.statuses.$select(t).quotes.list({limit:Ss}).values()),l("loading"),(async()=>{try{let{done:g,value:v}=await u.current.next();Array.isArray(v)?(i(m?v:b=>[...b,...v]),v.length<Ss&&(g=!0),d(!g)):d(!1),l("default")}catch{l("error")}})()};return q(()=>{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(I,{icon:"x",alt:r({id:"yz7wBu"})})}),o("header",{children:o("h2",{children:o(x,{id:"eWLklq"})})}),o("main",{children:a.length>0?o(F,{children:[o("ul",{class:"quoted-posts-list",children:a.map(m=>o("li",{class:"quoted-post-item",children:o(Ze,{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(Ra,{status:m,instance:e,size:"s",readOnly:!0,showCommentCount:!0})})},m.id))}),c==="default"?h?o("button",{type:"button",class:"plain block",onClick:()=>p(),children:o(x,{id:"uXRAkV"})}):o("p",{class:"ui-state insignificant",children:o(x,{id:"2EYeAZ"})}):c==="loading"&&o("p",{class:"ui-state",children:o(bo,{abrupt:!0})})]}):c==="loading"?o("p",{class:"ui-state",children:o(bo,{abrupt:!0})}):c==="error"?o("p",{class:"ui-state",children:o(x,{id:"3Uoj83"})}):o("p",{class:"ui-state insignificant",children:o(x,{id:"/Xg6f6"})})})]})}const He=Re((t,e)=>{let{checked:n,count:r,extraCount:s,class:a,title:i,alt:c,size:l,icon:h,iconSize:d="l",onClick:u,...f}=t;typeof i=="string"&&(i=[i,i]),typeof c=="string"&&(c=[c,c]);const[p,m]=H(i[0]||""),[g,v]=H(c[0]||"");return q(()=>{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 ${l?"small":""} ${a} ${n?"checked":""}`,onClick:b=>{u&&(b.preventDefault(),b.stopPropagation(),u(b))},...f,children:[o(I,{icon:h,size:d,alt:g}),(!!r||!!s)&&o(F,{children:[" ",!!r&&o("small",{title:r,children:ae(r)}),!!r&&!!s&&o("small",{children:"+"}),!!s&&o("small",{title:s,children:ae(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 dv({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(I,{icon:"link",size:"s"})," ",o("small",{children:o(x,{id:"4LHHK6",components:{0:o(Pe,{account:r,showAvatar:!0})}})})]})]})}function Cs(t){return["x.com","twitter.com","threads.net","bsky.app","bsky.brid.gy","fed.brid.gy"].includes(t)}function hv({card:t,selfReferential:e,selfAuthor:n,instance:r}){const s=Ge(z),{blurhash:a,title:i,description:c,html:l,providerName:h,providerUrl:d,authorName:u,authorUrl:f,width:p,height:m,image:g,imageDescription:v,url:b,type:k,embedUrl:S,language:C,publishedAt:_,authors:T}=t,E=i||h||u,M=p/m>=1.2?"large":"",[P,L]=H(null);if(q(()=>{if(!E||!g||e||!Ic(b))return;const B=new AbortController;return Lc(r,b,B.signal).then(Y=>{if(!Y)return;const{id:et,url:ct}=Y;L("#"+ct)}),()=>{B.abort()}},[E,g,e]),s.unfurledLinks[b])return null;const A=/<iframe/i.test(l),$=yt(B=>{A&&(B.preventDefault(),z.showEmbedModal={html:l,url:b||S,width:p,height:m})},[A]),[R,W]=H(null);if(E&&(g||k==="photo"&&a)){const B=mr(b),Y=g&&a?ni(a):null;if(!g){const Z=Ag(a,44,44),st=window.OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas");st.width=44,st.height=44;const J=st.getContext("2d");J.imageSmoothingEnabled=!1;const Tt=J.createImageData(44,44);Tt.data.set(Z),J.putImageData(Tt,0,0);try{window.OffscreenCanvas?st.convertToBlob().then(Lt=>{W(URL.createObjectURL(Lt))}):W(st.toDataURL())}catch{}}const et=Cs(B);return o(dv,{hidden:!!n,authors:T,children:o("a",{href:P||b,target:P?null:"_blank",rel:"nofollow noopener",class:`card link ${et?"card-post":""} ${R?"":M} ${A?"can-show-embed":""}`,style:{"--average-color":Y&&`rgb(${Y.join(",")})`},onClick:$,children:[o("div",{class:"card-image",children:o("img",{src:g||R,width:p,height:m,loading:"lazy",decoding:"async",fetchPriority:"low",alt:v||"",onError:ct=>{try{ct.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:B})," ",!!_&&o(F,{children:"· "}),!!_&&o(F,{children:o(be,{datetime:_,format:"micro"})})]}),o("p",{class:"title",dir:"auto",title:i,children:i}),o("p",{class:"meta",dir:"auto",title:c,children:c||!!_&&o(be,{datetime:_,format:"micro"})})]})]})})}else{if(k==="photo")return o("a",{href:b,target:"_blank",rel:"nofollow noopener",class:"card photo",onClick:$,children:o("img",{src:S,width:p,height:m,alt:i||c,loading:"lazy",style:{height:"auto",aspectRatio:`${p}/${m}`}})});if(k==="video"&&/youtube/i.test(h)){const B=b.match(/watch\?v=([^&]+)/)?.[1];if(B)return o("a",{class:"card video",onClick:$,children:o("lite-youtube",{videoid:B,nocookie:!0,autoPause:!0})})}if(E&&!g){const B=mr(b),Y=Cs(B);return o("a",{href:P||b,target:P?null:"_blank",rel:"nofollow noopener",class:`card link ${Y?"card-post":""} no-image`,lang:C,dir:"auto",onClick:$,children:o("div",{class:"meta-container",children:[o("p",{class:"meta domain",children:[o("span",{class:"domain",children:[o(I,{icon:"link",size:"s"})," ",o("span",{children:B})]})," ",!!_&&o(F,{children:"· "}),!!_&&o(F,{children:o(be,{datetime:_,format:"micro"})})]}),o("p",{class:"title",title:i,children:i}),o("p",{class:"meta",title:c||h||u,children:c||h||u})]})})}}}function fv({sKey:t}){const n=Ge(z).statusReply[t];if(!n)return null;const{id:r,instance:s}=n,a=zs(r,s);if(!a)return null;const{account:{id:i},sensitive:c,spoilerText:l,account:{avatar:h,avatarStatic:d,bot:u}={},visibility:f,content:p,language:m,filtered:g}=a;if(c||l||!p)return null;const v=Qt(r,s),b=ti(a),k=Ur(),S=k&&k===i,C=It(ei);let _=!S&&Mo(g,C);if(_?.action==="blur"&&(_=null),_?.action==="hide")return null;const T=_?.titlesStr||"";return o("article",{class:`status compact-reply shazam ${f==="direct"?"visibility-direct":""}`,tabindex:"-1","data-state-post-id":v,children:[o(we,{url:d||h,squircle:u}),o("div",{class:"content-compact",title:b,lang:m,dir:"auto",children:_?o("b",{class:"status-filtered-badge badge-meta",title:T,children:[o("span",{children:o(x,{id:"03Qqf9"})}),o("span",{children:T})]}):o("span",{children:b})})]})}const pv=ce(0);function Es({alt:t}){return o(I,{icon:"thread",size:"s",alt:t})}function As({index:t,showIcon:e,showText:n}){const{_:r}=Kt(),s=It(pv),a=t>0,i=s>0;return o("div",{class:"status-thread-badge",children:[e&&o(F,{children:[o(Es,{alt:n?"":r({id:"e66y2Z"})})," "]}),n?a?i?o(x,{id:"A05Pj6",values:{index:t,total:s}}):o(x,{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(Es,{alt:r({id:"e66y2Z"})})]})}const mv={BASE_URL:"./",DEV:!1,MODE:"production",PHANPY_CLIENT_NAME:"Phanpy",PHANPY_LINGVA_INSTANCES:"lingva.phanpy.social lingva.lunar.icu lingva.garudalinux.org translate.plausibility.cloud",PHANPY_PRIVACY_POLICY_URL:"https://github.com/cheeaun/phanpy/blob/main/PRIVACY.MD",PHANPY_TRANSLANG_INSTANCES:"translang.phanpy.social",PHANPY_WEBSITE:"https://phanpy.social",PROD:!0,SSR:!1,VITE_APP_ENV:"production"},gv=280,vv=140,yv=new Kr({concurrency:1,interval:1e3,intervalCap:1});function bv(t,e,n){return yv.add(()=>e.v1.accounts.$select(t).fetch(),{signal:n})}const wv=Eo(bv),_v=window.ontouchstart!==void 0&&/iPad|iPhone|iPod/.test(navigator.userAgent),xs=80;function kv(t){return t?.options?.length?`📊:
${t.options.map(e=>`- ${e.title}${e.votesCount>=0?` (${e.votesCount})`:""}`).join(`
`)}`:""}function hr(t,e){const{maskCustomEmojis:n,maskURLs:r,hideInlineQuote:s,htmlTextOpts:a={}}=e||{},{spoilerText:i,poll:c,emojis:l}=t;let{content:h}=t;if(n&&l?.length){const d=new RegExp(`:(${l.map(u=>u.shortcode).join("|")}):`,"g");h=h.replace(d,"⬚")}return(i?`${i}
`:"")+Jr(h,{...a,preProcess:(r||s)&&(d=>{if(r)for(const u of d.querySelectorAll("a")){const f=u.innerText.trim();/^https?:\/\//i.test(f)&&u.replaceWith("«🔗»")}if(s){const u=d.querySelector(".quote-inline");u&&u.remove()}})})+kv(c)}function Tv(t=[],e=document){for(const n of t)try{return e.querySelectorAll(n)}catch{}return[]}const Da=Wt((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?Jr(t,{preProcess:n=>{for(const r of Tv([".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 Sv(t,e){return!!Da(t,e)}const Cv={s:"small",m:"medium",l:"large"},Ev=Eo(async t=>{if(t=t?.trim(),t?.length>500)return null;if(We){const s=await We.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 Bs(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}),an={id:"8fZueG"},Dr={},Rr=(t,e)=>`${t}:${e.join("|")}`,Av=(t,e=[])=>{if(!t)return!1;const n=Rr(t,e),r=pa(!0),s=t!==r&&!yo([t],[r])&&!e.find(a=>t===a||yo([t],[a]));return s&&(Dr[n]=!0),s},Ln={quotePrivate:{id:"0NXzv9"},requestQuote:{id:"awRXyV"},quoteManualReview:{id:"re2mMZ"},quoteFollowersOnly:{id:"NPXprJ"},quoteCannot:{id:"dmiEVR"}},xv={public:{id:"hDWXuG"},followers:{id:"9Ko+Xp"},nobody:{id:"+bAQ3S"}},Mv=/[???︖❓❔⁇⁈⁉¿‽؟]/,{DEV:uo}=mv;function dn({statusID:t,status:e,instance:n,size:r="m",contentTextWeight:s,readOnly:a,enableCommentHint:i,withinContext:c,skeleton:l,enableTranslate:h,forceTranslate:d,previewMode:u,allowFilters:f,onMediaClick:p,quoted:m,quoteDomain:g,onStatusLinkClick:v=()=>{},showFollowedTags:b,allowContextMenu:k,showActionsBar:S,showReplyParent:C,mediaFirst:_,showCommentCount:T}){const{_:E,_:w,i18n:M}=Kt(),P=la(M.locale);if(l)return o("div",{class:`status skeleton ${_?"status-media-first small":""}`,children:[!_&&o(we,{size:"xxl"}),o("div",{class:"container",children:[o("div",{class:"meta",children:[(r==="s"||_)&&o(we,{size:"m"})," ███ ████████"]}),o("div",{class:"content-container",children:[_&&o("div",{class:"media-first-container"}),o("div",{class:`content ${_?"media-first-content":""}`,children:o("p",{children:"████ ████████"})})]})]})]});const{masto:L,instance:A,authenticated:$}=Ve({instance:n}),{instance:R}=Ve(),W=A===R;let B=Qt(t||e?.id,A);const Y=Ge(z);if(e||(e=Y.statuses[B]||Y.statuses[t],B=Qt(e?.id,A)),!e)return null;const{editHistoryRef:et,editHistoryMode:ct,editedAtIndex:nt}=hg();if(ct&&e?.editedAt&&et.current.length){const y=et.current[nt];y&&(e={...e,...y})}const{account:{acct:Z,avatar:st,avatarStatic:J,id:Tt,url:Lt,displayName:$t,username:dt,emojis:le,bot:ne,group:oe}={},id:K,repliesCount:mt,reblogged:Pt,reblogsCount:At,favourited:Ft,favouritesCount:jt,quotesCount:tt,bookmarked:ot,poll:lt,muted:gt,sensitive:Vt,spoilerText:bt,visibility:O,language:G,editedAt:U,filtered:wt,card:Mt,createdAt:ft,inReplyToId:xt,inReplyToAccountId:Dt,content:vt,mentions:Zt,mediaAttachments:V=[],reblog:_t,quote:Ht,uri:re,url:Jt,emojis:Se,tags:X,pinned:St,quoteApproval:Nt,_deleted:Ot,_pinned:kt,emojiReactions:Oe}=e,[pn,Io]=H(null);q(()=>{if(!vt||G||pn)return;let y;return y=setTimeout(async()=>{let D=await Ev(Da(vt,Se));Io(D)},1e3),()=>clearTimeout(y)},[vt,G]);const pt=G||pn,mn=!!V?.length;_&&mn&&(r="s");const me=Ur(),ie=me&&me===Tt,Lo=It(ei),te=!ie&&(!a&&!u||f)&&Mo(wt,Lo);if(te?.action==="hide")return null;const se=y=>{y.shiftKey};if((f||r!=="l")&&te&&te.action!=="blur")return o(Nv,{status:e,filterInfo:te,instance:A,containerProps:{onMouseEnter:se},showFollowedTags:!0,quoted:m});const Gt=new Date(ft),Xe=new Date(U);let Ce=Zt?.find(y=>y.id===Dt);!Ce&&Dt===K&&(Ce={url:Lt,username:dt,displayName:$t});const[gn,ri]=H(Ce);q(()=>{if(!c&&!gn&&Dt){const y=z.accounts[Dt];if(y){ri(y);return}const D=new AbortController;return wv(Dt,L,D.signal).then(Q=>{ri(Q),z.accounts[Q.id]=Q}).catch(Q=>{}),()=>{D.abort()}}},[c,gn,Dt]);const ii=Dt&&Dt===me||Zt?.find(y=>y.id===me),si=Dc(),Ee=!!si["reading:expand:spoilers"],ai=si["reading:expand:media"]?.toLowerCase()||"default",ue=u||Ee||!!Y.spoilers[K],vn=u||ai==="show_all"&&te?.action!=="blur"||!!Y.spoilersMedia[K];if(_t)return oe?o("div",{"data-state-post-id":B,class:"status-group",onMouseEnter:se,children:[o("div",{class:"status-pre-meta",children:[o(I,{icon:"group",size:"l",alt:w({id:"L8fEEm"})})," ",o(Pe,{account:e.account,instance:A,showAvatar:!0})]}),o(dn,{status:t?null:_t,statusID:t?_t.id:null,instance:A,size:r,contentTextWeight:s,readOnly:a,mediaFirst:_})]}):o("div",{"data-state-post-id":B,class:"status-reblog",onMouseEnter:se,children:[o("div",{class:"status-pre-meta",children:[o(I,{icon:"rocket",size:"l"})," ",o(x,{id:"DlhB4J",components:{0:o(Pe,{account:e.account,instance:A,showAvatar:!0}),1:o("span",{})}})]}),o(dn,{status:t?null:_t,statusID:t?_t.id:null,instance:A,size:r,contentTextWeight:s,readOnly:a,enableCommentHint:!0,mediaFirst:_})]});const qa=yt(({children:y})=>o("div",{"data-state-post-id":B,class:"status-followed-tags",onMouseEnter:se,children:[o("div",{class:"status-pre-meta",children:[o(I,{icon:"hashtag",size:"l"})," ",Y.statusFollowedTags[B].slice(0,3).map(D=>o(Ze,{to:A?`/${A}/t/${D}`:`/t/${D}`,class:"status-followed-tag-item",children:D},D))]}),y]}),[B,A,Y.statusFollowedTags[B]]),Wa=b&&Y.statusFollowedTags[B]?.length?qa:F,rt=r==="l",Ae=it(()=>mg(vt),[vt]),[Po,Va]=H(d),{contentTranslation:Do,contentTranslationAutoInline:ci}=Y.settings;Do||(h=!1);const li=it(()=>!Do||!ci||a||c&&!rt||u||bt||Vt||lt||Mt?!1:Ae>0&&Ae<=vv,[Do,ci,a,c,rt,u,bt,Vt,lt,Mt,V,Ae]),[Ro,Un]=H(!1),[Za,$o]=H(!1),[Ga,No]=H(!1),[Ya,Oo]=H(!1),ui=Nn(),Fo=Nn(),Xa=Nn(),Qe=N(null),[Qa,Ja]=Hr(y=>y+1,0),yn=w({id:"7jyUKe"}),di=yt(()=>Math.max(Math.round(((bt?.length||0)+Ae)/140)||1,1),[bt,Ae]),hi=ft&&Hn(Gt),fi=U&&Hn(Xe),Je=["public","unlisted"].includes(O);let bn=$&&Je;O==="private"&&ie&&(bn=!0);let tn=!1,wn=w({id:"ZhhOwV"}),xe;if(Yt()){const y=ie,D=y&&O==="private",Q=Nt?.currentUser==="automatic"&&(Je||D),at=Nt?.currentUser==="manual"&&(Je||D),ee=Nt?.automatic?.[0]==="followers"||Nt?.manual?.[0]==="followers";!Je&&!y?(tn=!0,xe=E(Ln.quotePrivate)):Q||(at?(wn=E(Ln.requestQuote),xe=E(Ln.quoteManualReview)):(tn=!0,xe=E(ee?Ln.quoteFollowersOnly:Ln.quoteCannot)))}const qn=Yt()&&!tn,pi=Xp(Nt),Fe=(y,D="all")=>{if(!W||!$)return alert(yn);(y?.shiftKey||y?.syntheticEvent?.shiftKey)&&jl({replyToStatus:e,replyMode:D})||Ie({replyToStatus:e,replyMode:D})},tc=it(()=>V.some(y=>!y.description?.trim?.()),[V]),mi=it(()=>Math.floor((new Date-Gt)/(1e3*60*60*24*30)),[Gt]),Bo=async()=>{if(!W||!$)return alert(yn),!1;try{if(z.statuses[B]={...e,reblogged:!Pt,reblogsCount:At+(Pt?-1:1)},Pt){const y=await L.v1.statuses.$select(K).unreblog();Me(y,A)}else{const y=await L.v1.statuses.$select(K).reblog();Me(y,A)}return!0}catch{return z.statuses[B]=e,!1}},gi=async()=>{if(!W||!$)return alert(yn),!1;try{if(z.statuses[B]={...e,favourited:!Ft,favouritesCount:jt+(Ft?-1:1)},Ft){const y=await L.v1.statuses.$select(K).unfavourite();Me(y,A)}else{const y=await L.v1.statuses.$select(K).favourite();Me(y,A)}return!0}catch{return z.statuses[B]=e,!1}},zo=async()=>{try{const y=await gi();!rt&&y&&ht(w(Ft?{id:"sZvpIt",values:{0:dt||Z}}:{id:"yUngDO",values:{0:dt||Z}}))}catch{}},vi=async()=>{if(oo("@mastodon/post-bookmark")){if(!W||!$)return alert(yn),!1;try{if(z.statuses[B]={...e,bookmarked:!ot},ot){const y=await L.v1.statuses.$select(K).unbookmark();Me(y,A)}else{const y=await L.v1.statuses.$select(K).bookmark();Me(y,A)}return!0}catch{return z.statuses[B]=e,!1}}},yi=async()=>{try{const y=await vi();!rt&&y&&ht(w(ot?{id:"lWQguj",values:{0:dt||Z}}:{id:"Fb2K8h",values:{0:dt||Z}}))}catch{}},Ho=Y.settings.contentTranslationHideLanguages||[],[Be,bi]=H(Dr[Rr(pt,Ho)]);q(()=>{if(!pt||Be)return;if(!Be&&Dr[Rr(pt,Ho)]){bi(!0);return}let y=setTimeout(()=>{const D=Av(pt,Ho);D&&bi(D)},100);return()=>clearTimeout(y)},[pt,Be]);const wi=N(),_i=N();async function ec(y){y&&(wi.current=L.v1.statuses.$select(t).rebloggedBy.list({limit:xs}).values(),_i.current=L.v1.statuses.$select(t).favouritedBy.list({limit:xs}).values());const[{value:D},{value:Q}]=await Promise.allSettled([wi.current.next(),_i.current.next()]);if(D.value?.length||Q.value?.length){const at=[];return D.value?.length&&at.push(...D.value.map(ee=>(ee._types=["reblog"],ee))),Q.value?.length&&at.push(...Q.value.map(ee=>(ee._types=["favourite"],ee))),{value:at,done:D.done&&Q.done}}return{value:[],done:!0}}const nc=Ht?.state==="accepted"&&Ht?.quotedStatus?.account?.id===me,oc=N(),rc=["public","unlisted","private"].includes(O),ki=tc&&!Pt?o("div",{class:"footer",children:[o(I,{icon:"alert"}),o(x,{id:"MB+wJL"})]}):mi>=3&&o("div",{class:"footer",children:[o(I,{icon:"info"}),o("span",{children:o(x,{id:"dBme/4",values:{0:P.format(-mi,"month")},components:{0:o("strong",{})}})})]}),Ko=it(()=>Zt?.length?[...new Set([Tt,...Zt.map(D=>D.id)])].filter(D=>D!==me).length:!1,[Tt,Zt?.length,me]),Wn=Ko>3,Ti=()=>o(F,{children:[o(I,{icon:"comment"}),o("span",{children:mt>0?ae(mt):w(Wn?{id:"MmYpxT"}:{id:"ImOQa9"})})]}),Si=o(F,{children:[o(ut,{onClick:y=>Fe(y,"all"),children:o("small",{children:[o(x,{id:"5ykMJ1"}),o("br",{}),o("span",{class:"more-insignificant",children:o(x,{id:"rtCQ2N",values:{mentionsCount:Ko}})})]})}),o(ut,{onClick:y=>Fe(y,"author-first"),children:o("small",{children:[o(x,{id:"5ykMJ1"}),o("br",{}),o("span",{class:"more-insignificant",children:o(x,{id:"4UOm4A",values:{0:Ko-1,1:dt||Z},components:{0:o("span",{class:"bidi-isolate"})}})})]})}),o(ut,{onClick:y=>Fe(y,"author-only"),children:o("small",{children:[o(x,{id:"ImOQa9"}),o("br",{}),o("span",{class:"more-insignificant",children:o(x,{id:"zcKxuj",values:{0:dt||Z},components:{0:o("span",{class:"bidi-isolate"})}})})]})})]}),Ci=o(F,{children:[!rt&&W&&o(F,{children:o("div",{class:"menu-control-group-horizontal status-menu",children:[Wn?o(ua,{openTrigger:"clickOnly",direction:"bottom",overflow:"auto",gap:-8,shift:8,menuClassName:"menu-emphasized",label:o(Ti,{}),children:Si}):o(ut,{onClick:Fe,children:o(Ti,{})}),o(to,{subMenu:!0,confirmLabel:o(F,{children:[o(I,{icon:"rocket"}),o("span",{children:w(Pt?{id:"QzzGsY"}:{id:"kulphB"})})]}),className:`menu-reblog ${Pt?"checked":""}`,menuExtras:o(F,{children:[Yt()&&o(ut,{disabled:tn,onClick:()=>{Ie({quoteStatus:e})},children:[o(I,{icon:"quote"}),xe?o("small",{children:[wn,o("br",{}),xe]}):o("span",{children:wn})]}),(uo||!Yt())&&o(ut,{onClick:()=>{Ie({draftStatus:{status:`
${Jt}`}})},children:[o(I,{icon:"quote"}),o("span",{children:o(x,{id:"ygxzZR"})}),Yt()&&uo&&o("small",{class:"tag collapsed",children:"DEV"})]})]}),menuFooter:ki,disabled:!bn,onClick:async()=>{try{const y=await Bo();!rt&&y&&ht(w(Pt?{id:"bpDheH",values:{0:dt||Z}}:{id:"dbNZdP",values:{0:dt||Z}}))}catch{}},children:[qn?o("span",{class:"icon",children:[o(I,{icon:"rocket"}),o(I,{icon:"quote"})]}):o(I,{icon:"rocket"}),o("span",{children:At>0||tt>0?`${At>0?ae(At):""}${At>0&&tt>0?"+":""}${tt>0?ae(tt):""}`:w(Pt?{id:"QzzGsY"}:qn?{id:"n1PNla"}:{id:"PiVIlD"})})]}),o(ut,{onClick:zo,className:`menu-favourite ${Ft?"checked":""}`,children:[o(I,{icon:"heart"}),o("span",{children:jt>0?ae(jt):w(Ft?{id:"OcUmcH"}:{id:"W9FRBT"})})]}),oo("@mastodon/post-bookmark")&&o(ut,{onClick:yi,className:`menu-bookmark ${ot?"checked":""}`,children:[o(I,{icon:"bookmark"}),o("span",{children:w(ot?{id:"q8EQYI"}:{id:"PZlHt8"})})]})]})}),!rt&&W&&(rt||S)&&o(Tn,{}),(rt||S)&&o(F,{children:[o(ut,{onClick:()=>{z.showGenericAccounts={heading:w({id:"+XOeb+"}),fetchAccounts:ec,instance:A,showReactions:!0,postID:B}},children:[o(I,{icon:"react"}),o("span",{children:o(x,{id:"+XOeb+"})})]}),Yt()&&o(ut,{onClick:()=>{Oo(!0)},children:[o(I,{icon:"quote"}),o("span",{children:o(x,{id:"5t4KSs"})})]})]}),(rt||!_&&(h||!pt||Be))&&o(Tn,{}),!_&&(h||!pt||Be)&&o("div",{class:Lr?"menu-horizontal":"",children:[h?o(ut,{disabled:Po,onClick:()=>Va(!0),children:[o(I,{icon:"translate"}),o("span",{children:o(x,{id:"pi8x/S"})})]}):o(Ui,{to:`${A?`/${A}`:""}/s/${K}?translate=1`,children:[o(I,{icon:"translate"}),o("span",{children:o(x,{id:"pi8x/S"})})]}),Lr&&o(ut,{onClick:()=>{try{const y=hr(e,{hideInlineQuote:Yt()});y&&gg(y,pt)}catch{}},children:[o(I,{icon:"speak"}),o("span",{children:o(x,{id:"yIBLq8"})})]})]}),rt&&o(ut,{onClick:()=>{try{const y=hr(e,{hideInlineQuote:Yt(),htmlTextOpts:{truncateLinks:!1}});navigator.clipboard.writeText(y),ht(w({id:"iSRQvy"}))}catch{ht(w({id:"N1MyiN"}))}},children:[o(I,{icon:"clipboard"}),o("span",{children:o(x,{id:"iQgJaz"})})]}),(!rt&&W||h||!pt||Be)&&o(Tn,{}),!rt&&o(F,{children:o(Ui,{to:A?`/${A}/s/${K}`:`/s/${K}`,onClick:y=>{v(y,e)},children:[o(I,{icon:"arrows-right"}),o("small",{children:[o(x,{id:"8MkSAW",values:{0:dt||Z},components:{0:o("span",{class:"bidi-isolate"})}}),o("br",{}),o("span",{class:"more-insignificant",children:[E(qe[O])," • ",hi]})]})]})}),!!U&&o(F,{children:o(ut,{onClick:()=>{Un(K)},children:[o(I,{icon:"history"}),o("small",{children:[o(x,{id:"QL+7Jw"}),o("br",{}),o("span",{class:"more-insignificant",children:o(x,{id:"DuJJm9",values:{editedDateText:fi}})})]})]})}),o(ut,{href:Jt,target:"_blank",children:[o(I,{icon:"external"}),o("small",{class:"menu-double-lines should-cloak",style:{maxWidth:"16em"},children:Iv(Jt)})]}),o("div",{class:"menu-horizontal",children:[o(ut,{onClick:()=>{try{navigator.clipboard.writeText(Jt),ht(w({id:"edWbV6"}))}catch{ht(w({id:"W1ewR0"}))}},children:[o(I,{icon:"link"}),o("span",{children:o(x,{id:"he3ygx"})})]}),Je&&navigator?.share&&navigator?.canShare?.({url:Jt})&&o(ut,{onClick:()=>{try{navigator.share({url:Jt})}catch{alert(w({id:"TtG3Uh"}))}},children:[o(I,{icon:"share"}),o("span",{children:o(x,{id:"LFKLqp"})})]})]}),Je&&rt&&o(ut,{onClick:()=>{$o(!0)},children:[o(I,{icon:"code"}),o("span",{children:o(x,{id:"jdVwsS"})})]}),$&&o(F,{children:[(ie||ii)&&o(Tn,{}),(ie||ii)&&o(ut,{onClick:async()=>{try{const y=await L.v1.statuses.$select(K)[gt?"unmute":"mute"]();Me(y,A),ht(w(gt?{id:"Pm+5jw"}:{id:"ywB7JM"}))}catch{ht(w(gt?{id:"c6jxNY"}:{id:"8SN9kN"}))}},children:gt?o(F,{children:[o(I,{icon:"unmute"}),o("span",{children:o(x,{id:"i51zUR"})})]}):o(F,{children:[o(I,{icon:"mute"}),o("span",{children:o(x,{id:"OiUYO5"})})]})}),ie&&rc&&o(ut,{onClick:async()=>{try{const y=await L.v1.statuses.$select(K)[St?"unpin":"pin"]();Me(y,A),ht(w(St?{id:"Yx809+"}:{id:"S6P6E+"}))}catch{ht(w(St?{id:"A6cs15"}:{id:"vgUfWO"}))}},children:St?o(F,{children:[o(I,{icon:"unpin"}),o("span",{children:o(x,{id:"XQMQZw"})})]}):o(F,{children:[o(I,{icon:"pin"}),o("span",{children:o(x,{id:"lfHLsx"})})]})}),ie&&o(F,{children:[Yt()&&!["private","direct"].includes(O)&&o(ut,{onClick:()=>No(!0),children:[o(I,{icon:"quote2"}),o("small",{children:[o(x,{id:"eKInue"}),o("br",{}),o("span",{class:"more-insignificant",children:E(xv[pi])})]})]}),o("div",{class:"menu-horizontal",children:[oo("@mastodon/post-edit")&&o(ut,{onClick:()=>{Ie({editStatus:e,quoteStatus:e.quote?.quotedStatus})},children:[o(I,{icon:"pencil"}),o("span",{children:o(x,{id:"ePK91l"})})]}),rt&&o(to,{subMenu:!0,confirmLabel:o(F,{children:[o(I,{icon:"trash"}),o("span",{children:o(x,{id:"FbPNuJ"})})]}),itemProps:{className:"danger"},menuItemClassName:"danger",onClick:()=>{(async()=>{try{await L.v1.statuses.$select(K).remove();const y=zs(K,A);y._deleted=!0,ht(w({id:"KiyvHV"}))}catch{ht(w({id:"Yb6p2q"}))}})()},children:[o(I,{icon:"trash"}),o("span",{children:o(x,{id:"Jb6/SB"})})]})]})]}),!ie&&rt&&o(F,{children:[o(Tn,{}),nc&&o(to,{subMenu:!0,confirmLabel:o(F,{children:[o(I,{icon:"quote"}),o("span",{children:o(x,{id:"FMGfUd",values:{0:dt||Z},components:{0:o("span",{class:"bidi-isolate"})}})})]}),itemProps:{className:"danger"},menuItemClassName:"danger",onClick:()=>{(async()=>{try{const y=Ht.quotedStatus.id;await L.v1.statuses.$select(y).quotes.$select(K).revoke.create(),ht(w({id:"YgM2yU"})),z.reloadStatusPage++}catch{ht(w({id:"VzLGaA"}))}})()},children:[o(I,{icon:"quote"}),o(x,{id:"ukL58r"})]}),o(ut,{className:"danger",onClick:()=>{z.showReportModal={account:e.account,post:e}},children:[o(I,{icon:"flag"}),o("span",{children:o(x,{id:"7PQAMY"})})]})]})]})]}),Ei=N(),[Vn,_n]=H(!1),[Ai,Zn]=H({}),Gn=k||!rt&&!u&&!Ot&&!m,ic=ra(_v&&Gn?y=>{if(y.pointerType==="mouse")return;const{clientX:D,clientY:Q}=y.touches?.[0]||y,at=y.target.closest("a");at&&Qe.current.contains(at)&&!at.getAttribute("href").startsWith("#")||(y.preventDefault(),Zn({anchorPoint:{x:D,y:Q},direction:"right"}),_n(!0))}:null,{threshold:600,captureEvent:!0,detect:"touch",cancelOnMovement:2}),kn=!a&&!u&&!m,sc=Ke("r, shift+r",(y,D)=>{y.shiftKey===D.shift&&Fe(y)},{enabled:kn,useKey:!0,ignoreEventWhen:y=>y.metaKey||y.ctrlKey||y.altKey}),ac=Ke("f, l",zo,{enabled:kn,ignoreEventWhen:y=>y.metaKey||y.ctrlKey||y.altKey||y.shiftKey,useKey:!0}),cc=Ke("d",yi,{enabled:kn,useKey:!0,ignoreEventWhen:y=>y.metaKey||y.ctrlKey||y.altKey||y.shiftKey}),lc=Ke("shift+b",y=>{y.shiftKey&&(async()=>{try{const D=await Bo();!rt&&D&&ht(w(Pt?{id:"bpDheH",values:{0:dt||Z}}:{id:"dbNZdP",values:{0:dt||Z}}))}catch{}})()},{enabled:kn&&bn,useKey:!0,ignoreEventWhen:y=>y.metaKey||y.ctrlKey||y.altKey}),uc=Ke("x",y=>{const D=document.activeElement.closest(".status-link, .status-focus");if(D){const Q=D.querySelector(".spoiler-button:not(.spoiling)");if(Q)y.stopPropagation(),Q.click();else{const at=D.querySelector(".spoiler-media-button:not(.spoiling)");at&&(y.stopPropagation(),at.click())}}},{useKey:!0,ignoreEventWhen:y=>y.metaKey||y.ctrlKey||y.altKey||y.shiftKey}),dc=Ke("q",y=>{if(!W||!$)return alert(yn);Yt()?tn?ht(xe):Ie({quoteStatus:e}):Ie({draftStatus:{status:`
${Jt}`}})},{enabled:kn,useKey:!0,ignoreEventWhen:y=>y.metaKey||y.ctrlKey||y.altKey||y.shiftKey}),Yn=V.slice(0,rt?void 0:4),Xn=V.length>1&&Yn.some(y=>!!y.description&&!La(y.description)),hc=it(()=>{if(!Xn)return null;const y=[];return Yn.forEach((D,Q)=>{if(!D.description)return;const at=y.findIndex(ee=>ee.media.description===D.description);at===-1?y.push({media:D,indices:[Q]}):y[at].indices.push(Q)}),y.map(({media:D,indices:Q})=>o("div",{"data-caption-index":Q.map(at=>at+1).join(" "),onClick:at=>{at.preventDefault(),at.stopPropagation(),z.showMediaAlt={alt:D.description,lang:pt}},title:D.description,children:[o("sup",{children:Q.map(at=>at+1).join(" ")})," ",D.description]},D.id))},[Xn,Yn,pt]),en=it(()=>!!xt&&Dt===e.account?.id||!!Y.statusThreadNumber[B],[xt,Dt,e.account?.id,Y.statusThreadNumber[B]]),fc=it(()=>i&&!en&&!c&&!xt&&O==="public"&&mt>0,[i,en,c,xt,mt,O]),xi=it(()=>{if(T&&mt>0)return!0;if(Mt||lt||Vt||bt||V?.length||en||c||xt||mt<=0||!Mv.test(vt))return!1;if(Ae>0&&Ae<=gv)return!0},[T,Mt,lt,Vt,bt,V,_t,en,c,xt,mt,vt,Ae]);return o(Wa,{children:[C&&!!(xt&&Dt)&&o(fv,{sKey:B}),o("article",{"data-state-post-id":B,ref:y=>{Qe.current=y;const D=y?.closest?.(".timeline-item, .timeline-item-alt, .status-link, .status-focus")||y;sc.current=D,ac.current=D,cc.current=D,lc.current=D,uc.current=D,dc.current=D},tabindex:"-1",class:`status ${!c&&xt&&gn?"status-reply-to":""} visibility-${O} ${kt?"status-pinned":""} ${Cv[r]} ${Ot?"status-deleted":""} ${m?"status-card":""} ${Vn?"status-menu-open":""} ${_&&mn?"status-media-first":""}`,onMouseEnter:se,onContextMenu:y=>{if(!Gn||y.metaKey)return;const D=y.target.closest("a");if(D&&Qe.current.contains(D)&&!D.getAttribute("href").startsWith("#"))return;const Q=window.getSelection?.();if(Q.toString().length>0){const{anchorNode:at}=Q;if(Qe.current?.contains(at))return}y.preventDefault(),Zn({anchorPoint:{x:y.clientX,y:y.clientY},direction:"right"}),_n(!0)},...Gn?ic():{},children:[Gn&&o(Ys,{ref:Ei,state:Vn?"open":void 0,...Ai,onClose:y=>{_n(!1),y?.reason==="click"&&Qe.current?.closest("[tabindex]")?.focus?.()},portal:{target:document.body},containerProps:{style:{zIndex:1001},onClick:()=>{Ei.current?.closeMenu?.()}},overflow:"auto",boundingBoxPadding:ca(),unmountOnClose:!0,children:Ci}),S&&r!=="l"&&!u&&!a&&!Ot&&!m&&o("div",{class:`status-actions ${Vn==="actions-bar"?"open":""}`,ref:oc,children:[o(He,{size:"s",title:w({id:"ImOQa9"}),alt:w({id:"ImOQa9"}),class:"reply-button",icon:"comment",iconSize:"m",onClick:y=>Fe(y,Wn?"author-first":"all")}),o(He,{size:"s",checked:Ft,title:[w({id:"W9FRBT"}),w({id:"OcUmcH"})],alt:[w({id:"W9FRBT"}),w({id:"8ab1sR"})],class:"favourite-button",icon:"heart",iconSize:"m",count:jt,onClick:zo}),o("button",{type:"button",title:w({id:"2FYpfJ"}),class:"plain more-button",onClick:y=>{y.preventDefault(),y.stopPropagation(),Zn({anchorRef:{current:y.currentTarget},align:"start",direction:"left",gap:0,shift:-8}),_n("actions-bar")},children:o(I,{icon:"more2",size:"m",alt:w({id:"2FYpfJ"})})})]}),r!=="l"&&o("div",{class:"status-badge",children:[Pt&&o(I,{class:"reblog",icon:"rocket",size:"s",alt:w({id:"b7T5Zj"})}),Ft&&o(I,{class:"favourite",icon:"heart",size:"s",alt:w({id:"8ab1sR"})}),ot&&o(I,{class:"bookmark",icon:"bookmark",size:"s",alt:w({id:"1C/9Sa"})}),kt&&o(I,{class:"pin",icon:"pin",size:"s",alt:w({id:"kNiQp6"})})]}),r!=="s"&&o("a",{href:Lt,tabindex:"-1",title:`@${Z}`,onClick:y=>{y.preventDefault(),y.stopPropagation(),z.showAccount={account:e.account,instance:A}},children:o(we,{url:J||st,size:"xxl",squircle:ne})}),o("div",{class:"container",children:[!!g&&o("div",{class:"status-quote-meta",children:o("span",{class:"domain",children:g})}),!!(e.account||ft)&&o("div",{class:"meta",children:[o("span",{class:"meta-name",children:o(Pe,{account:e.account,instance:A,showAvatar:r==="s",showAcct:rt})}),c&&en&&o(As,{showIcon:rt,index:Y.statusThreadNumber[B]})," ",r!=="l"&&(Ot?o("span",{class:"status-deleted-tag",children:o(x,{id:"vGjmyl"})}):Jt&&!u&&!a&&!m?o(Ze,{to:A?`/${A}/s/${K}`:`/s/${K}`,onClick:y=>{y.metaKey||y.ctrlKey||y.shiftKey||y.altKey||y.which===2||(y.preventDefault(),y.stopPropagation(),v?.(y,e),Zn({anchorRef:{current:y.currentTarget},align:"end",direction:"bottom",gap:4}),_n(!0))},class:`time ${Vn&&Ai?.anchorRef?"is-open":""}`,children:[fc&&!xi?o(I,{icon:"comment2",size:"s",alt:Rt._({id:"RXmXDR",values:{repliesCount:mt}})}):O!=="public"&&O!=="direct"&&o(I,{icon:On[O],alt:E(qe[O]),size:"s"})," ",o(be,{datetime:Gt,format:"micro"}),!u&&!a&&o(I,{icon:"more2",class:"more",alt:w({id:"2FYpfJ"})})]}):o("span",{class:"time",children:[O!=="public"&&O!=="direct"&&o(F,{children:[o(I,{icon:On[O],alt:E(qe[O]),size:"s"})," "]}),o(be,{datetime:Gt,format:"micro"})]}))]}),O==="direct"&&o(F,{children:[o("div",{class:"status-direct-badge",children:o(x,{id:"IV4QaU"})})," "]}),!c&&o(F,{children:en?o(As,{showIcon:!0,showText:!0,index:Y.statusThreadNumber[B]}):!!xt&&!!gn&&(!!bt||!Zt.find(y=>y.id===Dt))&&o("div",{class:"status-reply-badge",children:[o(I,{icon:"reply"})," ",o(Pe,{account:gn,instance:A,short:!0})]})}),o("div",{class:`content-container ${bt||Vt||te?.action==="blur"?"has-spoiler":""} ${ue?"show-spoiler":""} ${vn?"show-media":""}`,"data-content-text-weight":s?di():null,style:(rt||s)&&{"--content-text-weight":di()},children:_&&mn?o(F,{children:[(!!bt||!!Vt)&&!Ee&&o(F,{children:[!!bt&&o("span",{class:"spoiler-content media-first-spoiler-content",lang:pt,dir:"auto",ref:ui,"data-read-more":E(an),children:[o(un,{text:bt,emojis:Se})," "]}),o("button",{class:`light spoiler-button media-first-spoiler-button ${ue?"spoiling":""}`,type:"button",onClick:y=>{y.preventDefault(),y.stopPropagation(),ue?(delete z.spoilers[K],Ee||delete z.spoilersMedia[K]):(z.spoilers[K]=!0,Ee||(z.spoilersMedia[K]=!0))},children:[o(I,{icon:ue?"eye-open":"eye-close"})," ",w(ue?{id:"6lGV3K"}:{id:"lqBX03"})]})]}),o(Jg,{mediaAttachments:V,language:pt,postID:K,instance:A}),!!vt&&o("div",{class:"media-first-content content",ref:Fo,children:o(ws,{post:e,instance:A,previewMode:u})})]}):o(F,{children:[!!bt&&o(F,{children:[o("div",{class:"content spoiler-content",lang:pt,dir:"auto",ref:ui,"data-read-more":E(an),children:o("p",{children:o(un,{text:bt,emojis:Se})})}),Ee||u?o("div",{class:"spoiler-divider",children:[o(I,{icon:"eye-open"})," ",o(x,{id:"gnKo7f"})]}):o("button",{class:`light spoiler-button ${ue?"spoiling":""}`,type:"button",onClick:y=>{y.preventDefault(),y.stopPropagation(),ue?(delete z.spoilers[K],Ee||delete z.spoilersMedia[K]):(z.spoilers[K]=!0,Ee||(z.spoilersMedia[K]=!0))},children:[o(I,{icon:ue?"eye-open":"eye-close"})," ",w(ue?{id:"6lGV3K"}:{id:"lqBX03"})]})]}),!!vt&&o("div",{class:"content",ref:Fo,"data-read-more":E(an),inert:bt&&!ue?!0:void 0,children:o(ws,{post:e,instance:A,previewMode:u},Qa)}),!!vt&&o(Sg,{content:vt,contentRef:Fo,onRevert:Ja}),!!lt&&o(ev,{lang:pt,poll:lt,readOnly:a||!W||!$,onUpdate:y=>{z.statuses[B].poll=y},refresh:()=>L.v1.polls.$select(lt.id).fetch().then(y=>{z.statuses[B].poll=y}).catch(y=>{}),votePoll:y=>L.v1.polls.$select(lt.id).votes.create({choices:y}).then(D=>{z.statuses[B].poll=D}).catch(D=>{})}),((h||li)&&Sv(vt,Se)&&Be||Po)&&o(ng,{forceTranslate:Po||li,mini:!rt&&!c,sourceLanguage:pt,autoDetected:pn,text:hr(e,{maskCustomEmojis:!0,maskURLs:!0,hideInlineQuote:!0})}),!u&&(Vt||te?.action==="blur")&&!!V.length&&(ai!=="show_all"||te?.action==="blur")&&o("button",{class:`plain spoiler-media-button ${vn?"spoiling":""}`,type:"button",hidden:!Ee&&!!bt,onClick:y=>{y.preventDefault(),y.stopPropagation(),vn?delete z.spoilersMedia[K]:z.spoilersMedia[K]=!0},children:[o(I,{icon:vn?"eye-open":"eye-close"})," ",o("span",{children:[te?.action==="blur"&&o("small",{children:[o(x,{id:"suKjh3",values:{0:te?.titlesStr}}),o("br",{})]}),w(vn?{id:"6lGV3K"}:{id:"9ZCilh"})]})]}),!!V.length&&(V.length>1&&(rt||c&&r==="m")?o("div",{class:"media-large-container",children:V.map((y,D)=>o("div",{class:"media-container media-eq1",children:o(Pr,{media:y,autoAnimate:!0,showCaption:!0,allowLongerCaption:!vt||rt,lang:pt,to:`/${A}/s/${K}?${c?"media":"media-only"}=${D+1}`,onClick:p?Q=>p(Q,D,y,e):void 0})},y.id))}):o(tv,{lang:pt,enabled:Xn,captionChildren:hc,children:o("div",{ref:Xa,class:`media-container media-eq${V.length} ${V.length>2?"media-gt2":""} ${V.length>4?"media-gt4":""}`,children:Yn.map((y,D)=>o(Pr,{media:y,autoAnimate:rt,showCaption:V.length===1,allowLongerCaption:!vt&&V.length===1,lang:pt,altIndex:Xn&&!!y.description&&D+1,to:`/${A}/s/${K}?${c?"media":"media-only"}=${D+1}`,onClick:p?Q=>{p(Q,D,y,e)}:void 0,checkAspectRatio:V.length===1},y.id))})})),o(Rv,{id:K,instance:A,level:m,collapsed:!rt&&!c}),!!Mt&&/^https/i.test(Mt?.url)&&!Vt&&!bt&&!lt&&!V.length&&!Y.statusQuotes[B]&&o(hv,{card:Mt,selfReferential:Mt?.url===e.url||Mt?.url===e.uri,selfAuthor:Mt?.authors?.some(y=>y.account?.url===Lt),instance:R})]})}),!rt&&xi&&o("div",{class:"content-comment-hint insignificant",children:[o(I,{icon:"comment2",alt:w({id:"N8UzTV"})})," ",mt]}),rt&&o(F,{children:[o("div",{class:"extra-meta",children:Ot?o("span",{class:"status-deleted-tag",children:o(x,{id:"vGjmyl"})}):o(F,{children:[o("span",{children:E(qe[O])})," •"," ",o("a",{href:Jt,target:"_blank",rel:"noopener",children:[Date.now()-Gt.getTime()<864e5&&o(F,{children:[o(be,{datetime:Gt,format:"micro"})," ",""," "]}),!!ft&&o("time",{class:"created",datetime:Gt.toISOString(),title:Gt.toLocaleString(),children:hi})]}),U&&o("span",{class:"edited-container",children:[" ","• ",o(I,{icon:"pencil",alt:w({id:"MRZxAn"})})," ",o("time",{tabIndex:"0",class:"edited",datetime:Xe.toISOString(),onClick:()=>{Un(K)},children:fi})]})]})}),!!Oe?.length&&o("div",{class:"emoji-reactions",children:Oe.map(y=>{const{name:D,count:Q,me:at,url:ee,staticUrl:pc}=y;if(ee)return o("span",{class:`emoji-reaction tag ${at?"":"insignificant"}`,children:[o(Cr,{alt:D,url:ee,staticUrl:pc})," ",Q]});if(/^:.+?:$/.test(D)){const jo=Se.find(mc=>mc.shortcode===D.replace(/^:/,"").replace(/:$/,""));if(jo)return o("span",{class:`emoji-reaction tag ${at?"":"insignificant"}`,children:[o(Cr,{alt:D,url:jo.url,staticUrl:jo.staticUrl})," ",Q]})}return o("span",{class:`emoji-reaction tag ${at?"":"insignificant"}`,children:[D," ",Q]})})}),o("div",{class:`actions ${Ot?"disabled":""}`,children:[o("div",{class:"action has-count",children:Wn?o(Sr,{openTrigger:"clickOnly",direction:"bottom",overflow:"auto",gap:-8,shift:8,menuClassName:"menu-emphasized",menuButton:o(He,{title:w({id:"ImOQa9"}),alt:w({id:"VbyRUy"}),class:"reply-button",icon:"comment",count:mt}),children:Si}):o(He,{title:w({id:"ImOQa9"}),alt:w({id:"VbyRUy"}),class:"reply-button",icon:"comment",count:mt,onClick:Fe})}),o("div",{class:`action ${qn&&At>0&&tt>0?"has-counts":"has-count"}`,children:o(to,{disabled:!bn,onClick:Bo,confirmLabel:o(F,{children:[o(I,{icon:"rocket"}),o("span",{children:w(Pt?{id:"QzzGsY"}:{id:"kulphB"})})]}),menuExtras:o(F,{children:[Yt()&&o(ut,{disabled:tn,onClick:()=>{Ie({quoteStatus:e})},children:[o(I,{icon:"quote"}),xe?o("small",{children:[wn,o("br",{}),xe]}):o("span",{children:wn})]}),(uo||!Yt())&&o(ut,{onClick:()=>{Ie({draftStatus:{status:`
${Jt}`}})},children:[o(I,{icon:"quote"}),o("span",{children:o(x,{id:"ygxzZR"})}),Yt()&&uo&&o("small",{class:"tag collapsed",children:"DEV"})]})]}),menuFooter:ki,children:o(He,{checked:Pt,title:[w(qn?{id:"n1PNla"}:{id:"PiVIlD"}),w({id:"QzzGsY"})],alt:[w({id:"kulphB"}),w({id:"b7T5Zj"})],class:"reblog-button",icon:"rocket",count:At,extraCount:tt,disabled:!bn})})}),o("div",{class:"action has-count",children:o(He,{checked:Ft,title:[w({id:"W9FRBT"}),w({id:"OcUmcH"})],alt:[w({id:"W9FRBT"}),w({id:"8ab1sR"})],class:"favourite-button",icon:"heart",count:jt,onClick:gi})}),oo("@mastodon/post-bookmark")&&o("div",{class:"action",children:o(He,{checked:ot,title:[w({id:"PZlHt8"}),w({id:"q8EQYI"})],alt:[w({id:"PZlHt8"}),w({id:"1C/9Sa"})],class:"bookmark-button",icon:"bookmark",onClick:vi})}),o(Sr,{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:w({id:"2FYpfJ"}),class:"plain more-button",children:o(I,{icon:"more",size:"l",alt:w({id:"2FYpfJ"})})})}),children:[Ci," "]})]})]})]}),!!Ro&&o(Rn,{onClick:y=>{y.target===y.currentTarget&&Un(!1)},children:o($v,{statusID:Ro,instance:A,fetchStatusHistory:()=>L.v1.statuses.$select(Ro).history.list(),onClose:()=>{Un(!1),Qe.current?.focus()}})}),!!Za&&o(Rn,{onClose:()=>{$o(!1)},children:o(cv,{post:e,instance:A,onClose:()=>{$o(!1)}})}),!!Ga&&o(Rn,{onClose:()=>{No(!1),z.reloadStatusPage++},children:o(lv,{onClose:()=>{No(!1),z.reloadStatusPage++},post:e,currentPolicy:pi})}),!!Ya&&o(Rn,{onClose:()=>{Oo(!1)},children:o(uv,{statusId:K,instance:A,onClose:()=>{Oo(!1)}})})]})]})}function Iv(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(F,{children:[Rc.toUnicode(n),i?o(F,{children:["/",i,o("wbr",{}),o("span",{class:"more-insignificant",children:["/",c]})]}):o("span",{class:"more-insignificant",children:s})]})}const Lv=["deleted","unauthorized","pending","rejected","revoked","blocked_account","blocked_domain","muted_account"],Pv=["blocked_account","blocked_domain","muted_account"],ho={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}})},Dv=$e(({quote:t,level:e=0})=>{const{_:n}=Kt(),r=Ge(z),s=It(ei),a=Ur(),i=t;let c;const l=r.statuses[Qt(i.id,i.instance)];l&&(!(a&&a===l.account?.id)&&Mo(l.filtered,s))?.action==="hide"&&(c="filterHidden"),c||(c=Lv.find(p=>i.state===p));const h=Pv.includes(c),d=i.id?Qt(i.id,i.instance):null,u=d&&r.revealedQuotes[d];if(c&&(!h||!u)){const m=l?.account?.acct,g=m?.split("@")[1];let v;return h?c==="blocked_account"?v=n(ho.blocked_account(m)):c==="blocked_domain"?v=n(ho.blocked_domain(g)):c==="muted_account"&&(v=n(ho.muted_account(m))):v=n(ho[c]),o("div",{class:`status-card-unfulfilled ${c==="filterHidden"||h?"status-card-ghost":""} ${i.native?"quote-post-native":""}`,children:[o(I,{icon:"quote"}),o("i",{children:v}),h&&d&&o("button",{type:"button",class:"textual",onClick:()=>{z.revealedQuotes[d]=!0},children:o(x,{id:"aWAdCb"})})]},d)}const f=i.native?F:ya;return o(f,{id:i.instance+i.id,children:o(Ze,{to:`${i.instance?`/${i.instance}`:""}/s/${i.id}`,class:`status-card-link ${i.native?"quote-post-native":""}`,"data-read-more":n(an),children:o(dn,{statusID:i.id,instance:i.instance,size:"s",quoted:e+1,quoteDomain:i.originalDomain,enableCommentHint:!0})},i.instance+i.id)},i.instance+i.id)}),Rv=$e(({id:t,instance:e,level:n=0,collapsed:r=!1})=>{if(!t||!e)return;const{_:s}=Kt(),a=Ge(z),i=Qt(t,e);let l=a.statusQuotes[i]?.filter((d,u,f)=>d.native||f.findIndex(p=>p.url===d.url)===u);if(!l?.length||n>2)return;r&&(l=[l[0]]);const h=Nn();return o("div",{class:"status-card-container",ref:h,"data-read-more":s(an),children:l.map(d=>{const u=d.id?Qt(d.id,d.instance):`${d.instance||""}-${d.state}`;return o(Dv,{quote:d,level:n},u)})})});function $v({statusID:t,instance:e,fetchStatusHistory:n=()=>{},onClose:r}){const{_:s}=Kt(),[a,i]=H("default"),[c,l]=H([]);return q(()=>{i("loading"),(async()=>{try{const h=await n();l(h),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(I,{icon:"x",alt:s({id:"yz7wBu"})})}),o("header",{children:[o("h2",{children:o(x,{id:"OKiofn"})}),a==="error"&&o("p",{children:o(x,{id:"EANWES"})}),a==="loading"&&o("p",{children:[o(bo,{abrupt:!0})," ",o(x,{id:"Pwqkdw"})]})]}),o("main",{tabIndex:"-1",children:c.length>0&&o("ol",{children:c.map(h=>{const{createdAt:d}=h,u=new Date(d);return o("li",{class:"history-item",children:[o("h3",{children:o("time",{children:Hn(u,{formatOpts:{weekday:"short",second:"numeric"}})})}),o(dn,{status:h,instance:e,size:"s",withinContext:!0,readOnly:!0,previewMode:!0})]},d)})})})]})}function Nv({status:t,filterInfo:e,instance:n,containerProps:r={},showFollowedTags:s,quoted:a}){const{_:i,_:c}=Kt(),l=Ge(z),{id:h,account:{avatar:d,avatarStatic:u,bot:f,group:p},createdAt:m,visibility:g,reblog:v}=t,b=!!v,k=e?.titlesStr||"",S=new Date(m),C=ti(t.reblog||t),[_,T]=H(!1),E=ra(()=>{T(!0)},{threshold:600,captureEvent:!0,detect:"touch",cancelOnMovement:2}),w=Nn(),M=Qt(t.id,n),P=Qt(t.id,n)+" "+(Qt(v?.id,n)||""),L=v?.id||h,A=n?`/${n}/s/${L}`:`/s/${L}`,$=s&&!!l.statusFollowedTags[M]?.length;return o("div",{class:`${a?"":b?p?"status-group":"status-reblog":$?"status-followed-tags":""} visibility-${g}`,...r,onContextMenu:R=>{R.preventDefault(),T(!0)},...E(),children:[o("article",{"data-state-post-id":P,class:`status filtered ${a?"status-card":""}`,tabindex:"-1",children:[o("b",{class:"status-filtered-badge clickable badge-meta",title:k,onClick:R=>{R.preventDefault(),T(!0)},children:[o("span",{children:o(x,{id:"03Qqf9"})}),o("span",{children:k})]})," ",o(we,{url:u||d,squircle:f}),o("span",{class:"status-filtered-info",children:[o("span",{class:"status-filtered-info-1",children:b?o(x,{id:"zJyf/5",components:{0:o(Pe,{account:t.account,instance:n}),1:o(I,{icon:On[g],alt:i(qe[g]),size:"s"})}}):$?o(F,{children:[o(Pe,{account:t.account,instance:n})," ",o(I,{icon:On[g],alt:i(qe[g]),size:"s"})," ",o("span",{children:l.statusFollowedTags[M].slice(0,3).map(R=>o("span",{class:"status-followed-tag-item",children:["#",R]},R))})]}):o(F,{children:[o(Pe,{account:t.account,instance:n})," ",o(I,{icon:On[g],alt:i(qe[g]),size:"s"})," ",o(be,{datetime:S,format:"micro"})]})}),o("span",{class:"status-filtered-info-2",children:[b&&o(F,{children:[o(we,{url:v.account.avatarStatic||v.account.avatar,squircle:f})," "]}),C]})]})]}),!!_&&o(Rn,{onClick:R=>{R.target===R.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(I,{icon:"x",alt:c({id:"yz7wBu"})})}),o("header",{children:[o("b",{class:"status-filtered-badge",children:o(x,{id:"03Qqf9"})})," ",k]}),o("main",{tabIndex:"-1",children:o(Ze,{ref:w,class:"status-link",to:A,onClick:()=>{T(!1)},"data-read-more":i(an),children:o(dn,{status:t,instance:n,size:"s",readOnly:!0})})})]})})]})}const Ra=$e(dn,(t,e)=>{const{status:n,...r}=t,{status:s,...a}=e;return n?.id===s?.id&&Pc(r,a)});var Ms=36,$a="";for(;Ms--;)$a+=Ms.toString(36);function Vy(t){for(var e="",n=t||11;n--;)e+=$a[Math.random()*36|0];return e}function ke(t){return Array.isArray?Array.isArray(t):Fa(t)==="[object Array]"}const Ov=1/0;function Fv(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-Ov?"-0":e}function Bv(t){return t==null?"":Fv(t)}function he(t){return typeof t=="string"}function Na(t){return typeof t=="number"}function zv(t){return t===!0||t===!1||Hv(t)&&Fa(t)=="[object Boolean]"}function Oa(t){return typeof t=="object"}function Hv(t){return Oa(t)&&t!==null}function Xt(t){return t!=null}function fr(t){return!t.trim().length}function Fa(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const Kv="Incorrect 'index' type",jv=t=>`Invalid value for key ${t}`,Uv=t=>`Pattern length exceeds max of ${t}.`,qv=t=>`Missing ${t} property in key`,Wv=t=>`Property 'weight' in key '${t}' must be a positive integer`,Is=Object.prototype.hasOwnProperty;class Vv{constructor(e){this._keys=[],this._keyMap={};let n=0;e.forEach(r=>{let s=Ba(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 Ba(t){let e=null,n=null,r=null,s=1,a=null;if(he(t)||ke(t))r=t,e=Ls(t),n=$r(t);else{if(!Is.call(t,"name"))throw new Error(qv("name"));const i=t.name;if(r=i,Is.call(t,"weight")&&(s=t.weight,s<=0))throw new Error(Wv(i));e=Ls(i),n=$r(i),a=t.getFn}return{path:e,id:n,weight:s,src:r,getFn:a}}function Ls(t){return ke(t)?t:t.split(".")}function $r(t){return ke(t)?t.join("."):t}function Zv(t,e){let n=[],r=!1;const s=(a,i,c)=>{if(Xt(a))if(!i[c])n.push(a);else{let l=i[c];const h=a[l];if(!Xt(h))return;if(c===i.length-1&&(he(h)||Na(h)||zv(h)))n.push(Bv(h));else if(ke(h)){r=!0;for(let d=0,u=h.length;d<u;d+=1)s(h[d],i,c+1)}else i.length&&s(h,i,c+1)}};return s(t,he(e)?e.split("."):e,0),r?n:n[0]}const Gv={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},Yv={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},Xv={location:0,threshold:.6,distance:100},Qv={useExtendedSearch:!1,getFn:Zv,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var j={...Yv,...Gv,...Xv,...Qv};const Jv=/[^ ]+/g;function ty(t=1,e=3){const n=new Map,r=Math.pow(10,e);return{get(s){const a=s.match(Jv).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 oi{constructor({getFn:e=j.getFn,fieldNormWeight:n=j.fieldNormWeight}={}){this.norm=ty(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,he(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();he(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)||fr(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(ke(i)){let c=[];const l=[{nestedArrIndex:-1,value:i}];for(;l.length;){const{nestedArrIndex:h,value:d}=l.pop();if(Xt(d))if(he(d)&&!fr(d)){let u={v:d,i:h,n:this.norm.get(d)};c.push(u)}else ke(d)&&d.forEach((u,f)=>{l.push({nestedArrIndex:f,value:u})})}r.$[a]=c}else if(he(i)&&!fr(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 oi({getFn:n,fieldNormWeight:r});return s.setKeys(t.map(Ba)),s.setSources(e),s.create(),s}function ey(t,{getFn:e=j.getFn,fieldNormWeight:n=j.fieldNormWeight}={}){const{keys:r,records:s}=t,a=new oi({getFn:e,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(s),a}function fo(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 ny(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 Ue=32;function oy(t,e,n,{location:r=j.location,distance:s=j.distance,threshold:a=j.threshold,findAllMatches:i=j.findAllMatches,minMatchCharLength:c=j.minMatchCharLength,includeMatches:l=j.includeMatches,ignoreLocation:h=j.ignoreLocation}={}){if(e.length>Ue)throw new Error(Uv(Ue));const d=e.length,u=t.length,f=Math.max(0,Math.min(r,u));let p=a,m=f;const g=c>1||l,v=g?Array(u):[];let b;for(;(b=t.indexOf(e,m))>-1;){let E=fo(e,{currentLocation:b,expectedLocation:f,distance:s,ignoreLocation:h});if(p=Math.min(E,p),m=b+d,g){let w=0;for(;w<d;)v[b+w]=1,w+=1}}m=-1;let k=[],S=1,C=d+u;const _=1<<d-1;for(let E=0;E<d;E+=1){let w=0,M=C;for(;w<M;)fo(e,{errors:E,currentLocation:f+M,expectedLocation:f,distance:s,ignoreLocation:h})<=p?w=M:C=M,M=Math.floor((C-w)/2+w);C=M;let P=Math.max(1,f-M+1),L=i?u:Math.min(f+M,u)+d,A=Array(L+2);A[L+1]=(1<<E)-1;for(let R=L;R>=P;R-=1){let W=R-1,B=n[t.charAt(W)];if(g&&(v[W]=+!!B),A[R]=(A[R+1]<<1|1)&B,E&&(A[R]|=(k[R+1]|k[R])<<1|1|k[R+1]),A[R]&_&&(S=fo(e,{errors:E,currentLocation:W,expectedLocation:f,distance:s,ignoreLocation:h}),S<=p)){if(p=S,m=W,m<=f)break;P=Math.max(1,2*f-m)}}if(fo(e,{errors:E+1,currentLocation:f,expectedLocation:f,distance:s,ignoreLocation:h})>p)break;k=A}const T={isMatch:m>=0,score:Math.max(.001,S)};if(g){const E=ny(v,c);E.length?l&&(T.indices=E):T.isMatch=!1}return T}function ry(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 So=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 Ha{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:l=j.isCaseSensitive,ignoreDiacritics:h=j.ignoreDiacritics,ignoreLocation:d=j.ignoreLocation}={}){if(this.options={location:n,threshold:r,distance:s,includeMatches:a,findAllMatches:i,minMatchCharLength:c,isCaseSensitive:l,ignoreDiacritics:h,ignoreLocation:d},e=l?e:e.toLowerCase(),e=h?So(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const u=(p,m)=>{this.chunks.push({pattern:p,alphabet:ry(p),startIndex:m})},f=this.pattern.length;if(f>Ue){let p=0;const m=f%Ue,g=f-m;for(;p<g;)u(this.pattern.substr(p,Ue),p),p+=Ue;if(m){const v=f-Ue;u(this.pattern.substr(v),v)}}else u(this.pattern,0)}searchIn(e){const{isCaseSensitive:n,ignoreDiacritics:r,includeMatches:s}=this.options;if(e=n?e:e.toLowerCase(),e=r?So(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:l,minMatchCharLength:h,ignoreLocation:d}=this.options;let u=[],f=0,p=!1;this.chunks.forEach(({pattern:g,alphabet:v,startIndex:b})=>{const{isMatch:k,score:S,indices:C}=oy(e,g,v,{location:a+b,distance:i,threshold:c,findAllMatches:l,minMatchCharLength:h,includeMatches:s,ignoreLocation:d});k&&(p=!0),f+=S,k&&C&&(u=[...u,...C])});let m={isMatch:p,score:p?f/this.chunks.length:1};return p&&s&&(m.indices=u),m}}class Ne{constructor(e){this.pattern=e}static isMultiMatch(e){return Ps(e,this.multiRegex)}static isSingleMatch(e){return Ps(e,this.singleRegex)}search(){}}function Ps(t,e){const n=t.match(e);return n?n[1]:null}class iy extends Ne{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 sy extends Ne{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 ay extends Ne{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 cy extends Ne{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 ly extends Ne{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 uy extends Ne{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 Ka extends Ne{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:l=j.isCaseSensitive,ignoreDiacritics:h=j.ignoreDiacritics,ignoreLocation:d=j.ignoreLocation}={}){super(e),this._bitapSearch=new Ha(e,{location:n,threshold:r,distance:s,includeMatches:a,findAllMatches:i,minMatchCharLength:c,isCaseSensitive:l,ignoreDiacritics:h,ignoreLocation:d})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class ja extends Ne{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 Nr=[iy,ja,ay,cy,uy,ly,sy,Ka],Ds=Nr.length,dy=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,hy="|";function fy(t,e={}){return t.split(hy).map(n=>{let r=n.trim().split(dy).filter(a=>a&&!!a.trim()),s=[];for(let a=0,i=r.length;a<i;a+=1){const c=r[a];let l=!1,h=-1;for(;!l&&++h<Ds;){const d=Nr[h];let u=d.isMultiMatch(c);u&&(s.push(new d(u,e)),l=!0)}if(!l)for(h=-1;++h<Ds;){const d=Nr[h];let u=d.isSingleMatch(c);if(u){s.push(new d(u,e));break}}}return s})}const py=new Set([Ka.type,ja.type]);class my{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:l=j.location,threshold:h=j.threshold,distance:d=j.distance}={}){this.query=null,this.options={isCaseSensitive:n,ignoreDiacritics:r,includeMatches:s,minMatchCharLength:a,findAllMatches:c,ignoreLocation:i,location:l,threshold:h,distance:d},e=n?e:e.toLowerCase(),e=r?So(e):e,this.pattern=e,this.query=fy(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?So(e):e;let i=0,c=[],l=0;for(let h=0,d=n.length;h<d;h+=1){const u=n[h];c.length=0,i=0;for(let f=0,p=u.length;f<p;f+=1){const m=u[f],{isMatch:g,indices:v,score:b}=m.search(e);if(g){if(i+=1,l+=b,r){const k=m.constructor.type;py.has(k)?c=[...c,...v]:c.push(v)}}else{l=0,i=0,c.length=0;break}}if(i){let f={isMatch:!0,score:l/i};return r&&(f.indices=c),f}}return{isMatch:!1,score:1}}}const Or=[];function gy(...t){Or.push(...t)}function Fr(t,e){for(let n=0,r=Or.length;n<r;n+=1){let s=Or[n];if(s.condition(t,e))return new s(t,e)}return new Ha(t,e)}const Co={AND:"$and",OR:"$or"},Br={PATH:"$path",PATTERN:"$val"},zr=t=>!!(t[Co.AND]||t[Co.OR]),vy=t=>!!t[Br.PATH],yy=t=>!ke(t)&&Oa(t)&&!zr(t),Rs=t=>({[Co.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function Ua(t,e,{auto:n=!0}={}){const r=s=>{let a=Object.keys(s);const i=vy(s);if(!i&&a.length>1&&!zr(s))return r(Rs(s));if(yy(s)){const l=i?s[Br.PATH]:a[0],h=i?s[Br.PATTERN]:s[l];if(!he(h))throw new Error(jv(l));const d={keyId:$r(l),pattern:h};return n&&(d.searcher=Fr(h,e)),d}let c={children:[],operator:a[0]};return a.forEach(l=>{const h=s[l];ke(h)&&h.forEach(d=>{c.children.push(r(d))})}),c};return zr(t)||(t=Rs(t)),r(t)}function by(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 wy(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 _y(t,e){e.score=t.score}function ky(t,e,{includeMatches:n=j.includeMatches,includeScore:r=j.includeScore}={}){const s=[];return n&&s.push(wy),r&&s.push(_y),t.map(a=>{const{idx:i}=a,c={item:e[i],refIndex:i};return s.length&&s.forEach(l=>{l(a,c)}),c})}class jn{constructor(e,n={},r){this.options={...j,...n},this.options.useExtendedSearch,this._keyStore=new Vv(this.options.keys),this.setCollection(e,r)}setCollection(e,n){if(this._docs=e,n&&!(n instanceof oi))throw new Error(Kv);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 l=he(e)?he(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return by(l,{ignoreFieldNorm:c}),a&&l.sort(i),Na(n)&&n>-1&&(l=l.slice(0,n)),ky(l,this._docs,{includeMatches:r,includeScore:s})}_searchStringList(e){const n=Fr(e,this.options),{records:r}=this._myIndex,s=[];return r.forEach(({v:a,i,n:c})=>{if(!Xt(a))return;const{isMatch:l,score:h,indices:d}=n.searchIn(a);l&&s.push({item:a,idx:i,matches:[{score:h,value:a,norm:c,indices:d}]})}),s}_searchLogical(e){const n=Ua(e,this.options),r=(c,l,h)=>{if(!c.children){const{keyId:u,searcher:f}=c,p=this._findMatches({key:this._keyStore.get(u),value:this._myIndex.getValueForItemAtKeyId(l,u),searcher:f});return p&&p.length?[{idx:h,item:l,matches:p}]:[]}const d=[];for(let u=0,f=c.children.length;u<f;u+=1){const p=c.children[u],m=r(p,l,h);if(m.length)d.push(...m);else if(c.operator===Co.AND)return[]}return d},s=this._myIndex.records,a={},i=[];return s.forEach(({$:c,i:l})=>{if(Xt(c)){let h=r(n,c,l);h.length&&(a[l]||(a[l]={idx:l,item:c,matches:[]},i.push(a[l])),h.forEach(({matches:d})=>{a[l].matches.push(...d)}))}}),i}_searchObjectList(e){const n=Fr(e,this.options),{keys:r,records:s}=this._myIndex,a=[];return s.forEach(({$:i,i:c})=>{if(!Xt(i))return;let l=[];r.forEach((h,d)=>{l.push(...this._findMatches({key:h,value:i[d],searcher:n}))}),l.length&&a.push({idx:c,item:i,matches:l})}),a}_findMatches({key:e,value:n,searcher:r}){if(!Xt(n))return[];let s=[];if(ke(n))n.forEach(({v:a,i,n:c})=>{if(!Xt(a))return;const{isMatch:l,score:h,indices:d}=r.searchIn(a);l&&s.push({score:h,key:e,value:a,idx:i,norm:c,indices:d})});else{const{v:a,n:i}=n,{isMatch:c,score:l,indices:h}=r.searchIn(a);c&&s.push({score:l,key:e,value:a,norm:i,indices:h})}return s}}jn.version="7.1.0";jn.createIndex=za;jn.parseIndex=ey;jn.config=j;jn.parseQuery=Ua;gy(my);const Ty=6*60*1e3,Sy=90*24*60*60*1e3;function Zy({scheduledAt:t,setScheduledAt:e}){if(!t||!t?.getTime)return;const[n,r]=H(),[s,a]=H(),i=t.getTimezoneOffset();q(()=>{function l(){const u=new Date(Date.now()+Ty),f=new Date(u.getTime()-i*6e4).toISOString().slice(0,16);r(f)}l();function h(){const u=new Date(Date.now()+Sy),f=new Date(u.getTime()-i*6e4).toISOString().slice(0,16);a(f)}h();const d=setInterval(()=>{l(),h()},1e3*10);return()=>clearInterval(d)},[]);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:l=>{e(new Date(l.target.value))}})}function Gy(){const t=new Date;return new Intl.DateTimeFormat(void 0,{timeZoneName:"long"}).formatToParts(t).find(s=>s.type==="timeZoneName")?.value}export{As as $,we as A,ae as B,Ys as C,Ny as D,un as E,Ra as F,$y as G,Lr as H,I,gg as J,Tr as K,Ze as L,Ui as M,Pe as N,ni as O,Pr as P,Cr as Q,be as R,ua as S,ng as T,Mo as U,ra as V,Nn as W,yg as X,ei as Y,vg as Z,Fy as _,jl as a,Vy as a0,mg as a1,xr as a2,My as a3,Pl as a4,Iy as a5,jn as a6,Gy as a7,Zy as a8,hg as a9,Qg as aa,Oy as ab,Fm as ac,pv as ad,tl as ae,Qo as af,We as ag,_g as ah,ia as ai,Ty as aj,la as ak,Xp as al,ou as am,qe as an,On as ao,Ie as b,Tn as c,ut as d,ti as e,Ke as f,ca as g,Rn as h,Sr as i,to as j,fa as k,An as l,pa as m,Hn as n,ql as o,Yt as p,Ly as q,oo as r,ht as s,Dy as t,xy as u,Py as v,Jr as w,Ry as x,ma as y,Cm as z};
//# sourceMappingURL=ScheduledAtField-BOlu1KST.js.map