Files
phanpy-cz/assets/ScheduledAtField-B9b7q7O5.js
2026-02-07 19:49:28 +01:00

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