import{ad as lt,Q as Ne,d as r,h as K,q as ke,A as D,_ as Rt,y as J,B as kr,r as Ie,ae as k,af as Va,e as ir,ag as co,ah as Ha,i as se,P as bt,p as cs,ai as Ba,aj as ls,O as us,k as $,M as Qt,V as Le,n as Ua,s as V,ak as ja,u as tt,a as lo,x as En,z as Wa,al as Ka,T as O,am as ds,an as Za,ao as fs,o as vo,v as hs,g as Ir,ap as qa,aq as De,ar as Ga,as as Ya,at as jn,I as it,c as Pn,b as mt,W as ps,au as Xa,av as Qa,aw as Ja}from"./useTitle-jLgT0T3g.js";function sr(){return sr=Object.assign?Object.assign.bind():function(e){for(var t=1;t'),!0):t?e.some(function(n){return t.includes(n)})||e.includes("*"):!0}var cc=function(t,n,o){o===void 0&&(o=!1);var i=n.alt,a=n.meta,s=n.mod,c=n.shift,l=n.ctrl,u=n.keys,f=t.key,d=t.code,h=t.ctrlKey,p=t.metaKey,m=t.shiftKey,_=t.altKey,v=vt(d),T=f.toLowerCase();if(!(u!=null&&u.includes(v))&&!(u!=null&&u.includes(T))&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(v))return!1;if(!o){if(i===!_&&T!=="alt"||c===!m&&T!=="shift")return!1;if(s){if(!p&&!h)return!1}else if(a===!p&&T!=="meta"&&T!=="os"||l===!h&&T!=="ctrl"&&T!=="control")return!1}return u&&u.length===1&&(u.includes(T)||u.includes(v))?!0:u?nc(u):!u},lc=lt(void 0),uc=function(){return Ne(lc)};function ys(e,t){return e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce(function(n,o){return n&&ys(e[o],t[o])},!0):e===t}var dc=lt({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),fc=function(){return Ne(dc)};function hc(e){var t=D(void 0);return ys(t.current,e)||(t.current=e),t.current}var ai=function(t){t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation()},pc=typeof window<"u"?Rt:J;function Bt(e,t,n,o){var i=K(null),a=i[0],s=i[1],c=D(!1),l=n instanceof Array?o instanceof Array?void 0:o:n,u=Ar(e)?e.join(l==null?void 0:l.splitKey):e,f=n instanceof Array?n:o instanceof Array?o:void 0,d=ke(t,f??[]),h=D(d);f?h.current=d:h.current=t;var p=hc(l),m=fc(),_=m.enabledScopes,v=uc();return pc(function(){if(!((p==null?void 0:p.enabled)===!1||!ac(_,p==null?void 0:p.scopes))){var T=function(x,E){var A;if(E===void 0&&(E=!1),!(ic(x)&&!_s(x,p==null?void 0:p.enableOnFormTags))){if(a!==null){var M=a.getRootNode();if((M instanceof Document||M instanceof ShadowRoot)&&M.activeElement!==a&&!a.contains(M.activeElement)){ai(x);return}}(A=x.target)!=null&&A.isContentEditable&&!(p!=null&&p.enableOnContentEditable)||Ao(u,p==null?void 0:p.splitKey).forEach(function(R){var S,C=Co(R,p==null?void 0:p.combinationKey);if(cc(x,C,p==null?void 0:p.ignoreModifiers)||(S=C.keys)!=null&&S.includes("*")){if(p!=null&&p.ignoreEventWhen!=null&&p.ignoreEventWhen(x)||E&&c.current)return;if(oc(x,C,p==null?void 0:p.preventDefault),!rc(x,C,p==null?void 0:p.enabled)){ai(x);return}h.current(x,C),E||(c.current=!0)}})}},b=function(x){x.key!==void 0&&(gs(vt(x.code)),((p==null?void 0:p.keydown)===void 0&&(p==null?void 0:p.keyup)!==!0||p!=null&&p.keydown)&&T(x))},w=function(x){x.key!==void 0&&(vs(vt(x.code)),c.current=!1,p!=null&&p.keyup&&T(x,!0))},I=a||(l==null?void 0:l.document)||document;return I.addEventListener("keyup",w),I.addEventListener("keydown",b),v&&Ao(u,p==null?void 0:p.splitKey).forEach(function(g){return v.addHotkey(Co(g,p==null?void 0:p.combinationKey,p==null?void 0:p.description))}),function(){I.removeEventListener("keyup",w),I.removeEventListener("keydown",b),v&&Ao(u,p==null?void 0:p.splitKey).forEach(function(g){return v.removeHotkey(Co(g,p==null?void 0:p.combinationKey,p==null?void 0:p.description))})}}},[a,u,p,_]),s}var no={exports:{}};/*! * Toastify js 1.12.0 * https://github.com/apvarun/toastify-js * @license MIT licensed * * Copyright (C) 2018 Varun A P */var mc=no.exports,ci;function gc(){return ci||(ci=1,function(e){(function(t,n){e.exports?e.exports=n():t.Toastify=n()})(mc,function(t){var n=function(s){return new n.lib.init(s)},o="1.12.0";n.defaults={oldestFirst:!0,text:"Toastify is awesome!",node:void 0,duration:3e3,selector:void 0,callback:function(){},destination:void 0,newWindow:!1,close:!1,gravity:"toastify-top",positionLeft:!1,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:!0,onClick:function(){},offset:{x:0,y:0},escapeMarkup:!0,ariaLive:"polite",style:{background:""}},n.lib=n.prototype={toastify:o,constructor:n,init:function(s){return s||(s={}),this.options={},this.toastElement=null,this.options.text=s.text||n.defaults.text,this.options.node=s.node||n.defaults.node,this.options.duration=s.duration===0?0:s.duration||n.defaults.duration,this.options.selector=s.selector||n.defaults.selector,this.options.callback=s.callback||n.defaults.callback,this.options.destination=s.destination||n.defaults.destination,this.options.newWindow=s.newWindow||n.defaults.newWindow,this.options.close=s.close||n.defaults.close,this.options.gravity=s.gravity==="bottom"?"toastify-bottom":n.defaults.gravity,this.options.positionLeft=s.positionLeft||n.defaults.positionLeft,this.options.position=s.position||n.defaults.position,this.options.backgroundColor=s.backgroundColor||n.defaults.backgroundColor,this.options.avatar=s.avatar||n.defaults.avatar,this.options.className=s.className||n.defaults.className,this.options.stopOnFocus=s.stopOnFocus===void 0?n.defaults.stopOnFocus:s.stopOnFocus,this.options.onClick=s.onClick||n.defaults.onClick,this.options.offset=s.offset||n.defaults.offset,this.options.escapeMarkup=s.escapeMarkup!==void 0?s.escapeMarkup:n.defaults.escapeMarkup,this.options.ariaLive=s.ariaLive||n.defaults.ariaLive,this.options.style=s.style||n.defaults.style,s.backgroundColor&&(this.options.style.background=s.backgroundColor),this},buildToast:function(){if(!this.options)throw"Toastify is not initialized";var s=document.createElement("div");s.className="toastify on "+this.options.className,this.options.position?s.className+=" toastify-"+this.options.position:this.options.positionLeft===!0?(s.className+=" toastify-left",console.warn("Property `positionLeft` will be depreciated in further versions. Please use `position` instead.")):s.className+=" toastify-right",s.className+=" "+this.options.gravity,this.options.backgroundColor&&console.warn('DEPRECATION NOTICE: "backgroundColor" is being deprecated. Please use the "style.background" property.');for(var c in this.options.style)s.style[c]=this.options.style[c];if(this.options.ariaLive&&s.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)s.appendChild(this.options.node);else if(this.options.escapeMarkup?s.innerText=this.options.text:s.innerHTML=this.options.text,this.options.avatar!==""){var l=document.createElement("img");l.src=this.options.avatar,l.className="toastify-avatar",this.options.position=="left"||this.options.positionLeft===!0?s.appendChild(l):s.insertAdjacentElement("afterbegin",l)}if(this.options.close===!0){var u=document.createElement("button");u.type="button",u.setAttribute("aria-label","Close"),u.className="toast-close",u.innerHTML="✖",u.addEventListener("click",(function(v){v.stopPropagation(),this.removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)}).bind(this));var f=window.innerWidth>0?window.innerWidth:screen.width;(this.options.position=="left"||this.options.positionLeft===!0)&&f>360?s.insertAdjacentElement("afterbegin",u):s.appendChild(u)}if(this.options.stopOnFocus&&this.options.duration>0){var d=this;s.addEventListener("mouseover",function(v){window.clearTimeout(s.timeOutValue)}),s.addEventListener("mouseleave",function(){s.timeOutValue=window.setTimeout(function(){d.removeElement(s)},d.options.duration)})}if(typeof this.options.destination<"u"&&s.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"&&s.addEventListener("click",(function(v){v.stopPropagation(),this.options.onClick()}).bind(this)),typeof this.options.offset=="object"){var h=i("x",this.options),p=i("y",this.options),m=this.options.position=="left"?h:"-"+h,_=this.options.gravity=="toastify-top"?p:"-"+p;s.style.transform="translate("+m+","+_+")"}return s},showToast:function(){this.toastElement=this.buildToast();var s;if(typeof this.options.selector=="string"?s=document.getElementById(this.options.selector):this.options.selector instanceof HTMLElement||typeof ShadowRoot<"u"&&this.options.selector instanceof ShadowRoot?s=this.options.selector:s=document.body,!s)throw"Root element is not defined";var c=n.defaults.oldestFirst?s.firstChild:s.lastChild;return s.insertBefore(this.toastElement,c),n.reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout((function(){this.removeElement(this.toastElement)}).bind(this),this.options.duration)),this},hideToast:function(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this.removeElement(this.toastElement)},removeElement:function(s){s.className=s.className.replace(" on",""),window.setTimeout((function(){this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),s.parentNode&&s.parentNode.removeChild(s),this.options.callback.call(s),n.reposition()}).bind(this),400)}},n.reposition=function(){for(var s={top:15,bottom:15},c={top:15,bottom:15},l={top:15,bottom:15},u=document.getElementsByClassName("toastify"),f,d=0;d0?window.innerWidth:screen.width;m<=360?(u[d].style[f]=l[f]+"px",l[f]+=h+p):a(u[d],"toastify-left")===!0?(u[d].style[f]=s[f]+"px",s[f]+=h+p):(u[d].style[f]=c[f]+"px",c[f]+=h+p)}return this};function i(s,c){return c.offset[s]?isNaN(c.offset[s])?c.offset[s]:c.offset[s]+"px":"0px"}function a(s,c){return!s||typeof c!="string"?!1:!!(s.className&&s.className.trim().split(/\s+/gi).indexOf(c)>-1)}return n.lib.init.prototype=n.lib,n})}(no)),no.exports}var vc=gc();const _c=kr(vc);window._showToast=Re;function Re(e){typeof e=="string"&&(e={text:e});const{onClick:t,delay:n,...o}=e,i=_c({className:`${t||e.destination?"shiny-pill":""}`,gravity:"bottom",position:"center",...o,onClick:()=>{t==null||t(i)}});return n?setTimeout(()=>{i.showToast()},n):i.showToast(),i}function nh(e,t,n,o){const i=D(e);J(()=>{i.current=e},[e,n]),J(()=>{!o||t===null||t===!1||i.current()},[o]),J(()=>{if(t===null||t===!1)return;const s=setInterval(()=>i.current(),t);return()=>clearInterval(s)},[t])}function yc(e){const t=URL.parse("/compose/",window.location),{width:n,height:o}=window.screen,i=Math.max(0,(n-600)/2),a=Math.max(0,(o-450)/2),s=Math.min(n,600),c=Math.min(o,450),l=(e==null?void 0:e.uid)||Math.random(),u=window.open(t,"compose"+l,`width=${s},height=${c},left=${i},top=${a}`);return u?u.__COMPOSE__=e:alert(Ie._({id:"4S86wI"})),u}const bc=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);function Tc(){if(bc){const e=document.createElement("input");e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.opacity="0",document.body.appendChild(e),e.focus(),setTimeout(()=>{document.body.removeChild(e)},500)}}const bs={x:()=>k(()=>import("./icons/close-line-YTE7hIJE.js"),[],import.meta.url),heart:()=>k(()=>import("./icons/heart-line-VwvWYh8h.js"),[],import.meta.url),bookmark:()=>k(()=>import("./icons/bookmark-line-D6jQ7QFs.js"),[],import.meta.url),"check-circle":()=>k(()=>import("./icons/check-circle-line-sE41WGxF.js"),[],import.meta.url),"x-circle":()=>k(()=>import("./icons/close-circle-line-qd3g541O.js"),[],import.meta.url),transfer:()=>k(()=>import("./icons/transfer-4-line-Q9QJoxz3.js"),[],import.meta.url),rocket:()=>k(()=>import("./icons/rocket-line-rZbVYYCZ.js"),[],import.meta.url),"arrow-left":{module:()=>k(()=>import("./icons/arrow-left-line-_YC6-XGG.js"),[],import.meta.url),rtl:!0},"arrow-right":{module:()=>k(()=>import("./icons/arrow-right-line-PypiEqpu.js"),[],import.meta.url),rtl:!0},"arrow-up":()=>k(()=>import("./icons/arrow-up-line-fcuKqhVE.js"),[],import.meta.url),"arrow-down":()=>k(()=>import("./icons/arrow-down-line-0TRJUP_K.js"),[],import.meta.url),earth:()=>k(()=>import("./icons/earth-line-t1Um8wpQ.js"),[],import.meta.url),lock:()=>k(()=>import("./icons/lock-line-0jNHqZpm.js"),[],import.meta.url),unlock:()=>k(()=>import("./icons/unlock-line-w3piJMVb.js"),[],import.meta.url),"eye-close":()=>k(()=>import("./icons/eye-close-line-lBiePPv9.js"),[],import.meta.url),"eye-open":()=>k(()=>import("./icons/eye-2-line-vz_Kw-rK.js"),[],import.meta.url),message:()=>k(()=>import("./icons/mail-line-5XLS6FEo.js"),[],import.meta.url),comment:{module:()=>k(()=>import("./icons/chat-3-line-F0xcdpXY.js"),[],import.meta.url),rtl:!0},comment2:{module:()=>k(()=>import("./icons/comment-2-line-xEXuT-Ip.js"),[],import.meta.url),rtl:!0},home:()=>k(()=>import("./icons/home-3-line-qJiZhXUH.js"),[],import.meta.url),notification:()=>k(()=>import("./icons/notification-line-olNPLtgS.js"),[],import.meta.url),follow:()=>k(()=>import("./icons/user-follow-line-k_GCWTtp.js"),[],import.meta.url),"follow-add":()=>k(()=>import("./icons/user-add-line-zzW9OULB.js"),[],import.meta.url),poll:[()=>k(()=>import("./icons/chart-bar-line-5r_DfN2w.js"),[],import.meta.url),"90deg"],pencil:()=>k(()=>import("./icons/pencil-line-bKXqElLR.js"),[],import.meta.url),quill:()=>k(()=>import("./icons/quill-pen-line-h_5-FsGz.js"),[],import.meta.url),at:()=>k(()=>import("./icons/at-line-9vJS_Hnl.js"),[],import.meta.url),attachment:()=>k(()=>import("./icons/attachment-line-C2PUa1Ke.js"),[],import.meta.url),upload:()=>k(()=>import("./icons/upload-3-line-Qsjvubiw.js"),[],import.meta.url),gear:()=>k(()=>import("./icons/settings-3-line-kt4MSpRv.js"),[],import.meta.url),more:()=>k(()=>import("./icons/more-3-line-wUD-Yhmj.js"),[],import.meta.url),more2:()=>k(()=>import("./icons/more-1-fill-je1-slyh.js"),[],import.meta.url),external:{module:()=>k(()=>import("./icons/external-link-line-8nOOkmFu.js"),[],import.meta.url),rtl:!0},popout:{module:()=>k(()=>import("./icons/external-link-line-8nOOkmFu.js"),[],import.meta.url),rtl:!0},popin:{module:()=>k(()=>import("./icons/external-link-line-8nOOkmFu.js"),[],import.meta.url),rotate:"180deg",rtl:!0},plus:()=>k(()=>import("./icons/add-circle-line--O-MfyNy.js"),[],import.meta.url),"chevron-left":{module:()=>k(()=>import("./icons/left-line-Jck0yVmC.js"),[],import.meta.url),rtl:!0},"chevron-right":{module:()=>k(()=>import("./icons/right-line-7VBoqLdz.js"),[],import.meta.url),rtl:!0},"chevron-down":()=>k(()=>import("./icons/down-line-9PeS5YhF.js"),[],import.meta.url),reply:{module:()=>k(()=>import("./icons/share-forward-line-4jL-2Q4u.js"),[],import.meta.url),rotate:"180deg",flip:"horizontal",rtl:!0},thread:()=>k(()=>import("./icons/route-line-2YYy3958.js"),[],import.meta.url),group:{module:()=>k(()=>import("./icons/group-line-JvhJklhQ.js"),[],import.meta.url),rtl:!0},bot:()=>k(()=>import("./icons/android-2-line-uPwvVubH.js"),[],import.meta.url),menu:()=>k(()=>import("./icons/rows-4-line-SxGPYpTa.js"),[],import.meta.url),list:{module:()=>k(()=>import("./icons/list-check-line-qNqx9Mm4.js"),[],import.meta.url),rtl:!0},search:()=>k(()=>import("./icons/search-2-line-G39AynEw.js"),[],import.meta.url),hashtag:()=>k(()=>import("./icons/hashtag-line-SS3QMu1R.js"),[],import.meta.url),info:()=>k(()=>import("./icons/information-line-8SOch6cR.js"),[],import.meta.url),shortcut:()=>k(()=>import("./icons/lightning-line-JMYUlCZM.js"),[],import.meta.url),user:()=>k(()=>import("./icons/user-4-line-zT_bpOrS.js"),[],import.meta.url),following:()=>k(()=>import("./icons/walk-line-CF7a5s4t.js"),[],import.meta.url),pin:()=>k(()=>import("./icons/pin-line-ULyRQyWZ.js"),[],import.meta.url),unpin:[()=>k(()=>import("./icons/pin-line-ULyRQyWZ.js"),[],import.meta.url),"180deg"],bus:()=>k(()=>import("./icons/bus-2-line-XuQdDZ_w.js"),[],import.meta.url),link:()=>k(()=>import("./icons/link-2-line-BUqp1EwN.js"),[],import.meta.url),history:()=>k(()=>import("./icons/history-line-yoG7K8wL.js"),[],import.meta.url),share:()=>k(()=>import("./icons/share-2-line-PYo-zN94.js"),[],import.meta.url),sparkles:()=>k(()=>import("./icons/sparkles-line-wjZWGZ1a.js"),[],import.meta.url),sparkles2:()=>k(()=>import("./icons/sparkles-2-line-g2FqdZ0R.js"),[],import.meta.url),exit:{module:()=>k(()=>import("./icons/exit-line-l-1uUgI7.js"),[],import.meta.url),rtl:!0},translate:()=>k(()=>import("./icons/translate-line-HpDtlqS2.js"),[],import.meta.url),play:()=>k(()=>import("./icons/play-fill-Ey-zv2eL.js"),[],import.meta.url),trash:()=>k(()=>import("./icons/delete-2-line-pjUduCFs.js"),[],import.meta.url),mute:{module:()=>k(()=>import("./icons/volume-mute-line-WthBoXru.js"),[],import.meta.url),rtl:!0},unmute:{module:()=>k(()=>import("./icons/volume-line-PZujbN8h.js"),[],import.meta.url),rtl:!0},block:()=>k(()=>import("./icons/forbid-circle-line-3FxopGoP.js"),[],import.meta.url),unblock:[()=>k(()=>import("./icons/forbid-circle-line-3FxopGoP.js"),[],import.meta.url),"180deg"],flag:()=>k(()=>import("./icons/flag-1-line-xvcg7G7Q.js"),[],import.meta.url),time:()=>k(()=>import("./icons/time-line-ThP0kTRr.js"),[],import.meta.url),refresh:()=>k(()=>import("./icons/refresh-2-line-t42qqclb.js"),[],import.meta.url),emoji2:()=>k(()=>import("./icons/emoji-2-line--uNVc2IC.js"),[],import.meta.url),filter:()=>k(()=>import("./icons/filter-2-line-KyjbFYlO.js"),[],import.meta.url),filters:()=>k(()=>import("./icons/filter-line-1KEfnWDm.js"),[],import.meta.url),chart:()=>k(()=>import("./icons/chart-line-line-pHaLt6yC.js"),[],import.meta.url),react:()=>k(()=>import("./icons/react-line-YfZPqZem.js"),[],import.meta.url),layout4:{module:()=>k(()=>import("./icons/layout-4-line-FOdnyEcZ.js"),[],import.meta.url),rtl:!0},layout5:()=>k(()=>import("./icons/layout-5-line-9Kks7dle.js"),[],import.meta.url),announce:{module:()=>k(()=>import("./icons/announcement-line-MSlAmDH1.js"),[],import.meta.url),rtl:!0},alert:()=>k(()=>import("./icons/alert-line-zyc6hy8V.js"),[],import.meta.url),round:()=>k(()=>import("./icons/round-fill-a0rplSmV.js"),[],import.meta.url),"arrow-up-circle":()=>k(()=>import("./icons/arrow-up-circle-line-e3kZqEZN.js"),[],import.meta.url),"arrow-down-circle":()=>k(()=>import("./icons/arrow-down-circle-line-mpqFtRtO.js"),[],import.meta.url),clipboard:{module:()=>k(()=>import("./icons/clipboard-line-9F_Yeo71.js"),[],import.meta.url),rtl:!0},"account-edit":()=>k(()=>import("./icons/user-edit-line-9VnWCh0X.js"),[],import.meta.url),"account-warning":()=>k(()=>import("./icons/user-warning-line-gL3RGb1N.js"),[],import.meta.url),keyboard:()=>k(()=>import("./icons/keyboard-line-10AZQcVH.js"),[],import.meta.url),cloud:()=>k(()=>import("./icons/cloud-line-abe0HgFS.js"),[],import.meta.url),month:{module:()=>k(()=>import("./icons/calendar-month-line-VoXZVWAe.js"),[],import.meta.url),rtl:!0},media:()=>k(()=>import("./icons/photo-album-line--GdJqjfq.js"),[],import.meta.url),speak:()=>k(()=>import("./icons/radar-line-ndI8IhOG.js"),[],import.meta.url),building:()=>k(()=>import("./icons/building-5-line-ew7lu83B.js"),[],import.meta.url),history2:{module:()=>k(()=>import("./icons/history-2-line-3yIVzoWo.js"),[],import.meta.url),rtl:!0},document:()=>k(()=>import("./icons/document-line--D6ooZg1.js"),[],import.meta.url),"arrows-right":{module:()=>k(()=>import("./icons/arrows-right-line-HF4HILdT.js"),[],import.meta.url),rtl:!0},code:()=>k(()=>import("./icons/code-line-h4RWLaak.js"),[],import.meta.url),copy:()=>k(()=>import("./icons/copy-2-line-mPSDKieb.js"),[],import.meta.url),quote:{module:()=>k(()=>import("./icons/quote-left-line-NQzeELMO.js"),[],import.meta.url),rtl:!0},settings:()=>k(()=>import("./icons/settings-6-line-ZgCBilgF.js"),[],import.meta.url),"heart-break":()=>k(()=>import("./icons/heart-crack-line-P3DoKfTT.js"),[],import.meta.url),"user-x":()=>k(()=>import("./icons/user-x-line-zIdph-gu.js"),[],import.meta.url),minimize:()=>k(()=>import("./icons/arrows-down-line-ovOF9r0o.js"),[],import.meta.url),celebrate:()=>k(()=>import("./icons/celebrate-line-2j4SZgI5.js"),[],import.meta.url)},wc={s:12,m:16,l:20,xl:24,xxl:32},li={},Ec=Va(function({width:e,height:t,body:n,rotate:o,flip:i}){return r("svg",{viewBox:`0 0 ${e} ${t}`,dangerouslySetInnerHTML:{__html:n},style:{transform:`${o?`rotate(${o})`:""} ${i?"scaleX(-1)":""}`}})},{isShallowEqual:!0,maxSize:Object.keys(bs).length,matchesArg:(e,t)=>e.icon===t.icon&&e.body===t.body});function L({icon:e,size:t="m",alt:n,title:o,class:i="",style:a={}}){if(!e)return null;const s=wc[t];let c=bs[e];if(!c)return null;let l,u,f=!1;Array.isArray(c)?[c,l,u]=c:typeof c=="object"&&({rotate:l,flip:u,rtl:f}=c,c=c.module);const[d,h]=K(li[e]),p=D(e);return J(()=>{d&&p.current===e||((async()=>{const m=await c();h(m.default),li[e]=m.default})(),p.current=e)},[e]),r("span",{class:`icon ${i} ${f?"rtl-flip":""}`,title:o||n,style:{width:`${s}px`,height:`${s}px`,...a},"data-icon":e,children:d&&r(Ec,{icon:e,width:d.width,height:d.height,body:d.body,rotate:l,flip:u})})}function xc(e,t=[]){!e||typeof e!="function"||J(()=>{const n=new CloseWatcher;return n.addEventListener("close",e),()=>{n.destroy()}},t)}const Sc=window.CloseWatcher?xc:()=>{},kc=document.getElementById("modal-container");function ui(){return getComputedStyle(document.documentElement).getPropertyValue("--backdrop-theme-color")}function ar({children:e,onClose:t,onClick:n,class:o,minimized:i}){if(!e)return null;const a=D();J(()=>{let d=setTimeout(()=>{var p;const h=(p=a.current)==null?void 0:p.querySelector('[tabindex="-1"]');h&&h.focus()},100);return()=>clearTimeout(d)},[]);const s=window.CloseWatcher,c=Bt("esc",()=>{setTimeout(()=>{t==null||t()},0)},{enabled:!s&&!!t,keydown:!1,keyup:!0},[t]);Sc(t,[t]),J(()=>{const d=document.querySelectorAll(".deck-container");if(i){const h=d[d.length-1];h&&h.tabIndex===-1&&h.focus()}else e?d.forEach(h=>{h.setAttribute("inert","")}):d.forEach(h=>{h.removeAttribute("inert")});return()=>{d.forEach(h=>{h.removeAttribute("inert")})}},[e,i]);const l=D(),u=D();Rt(()=>{if(e&&!i)if(ir.local.get("theme")){const h=ui();l.current=document.querySelector('meta[name="theme-color"][data-theme-setting="manual"]'),l.current&&(u.current=l.current.content,l.current.content=h)}else{const h=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",p=ui();l.current=document.querySelector(`meta[name="theme-color"][media*="${h}"]`),l.current&&(u.current=l.current.content,l.current.content=p)}else l.current&&u.current&&(l.current.content=u.current);return()=>{l.current&&u.current&&(l.current.content=u.current)}},[e,i]);const f=r("div",{ref:d=>{var h;a.current=d,c(((h=d==null?void 0:d.querySelector)==null?void 0:h.call(d,'[tabindex="-1"]'))||d)},className:o,onClick:d=>{n==null||n(d),d.target===d.currentTarget&&(t==null||t(d))},tabIndex:i?0:"-1",inert:i,onFocus:d=>{var h,p;try{if(d.target===d.currentTarget){const m=(h=a.current)==null?void 0:h.querySelector('[tabindex="-1"]'),_=!!m&&((p=getComputedStyle(m))==null?void 0:p.pointerEvents)!=="none";m&&_&&m.focus()}}catch{}},children:e});return co(f,kc)}var oo={exports:{}},Po,di;function Ic(){if(di)return Po;di=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Po=e,Po}var Ro,fi;function Ac(){if(fi)return Ro;fi=1;var e=Ic();function t(){}function n(){}return n.resetWarningCache=t,Ro=function(){function o(s,c,l,u,f,d){if(d!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}o.isRequired=o;function i(){return o}var a={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:i,element:o,elementType:o,instanceOf:i,node:o,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},Ro}var oh=oo.exports,hi;function Cc(){if(hi)return oo.exports;if(hi=1,0)var e,t;else oo.exports=Ac()();return oo.exports}var U=Cc();const Cr=e=>!!e&&e[0]==="o",cr=Ha||(e=>e());const xn=(e,t)=>e===!0||!!(e&&e[t]),ze=(e,t)=>typeof e=="function"?e(t):e,Pc="_szhsinMenu",Rc=e=>e[Pc];const Jt=(e,t)=>(t&&Object.keys(t).forEach(n=>{const o=e[n],i=t[n];typeof i=="function"&&o?e[n]=(...a)=>{i(...a),o(...a)}:e[n]=i}),e),Lc=e=>{if(typeof e!="string")return{top:0,right:0,bottom:0,left:0};const t=e.trim().split(/\s+/,4).map(parseFloat),n=isNaN(t[0])?0:t[0],o=isNaN(t[1])?n:t[1];return{top:n,right:o,bottom:isNaN(t[2])?n:t[2],left:isNaN(t[3])?o:t[3]}},Lo=e=>{for(;e;){if(e=e.parentNode,!e||e===document.body||!e.parentNode)return;const{overflow:t,overflowX:n,overflowY:o}=getComputedStyle(e);if(/auto|scroll|overlay|hidden/.test(t+o+n))return e}};function _o(e,t){return{"aria-disabled":e||void 0,tabIndex:t?0:-1}}function pi(e,t){for(let n=0;n({[e?`${e}ClassName`:"className"]:U.oneOfType([U.string,U.func])}),Oc={className:U.string,...Mc("menu"),arrowProps:U.object,focusProps:U.object,menuStyle:U.object,arrow:U.bool,setDownOverflow:U.bool,gap:U.number,shift:U.number,align:U.oneOf(["start","center","end"]),direction:U.oneOf(["left","right","top","bottom"]),position:U.oneOf(["auto","anchor","initial"]),overflow:U.oneOf(["auto","visible","hidden"])},rh={...Oc,containerProps:U.object,initialMounted:U.bool,unmountOnClose:U.bool,transition:U.oneOfType([U.bool,U.exact({open:U.bool,close:U.bool,item:U.bool})]),transitionTimeout:U.number,boundingBoxRef:U.object,boundingBoxPadding:U.string,reposition:U.oneOf(["auto","initial"]),repositionFlag:U.oneOfType([U.string,U.number]),viewScroll:U.oneOf(["auto","close","initial"]),submenuOpenDelay:U.number,submenuCloseDelay:U.number,portal:U.oneOfType([U.bool,U.exact({target:U.object,stablePosition:U.bool})]),theming:U.string,onItemClick:U.func},ih={instanceRef:U.oneOfType([U.object,U.func]),onMenuChange:U.func},et=({block:e,element:t,modifiers:n,className:o})=>se(()=>{const i=t?`${e}__${t}`:e;let a=i;n&&Object.keys(n).forEach(c=>{const l=n[c];l&&(a+=` ${i}--${l===!0?c:`${c}-${l}`}`)});let s=typeof o=="function"?o(n):o;return typeof s=="string"&&(s=s.trim(),s&&(a+=` ${s}`)),a},[e,t,n,o]),Dc="szh-menu-container",Je="szh-menu";const $c="arrow",Pr="item",Nc="divider",Fc="header",zc="group",Vc="submenu";const Ts=lt(),Rr=lt({}),uo=lt({}),Lr=lt({}),Hc=lt({}),yo=lt({}),$e=Object.freeze({ENTER:"Enter",ESC:"Escape",SPACE:" ",HOME:"Home",END:"End",LEFT:"ArrowLeft",RIGHT:"ArrowRight",UP:"ArrowUp",DOWN:"ArrowDown"}),we=Object.freeze({RESET:0,SET:1,UNSET:2,INCREASE:3,DECREASE:4,FIRST:5,LAST:6,SET_INDEX:7}),Sn=Object.freeze({CLICK:"click",CANCEL:"cancel",BLUR:"blur",SCROLL:"scroll"}),jt=Object.freeze({FIRST:"first",LAST:"last"}),Bc=Object.freeze({entering:"opening",entered:"open",exiting:"closing",exited:"closed"}),Mo="absolute",kn="none",Mr="menuitem";const Uc=({className:e,containerRef:t,containerProps:n,children:o,isOpen:i,theming:a,transition:s,onClose:c})=>{const l=xn(s,"item");return r("div",{...Jt({onKeyDown:({key:d})=>{switch(d){case $e.ESC:ze(c,{key:d,reason:Sn.CANCEL});break}},onBlur:d=>{i&&!d.currentTarget.contains(d.relatedTarget)&&ze(c,{reason:Sn.BLUR})}},n),className:et({block:Dc,modifiers:se(()=>({theme:a,itemTransition:l}),[a,l]),className:e}),style:{position:"absolute",...n==null?void 0:n.style},ref:t,children:o})},jc=()=>{let e,t=0;return{toggle:n=>{n?t++:t--,t=Math.max(t,0)},on:(n,o,i)=>{t?e||(e=setTimeout(()=>{e=0,o()},n)):i==null||i()},off:()=>{e&&(clearTimeout(e),e=0)}}},Wc=(e,t)=>{const[n,o]=K(),a=D({items:[],hoverIndex:-1,sorted:!1}).current,s=ke((l,u)=>{const{items:f}=a;if(!l)a.items=[];else if(u)f.push(l);else{const d=f.indexOf(l);d>-1&&(f.splice(d,1),l.contains(document.activeElement)&&(t.current.focus(),o()))}a.hoverIndex=-1,a.sorted=!1},[a,t]),c=ke((l,u,f)=>{const{items:d,hoverIndex:h}=a,p=()=>{if(a.sorted)return;const v=e.current.querySelectorAll(".szh-menu__item");d.sort((T,b)=>pi(v,T)-pi(v,b)),a.sorted=!0};let m=-1,_;switch(l){case we.RESET:break;case we.SET:_=u;break;case we.UNSET:_=v=>v===u?void 0:v;break;case we.FIRST:p(),m=0,_=d[m];break;case we.LAST:p(),m=d.length-1,_=d[m];break;case we.SET_INDEX:p(),m=f,_=d[m];break;case we.INCREASE:p(),m=h,m<0&&(m=d.indexOf(u)),m++,m>=d.length&&(m=0),_=d[m];break;case we.DECREASE:p(),m=h,m<0&&(m=d.indexOf(u)),m--,m<0&&(m=d.length-1),_=d[m];break;default:}_||(m=-1),o(_),a.hoverIndex=m},[e,a]);return{hoverItem:n,dispatch:c,updateItems:s}},mi=(e,t)=>Math.round(e)===t?e:t,ws=e=>{const t=e.getBoundingClientRect();return t.width=mi(t.width,e.offsetWidth),t.height=mi(t.height,e.offsetHeight),t},Kc=(e,t,n,o)=>{const i=ws(t.current),a=e.current.getBoundingClientRect(),s=n===window?{left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight}:n.getBoundingClientRect(),c=Lc(o),l=m=>m+a.left-s.left-c.left,u=m=>m+a.left+i.width-s.right+c.right,f=m=>m+a.top-s.top-c.top,d=m=>m+a.top+i.height-s.bottom+c.bottom;return{menuRect:i,containerRect:a,getLeftOverflow:l,getRightOverflow:u,getTopOverflow:f,getBottomOverflow:d,confineHorizontally:m=>{let _=l(m);if(_<0)m-=_;else{const v=u(m);v>0&&(m-=v,_=l(m),_<0&&(m-=_))}return m},confineVertically:m=>{let _=f(m);if(_<0)m-=_;else{const v=d(m);v>0&&(m-=v,_=f(m),_<0&&(m-=_))}return m}}},Zc=({arrowRef:e,menuY:t,anchorRect:n,containerRect:o,menuRect:i})=>{let a=n.top-o.top-t+n.height/2;const s=e.current.offsetHeight*1.25;return a=Math.max(s,a),a=Math.min(a,i.height-s),a},qc=({anchorRect:e,containerRect:t,menuRect:n,placeLeftorRightY:o,placeLeftX:i,placeRightX:a,getLeftOverflow:s,getRightOverflow:c,confineHorizontally:l,confineVertically:u,arrowRef:f,arrow:d,direction:h,position:p})=>{let m=h,_=o;p!=="initial"&&(_=u(_),p==="anchor"&&(_=Math.min(_,e.bottom-t.top),_=Math.max(_,e.top-t.top-n.height)));let v,T,b;return m==="left"?(v=i,p!=="initial"&&(T=s(v),T<0&&(b=c(a),(b<=0||-T>b)&&(v=a,m="right")))):(v=a,p!=="initial"&&(b=c(v),b>0&&(T=s(i),(T>=0||-T{let a=n.left-o.left-t+n.width/2;const s=e.current.offsetWidth*1.25;return a=Math.max(s,a),a=Math.min(a,i.width-s),a},Yc=({anchorRect:e,containerRect:t,menuRect:n,placeToporBottomX:o,placeTopY:i,placeBottomY:a,getTopOverflow:s,getBottomOverflow:c,confineHorizontally:l,confineVertically:u,arrowRef:f,arrow:d,direction:h,position:p})=>{let m=h==="top"?"top":"bottom",_=o;p!=="initial"&&(_=l(_),p==="anchor"&&(_=Math.min(_,e.right-t.left),_=Math.max(_,e.left-t.left-n.width)));let v,T,b;return m==="top"?(v=i,p!=="initial"&&(T=s(v),T<0&&(b=c(a),(b<=0||-T>b)&&(v=a,m="bottom")))):(v=a,p!=="initial"&&(b=c(v),b>0&&(T=s(i),(T>=0||-T{const{menuRect:u,containerRect:f}=l,d=n==="left"||n==="right";let h=d?o:i,p=d?i:o;if(e){const g=c.current;d?h+=g.offsetWidth:p+=g.offsetHeight}const m=s.left-f.left-u.width-h,_=s.right-f.left+h,v=s.top-f.top-u.height-p,T=s.bottom-f.top+p;let b,w;t==="end"?(b=s.right-f.left-u.width,w=s.bottom-f.top-u.height):t==="center"?(b=s.left-f.left-(u.width-s.width)/2,w=s.top-f.top-(u.height-s.height)/2):(b=s.left-f.left,w=s.top-f.top),b+=h,w+=p;const I={...l,anchorRect:s,placeLeftX:m,placeRightX:_,placeLeftorRightY:w,placeTopY:v,placeBottomY:T,placeToporBottomX:b,arrowRef:c,arrow:e,direction:n,position:a};switch(n){case"left":case"right":return qc(I);case"top":case"bottom":default:return Yc(I)}},Wt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?Rt:J;function gi(e,t){typeof e=="function"?e(t):e.current=t}const en=(e,t)=>se(()=>e?t?n=>{gi(e,n),gi(t,n)}:e:t,[e,t]),vi=-9999,Es=({ariaLabel:e,menuClassName:t,menuStyle:n,arrow:o,arrowProps:i={},anchorPoint:a,anchorRef:s,containerRef:c,containerProps:l,focusProps:u,externalRef:f,parentScrollingRef:d,align:h="start",direction:p="bottom",position:m="auto",overflow:_="visible",setDownOverflow:v,repositionFlag:T,captureFocus:b=!0,state:w,endTransition:I,isDisabled:g,menuItemFocus:x,gap:E=0,shift:A=0,children:M,onClose:R,...S})=>{const[C,N]=K({x:vi,y:vi}),[q,B]=K({}),[X,ae]=K(),[ie,ee]=K(p),[Q]=K(jc),[me,he]=cs(ne=>ne+1,1),{transition:z,boundingBoxRef:ce,boundingBoxPadding:le,rootMenuRef:Me,rootAnchorRef:ge,scrollNodesRef:Ve,reposition:Ae,viewScroll:ye,submenuCloseDelay:He}=Ne(yo),{submenuCtx:Ce,reposSubmenu:F=T}=Ne(uo),Y=D(null),Ze=D(),nt=D(),re=D(!1),{hoverItem:H,dispatch:Z,updateItems:te}=Wc(Y,Ze),oe=Cr(w),ue=xn(z,"open"),Fe=xn(z,"close"),W=Ve.current,We=ne=>{switch(ne.key){case $e.HOME:Z(we.FIRST);break;case $e.END:Z(we.LAST);break;case $e.UP:Z(we.DECREASE,H);break;case $e.DOWN:Z(we.INCREASE,H);break;case $e.SPACE:ne.target&&ne.target.className.indexOf(Je)!==-1&&ne.preventDefault();return;default:return}ne.preventDefault(),ne.stopPropagation()},Ln=()=>{w==="closing"&&ae(),ze(I)},pe=ne=>{ne.stopPropagation(),Q.on(He,()=>{Z(we.RESET),Ze.current.focus()})},be=ne=>{ne.target===ne.currentTarget&&Q.off()},Se=ke(ne=>{var _e;const Pe=s?(_e=s.current)==null?void 0:_e.getBoundingClientRect():a?{left:a.x,right:a.x,top:a.y,bottom:a.y,width:0,height:0}:null;if(!Pe)return;W.menu||(W.menu=(ce?ce.current:Lo(Me.current))||window);const Te=Kc(c,Y,W.menu,le);let{arrowX:xe,arrowY:ht,x:Ot,y:Et,computedDirection:Mn}=Xc({arrow:o,align:h,direction:p,gap:E,shift:A,position:m,anchorRect:Pe,arrowRef:nt,positionHelpers:Te});const{menuRect:Ge}=Te,on=Ge.height;if(!ne&&_!=="visible"){const{getTopOverflow:Ke,getBottomOverflow:xt}=Te;let St,rn;const fe=xt(Et);if(fe>0)St=on-fe,rn=fe;else{const pt=Ke(Et);pt<0&&(St=on+pt,rn=0-pt,St>=0&&(Et-=pt))}St>=0&&ae({height:St,overflowAmt:rn})}o&&B({x:xe,y:ht}),N({x:Ot,y:Et}),ee(Mn)},[o,h,le,p,E,A,m,_,a,s,c,ce,Me,W]);Wt(()=>{oe&&(Se(),re.current&&he()),re.current=oe},[oe,Se,F]),Wt(()=>{X&&!v&&(Y.current.scrollTop=0)},[X,v]),Wt(()=>te,[te]),J(()=>{let{menu:ne}=W;if(!oe||!ne)return;if(ne=ne.addEventListener?ne:window,!W.anchors){W.anchors=[];let xe=Lo(ge&&ge.current);for(;xe&&xe!==ne;)W.anchors.push(xe),xe=Lo(xe)}let _e=ye;if(W.anchors.length&&_e==="initial"&&(_e="auto"),_e==="initial")return;const Pe=()=>{_e==="auto"?cr(()=>Se(!0)):ze(R,{reason:Sn.SCROLL})},Te=W.anchors.concat(ye!=="initial"?ne:[]);return Te.forEach(xe=>xe.addEventListener("scroll",Pe)),()=>Te.forEach(xe=>xe.removeEventListener("scroll",Pe))},[ge,W,oe,R,ye,Se]);const Oe=!!X&&X.overflowAmt>0;J(()=>{if(Oe||!oe||!d)return;const ne=()=>cr(Se),_e=d.current;return _e.addEventListener("scroll",ne),()=>_e.removeEventListener("scroll",ne)},[oe,Oe,d,Se]),J(()=>{if(!oe||typeof ResizeObserver!="function"||Ae==="initial")return;const ne=[],_e=new ResizeObserver(xe=>xe.forEach(({target:ht})=>{ne.indexOf(ht)<0?ne.push(ht):Ba(()=>{Se(),he()})})),Pe={box:"border-box"};_e.observe(Y.current,Pe);const Te=s==null?void 0:s.current;return Te&&_e.observe(Te,Pe),()=>_e.disconnect()},[oe,Ae,s,Se]),J(()=>{if(!oe){Z(we.RESET),Fe||ae();return}const{position:ne,alwaysUpdate:_e}=x||{},Pe=()=>{ne===jt.FIRST?Z(we.FIRST):ne===jt.LAST?Z(we.LAST):ne>=-1&&Z(we.SET_INDEX,void 0,ne)};if(_e)Pe();else if(b){const Te=setTimeout(()=>{const xe=Y.current;xe&&!xe.contains(document.activeElement)&&(Ze.current.focus(),Pe())},ue?170:100);return()=>clearTimeout(Te)}},[oe,ue,Fe,b,x,Z]);const dt=se(()=>({isParentOpen:oe,submenuCtx:Q,dispatch:Z,updateItems:te}),[oe,Q,Z,te]);let Mt,ft;X&&(v?ft=X.overflowAmt:Mt=X.height);const tn=se(()=>({reposSubmenu:me,submenuCtx:Q,overflow:_,overflowAmt:ft,parentMenuRef:Y,parentDir:ie}),[me,Q,_,ft,ie]),To=Mt>=0?{maxHeight:Mt,overflow:_}:void 0,ve=se(()=>({state:w,align:h,dir:ie}),[w,h,ie]),nn=se(()=>({dir:ie}),[ie]),wt=et({block:Je,element:$c,modifiers:nn,className:i.className}),qe=r("ul",{role:"menu","aria-label":e,..._o(g),...Jt({onPointerEnter:Ce==null?void 0:Ce.off,onPointerMove:pe,onPointerLeave:be,onKeyDown:We,onAnimationEnd:Ln},S),ref:en(f,Y),className:et({block:Je,modifiers:ve,className:t}),style:{...n,...To,margin:0,display:w==="closed"?"none":void 0,position:Mo,left:C.x,top:C.y},children:[r("li",{tabIndex:-1,role:kn,style:{position:Mo,left:0,top:0,display:"block",outline:"none"},ref:Ze,...u}),o&&r("li",{role:kn,...i,className:wt,style:{display:"block",position:Mo,left:q.x,top:q.y,...i.style},ref:nt}),r(uo.Provider,{value:tn,children:r(Rr.Provider,{value:dt,children:r(Ts.Provider,{value:H,children:ze(M,ve)})})})]});return l?r(Uc,{...l,isOpen:oe,children:qe}):qe},xs=bt(function({"aria-label":t,className:n,containerProps:o,initialMounted:i,unmountOnClose:a,transition:s,transitionTimeout:c,boundingBoxRef:l,boundingBoxPadding:u,reposition:f="auto",submenuOpenDelay:d=300,submenuCloseDelay:h=150,viewScroll:p="initial",portal:m,theming:_,onItemClick:v,...T},b){const w=D(null),I=D({}),{anchorRef:g,state:x,onClose:E}=T,A=se(()=>({initialMounted:i,unmountOnClose:a,transition:s,transitionTimeout:c,boundingBoxRef:l,boundingBoxPadding:u,rootMenuRef:w,rootAnchorRef:g,scrollNodesRef:I,reposition:f,viewScroll:p,submenuOpenDelay:d,submenuCloseDelay:h}),[i,a,s,c,g,l,u,f,p,d,h]),M=se(()=>({handleClick(S,C){S.stopPropagation||ze(v,S);let N=S.keepOpen;N===void 0&&(N=C&&S.key===$e.SPACE),N||ze(E,{value:S.value,key:S.key,reason:Sn.CLICK})},handleClose(S){ze(E,{key:S,reason:Sn.CLICK})}}),[v,E]);if(!x)return null;const R=r(yo.Provider,{value:A,children:r(Lr.Provider,{value:M,children:r(Es,{...T,ariaLabel:t||"Menu",externalRef:b,containerRef:w,containerProps:{className:n,containerRef:w,containerProps:o,theming:_,transition:s,onClose:E}})})});return m===!0&&typeof document<"u"?co(R,document.body):m?m.target?co(R,m.target):m.stablePosition?null:R:R}),lr=0,ur=1,fo=2,ho=3,po=4,Qc=5,Ss=6,Jc=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],ks=e=>({_s:e,status:Jc[e],isEnter:epo}),dr=e=>e?Ss:Qc,el=(e,t)=>{switch(e){case ur:case lr:return fo;case po:case ho:return dr(t)}},tl=e=>typeof e=="object"?[e.enter,e.exit]:[e,e],nl=(e,t)=>setTimeout(()=>{isNaN(document.body.offsetTop)||e(t+1)},0),_i=(e,t,n,o,i)=>{clearTimeout(o.current);const a=ks(e);t(a),n.current=a,i&&i({current:a})},ol=({enter:e=!0,exit:t=!0,preEnter:n,preExit:o,timeout:i,initialEntered:a,mountOnEnter:s,unmountOnExit:c,onStateChange:l}={})=>{const[u,f]=K(()=>ks(a?fo:dr(s))),d=D(u),h=D(),[p,m]=tl(i),_=ke(()=>{const T=el(d.current._s,c);T&&_i(T,f,d,h,l)},[l,c]),v=ke(T=>{const b=I=>{switch(_i(I,f,d,h,l),I){case ur:p>=0&&(h.current=setTimeout(_,p));break;case po:m>=0&&(h.current=setTimeout(_,m));break;case lr:case ho:h.current=nl(b,I);break}},w=d.current.isEnter;typeof T!="boolean"&&(T=!w),T?!w&&b(e?n?lr:ur:fo):w&&b(t?o?ho:po:dr(c))},[_,l,e,t,n,o,p,m,c]);return J(()=>()=>clearTimeout(h.current),[]),[u,v,_]};const rl=({initialOpen:e,initialMounted:t,unmountOnClose:n,transition:o,transitionTimeout:i=500}={})=>{const[{status:a},s,c]=ol({initialEntered:e,mountOnEnter:!t,unmountOnExit:n,timeout:i,enter:xn(o,"open"),exit:xn(o,"close")});return[{state:Bc[a],endTransition:c},s]},Is=e=>{const[t,n]=rl(e),[o,i]=K(),a=(s,c)=>{i({position:s,alwaysUpdate:c}),n(!0)};return[{menuItemFocus:o,...t},n,a]},il=(e,t)=>{const[n]=K({});return{onMouseDown:()=>{n.v=e&&e!=="closed"},onClick:o=>n.v?n.v=!1:t(!0,o)}},As=(e,t)=>{const n=D(t);J(()=>{n.current!==t&&ze(e,{open:t}),n.current=t},[e,t])},sl=bt(function({"aria-label":t,captureFocus:n,initialOpen:o,menuButton:i,instanceRef:a,onMenuChange:s,...c},l){const[u,f,d]=Is(c),{state:h}=u,p=Cr(h),m=D(null),_=il(h,(g,x)=>d(x.detail?void 0:jt.FIRST)),v=ke(g=>{f(!1),g.key&&m.current.focus()},[f]),T=g=>{switch(g.key){case $e.UP:d(jt.LAST);break;case $e.DOWN:d(jt.FIRST);break;default:return}g.preventDefault()},b=ze(i,{open:p});if(!b||!b.type)throw new Error("Menu requires a menuButton prop.");const w={ref:en(b.ref,m),...Jt({onKeyDown:T,..._},b.props)};Rc(b.type)==="MenuButton"&&(w.isOpen=p);const I=ls(b,w);return As(s,p),us(a,()=>({openMenu:d,closeMenu:()=>f(!1)})),r($,{children:[I,r(xs,{...c,...u,"aria-label":t||(typeof b.props.children=="string"?b.props.children:"Menu"),anchorRef:m,ref:l,onClose:v})]})}),Or=(e,t)=>{const n=Qt(t),o=bt((i,a)=>{const s=D(null);return r(n,{...i,itemRef:s,externalRef:a,isHovering:Ne(Ts)===s.current})});return o.displayName=`WithHovering(${e})`,o},Cs=(e,t,n)=>{Wt(()=>{if(e)return;const o=t.current;return n(o,!0),()=>{n(o)}},[e,t,n])},al=Or("SubMenu",function({"aria-label":t,className:n,disabled:o,direction:i,label:a,openTrigger:s,onMenuChange:c,isHovering:l,instanceRef:u,itemRef:f,captureFocus:d,repositionFlag:h,itemProps:p={},...m}){const _=Ne(yo),{rootMenuRef:v,submenuOpenDelay:T,submenuCloseDelay:b}=_,{parentMenuRef:w,parentDir:I,overflow:g}=Ne(uo),{isParentOpen:x,submenuCtx:E,dispatch:A,updateItems:M}=Ne(Rr),R=g!=="visible",[S,C,N]=Is(_),{state:q}=S,B=!!o,X=Cr(q),ae=D(null),[ie]=K({v:0}),ee=()=>{E.off(),ie.v&&(clearTimeout(ie.v),ie.v=0)},Q=(...F)=>{ee(),me(),!B&&N(...F)},me=()=>!l&&!B&&A(we.SET,f.current),he=F=>{me(),s||(ie.v=setTimeout(()=>cr(Q),Math.max(F,0)))},z=F=>{B||(F.stopPropagation(),!(ie.v||X)&&E.on(b,()=>he(T-b),()=>he(T)))},ce=()=>{ee(),X||A(we.UNSET,f.current)},le=F=>{if(l)switch(F.key){case $e.ENTER:F.preventDefault();case $e.SPACE:case $e.RIGHT:s!=="none"&&Q(jt.FIRST)}},Me=F=>{let Y=!1;switch(F.key){case $e.LEFT:X&&(f.current.focus(),C(!1),Y=!0);break;case $e.RIGHT:X||(Y=!0);break}Y&&(F.preventDefault(),F.stopPropagation())};Cs(B,f,M),As(c,X),J(()=>E.toggle(X),[E,X]),J(()=>()=>clearTimeout(ie.v),[ie]),J(()=>{l&&x?f.current.focus():C(!1)},[l,x,C,f]),us(u,()=>({openMenu:(...F)=>{x&&Q(...F)},closeMenu:()=>{X&&(f.current.focus(),C(!1))}}));const ge=se(()=>({open:X,hover:l,disabled:B,submenu:!0}),[X,l,B]),{ref:Ve,className:Ae,...ye}=p,He=Jt({onPointerEnter:E.off,onPointerMove:z,onPointerLeave:ce,onKeyDown:le,onClick:()=>s!=="none"&&Q()},ye),Ce=()=>{const F=r(Es,{...m,...S,ariaLabel:t||(typeof a=="string"?a:"Submenu"),anchorRef:f,containerRef:R?v:ae,direction:i||(I==="right"||I==="left"?I:"right"),parentScrollingRef:R&&w,isDisabled:B}),Y=v.current;return R&&Y?co(F,Y):F};return r("li",{className:et({block:Je,element:Vc,className:n}),style:{position:"relative"},role:kn,ref:ae,onKeyDown:Me,children:[r("div",{role:Mr,"aria-haspopup":!0,"aria-expanded":X,..._o(B,l),...He,ref:en(Ve,f),className:et({block:Je,element:Pr,modifiers:ge,className:Ae}),children:se(()=>ze(a,ge),[a,ge])}),q&&Ce()]})}),Ps=(e,t,n,o)=>{const{submenuCloseDelay:i}=Ne(yo),{isParentOpen:a,submenuCtx:s,dispatch:c,updateItems:l}=Ne(Rr),u=()=>{!n&&!o&&c(we.SET,e.current)},f=()=>{!o&&c(we.UNSET,e.current)},d=m=>{n&&!m.currentTarget.contains(m.relatedTarget)&&f()},h=m=>{o||(m.stopPropagation(),s.on(i,u,u))},p=(m,_)=>{s.off(),!_&&f()};return Cs(o,e,l),J(()=>{n&&a&&t.current&&t.current.focus()},[t,n,a]),{setHover:u,onBlur:d,onPointerMove:h,onPointerLeave:p}},Ee=Or("MenuItem",function({className:t,value:n,href:o,type:i,checked:a,disabled:s,children:c,onClick:l,isHovering:u,itemRef:f,externalRef:d,...h}){const p=!!s,{setHover:m,..._}=Ps(f,f,u,p),v=Ne(Lr),T=Ne(Hc),b=i==="radio",w=i==="checkbox",I=!!o&&!p&&!b&&!w,g=b?T.value===n:w?!!a:!1,x=S=>{if(p){S.stopPropagation(),S.preventDefault();return}const C={value:n,syntheticEvent:S};S.key!==void 0&&(C.key=S.key),w&&(C.checked=!g),b&&(C.name=T.name),ze(l,C),b&&ze(T.onRadioChange,C),v.handleClick(C,w||b)},E=S=>{if(u)switch(S.key){case $e.ENTER:S.preventDefault();case $e.SPACE:I?f.current.click():x(S)}},A=se(()=>({type:i,disabled:p,hover:u,checked:g,anchor:I}),[i,p,u,g,I]),M=Jt({..._,onPointerDown:m,onKeyDown:E,onClick:x},h),R={role:b?"menuitemradio":w?"menuitemcheckbox":Mr,"aria-checked":b||w?g:void 0,..._o(p,u),...M,ref:en(d,f),className:et({block:Je,element:Pr,modifiers:A,className:t}),children:se(()=>ze(c,A),[c,A])};return I?r("li",{role:kn,children:r("a",{href:o,...R})}):r("li",{...R})}),cl=Or("FocusableItem",function({className:t,disabled:n,children:o,isHovering:i,itemRef:a,externalRef:s,...c}){const l=!!n,u=D(null),{setHover:f,onPointerLeave:d,...h}=Ps(a,u,i,l),{handleClose:p}=Ne(Lr),m=se(()=>({disabled:l,hover:i,focusable:!0}),[l,i]),_=se(()=>ze(o,{...m,ref:u,closeMenu:p}),[o,m,p]),v=Jt({...h,onPointerLeave:T=>d(T,!0),onFocus:f},c);return r("li",{role:Mr,..._o(l),...v,ref:en(s,a),className:et({block:Je,element:Pr,modifiers:m,className:t}),children:_})}),un=Qt(bt(function({className:t,...n},o){return r("li",{role:"separator",...n,ref:o,className:et({block:Je,element:Nc,className:t})})})),sh=Qt(bt(function({className:t,...n},o){return r("li",{role:kn,...n,ref:o,className:et({block:Je,element:Fc,className:t})})})),ah=bt(function({className:t,style:n,takeOverflow:o,...i},a){const s=D(null),[c,l]=K(),{overflow:u,overflowAmt:f}=Ne(uo);return Wt(()=>{let d;o&&f>=0&&(d=ws(s.current).height-f,d<0&&(d=0)),l(d>=0?{maxHeight:d,overflow:u}:void 0)},[o,u,f]),Wt(()=>{c&&(s.current.scrollTop=0)},[c]),r("div",{...i,ref:en(a,s),className:et({block:Je,element:zc,className:t}),style:{...n,...c}})});const yi={s:16,m:20,l:24,xl:32,xxl:50,xxxl:64},dn={},mn=window.OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas"),ro=mn.getContext("2d",{willReadFrequently:!0});ro.imageSmoothingEnabled=!1;const ll=/missing\.png$/;function ul({url:e,size:t,alt:n="",squircle:o,...i}){t=yi[t]||t||yi.m;const a=D(),s=ll.test(e);return r("span",{ref:a,class:`avatar ${o?"squircle":""} ${dn[e]?"has-alpha":""}`,style:{width:t,height:t},title:n,...i,children:!!e&&r("img",{src:e,width:t,height:t,alt:n,loading:"lazy",decoding:"async",fetchPriority:"low",crossOrigin:dn[e]===void 0&&!s?"anonymous":void 0,onError:c=>{c.target.crossOrigin&&(c.target.crossOrigin=null,c.target.src=e)},onLoad:c=>{a.current&&(a.current.dataset.loaded=!0),dn[e]===void 0&&(s||setTimeout(()=>{try{const{width:l,height:u}=c.target;mn.width!==l&&(mn.width=l),mn.height!==u&&(mn.height=u),ro.drawImage(c.target,0,0);const f=ro.getImageData(0,0,l,u),d=f.data.filter((h,p)=>p%4===3&&h<=128).length/(f.data.length/4)>.1;d&&a.current.classList.add("has-alpha"),dn[e]=d,ro.clearRect(0,0,l,u)}catch{dn[e]=!1}},1))}})})}const st=Le(ul),Zt=bt((e,t)=>{var c;let n;try{n=Ua()}catch{}let o=(location.hash||"").replace(/^#/,"").trim();o===""&&(o="/");const{to:i,...a}=e;if(o&&o!=="/"&&o.includes("?")){const l=URL.parse(o,location.origin);if((c=l==null?void 0:l.searchParams)!=null&&c.size){const u=Array.from(l.searchParams.entries()).map(([f,d])=>`${f}=${encodeURIComponent(d)}`).join("&");o=l.pathname+"?"+u}}const s=o===i||decodeURIComponent(o)===i;return r("a",{ref:t,href:`#${i}`,...a,class:`${e.class||""} ${s?"is-active":""}`,onClick:l=>{var u,f,d;(f=(u=l.currentTarget)==null?void 0:u.parentNode)!=null&&f.closest("a")&&l.stopPropagation(),n&&(V.prevLocation=n),(d=e.onClick)==null||d.call(e,l)}})});let fr=!1;const dl=new MutationObserver(e=>{e.forEach(t=>{if(t.type==="attributes"){const{dir:n}=t.target;n==="rtl"?fr=!0:fr=!1}})});dl.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});function hr(){return fr}const fl=document.documentElement,Wn=getComputedStyle(fl),hl=8;let Rs=[0,0,0,0];function Ls(){const e=Wn.getPropertyValue("--sai-top"),t=Wn.getPropertyValue("--sai-right"),n=Wn.getPropertyValue("--sai-bottom"),o=Wn.getPropertyValue("--sai-left");Rs=[Math.max(0,parseInt(e,10)),Math.max(0,parseInt(t,10)),Math.max(0,parseInt(n,10)),Math.max(0,parseInt(o,10))]}requestAnimationFrame(Ls);function Ms(e=[]){return Rs.map((n,o)=>(n||hl)+(e[o]||0)).join(" ")}CSS.supports("top: env(safe-area-inset-top)")&&window.addEventListener("resize",Ls,{passive:!0});function pl(){const[e,t]=K({width:null,height:null});return Rt(()=>{const n=()=>{t({width:window.innerWidth,height:window.innerHeight})};return n(),window.addEventListener("resize",n,{passive:!0}),()=>{window.removeEventListener("resize",n)}},[]),e}function Os(e){const{containerProps:t,instanceRef:n,align:o}=e,i=pl(),a=n!=null&&n.current?n:D(),s=hr()?o==="end"?"start":o==="start"?"end":o:o;return r(sl,{boundingBoxPadding:Ms(),repositionFlag:`${i.width}x${i.height}`,unmountOnClose:!0,...e,align:s,instanceRef:a,containerProps:{onClick:c=>{var l,u,f;c.target===c.currentTarget&&((u=(l=a.current)==null?void 0:l.closeMenu)==null||u.call(l)),(f=t==null?void 0:t.onClick)==null||f.call(t,c)},...t}})}function ml(e){const t=D();return r(al,{...e,instanceRef:t,itemProps:{onPointerMove:n=>{var o,i;n.pointerType==="touch"&&((i=(o=t.current)==null?void 0:o.openMenu)==null||i.call(o))},onPointerLeave:n=>{var o,i;n.pointerType==="touch"&&((i=(o=t.current)==null?void 0:o.openMenu)==null||i.call(o))},...e.itemProps}})}function Oo({subMenu:e=!1,confirm:t=!0,confirmLabel:n,menuItemClassName:o,menuFooter:i,menuExtras:a,...s}){const{children:c,onClick:l,...u}=s;return t?r(e?ml:Os,{openTrigger:"clickOnly",direction:"bottom",overflow:"auto",gap:-8,shift:8,menuClassName:"menu-emphasized",...u,menuButton:e?void 0:c,label:e?c:void 0,children:[r(Ee,{className:o,onClick:l,children:n}),a,i]}):e?r(Ee,{...s}):l?ja(c,{onClick:l}):c}function bi(e){const{className:t,disabled:n,...o}=e;return r(cl,{className:t,disabled:n,children:({ref:i,closeMenu:a})=>r(Zt,{...o,ref:i,onClick:({detail:s})=>a(s===0?"Enter":void 0)})})}function pr({staticUrl:e,alt:t,url:n}){return r("picture",{children:[e&&r("source",{srcset:e,media:"(prefers-reduced-motion: reduce)"}),r("img",{src:n,alt:t,class:"shortcode-emoji emoji",width:"16",height:"16",loading:"lazy",decoding:"async",fetchPriority:"low"},t||n)]})}const gl=Le(e=>new RegExp(`:(${e.join("|")}):`,"g"));function vl({text:e,emojis:t}){if(!e)return"";if(!(t!=null&&t.length)||e.indexOf(":")===-1)return e;const n=gl(t.map(i=>i.shortcode));return e.split(n).map((i,a)=>{const s=t.find(c=>c.shortcode===i);if(s){const{url:c,staticUrl:l}=s;return r(pr,{staticUrl:l,alt:i,url:c},i+"-"+a)}return i})}const qt=Le(vl),_l=Le(e=>{const t={sensitivity:"base"};try{return new Intl.Collator(e||void 0,t)}catch{return new Intl.Collator(void 0,t)}}),yl=/([^@]+)(@.+)/i,bl=/(\:(\w|\+|\-)+\:)(?=|[\!\.\?]|$)/g,Tl=/\s+/g,wl=/[^a-z0-9@\.]/gi;function El({account:e,instance:t,showAvatar:n,showAcct:o,short:i,external:a,onClick:s}){const{i18n:c}=tt(),{acct:l,avatar:u,avatarStatic:f,id:d,url:h,displayName:p,emojis:m,bot:_,username:v}=e,[T,b,w]=l.match(yl)||[,l];t||(t=lo().instance);const I=v.toLowerCase().trim(),g=(p||"").toLowerCase().trim(),x=g.replace(bl,"").replace(Tl,""),E=x.replace(wl,""),A=!i&&(I===g||I===x||I===E||_l(c.locale).compare(I,x)===0)||E===l.toLowerCase();return r("a",{class:`name-text ${o?"show-acct":""} ${i?"short":""}`,href:h,target:a?"_blank":null,title:p?`${p} (${w?"":"@"}${l})`:`${w?"":"@"}${l}`,onClick:M=>{if(!a&&!M.shiftKey){if(M.preventDefault(),M.stopPropagation(),s)return s(M);if(M.metaKey||M.ctrlKey||M.shiftKey||M.which===2){const R=`#/${t}/a/${d}`;window.open(R,"_blank");return}V.showAccount={account:e,instance:t}}},children:[n&&r($,{children:[r(st,{url:f||u,squircle:_})," "]}),p&&!i?r($,{children:[r("b",{dir:"auto",children:r(qt,{text:p,emojis:m})}),!o&&!A&&r($,{children:[" ",r("i",{class:"bidi-isolate",children:["@",v]})]})]}):i?r("i",{children:v}):r("b",{children:v}),o&&r($,{children:[r("br",{}),r("i",{class:"bidi-isolate",children:[w?"":"@",b,!!w&&r("span",{class:"ib",children:w})]})]})]})}const yt=Le(El),Kn={"zh-YUE":"YUE",zh_HANT:"zh-Hant"},Do=Le(e=>new Intl.DisplayNames(e||void 0,{type:"language"}));function xl(e){let t,n;typeof e=="object"&&({code:e,locale:t,fallback:n}=e);try{const o=Do(t||Ie.locale).of(e);if(o!==e)return o;if(!n){const i=Do(e).of(e);if(i!==e)return i}return n||""}catch{if(Kn[e])try{const i=Do(Kn[t]||t||Ie.locale).of(Kn[e]);return i!==Kn[e]?i:n||""}catch{}return n||""}}const fn=Le(xl);function Ti(e){if(e instanceof Date)return!isNaN(e.getTime());{const t=new Date(e);return!isNaN(t.getTime())}}const Sl=Le(()=>new Intl.DateTimeFormat().resolvedOptions().locale),wi=Le((e,t={})=>{const n=e.replace(/-[a-z]+$/i,""),o=En([n],[Sl()],e);try{return new Intl.DateTimeFormat(o,t)}catch{}try{return new Intl.DateTimeFormat(e,t)}catch{}return new Intl.DateTimeFormat(void 0,t)}),kl=Le(e=>new Intl.RelativeTimeFormat(e||void 0)),Gt=60,Yt=60*Gt,mr=24*Yt,Il=e=>{const t=kl(Ie.locale),n=(e.getTime()-Date.now())/1e3,o=Math.abs(n);return o{const t=(Date.now()-e.getTime())/1e3;return tl+1,0),i=se(()=>new Date(e),[e]),[a,s,c]=se(()=>{if(!Ti(i))return[""+e,"",""];let l;if(t==="micro"){const u=new Date;(u.getTime()-i.getTime())/1e3/mr<=1?l=Al(i):u.getFullYear()===i.getFullYear()?l=wi(Ie.locale,{year:void 0,month:"short",day:"numeric"}).format(i):l=wi(Ie.locale,{dateStyle:"short"}).format(i)}return l||(l=Il(i)),[l,i.toISOString(),i.toLocaleString()]},[i,t,n]);return J(()=>{if(!Ti(i))return;let l,u;function f(){u=requestAnimationFrame(()=>{o(),d()})}function d(){const h=(Date.now()-i.getTime())/1e3;h{clearTimeout(l),cancelAnimationFrame(u)}},[]),r("time",{datetime:s,title:c,children:a})}const Cl=[{code:"af",name:"Afrikaans"},{code:"sq",name:"Albanian"},{code:"am",name:"Amharic"},{code:"ar",name:"Arabic"},{code:"hy",name:"Armenian"},{code:"as",name:"Assamese"},{code:"ay",name:"Aymara"},{code:"az",name:"Azerbaijani"},{code:"bm",name:"Bambara"},{code:"eu",name:"Basque"},{code:"be",name:"Belarusian"},{code:"bn",name:"Bengali"},{code:"bho",name:"Bhojpuri"},{code:"bs",name:"Bosnian"},{code:"bg",name:"Bulgarian"},{code:"ca",name:"Catalan"},{code:"ceb",name:"Cebuano"},{code:"ny",name:"Chichewa"},{code:"zh",name:"Chinese"},{code:"zh_HANT",name:"Chinese (Traditional)"},{code:"co",name:"Corsican"},{code:"hr",name:"Croatian"},{code:"cs",name:"Czech"},{code:"da",name:"Danish"},{code:"dv",name:"Dhivehi"},{code:"doi",name:"Dogri"},{code:"nl",name:"Dutch"},{code:"en",name:"English"},{code:"eo",name:"Esperanto"},{code:"et",name:"Estonian"},{code:"ee",name:"Ewe"},{code:"tl",name:"Filipino"},{code:"fi",name:"Finnish"},{code:"fr",name:"French"},{code:"fy",name:"Frisian"},{code:"gl",name:"Galician"},{code:"ka",name:"Georgian"},{code:"de",name:"German"},{code:"el",name:"Greek"},{code:"gn",name:"Guarani"},{code:"gu",name:"Gujarati"},{code:"ht",name:"Haitian Creole"},{code:"ha",name:"Hausa"},{code:"haw",name:"Hawaiian"},{code:"iw",name:"Hebrew"},{code:"hi",name:"Hindi"},{code:"hmn",name:"Hmong"},{code:"hu",name:"Hungarian"},{code:"is",name:"Icelandic"},{code:"ig",name:"Igbo"},{code:"ilo",name:"Ilocano"},{code:"id",name:"Indonesian"},{code:"ga",name:"Irish"},{code:"it",name:"Italian"},{code:"ja",name:"Japanese"},{code:"jw",name:"Javanese"},{code:"kn",name:"Kannada"},{code:"kk",name:"Kazakh"},{code:"km",name:"Khmer"},{code:"rw",name:"Kinyarwanda"},{code:"gom",name:"Konkani"},{code:"ko",name:"Korean"},{code:"kri",name:"Krio"},{code:"ku",name:"Kurdish (Kurmanji)"},{code:"ckb",name:"Kurdish (Sorani)"},{code:"ky",name:"Kyrgyz"},{code:"lo",name:"Lao"},{code:"la",name:"Latin"},{code:"lv",name:"Latvian"},{code:"ln",name:"Lingala"},{code:"lt",name:"Lithuanian"},{code:"lg",name:"Luganda"},{code:"lb",name:"Luxembourgish"},{code:"mk",name:"Macedonian"},{code:"mai",name:"Maithili"},{code:"mg",name:"Malagasy"},{code:"ms",name:"Malay"},{code:"ml",name:"Malayalam"},{code:"mt",name:"Maltese"},{code:"mi",name:"Maori"},{code:"mr",name:"Marathi"},{code:"mni-Mtei",name:"Meiteilon (Manipuri)"},{code:"lus",name:"Mizo"},{code:"mn",name:"Mongolian"},{code:"my",name:"Myanmar (Burmese)"},{code:"ne",name:"Nepali"},{code:"no",name:"Norwegian"},{code:"or",name:"Odia (Oriya)"},{code:"om",name:"Oromo"},{code:"ps",name:"Pashto"},{code:"fa",name:"Persian"},{code:"pl",name:"Polish"},{code:"pt",name:"Portuguese"},{code:"pa",name:"Punjabi"},{code:"qu",name:"Quechua"},{code:"ro",name:"Romanian"},{code:"ru",name:"Russian"},{code:"sm",name:"Samoan"},{code:"sa",name:"Sanskrit"},{code:"gd",name:"Scots Gaelic"},{code:"nso",name:"Sepedi"},{code:"sr",name:"Serbian"},{code:"st",name:"Sesotho"},{code:"sn",name:"Shona"},{code:"sd",name:"Sindhi"},{code:"si",name:"Sinhala"},{code:"sk",name:"Slovak"},{code:"sl",name:"Slovenian"},{code:"so",name:"Somali"},{code:"es",name:"Spanish"},{code:"su",name:"Sundanese"},{code:"sw",name:"Swahili"},{code:"sv",name:"Swedish"},{code:"tg",name:"Tajik"},{code:"ta",name:"Tamil"},{code:"tt",name:"Tatar"},{code:"te",name:"Telugu"},{code:"th",name:"Thai"},{code:"ti",name:"Tigrinya"},{code:"ts",name:"Tsonga"},{code:"tr",name:"Turkish"},{code:"tk",name:"Turkmen"},{code:"ak",name:"Twi"},{code:"uk",name:"Ukrainian"},{code:"ur",name:"Urdu"},{code:"ug",name:"Uyghur"},{code:"uz",name:"Uzbek"},{code:"vi",name:"Vietnamese"},{code:"cy",name:"Welsh"},{code:"xh",name:"Xhosa"},{code:"yi",name:"Yiddish"},{code:"yo",name:"Yoruba"},{code:"zu",name:"Zulu"}],Pl=Le(()=>[new Intl.DateTimeFormat().resolvedOptions().locale,...navigator.languages]),Rl=()=>En(Pl(),Cl.map(e=>e.code.replace("_","-")),"en");function Ds(e=!1){if(e){const{contentTranslationTargetLanguage:t}=V.settings;if(t)return t}return Rl()}const Ei=["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte"];function ch(e){const t=Math.min(Math.floor(Math.log2(e)/10),Ei.length-1),n=e/1024**t;return Ie.number(n,{style:"unit",unit:Ei[t],unitDisplay:"narrow",maximumFractionDigits:0})}const Ll=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,mo=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(Ll);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},xi=e=>e==="*"||e==="x"||e==="X",Si=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},Ml=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],Ol=(e,t)=>{if(xi(e)||xi(t))return 0;const[n,o]=Ml(Si(e),Si(t));return n>o?1:n{for(let n=0;n{const n=mo(e),o=mo(t),i=n.pop(),a=o.pop(),s=Ut(n,o);return s!==0?s:i&&a?Ut(i.split("."),a.split(".")):i||a?i?-1:1:0},$l=(e,t,n)=>{Nl(n);const o=Dl(e,t);return $s[n].includes(o)},$s={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},ki=Object.keys($s),Nl=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(ki.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${ki.join("|")}`)},io=(e,t)=>{if(t=t.replace(/([><=]+)\s+/g,"$1"),t.includes("||"))return t.split("||").some(v=>io(e,v));if(t.includes(" - ")){const[v,T]=t.split(" - ",2);return io(e,`>=${v} <=${T}`)}else if(t.includes(" "))return t.trim().replace(/\s{2,}/g," ").split(" ").every(v=>io(e,v));const n=t.match(/^([<>=~^]+)/),o=n?n[1]:"=";if(o!=="^"&&o!=="~")return $l(e,t,o);const[i,a,s,,c]=mo(e),[l,u,f,,d]=mo(t),h=[i,a,s],p=[l,u??"x",f??"x"];if(d&&(!c||Ut(h,p)!==0||Ut(c.split("."),d.split("."))===-1))return!1;const m=p.findIndex(v=>v!=="0")+1,_=o==="~"?2:m>1?m:1;return!(Ut(h.slice(0,_),p.slice(0,_))!==0||Ut(h.slice(_),p.slice(_))===-1)};const Fl={"@mastodon/edit-media-attributes":">=4.1","@mastodon/list-exclusive":">=4.2","@gotosocial/list-exclusive":">=0.17","@mastodon/filtered-notifications":"~4.3 || >=4.3","@mastodon/fetch-multiple-statuses":"~4.3 || >=4.3","@mastodon/trending-link-posts":"~4.3 || >=4.3","@mastodon/grouped-notifications":"~4.3 || >=4.3","@mastodon/annual-report":"~4.4 || >=4.4"},$o=/pixelfed/i,ot=/^(?!.*pixelfed).*$/i,zl=/pleroma/i,Vl=/akkoma/i;const Ii={"@mastodon/lists":ot,"@mastodon/filters":ot,"@mastodon/mentions":ot,"@mastodon/trending-hashtags":ot,"@mastodon/trending-links":ot,"@mastodon/post-bookmark":ot,"@mastodon/post-edit":ot,"@mastodon/profile-edit":ot,"@mastodon/profile-private-note":ot,"@pixelfed/trending":$o,"@pixelfed/home-include-reblogs":$o,"@pixelfed/global-feed":$o,"@pleroma/local-visibility-post":zl,"@akkoma/local-visibility-post":Vl},Zn={};function qn(e){var t,n;try{let{version:o,domain:i}=Wa(),a=((n=(t=Ka())==null?void 0:t.software)==null?void 0:n.name)||"mastodon";a==="hometown"&&(a="mastodon");const s=`${i}-${e}`;if(Zn[s])return Zn[s];if(Ii[e])return Zn[s]=Ii[e].test(o);const c=Fl[e];if(!c)return!1;const u=e.match(/^@([a-z]+)\//)[1]===a.toLowerCase();return Zn[s]=u&&io(o,c,{includePrerelease:!0,loose:!0})}catch{return!1}}const Kt=2147483647,Ye=36,Dr=1,In=26,Hl=38,Bl=700,Ns=72,Fs=128,zs="-",Ul=/^xn--/,jl=/[^\0-\x7F]/,Wl=/[\x2E\u3002\uFF0E\uFF61]/g,Kl={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},No=Ye-Dr,Xe=Math.floor,Fo=String.fromCharCode;function gt(e){throw new RangeError(Kl[e])}function Zl(e,t){const n=[];let o=e.length;for(;o--;)n[o]=t(e[o]);return n}function Vs(e,t){const n=e.split("@");let o="";n.length>1&&(o=n[0]+"@",e=n[1]),e=e.replace(Wl,".");const i=e.split("."),a=Zl(i,t).join(".");return o+a}function Hs(e){const t=[];let n=0;const o=e.length;for(;n=55296&&i<=56319&&nString.fromCodePoint(...e),Gl=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:Ye},Ai=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},Bs=function(e,t,n){let o=0;for(e=n?Xe(e/Bl):e>>1,e+=Xe(e/t);e>No*In>>1;o+=Ye)e=Xe(e/No);return Xe(o+(No+1)*e/(e+Hl))},Us=function(e){const t=[],n=e.length;let o=0,i=Fs,a=Ns,s=e.lastIndexOf(zs);s<0&&(s=0);for(let c=0;c=128&>("not-basic"),t.push(e.charCodeAt(c));for(let c=s>0?s+1:0;c=n&>("invalid-input");const h=Gl(e.charCodeAt(c++));h>=Ye&>("invalid-input"),h>Xe((Kt-o)/f)&>("overflow"),o+=h*f;const p=d<=a?Dr:d>=a+In?In:d-a;if(hXe(Kt/m)&>("overflow"),f*=m}const u=t.length+1;a=Bs(o-l,u,l==0),Xe(o/u)>Kt-i&>("overflow"),i+=Xe(o/u),o%=u,t.splice(o++,0,i)}return String.fromCodePoint(...t)},js=function(e){const t=[];e=Hs(e);const n=e.length;let o=Fs,i=0,a=Ns;for(const l of e)l<128&&t.push(Fo(l));const s=t.length;let c=s;for(s&&t.push(zs);c=o&&fXe((Kt-i)/u)&>("overflow"),i+=(l-o)*u,o=l;for(const f of e)if(fKt&>("overflow"),f===o){let d=i;for(let h=Ye;;h+=Ye){const p=h<=a?Dr:h>=a+In?In:h-a;if(d{const{shortcode:o,staticUrl:i,url:a}=n;e=e.replace(new RegExp(`:${o}:`,"g"),`:${o}:`)}),e):""}const Ft=document.createElement("div"),Ql=["u-url","mention","hashtag"],Jl=/[&<>]/g;function zo(e){return e.replace(Jl,t=>({"&":"&","<":"<",">":">"})[t])}const eu=/{}}=t;let a=e;const s=fu(a,o),c=eu.test(a),l=a.includes("```");if(c){const f=s.querySelectorAll('a:not([target="_blank"])');for(const h of f)h.setAttribute("target","_blank");const d=s.querySelectorAll("a[class]");for(const h of d)for(const p of h.classList)Ql.includes(p)||h.classList.remove(p)}if(c){const f=s.querySelectorAll("a[href]");for(const d of f)tu.test(d.textContent.trim())&&(d.classList.add("has-url-text"),vu(d))}if(c){const f=s.querySelectorAll("a[href]"),d=[];for(const h of f){const p=h.innerText.trim(),m=h.querySelector("*");if(nu.test(p)){const[_,v,T]=p.split("@");m||(!d.some(([b])=>b===v)||d.some(([b,w])=>b===v&&w===T)?(h.innerHTML=`@${v}`,d.push([v,T])):h.innerHTML=`@${v}@${T}`),h.classList.add("mention")}ou.test(p)&&(m||(h.innerHTML=`#${p.slice(1)}`),h.classList.add("mention","hashtag"))}}let u;if(a.includes(":")&&(n!=null&&n.length)){u=Ho(s);for(const f of u){let d=zo(f.nodeValue);d=gr(d,n),Ft.innerHTML=d,f.replaceWith(...Ft.childNodes)}}if(l){const f=[...s.querySelectorAll("p")].filter(d=>ru.test(d.innerText.trim()));for(const d of f){const h=document.createElement("pre");for(const p of d.querySelectorAll("br"))p.replaceWith(` `);h.innerHTML=`${d.innerHTML.trim()}`,d.replaceWith(h)}}if(l){const d=[...s.querySelectorAll("p")].filter(h=>iu.test(h.innerText));for(const h of d){const p=[h];let m=!1,_=h;for(;_.nextElementSibling;){const v=_.nextElementSibling;if(v&&v.tagName==="P")if(su.test(v.innerText)){p.push(v),m=!0;break}else p.push(v);else break;_=v}if(m){const v=document.createElement("pre");for(const b of p)for(const w of b.querySelectorAll("br"))w.replaceWith(` `);const T=p.map(b=>b.innerHTML).join(` `);v.innerHTML=`${T}`,h.replaceWith(v);for(const b of p)b.remove()}}}if(a.includes("`")){u=Ho(s);for(const f of u){let d=zo(f.nodeValue);au.test(d)&&(d=d.replaceAll(du,"$1")),Ft.innerHTML=d,f.replaceWith(...Ft.childNodes)}}if(cu.test(a)){u=Ho(s,{rejectFilter:["A"]});for(const f of u){let d=zo(f.nodeValue);lu.test(d)&&(d=d.replaceAll(uu,'$1')),Ft.innerHTML=d,f.replaceWith(...Ft.childNodes)}}if(a.includes("#")){let f=null;const d=[...s.querySelectorAll("p")].filter((h,p)=>{let m=0;for(let _=0;_3||m>1&&f&&p===f+1)return f=p,!0});if(d!=null&&d.length)for(const h of d)h.classList.add("hashtag-stuffing"),h.title=h.innerText}if(a.includes("i(s)),o?s:s.innerHTML}const Ks=Le(hu),pu=["STYLE","IMG","VIDEO","AUDIO","AREA","MAP","TRACK","EMBED","IFRAME","OBJECT","PICTURE","PORTAL","SOURCE","SVG","MATH","CANVAS","NOSCRIPT","SCRIPT","INPUT","OPTION","TEXTAREA","SLOT","TEMPLATE"],mu=Object.fromEntries(pu.map(e=>[e,!0])),gu=/^(https?:\/\/(www\.)?|xmpp:)/,Vo=30;function vu(e){var t;if(!(!e||(t=e.querySelector)!=null&&t.call(e,"*")))try{const n=e.innerText.trim(),o=(n.match(gu)||[])[0]||"";if(!o)return;const i=n.slice(o.length,o.length+Vo),a=n.slice(o.length+Vo),s=n.slice(o.length).length>Vo;e.innerHTML=`${i}`}catch{}}function Ho(e,t={}){var s;const n=[],o=Object.assign({},mu,(s=t.rejectFilter)==null?void 0:s.reduce((c,l)=>(c[l]=!0,c),{})),i=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode(c){return o[c.parentNode.nodeName]?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}},!1);let a;for(;a=i.nextNode();)n.push(a);return n}const zt=document.createElement("div");function _u(e,t){if(!e)return"";const{preProcess:n}=t||{};return zt.innerHTML=e.replace(/<\/p>/g,`

`).replace(/<\/li>/g,` `),zt.querySelectorAll("br").forEach(o=>{o.replaceWith(` `)}),n==null||n(zt),zt.querySelectorAll(".invisible").forEach(o=>{o.remove()}),zt.querySelectorAll(".ellipsis").forEach(o=>{o.append("...")}),zt.innerText.replace(/[\r\n]{3,}/g,` `).trim()}const bo=Le(_u);function yu(e){const{mentions:t=[],instance:n,previewMode:o,statusURL:i}=e||{};return a=>{var f,d;let{target:s}=a;if(s=s.closest("a"),!s||a.metaKey||a.ctrlKey||a.shiftKey||a.altKey||a.which===2)return;const c=(f=s.previousSibling)==null?void 0:f.textContent,l=c==null?void 0:c.endsWith("@"),u=s.innerText.startsWith("@");if((s.classList.contains("u-url")||s.classList.contains("mention"))&&u||l&&!u){const h=(s.querySelector("span")||s).innerText.trim(),p=h.replace(/^@/,""),m=s.getAttribute("href"),_=t.find(v=>v.url===m)||t.find(v=>v.acct===p||v.username===p);if(_)a.preventDefault(),a.stopPropagation(),V.showAccount={account:_.acct,instance:n};else if(!/^http/i.test(h)){a.preventDefault(),a.stopPropagation();const v=s.getAttribute("href");V.showAccount={account:v,instance:n}}}else if(!o){const h=c==null?void 0:c.endsWith("#");if(s.classList.contains("hashtag")||h){a.preventDefault(),a.stopPropagation();const p=s.innerText.replace(/^#/,"").trim(),m=n?`#/${n}/t/${p}`:`#/t/${p}`;location.hash=m}else(d=V.unfurledLinks[s.href])!=null&&d.url&&i!==s.href&&(a.preventDefault(),a.stopPropagation(),V.prevLocation={pathname:location.hash.replace(/^#/,"")},location.hash=`#${V.unfurledLinks[s.href].url}`)}}}function lh(e,t){return()=>Ie.number(e,{style:"unit",unit:t,unitDisplay:"long"})}const bu=Le(()=>new Intl.DateTimeFormat().resolvedOptions().locale),Tu=e=>{const{locale:t,dateYear:n,hideTime:o,formatOpts:i,forceOpts:a}=e||{},s=t.replace(/-[a-z]+$/i,""),c=En([s],[bu],t),l=new Date().getFullYear(),u=a||{year:n===l?void 0:"numeric",month:"short",day:"numeric",hour:o?void 0:"numeric",minute:o?void 0:"numeric",...i};try{return Intl.DateTimeFormat(c,u)}catch{}try{return Intl.DateTimeFormat(t,u)}catch{}return Intl.DateTimeFormat(void 0,u)},wu=Le(Tu);function An(e,t){return e instanceof Date||(e=new Date(e)),wu({dateYear:e.getFullYear(),locale:Ie.locale,...t}).format(e)}function rt(e){try{return Ie.number(e,{notation:"compact",roundingMode:"floor"})}catch{return e}}const Ci=5e3;function Gn(e){if(e||(e=!0),V.showCompose){V.composerState.minimized?Re({duration:Ci,text:Ie._({id:"/4fHR1"})}):Re({duration:Ci,text:Ie._({id:"vvl08N"})});return}Tc(),V.showCompose=e}function uh({skeleton:e,account:t,avatarSize:n="xl",useAvatarStatic:o=!1,instance:i,external:a,internal:s,onClick:c,showActivity:l=!1,showStats:u=!1,accountInstance:f,hideDisplayName:d=!1,relationship:h={},excludeRelationshipAttrs:p=[]}){const{_:m}=tt();if(e)return r("div",{class:"account-block skeleton",children:[r(st,{size:n}),r("span",{children:[r("b",{children:"โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ"}),r("br",{}),r("span",{class:"account-block-acct",children:"โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ"})]})]});if(!t)return null;const{id:_,acct:v,avatar:T,avatarStatic:b,displayName:w,username:I,emojis:g,url:x,statusesCount:E,lastStatusAt:A,bot:M,fields:R,note:S,group:C,followersCount:N,createdAt:q,locked:B}=t;let[X,ae,ie]=v.match(/([^@]+)(@.+)/i)||[,v];f&&(ie=`@${f}`);const ee=R==null?void 0:R.find(he=>!!he.verifiedAt&&!!he.value),Q={};for(const he in h)p.includes(he)||(Q[he]=h[he]);const me=Q.following||Q.followedBy||Q.requested;return r("a",{class:"account-block",href:x,target:a?"_blank":null,title:ie?v:`@${v}`,onClick:he=>{if(!a){if(he.preventDefault(),c)return c(he);s?location.hash=`/${i}/a/${_}`:V.showAccount={account:t,instance:i}}},children:[r("div",{class:"avatar-container",children:r(st,{url:o?b:T||b,size:n,squircle:M})}),r("span",{class:"account-block-content",children:[!d&&r($,{children:w?r("b",{children:r(qt,{text:w,emojis:g})}):r("b",{children:I})})," ",r("span",{class:"account-block-acct bidi-isolate",children:[ie?"":"@",ae,r("wbr",{}),ie,B&&r($,{children:[" ",r(L,{icon:"lock",size:"s",alt:m({id:"G2fuEb"})})]})]}),l&&r("div",{class:"account-block-stats",children:[r(O,{id:"ajzDof",values:{0:rt(E)}}),!!A&&r($,{children:[" ","ยท"," ",r(O,{id:"f8bJ3C",values:{0:An(A,{hideTime:!0})}})]})]}),u&&r("div",{class:"account-block-stats",children:[M&&r($,{children:r("span",{class:"tag collapsed",children:[r(L,{icon:"bot"})," ",r(O,{id:"9Vdq+j"})]})}),!!C&&r($,{children:r("span",{class:"tag collapsed",children:[r(L,{icon:"group"})," ",r(O,{id:"L8fEEm"})]})}),me&&r("div",{class:"shazam-container-horizontal",children:r("div",{class:"shazam-container-inner",children:Q.following&&Q.followedBy?r("span",{class:"tag minimal",children:r(O,{id:"7oRLbi"})}):Q.requested?r("span",{class:"tag minimal",children:r(O,{id:"Yx0Ud8"})}):Q.following?r("span",{class:"tag minimal",children:r(O,{id:"y6sq5j"})}):Q.followedBy?r("span",{class:"tag minimal",children:r(O,{id:"p3UO/y"})}):null})},h.id),!!N&&r("span",{class:"ib",children:r(O,{id:"Mn1E9C",values:{followersCount:N}})}),!!ee&&r("span",{class:"verified-field",children:[r(L,{icon:"check-circle",size:"s",alt:m({id:"QDEWii"})})," ",r("span",{dangerouslySetInnerHTML:{__html:Ks(ee.value,{emojis:g})}})]}),!M&&!C&&!me&&!N&&!ee&&!!q&&r("span",{class:"created-at",children:r(O,{id:"PCcEFZ",values:{0:An(q,{hideTime:!0})},components:{0:r("time",{datetime:q})}})})]})]})]})}var Bo={},Uo,Pi;function Eu(){if(Pi)return Uo;Pi=1;function e(t,n){typeof n=="boolean"&&(n={forever:n}),this._originalTimeouts=JSON.parse(JSON.stringify(t)),this._timeouts=t,this._options=n||{},this._maxRetryTime=n&&n.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}return Uo=e,e.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},e.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},e.prototype.retry=function(t){if(this._timeout&&clearTimeout(this._timeout),!t)return!1;var n=new Date().getTime();if(t&&n-this._operationStart>=this._maxRetryTime)return this._errors.push(t),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(t);var o=this._timeouts.shift();if(o===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),o=this._cachedTimeouts.slice(-1);else return!1;var i=this;return this._timer=setTimeout(function(){i._attempts++,i._operationTimeoutCb&&(i._timeout=setTimeout(function(){i._operationTimeoutCb(i._attempts)},i._operationTimeout),i._options.unref&&i._timeout.unref()),i._fn(i._attempts)},o),this._options.unref&&this._timer.unref(),!0},e.prototype.attempt=function(t,n){this._fn=t,n&&(n.timeout&&(this._operationTimeout=n.timeout),n.cb&&(this._operationTimeoutCb=n.cb));var o=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){o._operationTimeoutCb()},o._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)},e.prototype.try=function(t){console.log("Using RetryOperation.try() is deprecated"),this.attempt(t)},e.prototype.start=function(t){console.log("Using RetryOperation.start() is deprecated"),this.attempt(t)},e.prototype.start=e.prototype.try,e.prototype.errors=function(){return this._errors},e.prototype.attempts=function(){return this._attempts},e.prototype.mainError=function(){if(this._errors.length===0)return null;for(var t={},n=null,o=0,i=0;i=o&&(n=a,o=c)}return n},Uo}var Ri;function xu(){return Ri||(Ri=1,function(e){var t=Eu();e.operation=function(n){var o=e.timeouts(n);return new t(o,{forever:n&&(n.forever||n.retries===1/0),unref:n&&n.unref,maxRetryTime:n&&n.maxRetryTime})},e.timeouts=function(n){if(n instanceof Array)return[].concat(n);var o={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var i in n)o[i]=n[i];if(o.minTimeout>o.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var a=[],s=0;sAu.call(e)==="[object Error]",Pu=new Set(["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Load failed","Network request failed","fetch failed"]);function Ru(e){return e&&Cu(e)&&e.name==="TypeError"&&typeof e.message=="string"?e.message==="Load failed"?e.stack===void 0:Pu.has(e.message):!1}class Lu extends Error{constructor(t){super(),t instanceof Error?(this.originalError=t,{message:t}=t):(this.originalError=new Error(t),this.originalError.stack=this.stack),this.name="AbortError",this.message=t}}const Mi=(e,t,n)=>{const o=n.retries-(t-1);return e.attemptNumber=t,e.retriesLeft=o,e};async function Mu(e,t){return new Promise((n,o)=>{t={...t},t.onFailedAttempt??(t.onFailedAttempt=()=>{}),t.shouldRetry??(t.shouldRetry=()=>!0),t.retries??(t.retries=10);const i=Iu.operation(t),a=()=>{var c;i.stop(),o((c=t.signal)==null?void 0:c.reason)};t.signal&&!t.signal.aborted&&t.signal.addEventListener("abort",a,{once:!0});const s=()=>{var c;(c=t.signal)==null||c.removeEventListener("abort",a),i.stop()};i.attempt(async c=>{try{const l=await e(c);s(),n(l)}catch(l){try{if(!(l instanceof Error))throw new TypeError(`Non-error was thrown: "${l}". You should only throw errors.`);if(l instanceof Lu)throw l.originalError;if(l instanceof TypeError&&!Ru(l))throw l;if(Mi(l,c,t),await t.shouldRetry(l)||(i.stop(),o(l)),await t.onFailedAttempt(l),!i.retry(l))throw i.mainError()}catch(u){Mi(u,c,t),s(),o(u)}}})})}const Ou=[{code:"auto",name:"Detect"},{code:"af",name:"Afrikaans"},{code:"sq",name:"Albanian"},{code:"am",name:"Amharic"},{code:"ar",name:"Arabic"},{code:"hy",name:"Armenian"},{code:"as",name:"Assamese"},{code:"ay",name:"Aymara"},{code:"az",name:"Azerbaijani"},{code:"bm",name:"Bambara"},{code:"eu",name:"Basque"},{code:"be",name:"Belarusian"},{code:"bn",name:"Bengali"},{code:"bho",name:"Bhojpuri"},{code:"bs",name:"Bosnian"},{code:"bg",name:"Bulgarian"},{code:"ca",name:"Catalan"},{code:"ceb",name:"Cebuano"},{code:"ny",name:"Chichewa"},{code:"zh",name:"Chinese"},{code:"co",name:"Corsican"},{code:"hr",name:"Croatian"},{code:"cs",name:"Czech"},{code:"da",name:"Danish"},{code:"dv",name:"Dhivehi"},{code:"doi",name:"Dogri"},{code:"nl",name:"Dutch"},{code:"en",name:"English"},{code:"eo",name:"Esperanto"},{code:"et",name:"Estonian"},{code:"ee",name:"Ewe"},{code:"tl",name:"Filipino"},{code:"fi",name:"Finnish"},{code:"fr",name:"French"},{code:"fy",name:"Frisian"},{code:"gl",name:"Galician"},{code:"ka",name:"Georgian"},{code:"de",name:"German"},{code:"el",name:"Greek"},{code:"gn",name:"Guarani"},{code:"gu",name:"Gujarati"},{code:"ht",name:"Haitian Creole"},{code:"ha",name:"Hausa"},{code:"haw",name:"Hawaiian"},{code:"iw",name:"Hebrew"},{code:"hi",name:"Hindi"},{code:"hmn",name:"Hmong"},{code:"hu",name:"Hungarian"},{code:"is",name:"Icelandic"},{code:"ig",name:"Igbo"},{code:"ilo",name:"Ilocano"},{code:"id",name:"Indonesian"},{code:"ga",name:"Irish"},{code:"it",name:"Italian"},{code:"ja",name:"Japanese"},{code:"jw",name:"Javanese"},{code:"kn",name:"Kannada"},{code:"kk",name:"Kazakh"},{code:"km",name:"Khmer"},{code:"rw",name:"Kinyarwanda"},{code:"gom",name:"Konkani"},{code:"ko",name:"Korean"},{code:"kri",name:"Krio"},{code:"ku",name:"Kurdish (Kurmanji)"},{code:"ckb",name:"Kurdish (Sorani)"},{code:"ky",name:"Kyrgyz"},{code:"lo",name:"Lao"},{code:"la",name:"Latin"},{code:"lv",name:"Latvian"},{code:"ln",name:"Lingala"},{code:"lt",name:"Lithuanian"},{code:"lg",name:"Luganda"},{code:"lb",name:"Luxembourgish"},{code:"mk",name:"Macedonian"},{code:"mai",name:"Maithili"},{code:"mg",name:"Malagasy"},{code:"ms",name:"Malay"},{code:"ml",name:"Malayalam"},{code:"mt",name:"Maltese"},{code:"mi",name:"Maori"},{code:"mr",name:"Marathi"},{code:"mni-Mtei",name:"Meiteilon (Manipuri)"},{code:"lus",name:"Mizo"},{code:"mn",name:"Mongolian"},{code:"my",name:"Myanmar (Burmese)"},{code:"ne",name:"Nepali"},{code:"no",name:"Norwegian"},{code:"or",name:"Odia (Oriya)"},{code:"om",name:"Oromo"},{code:"ps",name:"Pashto"},{code:"fa",name:"Persian"},{code:"pl",name:"Polish"},{code:"pt",name:"Portuguese"},{code:"pa",name:"Punjabi"},{code:"qu",name:"Quechua"},{code:"ro",name:"Romanian"},{code:"ru",name:"Russian"},{code:"sm",name:"Samoan"},{code:"sa",name:"Sanskrit"},{code:"gd",name:"Scots Gaelic"},{code:"nso",name:"Sepedi"},{code:"sr",name:"Serbian"},{code:"st",name:"Sesotho"},{code:"sn",name:"Shona"},{code:"sd",name:"Sindhi"},{code:"si",name:"Sinhala"},{code:"sk",name:"Slovak"},{code:"sl",name:"Slovenian"},{code:"so",name:"Somali"},{code:"es",name:"Spanish"},{code:"su",name:"Sundanese"},{code:"sw",name:"Swahili"},{code:"sv",name:"Swedish"},{code:"tg",name:"Tajik"},{code:"ta",name:"Tamil"},{code:"tt",name:"Tatar"},{code:"te",name:"Telugu"},{code:"th",name:"Thai"},{code:"ti",name:"Tigrinya"},{code:"ts",name:"Tsonga"},{code:"tr",name:"Turkish"},{code:"tk",name:"Turkmen"},{code:"ak",name:"Twi"},{code:"uk",name:"Ukrainian"},{code:"ur",name:"Urdu"},{code:"ug",name:"Uyghur"},{code:"uz",name:"Uzbek"},{code:"vi",name:"Vietnamese"},{code:"cy",name:"Welsh"},{code:"xh",name:"Xhosa"},{code:"yi",name:"Yiddish"},{code:"yo",name:"Yoruba"},{code:"zu",name:"Zulu"}];var Du=Object.defineProperty,$u=(e,t,n)=>t in e?Du(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Yn=(e,t,n)=>$u(e,typeof t!="symbol"?t+"":t,n),vr=new Map,Xn=new WeakMap,Oi=0,Nu=void 0;function Fu(e){return e?(Xn.has(e)||(Oi+=1,Xn.set(e,Oi.toString())),Xn.get(e)):"0"}function zu(e){return Object.keys(e).sort().filter(t=>e[t]!==void 0).map(t=>`${t}_${t==="root"?Fu(e.root):e[t]}`).toString()}function Vu(e){const t=zu(e);let n=vr.get(t);if(!n){const o=new Map;let i;const a=new IntersectionObserver(s=>{s.forEach(c=>{var l;const u=c.isIntersecting&&i.some(f=>c.intersectionRatio>=f);e.trackVisibility&&typeof c.isVisible>"u"&&(c.isVisible=u),(l=o.get(c.target))==null||l.forEach(f=>{f(u,c)})})},e);i=a.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:a,elements:o},vr.set(t,n)}return n}function Zs(e,t,n={},o=Nu){if(typeof window.IntersectionObserver>"u"&&o!==void 0){const l=e.getBoundingClientRect();return t(o,{isIntersecting:o,target:e,intersectionRatio:typeof n.threshold=="number"?n.threshold:0,time:0,boundingClientRect:l,intersectionRect:l,rootBounds:l}),()=>{}}const{id:i,observer:a,elements:s}=Vu(n),c=s.get(e)||[];return s.has(e)||s.set(e,c),c.push(t),a.observe(e),function(){c.splice(c.indexOf(t),1),c.length===0&&(s.delete(e),a.unobserve(e)),s.size===0&&(a.disconnect(),vr.delete(i))}}function Hu(e){return typeof e.children!="function"}var dh=class extends ds{constructor(e){super(e),Yn(this,"node",null),Yn(this,"_unobserveCb",null),Yn(this,"handleNode",t=>{this.node&&(this.unobserve(),!t&&!this.props.triggerOnce&&!this.props.skip&&this.setState({inView:!!this.props.initialInView,entry:void 0})),this.node=t||null,this.observeNode()}),Yn(this,"handleChange",(t,n)=>{t&&this.props.triggerOnce&&this.unobserve(),Hu(this.props)||this.setState({inView:t,entry:n}),this.props.onChange&&this.props.onChange(t,n)}),this.state={inView:!!e.initialInView,entry:void 0}}componentDidMount(){this.unobserve(),this.observeNode()}componentDidUpdate(e){(e.rootMargin!==this.props.rootMargin||e.root!==this.props.root||e.threshold!==this.props.threshold||e.skip!==this.props.skip||e.trackVisibility!==this.props.trackVisibility||e.delay!==this.props.delay)&&(this.unobserve(),this.observeNode())}componentWillUnmount(){this.unobserve()}observeNode(){if(!this.node||this.props.skip)return;const{threshold:e,root:t,rootMargin:n,trackVisibility:o,delay:i,fallbackInView:a}=this.props;this._unobserveCb=Zs(this.node,this.handleChange,{threshold:e,root:t,rootMargin:n,trackVisibility:o,delay:i},a)}unobserve(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)}render(){const{children:e}=this.props;if(typeof e=="function"){const{inView:p,entry:m}=this.state;return e({inView:p,entry:m,ref:this.handleNode})}const{as:t,triggerOnce:n,threshold:o,root:i,rootMargin:a,onChange:s,skip:c,trackVisibility:l,delay:u,initialInView:f,fallbackInView:d,...h}=this.props;return Za(t||"div",{ref:this.handleNode,...h},e)}};function Bu({threshold:e,delay:t,trackVisibility:n,rootMargin:o,root:i,triggerOnce:a,skip:s,initialInView:c,fallbackInView:l,onChange:u}={}){var f;const[d,h]=K(null),p=D(u),[m,_]=K({inView:!!c,entry:void 0});p.current=u,J(()=>{if(s||!d)return;let w;return w=Zs(d,(I,g)=>{_({inView:I,entry:g}),p.current&&p.current(I,g),g.isIntersecting&&a&&w&&(w(),w=void 0)},{root:i,rootMargin:o,threshold:e,trackVisibility:n,delay:t},l),()=>{w&&w()}},[Array.isArray(e)?e.toString():e,d,i,o,a,s,n,l,t]);const v=(f=m.entry)==null?void 0:f.target,T=D(void 0);!d&&v&&!a&&!s&&T.current!==v&&(T.current=v,_({inView:!!c,entry:void 0}));const b=[h,m.inView,m.entry];return b.ref=b[0],b.inView=b[1],b.entry=b[2],b}const Di=48,Wo={};function qs({id:e,children:t}){const n=D(),o=!!Wo[e],[i,a]=K(!1),[s,c]=K(o||!1),{ref:l}=Bu({root:null,rootMargin:`-${Di}px 0px 0px 0px`,trackVisibility:!0,delay:1e3,onChange:u=>{u&&(a(!0),e&&(Wo[e]=!0))},triggerOnce:!0,skip:s||i});return J(()=>{if(!n.current)return;const u=n.current.getBoundingClientRect();u.bottom>Di&&(u.top{let i=yn[Ko];return fetch(`https://${i}/api/v1/${t}/${n}/${encodeURIComponent(e)}`).then(a=>{if(!a.ok)throw new Error(a.statusText);return a.json()}).then(a=>{var s;return{provider:"lingva",content:a.translation,detectedSourceLanguage:(s=a.info)==null?void 0:s.detectedSource,info:a.info}})},{retries:3,onFailedAttempt:i=>{Ko=(Ko+1)%yn.length}})}const Gs=1e3*60*60,Ys=vo(Wu,{maxAge:Gs}),Ku=vo(ju(Ys),{maxAge:Gs});function Zu({forceTranslate:e,sourceLanguage:t,onTranslate:n,text:o="",mini:i,autoDetected:a}){const{_:s}=tt(),c=Ds(!0),[l,u]=K("default"),[f,d]=K(null),[h,p]=K(null),[m,_]=K(null),v=D(),T=t?fn(t):null,b=fn(c),w=D("auto");n||(n=i?Ku:Ys);const I=async()=>{var g,x;u("loading");try{const{content:E,detectedSourceLanguage:A,provider:M,error:R,...S}=await n(o,w.current,c);if(E){if(A){const C=fn(A);_(C)}if(M==="lingva"){const C=(x=(g=S==null?void 0:S.info)==null?void 0:g.pronunciation)==null?void 0:x.query;C&&d(C)}p(E),u("default"),!i&&E.trim()!==o.trim()&&(v.current.open=!0,v.current.scrollIntoView({behavior:"smooth",block:"nearest"}))}else u("error")}catch{u("error")}};return J(()=>{e&&I()},[e]),i?h&&h.trim()!==o.trim()&&m!==b?r(qs,{children:r("div",{class:"status-translation-block-mini",children:[r(L,{icon:"translate",alt:s({id:"zVJKbG",values:{sourceLangText:T}})}),r("output",{lang:c,dir:"auto",title:f||"",children:h})]})}):null:r("div",{class:"status-translation-block",onClick:g=>{g.preventDefault()},children:r("details",{ref:v,children:[r("summary",{children:r("button",{type:"button",onClick:async g=>{g.preventDefault(),g.stopPropagation(),v.current.open=!v.current.open,l!=="loading"&&(h||I())},children:[r(L,{icon:"translate"})," ",r("span",{children:s(l==="loading"?{id:"Zxkt/v"}:t&&T&&!m?a?{id:"R20Yf9",values:{sourceLangText:T}}:{id:"h8zDAI",values:{sourceLangText:T}}:{id:"pi8x/S"})})]})}),r("div",{class:"translated-block",children:[r("div",{class:"translation-info insignificant",children:[r("select",{class:"translated-source-select",disabled:l==="loading",onChange:g=>{w.current=g.target.value,I()},children:Ou.map(g=>{const x=fn({code:g.code,fallback:g.name}),E=fn({code:g.code,locale:g.code}),A=x!==E;return r("option",{value:g.code,children:g.code==="auto"?s({id:"Bze3gr",values:{0:m??"โ€ฆ"}}):A?`${E} - ${x}`:E})})})," ",r("span",{children:["โ†’ ",b]}),r(hs,{abrupt:!0,hidden:l!=="loading"})]}),l==="error"?r("p",{class:"ui-state",children:r(O,{id:"m5LihO"})}):!!h&&r($,{children:[r("output",{class:"translated-content",lang:c,dir:"auto",children:h}),!!f&&r("output",{class:"translated-pronunciation-content",tabIndex:-1,onClick:g=>{g.target.classList.toggle("expand")},children:f})]})]})]})})}const qu=yn!=null&&yn.length?Zu:()=>null;function ut(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Xs(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const o=ut(n);return(i,a)=>o.then(s=>a(s.transaction(t,i).objectStore(t)))}let Zo;function Lt(){return Zo||(Zo=Xs("keyval-store","keyval")),Zo}function Gu(e,t=Lt()){return t("readonly",n=>ut(n.get(e)))}function Yu(e,t,n=Lt()){return n("readwrite",o=>(o.put(t,e),ut(o.transaction)))}function Xu(e,t=Lt()){return t("readonly",n=>Promise.all(e.map(o=>ut(n.get(o)))))}function Qu(e,t=Lt()){return t("readwrite",n=>(n.delete(e),ut(n.transaction)))}function Ju(e,t=Lt()){return t("readwrite",n=>(e.forEach(o=>n.delete(o)),ut(n.transaction)))}function ed(e=Lt()){return e("readwrite",t=>(t.clear(),ut(t.transaction)))}function td(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},ut(e.transaction)}function nd(e=Lt()){return e("readonly",t=>{if(t.getAllKeys)return ut(t.getAllKeys());const n=[];return td(t,o=>n.push(o.key)).then(()=>n)})}function Ni(e,t){const n=Xs(e,t);return{set:(o,i)=>Yu(o,i,n),get:o=>Gu(o,n),getMany:o=>Xu(o,n),del:o=>Qu(o,n),delMany:o=>Ju(o,n),clear:()=>ed(n),keys:()=>nd(n)}}const fh={drafts:Ni("drafts-db","drafts-store"),catchup:Ni("catchup-db","catchup-store")};async function hh(e,t={}){if(!(e!=null&&e.length))return;const{masto:n}=lo(),o=Ir(),i=e.reduce((a,s)=>(!a.includes(s.id)&&!t[s.id]&&s.id!==o&&a.push(s.id),a),[]);if(!i.length)return null;try{return(await n.v1.accounts.relationships.fetch({id:i})).reduce((c,l)=>(c[l.id]=l,c),{})}catch{return null}}class Be extends HTMLElement{constructor(){super(),this.isIframeLoaded=!1,this.setupDom()}static get observedAttributes(){return["videoid","playlistid","videoplay","videotitle"]}connectedCallback(){this.addEventListener("pointerover",()=>Be.warmConnections(this),{once:!0}),this.addEventListener("click",()=>this.addIframe())}get videoId(){return encodeURIComponent(this.getAttribute("videoid")||"")}set videoId(t){this.setAttribute("videoid",t)}get playlistId(){return encodeURIComponent(this.getAttribute("playlistid")||"")}set playlistId(t){this.setAttribute("playlistid",t)}get videoTitle(){return this.getAttribute("videotitle")||"Video"}set videoTitle(t){this.setAttribute("videotitle",t)}get videoPlay(){return this.getAttribute("videoplay")||"Play"}set videoPlay(t){this.setAttribute("videoplay",t)}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(t){this.setAttribute("params",t)}setupDom(){const t=this.attachShadow({mode:"open"});let n="";window.liteYouTubeNonce&&(n=`nonce="${window.liteYouTubeNonce}"`),t.innerHTML=`
`,this.domRefFrame=t.querySelector("#frame"),this.domRefImg={fallback:t.querySelector("#fallbackPlaceholder"),webp:t.querySelector("#webpPlaceholder"),jpeg:t.querySelector("#jpegPlaceholder")},this.domRefPlayButton=t.querySelector("#playButton")}setupComponent(){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()}attributeChangedCallback(t,n,o){n!==o&&(this.setupComponent(),this.domRefFrame.classList.contains("activated")&&(this.domRefFrame.classList.remove("activated"),this.shadowRoot.querySelector("iframe").remove(),this.isIframeLoaded=!1))}addIframe(t=!1){if(!this.isIframeLoaded){let n=t?0:1;const o=this.noCookie?"-nocookie":"";let i;this.playlistId?i=`?listType=playlist&list=${this.playlistId}&`:i=`${this.videoId}?`,this.autoPause&&(this.params="enablejsapi=1"),this.isYouTubeShort()&&(this.params=`loop=1&mute=1&modestbranding=1&playsinline=1&rel=0&enablejsapi=1&playlist=${this.videoId}`,n=1);const a=` `;this.domRefFrame.insertAdjacentHTML("beforeend",a),this.domRefFrame.classList.add("activated"),this.isIframeLoaded=!0,this.attemptShortAutoPlay(),this.dispatchEvent(new CustomEvent("liteYoutubeIframeLoaded",{detail:{videoId:this.videoId},bubbles:!0,cancelable:!0}))}}initImagePlaceholder(){var o,i;const t=`https://i.ytimg.com/vi_webp/${this.videoId}/${this.posterQuality}.webp`,n=`https://i.ytimg.com/vi/${this.videoId}/${this.posterQuality}.jpg`;this.domRefImg.fallback.loading=this.posterLoading,this.domRefImg.webp.srcset=t,this.domRefImg.jpeg.srcset=n,this.domRefImg.fallback.src=n,this.domRefImg.fallback.setAttribute("aria-label",`${this.videoPlay}: ${this.videoTitle}`),(i=(o=this.domRefImg)==null?void 0:o.fallback)==null||i.setAttribute("alt",`${this.videoPlay}: ${this.videoTitle}`)}initIntersectionObserver(){const t={root:null,rootMargin:"0px",threshold:0};new IntersectionObserver((o,i)=>{o.forEach(a=>{a.isIntersecting&&!this.isIframeLoaded&&(Be.warmConnections(this),this.addIframe(!0),i.unobserve(this))})},t).observe(this),this.autoPause&&new IntersectionObserver((i,a)=>{i.forEach(s=>{var c,l;s.intersectionRatio!==1&&((l=(c=this.shadowRoot.querySelector("iframe"))==null?void 0:c.contentWindow)==null||l.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*"))})},{threshold:1}).observe(this)}attemptShortAutoPlay(){this.isYouTubeShort()&&setTimeout(()=>{var t,n;(n=(t=this.shadowRoot.querySelector("iframe"))==null?void 0:t.contentWindow)==null||n.postMessage('{"event":"command","func":"playVideo","args":""}',"*")},2e3)}isYouTubeShort(){return this.getAttribute("short")===""&&window.matchMedia("(max-width: 40em)").matches}static addPrefetch(t,n){const o=document.createElement("link");o.rel=t,o.href=n,o.crossOrigin="true",document.head.append(o)}static warmConnections(t){Be.isPreconnected||window.liteYouTubeIsPreconnected||(Be.addPrefetch("preconnect","https://i.ytimg.com/"),Be.addPrefetch("preconnect","https://s.ytimg.com"),t.noCookie?Be.addPrefetch("preconnect","https://www.youtube-nocookie.com"):(Be.addPrefetch("preconnect","https://www.youtube.com"),Be.addPrefetch("preconnect","https://www.google.com"),Be.addPrefetch("preconnect","https://googleads.g.doubleclick.net"),Be.addPrefetch("preconnect","https://static.doubleclick.net")),Be.isPreconnected=!0,window.liteYouTubeIsPreconnected=!0)}}Be.isPreconnected=!1;customElements.define("lite-youtube",Be);const Qs=new Uint8Array(128);for(let e=0;e<83;e++)Qs["0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~".charCodeAt(e)]=e;const so=(e,t,n)=>{let o=0;for(;te>10.31475?Js(e/ta+.052132,2.4):e/ea,qo=e=>~~(e>1227e-8?ta*Js(e,.416666)-13.025:e*ea+1),bn=e=>(e<0?-1:1)*e*e,Fi=e=>{for(e+=Cn/2;e>Cn;)e-=od;const t=1.27323954*e-.405284735*bn(e);return .225*(bn(t)-t)+t};function $r(e){const t=so(e,2,6);return[t>>16,t>>8&255,t&255]}function id(e,t,n,o){const i=so(e,0,1),a=i%9+1,s=~~(i/9)+1,c=a*s;let l=0,u=0,f=0,d=0,h=0,p=0,m=0,_=0,v=0,T=0,b=0,w=0;const I=(so(e,1,2)+1)/13446*(o|1),g=new Float64Array(c*3),x=$r(e);for(l=0;l<3;l++)g[l]=rd(x[l]);for(l=1;l{const o=n.char||" ",i=n.count||2;let a=0;const s=[];return t.reverse().reduce((c,l)=>{s.length&&a&&s[a]&&s[a]===l.substring(1,s[a].length+1)&&(s.splice(a,1),a--);const f=[`${o.repeat(a?a*i:0)}${l}`,...c];return l.substring(0,2)==="n.trim().replace(/(^(\s|\t)+|(( |\t)+)$)/gm,"");return Yo={mergeAttributesWithElements:n=>{const o=e(n).split(` `),i=[];let a="";for(let s=0;s")){i.push(`${a}${c.slice(0,-2)} />`),a="";continue}if(c.endsWith(">")){i.push(`${a}${c.startsWith(">")||c.startsWith("<")?"":" "}${c}`),a="";continue}a+=a.length?` ${c}`:c}return i},removeEmptyLines:e},Yo}var Xo,Hi;function cd(){if(Hi)return Xo;Hi=1;const e=sd(),{mergeAttributesWithElements:t}=ad();return Xo=(o,i={})=>{const a=t(o);return e(a,i)},Xo}var ld=cd();const ud=kr(ld);var gn=(e=>(e.Mouse="mouse",e.Touch="touch",e.Pointer="pointer",e))(gn||{}),vn=(e=>(e.CancelledByMovement="cancelled-by-movement",e.CancelledByRelease="cancelled-by-release",e.CancelledOutsideElement="cancelled-outside-element",e))(vn||{});const na=()=>typeof window=="object"?(window==null?void 0:window.PointerEvent)??null:null,dd=()=>typeof window=="object"?(window==null?void 0:window.TouchEvent)??null:null;function oa(e){const{nativeEvent:t}=e,n=dd();return n&&t instanceof n||"touches"in e}function ra(e){const t=na();return e.nativeEvent instanceof MouseEvent&&!(t&&e.nativeEvent instanceof t)}function ia(e){const{nativeEvent:t}=e;if(!t)return!1;const n=na();return n&&t instanceof n||"pointerId"in t}function Bi(e){return ra(e)||oa(e)||ia(e)}function Ui(e){return oa(e)?{x:e.touches[0].pageX,y:e.touches[0].pageY}:ra(e)||ia(e)?{x:e.pageX,y:e.pageY}:null}function fd(e){return{target:e.target,currentTarget:e.currentTarget,nativeEvent:e,persist:()=>{}}}function sa(e,{threshold:t=400,captureEvent:n=!1,detect:o=gn.Pointer,cancelOnMovement:i=!1,cancelOutsideElement:a=!0,filterEvents:s,onStart:c,onMove:l,onFinish:u,onCancel:f}={}){const d=D(!1),h=D(!1),p=D(),m=D(),_=D(e),v=D(null),T=ke(g=>x=>{h.current||Bi(x)&&(s!==void 0&&!s(x)||(n&&x.persist(),c==null||c(x,{context:g}),v.current=Ui(x),h.current=!0,p.current=x.currentTarget,m.current=setTimeout(()=>{_.current&&(_.current(x,{context:g}),d.current=!0)},t)))},[n,s,c,t]),b=ke(g=>(x,E)=>{Bi(x)&&h.current&&(v.current=null,n&&x.persist(),d.current?u==null||u(x,{context:g}):h.current&&(f==null||f(x,{context:g,reason:E??vn.CancelledByRelease})),d.current=!1,h.current=!1,m.current!==void 0&&clearTimeout(m.current))},[n,u,f]),w=ke(g=>x=>{if(l==null||l(x,{context:g}),i!==!1&&v.current){const E=Ui(x);if(E){const A=i===!0?25:i,M={x:Math.abs(E.x-v.current.x),y:Math.abs(E.y-v.current.y)};(M.x>A||M.y>A)&&b(g)(x,vn.CancelledByMovement)}}},[b,i,l]),I=ke(g=>{if(e===null)return{};switch(o){case gn.Mouse:{const x={onMouseDown:T(g),onMouseMove:w(g),onMouseUp:b(g)};return a&&(x.onMouseLeave=E=>{b(g)(E,vn.CancelledOutsideElement)}),x}case gn.Touch:return{onTouchStart:T(g),onTouchMove:w(g),onTouchEnd:b(g)};case gn.Pointer:{const x={onPointerDown:T(g),onPointerMove:w(g),onPointerUp:b(g)};return a&&(x.onPointerLeave=E=>b(g)(E,vn.CancelledOutsideElement)),x}}},[e,b,a,o,w,T]);return J(()=>{if(!window)return;function g(x){const E=fd(x);b()(E)}return window.addEventListener("mouseup",g),window.addEventListener("touchend",g),window.addEventListener("pointerup",g),()=>{window.removeEventListener("mouseup",g),window.removeEventListener("touchend",g),window.removeEventListener("pointerup",g)}},[b]),J(()=>()=>{m.current!==void 0&&clearTimeout(m.current)},[]),J(()=>{_.current=e},[e]),I}function hd({poll:e,lang:t,readOnly:n,refresh:o=()=>{},votePoll:i=()=>{}}){const{_:a}=tt(),[s,c]=K("default"),{expired:l,expiresAt:u,id:f,multiple:d,options:h,ownVotes:p,voted:m,votersCount:_,votesCount:v,emojis:T}=e,b=!!u&&new Date(u),w=d?_:v;let I=0;w<=1e3?I=0:w<=1e4?I=1:w<=1e5&&(I=2);const[g,x]=K(!1),E=h.every(A=>A.votesCount!==null);return r("div",{lang:t,dir:"auto",class:`poll ${n?"read-only":""} ${s==="loading"?"loading":""}`,children:[g&&E||m||l?r($,{children:[r("div",{class:"poll-options",children:h.map((A,M)=>{const{title:R,votesCount:S}=A,C=w?S/w:0,N=C?C.toLocaleString(Ie.locale||void 0,{style:"percent",maximumFractionDigits:I}):"0%",q=S>0&&S===Math.max(...h.map(B=>B.votesCount));return r("div",{class:`poll-option poll-result ${q?"poll-option-leading":""}`,style:{"--percentage":`${C*100}%`},children:[r("div",{class:"poll-option-title",children:[r("span",{children:r(qt,{text:R,emojis:T})}),m&&p.includes(M)&&r($,{children:[" ",r(L,{icon:"check-circle",alt:a({id:"IeO7us"})})]})]}),r("div",{class:"poll-option-votes",title:Ie._({id:"+syLpm",values:{optionVotesCount:S}}),children:N})]},`${M}-${R}-${S}`)})}),!l&&!m&&r("button",{class:"poll-vote-button plain2",disabled:s==="loading",onClick:A=>{A.preventDefault(),x(!1)},children:[r(L,{icon:"arrow-left",size:"s"})," ",r(O,{id:"L96xSt"})]})]}):r("form",{onSubmit:async A=>{A.preventDefault();const M=A.target,R=new FormData(M),S=[];R.forEach((C,N)=>{N==="poll"&&S.push(C)}),S.length&&(c("loading"),await i(S),c("default"))},children:[r("div",{class:"poll-options",children:h.map((A,M)=>{const{title:R}=A;return r("div",{class:"poll-option",children:r("label",{class:"poll-label",children:[r("input",{type:d?"checkbox":"radio",name:"poll",value:M,disabled:s==="loading",readOnly:n}),r("span",{class:"poll-option-title",children:r(qt,{text:R,emojis:T})})]})})})}),!n&&r("button",{class:"poll-vote-button",type:"submit",disabled:s==="loading",children:r(O,{id:"lQXQKs"})})]}),r("p",{class:"poll-meta",children:[!l&&!n&&r("button",{type:"button",class:"plain small",disabled:s==="loading",onClick:A=>{A.preventDefault(),c("loading"),(async()=>(await o(),c("default")))()},title:a({id:"lCF0wC"}),children:r(L,{icon:"refresh",alt:a({id:"lCF0wC"})})}),!m&&!l&&!n&&E&&r("button",{type:"button",class:"plain small",disabled:s==="loading",onClick:A=>{A.preventDefault(),x(!g)},title:a(g?{id:"L96xSt"}:{id:"zCjei3"}),children:[r(L,{icon:g?"eye-open":"eye-close",alt:a(g?{id:"L96xSt"}:{id:"zCjei3"})})," "]}),!l&&!n&&" ",r(O,{id:"k7v0Rh",values:{0:rt(v),1:rt(v),votesCount:v},components:{0:r("span",{title:v}),1:r("span",{title:v})}}),!!_&&_!==v&&r($,{children:[" ","โ€ข"," ",r(O,{id:"jf1i1L",values:{0:rt(_),1:rt(_),votersCount:_},components:{0:r("span",{title:_}),1:r("span",{title:_})}})]})," ","โ€ข"," ",l?b?r(O,{id:"5LwCCI",components:{0:r(at,{datetime:b})}}):a({id:"237hSL"}):b?r(O,{id:"ooHDPY",components:{0:r(at,{datetime:b})}}):a({id:"O2tNG0"})]})]})}const aa=lt();function pd(e,t){if(!(e!=null&&e.length))return!1;const n=e.filter(a=>{const{filter:s}=a,c=s.context.includes(t);return c?s.expiresAt?new Date(s.expiresAt)>new Date:c:!1});if(!n.length)return!1;if(n.some(a=>a.filter.filterAction==="hide"))return{action:"hide"};if(n.some(a=>a.filter.filterAction==="warn")){const a=n.map(s=>s.filter.title);return{action:"warn",titles:a,titlesStr:a.join(" โ€ข ")}}return!1}const Nr=Le(pd);function md(e,t,n){var s;const{filtered:o}=e;if(!(o!=null&&o.length)||n&&((s=e.account)==null?void 0:s.id)===n)return!0;const a=Nr(o,t);return a?a.action!=="hide":!0}function ph(e,t){if(!(e!=null&&e.length))return[];if(!t)return e;const n=Ir();return e.filter(o=>md(o,t,n))}const Qo=document.createElement("div");function Jo(e){return e?(Qo.innerHTML=e,Qo.querySelectorAll(".invisible").forEach(t=>{t.remove()}),Qo.innerText.length):0}const _n="speechSynthesis"in window;function ji(e,t){if(_n)try{speechSynthesis.speaking&&speechSynthesis.cancel();const n=new SpeechSynthesisUtterance(e);t&&(n.lang=t),speechSynthesis.speak(n)}catch(n){alert(n)}}function ca(e){var s;const{spoilerText:t,content:n,poll:o,mediaAttachments:i}=e;let a="";return t!=null&&t.trim()?a+=t:a+=bo(n),a=a.trim(),(s=o==null?void 0:o.options)!=null&&s.length&&(a+=` ๐Ÿ“Š: ${o.options.map(c=>`${o.multiple?"โ–ช๏ธ":"โ€ข"} ${c.title}`).join(` `)}`),i!=null&&i.length&&(a+=" "+i.map(c=>({image:"๐Ÿ–ผ๏ธ",gifv:"๐ŸŽž๏ธ",video:"๐Ÿ“น",audio:"๐ŸŽต",unknown:""})[c.type]||"").join("")),a}function gd(e,t,n){var o=this,i=D(null),a=D(0),s=D(null),c=D([]),l=D(),u=D(),f=D(e),d=D(!0);f.current=e;var h=typeof window<"u",p=!t&&t!==0&&h;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var m=!!(n=n||{}).leading,_=!("trailing"in n)||!!n.trailing,v="maxWait"in n,T="debounceOnServer"in n&&!!n.debounceOnServer,b=v?Math.max(+n.maxWait||0,t):null;J(function(){return d.current=!0,function(){d.current=!1}},[]);var w=se(function(){var I=function(R){var S=c.current,C=l.current;return c.current=l.current=null,a.current=R,u.current=f.current.apply(C,S)},g=function(R,S){p&&cancelAnimationFrame(s.current),s.current=p?requestAnimationFrame(R):setTimeout(R,S)},x=function(R){if(!d.current)return!1;var S=R-i.current;return!i.current||S>=t||S<0||v&&R-a.current>=b},E=function(R){return s.current=null,_&&c.current?I(R):(c.current=l.current=null,u.current)},A=function R(){var S=Date.now();if(x(S))return E(S);if(d.current){var C=t-(S-i.current),N=v?Math.min(C,b-(S-a.current)):C;g(R,N)}},M=function(){if(h||T){var R=Date.now(),S=x(R);if(c.current=[].slice.call(arguments),l.current=o,i.current=R,S){if(!s.current&&d.current)return a.current=i.current,g(A,t),m?I(i.current):u.current;if(v)return g(A,t),I(i.current)}return s.current||g(A,t),u.current}};return M.cancel=function(){s.current&&(p?cancelAnimationFrame(s.current):clearTimeout(s.current)),a.current=0,c.current=i.current=l.current=s.current=null},M.isPending=function(){return!!s.current},M.flush=function(){return s.current?E(Date.now()):u.current},M},[m,v,t,b,_,p,h,T]);return w}function vd(e,t,n){var o=n===void 0?{}:n,i=o.leading,a=o.trailing;return gd(e,t,{maxWait:t,leading:i===void 0||i,trailing:a===void 0||a})}function _d(e,t){var n=D(null),o=D(null);o.current=t;var i=D(null);J(function(){a()});var a=ke(function(){var s=i.current,c=o.current,l=s||(c?c instanceof Element?c:c.current:null);n.current&&n.current.element===l&&n.current.subscriber===e||(n.current&&n.current.cleanup&&n.current.cleanup(),n.current={element:l,subscriber:e,cleanup:l?e(l):void 0})},[e]);return J(function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}},[]),ke(function(s){i.current=s,a()},[a])}function Wi(e,t,n){return e[t]?e[t][0]?e[t][0][n]:e[t][n]:t==="contentBoxSize"?e.contentRect[n==="inlineSize"?"width":"height"]:void 0}function yd(e){e===void 0&&(e={});var t=e.onResize,n=D(void 0);n.current=t;var o=e.round||Math.round,i=D(),a=K({width:void 0,height:void 0}),s=a[0],c=a[1],l=D(!1);J(function(){return l.current=!1,function(){l.current=!0}},[]);var u=D({width:void 0,height:void 0}),f=_d(ke(function(d){return(!i.current||i.current.box!==e.box||i.current.round!==o)&&(i.current={box:e.box,round:o,instance:new ResizeObserver(function(h){var p=h[0],m=e.box==="border-box"?"borderBoxSize":e.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",_=Wi(p,m,"inlineSize"),v=Wi(p,m,"blockSize"),T=_?o(_):void 0,b=v?o(v):void 0;if(u.current.width!==T||u.current.height!==b){var w={width:T,height:b};u.current.width=T,u.current.height=b,n.current?n.current(w):l.current||c(w)}})}),i.current.instance.observe(d,{box:e.box}),function(){i.current&&i.current.instance.unobserve(d)}},[e.box,o]),e.ref);return se(function(){return{ref:f,width:s.width,height:s.height}},[f,s.width,s.height])}function ao({className:e="truncated"}={}){const t=D(),n=vd(({height:o})=>{if(t.current){const{scrollHeight:i}=t.current;let a=i>o;if(a){const{height:s,maxHeight:c}=getComputedStyle(t.current),l=parseInt(c||s,10);a=i>l}t.current.classList.toggle(e,a)}},300);return yd({ref:t,box:"border-box",onResize:n}),t}const Tn={public:"earth",unlisted:"group",private:"lock",direct:"message",local:"building"};var la="kvfysmfp",ua="ufhsfnkm",bd=".".concat(la,"{overflow:hidden;touch-action:none}.").concat(ua,"{transform-origin: 0 0}"),Td=typeof window>"u",wd=function(){return!Td&&("ontouchstart"in window||navigator.maxTouchPoints>0)};var Ed=function(e){var t=e.x,n=e.y,o=e.scale;return"scale3d(".concat(o,",").concat(o,", 1) translate3d(").concat(t,"px, ").concat(n,"px, 0)")};var xd=Math.min,Sd=Math.max;function Ki(e){var t=e.containerDimension,n=e.childDimension,o=e.padding,i=e.centerContained,a=n-t;return a+2*o<=0&&i?[a/2,a/2]:[xd(a+o,0)-o,Sd(0,a+o)]}var Zi=function(e,t){return t?"".concat(e," ").concat(t):e},Qn=Math.abs,kd=Math.min,Id=Math.sqrt,da=typeof window>"u",Ad=da?!1:/(Mac)/i.test(navigator.platform),Vt=function(e){return e==="drag"},hn=function(e){return e==="zoom"},Cd=function(e){return Ad&&e.ctrlKey},pn=function(e){e.stopPropagation(),e.preventDefault()},qi=function(e,t){var n=e.x-t.x,o=e.y-t.y;return Id(n*n+o*o)},Pd=function(e,t){var n=qi(e[0],e[1]),o=qi(t[0],t[1]);return o/n},Rd=function(e,t){return e>t-.01&&et?t:n},Dd=function(e){return!(e.ctrlKey||e.metaKey)},$d=function(e){if(e){var t=e.offsetWidth,n=e.offsetHeight;if(t&&n)return{width:t,height:n};var o=getComputedStyle(e),i=parseFloat(o.width),a=parseFloat(o.height);if(a&&i)return{width:i,height:a}}return{width:0,height:0}},Nd=function(e,t){return{x:t.x-e.x,y:t.y-e.y}},Fd=function(e,t){return e.x===t.x&&e.y===t.y},At=function(){},eo={x:0,y:0},Yi=function(e){qa(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n._prevDragMovePoint=null,n._containerObserver=null,n._fingers=0,n._firstMove=!0,n._initialOffset=De({},eo),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=De({},eo),n._startOffset=De({},eo),n._startTouches=null,n._updatePlaned=!1,n._wheelTimeOut=null,n._zoomFactor=1,n._initialZoomFactor=1,n._draggingPoint=De({},eo),n._ignoreNextClick=!1,n._containerRef=Ga(),n._handleClick=function(o){n._ignoreNextClick&&(n._ignoreNextClick=!1,o.stopPropagation())},n._onResize=function(){var o;!((o=n._containerRef)===null||o===void 0)&&o.current&&(n._updateInitialZoomFactor(),n._setupOffsets(),n._update())},n._handlerOnTouchEnd=n._handlerIfEnable(function(o){n._fingers=o.touches.length,n.props.shouldCancelHandledTouchEndEvents&&(hn(n._interaction)||Vt(n._interaction)&&(n._startOffset.x!==n._offset.x||n._startOffset.y!==n._offset.y))&&pn(o),Vt(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=De({},n._offset),n._startTouches=Jn(o.touches)):(hn(n._interaction)?n._startTouches&&n._startTouches.length===2&&o.touches.length===2&&n._handleZoom(o,Pd(n._startTouches,Jn(o.touches))):Vt(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 i=o.pageX,a=o.pageY,s=o.deltaY,c=o.deltaMode,l=1;(Cd(o)||c===1)&&(l=15);var u={touches:[{pageX:i,pageY:a}]},f=n._getOffsetByFirstTouch(u),d=s*l;n._stopAnimation(),n._scaleTo(n._zoomFactor-d/n.props.wheelScaleFactor,f),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 t.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)},t.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},t.prototype._resetInertia=function(){this._velocity=null,this._prevDragMovePoint=null},t.prototype._realizeInertia=function(){var n=this,o=this.props,i=o.inertiaFriction,a=o.inertia;if(!(!a||!this._velocity)){var s=this._velocity,c=s.x,l=s.y;if(c||l){this._stopAnimation(),this._resetInertia();var u=function(){if(c*=i,l*=i,!c&&!l)return n._stopAnimation();var f=De({},n._offset);if(n._addOffset({x:c,y:l}),n._offset=n._sanitizeOffset(n._offset),Fd(f,n._offset))return n._stopAnimation();n._update({isAnimation:!0})};this._animate(u,{duration:9999})}}},t.prototype._collectInertia=function(n){var o=n.touches;if(this.props.inertia){var i=Jn(o)[0],a=this._prevDragMovePoint;a&&(this._velocity=Nd(i,a)),this._prevDragMovePoint=i}},t.prototype._handleDragEnd=function(){this.props.onDragEnd(),this._end(),this._realizeInertia()},t.prototype._handleZoomStart=function(){this.props.onZoomStart(),this._stopAnimation(),this._lastScale=1,this._nthZoom=0,this._lastZoomCenter=null,this._hasInteraction=!0},t.prototype._handleZoom=function(n,o){var i=Od(this._getOffsetTouches(n)),a=o/this._lastScale;this._lastScale=o,this._nthZoom+=1,this._nthZoom>3&&(this._scale(a,i),this._drag(i,this._lastZoomCenter),this.props.enforceBoundsDuringZoom&&(this._offset=this._sanitizeOffset(this._offset))),this._lastZoomCenter=i},t.prototype._handleZoomEnd=function(){this.props.onZoomEnd(),this._end()},t.prototype._handleDoubleTap=function(n){var o=this;if(!(this._hasInteraction||this.props.tapZoomFactor===0)){var i=this.props.doubleTapZoomOutOnMaxScale&&this._zoomFactor===this.props.maxZoom||this.props.doubleTapToggleZoom&&this._zoomFactor>1;this.props.onDoubleTap(),this._ignoreNextClick=!0;var a=this._zoomFactor+this.props.tapZoomFactor,s=this._zoomFactor,c=function(u){o._scaleTo(s+u*(a-s),l)},l=this._getOffsetByFirstTouch(n);this._isDoubleTap=!0,s>a&&(l=this._getCurrentZoomCenter()),i?this._zoomOutAnimation():this._animate(c)}},t.prototype._computeInitialOffset=function(){var n=this._getContainerRect(),o=this._getChildSize(),i=o.width,a=o.height,s=-Qn(i*this._getInitialZoomFactor()-n.width)/2,c=-Qn(a*this._getInitialZoomFactor()-n.height)/2;this._initialOffset={x:s,y:c}},t.prototype._resetOffset=function(){this._offset=De({},this._initialOffset)},t.prototype._setupOffsets=function(){this.props.setOffsetsOnce&&this._isOffsetsSet||(this._isOffsetsSet=!0,this._computeInitialOffset(),this._resetOffset())},t.prototype._sanitizeOffset=function(n){var o=this._getContainerRect(),i=this._getChildSize(),a=i.width,s=i.height,c=a*this._getInitialZoomFactor()*this._zoomFactor,l=s*this._getInitialZoomFactor()*this._zoomFactor,u=Ki({containerDimension:o.width,childDimension:c,padding:this.props.horizontalPadding,centerContained:this.props.centerContained}),f=u[0],d=u[1],h=Ki({containerDimension:o.height,childDimension:l,padding:this.props.verticalPadding,centerContained:this.props.centerContained}),p=h[0],m=h[1];return{x:er(f,d,n.x),y:er(p,m,n.y)}},t.prototype.alignCenter=function(n){var o=this,i=De({duration:250,animated:!0},n),a=i.x,s=i.y,c=i.scale,l=i.animated,u=i.duration,f=a*this._initialZoomFactor,d=s*this._initialZoomFactor,h=this._zoomFactor,p=De({},this._offset),m=this._getContainerRect(),_={x:m.width/2,y:m.height/2};if(this._zoomFactor=1,this._offset={x:-(_.x-f),y:-(_.y-d)},this._scaleTo(c,_),this._stopAnimation(),!l)return this._update();var v=this._zoomFactor-h,T={x:this._offset.x-p.x,y:this._offset.y-p.y};this._zoomFactor=h,this._offset=De({},p);var b=function(w){var I=p.x+T.x*w,g=p.y+T.y*w;o._zoomFactor=h+v*w,o._offset=o._sanitizeOffset({x:I,y:g}),o._update()};this._animate(b,{callback:function(){return o._sanitize()},duration:u})},t.prototype.scaleTo=function(n){var o=this,i=De({duration:250,animated:!0},n),a=i.x,s=i.y,c=i.scale,l=i.animated,u=i.duration,f=this._zoomFactor,d=De({},this._offset);if(this._zoomFactor=1,this._offset={x:0,y:0},this._scaleTo(c,{x:a,y:s}),this._stopAnimation(),!l)return this._update();var h=this._zoomFactor-f,p={x:this._offset.x-d.x,y:this._offset.y-d.y};this._zoomFactor=f,this._offset=De({},d);var m=function(_){var v=d.x+p.x*_,T=d.y+p.y*_;o._zoomFactor=f+h*_,o._offset={x:v,y:T},o._update()};this._animate(m,{callback:function(){return o._sanitize()},duration:u})},t.prototype._scaleTo=function(n,o){this._scale(n/this._zoomFactor,o),this._offset=this._sanitizeOffset(this._offset)},t.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()},t.prototype._scaleZoomFactor=function(n){var o=this._zoomFactor;return this._zoomFactor*=n,this._zoomFactor=er(this.props.minZoom,this.props.maxZoom,this._zoomFactor),this._zoomFactor/o},t.prototype._canDrag=function(){return this.props.draggableUnZoomed||!Rd(this._zoomFactor,1)},t.prototype._drag=function(n,o){if(o){var i=-(n.y-o.y),a=-(n.x-o.x);this.props.lockDragAxis?Qn(a)>Qn(i)?this._addOffset({x:a,y:0}):this._addOffset({y:i,x:0}):this._addOffset({x:a,y:i}),this.props.onDragUpdate()}},t.prototype._virtualDrag=function(n,o){if(o){var i=-(n.y-o.y),a=-(n.x-o.x);this._draggingPoint={x:a+this._draggingPoint.x,y:i+this._draggingPoint.y}}},t.prototype._addOffset=function(n){var o=this._offset,i=o.x,a=o.y;this._offset={x:i+n.x,y:a+n.y}},t.prototype._sanitize=function(){this._zoomFactor=u?(n(1),i._stopAnimation(),l(),i._update()):(h=c(h),n(h),i._update({isAnimation:!0}),requestAnimationFrame(f))}};this._inAnimation=!0,requestAnimationFrame(f)},t.prototype._stopAnimation=function(){this._inAnimation=!1},t.prototype._end=function(){this._hasInteraction=!1,this._sanitize(),this._update()},t.prototype._getContainerRect=function(){var n=this._containerRef.current;return n.getBoundingClientRect()},t.prototype._getChildSize=function(){var n=this._containerRef.current;return $d(n==null?void 0:n.firstElementChild)},t.prototype._updateInitialZoomFactor=function(){var n=this._getContainerRect(),o=this._getChildSize(),i=n.width/o.width,a=n.height/o.height;this._initialZoomFactor=kd(i,a)},t.prototype._bindEvents=function(){var n=this,o=this._containerRef.current;window.ResizeObserver?(this._containerObserver=new ResizeObserver(this._onResize),this._containerObserver.observe(o)):window.addEventListener("resize",this._onResize),this._handlers.forEach(function(i){var a=i[0],s=i[1],c=i[2];(c||o).addEventListener(a,s,!0)}),Array.from(o.querySelectorAll("img")).forEach(function(i){return i.addEventListener("load",n._onResize)})},t.prototype._unSubscribe=function(){var n=this,o=this._containerRef.current;this._containerObserver&&(this._containerObserver.disconnect(),this._containerObserver=null),window.removeEventListener("resize",this._onResize),this._handlers.forEach(function(i){var a=i[0],s=i[1],c=i[2];(c||o).removeEventListener(a,s,!0)}),Array.from(o.querySelectorAll("img")).forEach(function(i){return i.removeEventListener("load",n._onResize)})},t.prototype._update=function(n){var o=this;if(!this._updatePlaned){var i=function(){var a=o._getInitialZoomFactor()*o._zoomFactor,s=-o._offset.x/a,c=-o._offset.y/a;o.props.onUpdate({scale:a,x:s,y:c})};if(n!=null&&n.isAnimation)return i();this._updatePlaned=!0,requestAnimationFrame(function(){o._updatePlaned=!1,i()})}},t.prototype._handlerIfEnable=function(n){var o=this;return function(){for(var i=[],a=0;ao?n-o:o-n},t.prototype._enoughToDrag=function(){return this._distanceBetweenNumbers(this._startOffset.x,this._draggingPoint.x)>5||this._distanceBetweenNumbers(this._startOffset.y,this._draggingPoint.y)>5},t.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)},t.prototype._detectDoubleTap=function(n){var o=new Date().getTime();this._fingers>1&&(this._lastTouchStart=0),o-this._lastTouchStart<300?(pn(n),this._handleDoubleTap(n),hn(this._interaction)?this._handleZoomEnd():Vt(this._interaction)&&this._handleDragEnd()):this._isDoubleTap=!1,this._fingers===1&&(this._lastTouchStart=o)},t.prototype.simulate=function(n){var o=this;return function(i){var a=i.pageX,s=i.pageY,c=i.type,l=c==="mouseup",u=c==="mousedown";u&&(i.preventDefault(),o._listenMouseMove=!0),o._listenMouseMove&&(i.touches=l?[]:[{pageX:a,pageY:s}],n(i)),l&&(o._listenMouseMove=!1)}},t.prototype.componentDidMount=function(){this._bindEvents(),this._update()},t.prototype.componentWillUnmount=function(){this._stopAnimation(),this._unSubscribe()},t.prototype.render=function(){var n=this.props,o=n.children,i=n.containerProps,a=Ya.only(o),s=i||{};return jn.createElement(jn.Fragment,null,jn.createElement("style",null,bd),jn.createElement("div",De({},s,{ref:this._containerRef,className:Zi(la,s.className)}),ls(a,{className:Zi(ua,a.props.className)})))},t.defaultProps={animationDuration:250,draggableUnZoomed:!0,enforceBoundsDuringZoom:!1,centerContained:!1,enabled:!0,inertia:!0,inertiaFriction:.96,horizontalPadding:0,isTouch:wd,lockDragAxis:!1,maxZoom:5,minZoom:.5,onDoubleTap:At,onDragEnd:At,onDragStart:At,onDragUpdate:At,onZoomEnd:At,onZoomStart:At,onZoomUpdate:At,setOffsetsOnce:!1,shouldInterceptWheel:Dd,shouldCancelHandledTouchEndEvents:!1,tapZoomFactor:1,verticalPadding:0,wheelScaleFactor:1500,zoomOutFactor:1.3,doubleTapZoomOutOnMaxScale:!1,doubleTapToggleZoom:!1,_document:da?null:window.document},t}(ds);if(0)var mh,gh,vh,_h,yh,bh,Th;function tr(e){if(!e)return;let t=Math.floor(e/3600),n=Math.floor(e%3600/60),o=Math.round(e%60);return t===0?`${n}:${o.toString().padStart(2,"0")}`:`${t}:${n.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`}const zd=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Vd="ALT",nr=e=>{const{_:t}=tt(),{alt:n,lang:o,index:i,...a}=e;return!n||!n.trim()?null:r("button",{type:"button",class:"alt-badge clickable",...a,onClick:s=>{s.stopPropagation(),s.preventDefault(),V.showMediaAlt={alt:n,lang:o}},title:t({id:"5gfDMm"}),children:[Vd,!!i&&r("sup",{children:i})]})},Hd=140,Bd=280,fa=Le(e=>e!=null&&e.length?e.length>Hd||/[\n\r].*[\n\r]/.test(e.trim()):!1);function Ud({class:e="",media:t,to:n,lang:o,showOriginal:i,autoAnimate:a,showCaption:s,allowLongerCaption:c,altIndex:l,checkAspectRatio:u=!0,onClick:f=()=>{}}){let{blurhash:d,description:h,meta:p,previewRemoteUrl:m,previewUrl:_,remoteUrl:v,url:T,type:b}=t;/no\-preview\./i.test(_)&&(_=null);const{original:w={},small:I,focus:g}=p||{},x=i?w==null?void 0:w.width:(I==null?void 0:I.width)||(w==null?void 0:w.width),E=i?w==null?void 0:w.height:(I==null?void 0:I.height)||(w==null?void 0:w.height),A=i?T:_||T,M=i?v:m||v,R=x&&E,S=R?x>E?"landscape":"portrait":null,C=d?$r(d):null,N=D();let q;if(g){const re=(g.x+1)/2*100,H=(1-g.y)/2*100;q=`${re.toFixed(0)}% ${H.toFixed(0)}%`}const B=D(),X=ke(({x:re,y:H,scale:Z})=>{const{current:te}=B;if(te){const oe=Ed({x:re,y:H,scale:Z});Z===1?te.style.removeProperty("transform"):te.style.setProperty("transform",oe),te.closest(".media-zoom").style.touchAction=Z<=1.01?"pan-x":""}},[]),[ae,ie]=K(!1),ee={enabled:ae,draggableUnZoomed:!1,inertiaFriction:.9,tapZoomFactor:2,doubleTapToggleZoom:!0,containerProps:{className:"media-zoom",style:{overflow:"visible"}},onUpdate:X},Q=se(()=>n?re=>r(Zt,{to:n,...re}):"div",[n]),me=M?jd(M):null,he=b==="unknown"&&me&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(me.pathname),z=b==="unknown"&&me&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test(me.pathname),ce=b==="image"||b==="unknown"&&_&&!he&&!z,le=D(),[Me,ge]=K(!1);Rt(()=>{if(!ce||!i||!le.current)return;const{offsetWidth:re,offsetHeight:H}=le.current,Z=x{const{children:H,...Z}=re;return r("figure",{...Z,children:[H,r("figcaption",{class:"media-caption",lang:o,dir:"auto",onClick:te=>{te.preventDefault(),te.stopPropagation(),V.showMediaAlt={alt:h,lang:o}},children:h})]})}:$,[Ze,nt]=K(void 0);if(ce)return ee.containerProps.style.display="inherit",Rt(()=>{zd&&i&&(async()=>{try{await fetch(A,{mode:"no-cors"}),B.current.src=A}catch{}})()},[A]),r(Y,{children:r(Q,{ref:le,class:`media media-image ${e}`,onClick:f,"data-orientation":S,"data-has-alt":!F||void 0,"data-has-natural-aspect-ratio":Ze||void 0,style:i?{backgroundImage:`url(${_})`,backgroundSize:Me?`${x}px ${E}px`:void 0,...ye}:He,children:i?r(Yi,{...ee,children:r("img",{ref:B,src:A,alt:h,width:x,height:E,"data-orientation":S,loading:"eager",decoding:"sync",onLoad:re=>{re.target.closest(".media-image").style.backgroundImage="",re.target.closest(".media-zoom").style.display="",ie(!0)},onError:re=>{const{src:H}=re.target;H===A&&M&&A!==M&&(re.target.src=M)}})}):r($,{children:[r("img",{src:A,alt:F?"":h,width:x,height:E,"data-orientation":S,loading:"lazy",style:{objectPosition:q||"center","--anim-duration":`${Math.min(Math.max(Math.max(x,E)/100,5),120)}s`},onLoad:re=>{re.target.dataset.loaded=!0;const H=re.target.closest(".media");if(!R&&H){const{naturalWidth:Z,naturalHeight:te}=re.target;H.dataset.orientation=Z>te?"landscape":"portrait",H.style.setProperty("--width",`${Z}px`),H.style.setProperty("--height",`${te}px`),H.style.aspectRatio=`${Z}/${te}`}if(u&&H){const{clientWidth:Z,clientHeight:te,naturalWidth:oe,naturalHeight:ue}=re.target;if(Z&&te&&oe&&ue)if(oe<88||ue<88)H.dataset.hasSmallDimension=!0;else{const W=ue*Z/oe;Math.abs(W-te)<5&&nt(!0)}}},onError:re=>{const{src:H}=re.target;H===A&&A!==M&&(re.target.src=M)}}),!F&&r(nr,{alt:h,lang:o,index:l})]})})});if(b==="gifv"||b==="video"||he){const re=w.duration>0,H=w.duration<31,Z=b==="gifv"&&H,te=w.duration<61,oe=tr(w.duration),ue=!i&&!a&&Z,Fe=!i&&a&&Z,W=w.duration>5,We=` `,Ln=` `;return r(Y,{children:r(Q,{class:`media ${e} media-${Z?"gif":"video"} ${Fe?"media-contain":""} ${ue?"media-hover-animate":""}`,"data-orientation":S,"data-formatted-duration":i?void 0:oe,"data-label":Z&&!i&&!Fe?"GIF":void 0,"data-has-alt":!F||void 0,style:!i&&He,onClick:pe=>{if(ue)try{N.current.pause()}catch{}f(pe)},onMouseEnter:()=>{if(ue)try{N.current.play()}catch{}},onMouseLeave:()=>{if(ue)try{N.current.pause()}catch{}},onFocus:()=>{if(ue)try{N.current.play()}catch{}},onBlur:()=>{if(ue)try{N.current.pause()}catch{}},children:[i||Fe?Z&&i?r(Yi,{...ee,enabled:!0,children:r("div",{ref:B,dangerouslySetInnerHTML:{__html:We}})}):Z?r("div",{class:"video-container",dangerouslySetInnerHTML:{__html:We}}):r("div",{class:"video-container",dangerouslySetInnerHTML:{__html:Ln}}):Z?r("video",{ref:N,src:T,poster:_,width:x,height:E,"data-orientation":S,preload:"auto",playsinline:!0,loop:!0,muted:!0,onTimeUpdate:W?pe=>{const{target:be}=pe,Se=be==null?void 0:be.closest(".media-gif");if(Se){const Oe=be.currentTime/be.duration*100;Se.style.setProperty("--progress",`${Oe}%`)}}:void 0}):r($,{children:[_?r("img",{src:_,alt:F?"":h,width:x,height:E,"data-orientation":S,loading:"lazy",decoding:"async",onLoad:pe=>{if(!R){const be=pe.target.closest(".media");if(be){const{naturalHeight:Se,naturalWidth:Oe}=pe.target;be.dataset.orientation=Oe>Se?"landscape":"portrait",be.style.setProperty("--width",`${Oe}px`),be.style.setProperty("--height",`${Se}px`),be.style.aspectRatio=`${Oe}/${Se}`}}}}):r("video",{src:T+"#t=0.1",width:x,height:E,"data-orientation":S,preload:"metadata",muted:!0,disablePictureInPicture:!0,onLoadedMetadata:pe=>{if(!re){const{duration:be}=pe.target;if(be){const Se=tr(be),Oe=pe.target.closest(".media-video");Oe&&(Oe.dataset.formattedDuration=Se)}}}}),r("div",{class:"media-play",children:r(L,{icon:"play",size:"xl",alt:"โ–ถ"})})]}),!i&&!F&&r(nr,{alt:h,lang:o,index:l})]})})}else if(b==="audio"||z){const re=tr(w.duration);return r(Y,{children:r(Q,{class:`media media-audio ${e}`,"data-formatted-duration":i?void 0:re,"data-has-alt":!F||void 0,onClick:f,style:!i&&He,children:[i?r("audio",{src:v||T,preload:"none",controls:!0,autoPlay:!0}):_?r("img",{src:_,alt:F?"":h,width:x,height:E,"data-orientation":S,loading:"lazy",onError:H=>{var Z,te;try{(te=(Z=H.target)==null?void 0:Z.remove)==null||te.call(Z)}catch{}}}):null,!i&&r($,{children:[r("div",{class:"media-play",children:r(L,{icon:"play",size:"xl",alt:"โ–ถ"})}),!F&&r(nr,{alt:h,lang:o,index:l})]})]})})}}function jd(e){return URL.parse(e,location.origin)}const _r=Qt(Ud,(e,t)=>{const n=e.media||{},o=t.media||{};return(n==null?void 0:n.id)===(o==null?void 0:o.id)&&n.url===o.url&&e.to===t.to&&e.class===t.class}),Wd=280,Kd=140,Zd=fs({limit:1,interval:1e3});function qd(e,t){return t.v1.accounts.$select(e).fetch()}const Gd=vo(Zd(qd)),Pt={public:{id:"7d1a0d"},local:{id:"d5zxa4"},unlisted:{id:"WDcQq9"},private:{id:"o34OrG"},direct:{id:"IV4QaU"}},Yd=window.ontouchstart!==void 0&&/iPad|iPhone|iPod/.test(navigator.userAgent),Xd=new Intl.RelativeTimeFormat,Xi=80;function Qd(e){var t;return(t=e==null?void 0:e.options)!=null&&t.length?`๐Ÿ“Š: ${e.options.map(n=>`- ${n.title}${n.votesCount>=0?` (${n.votesCount})`:""}`).join(` `)}`:""}function or(e){const{spoilerText:t,content:n,poll:o}=e;return(t?`${t} `:"")+bo(n)+Qd(o)}function ha(e=[],t=document){for(const n of e)try{return t.querySelectorAll(n)}catch{}return[]}function Jd(e){return!e||(e=e.trim(),!e)?!1:!!bo(e,{preProcess:n=>{for(const o of ha([".mention, pre, code, a:has(.invisible)",".mention, pre, code"],n))o.remove()}})}function ef(e){return bo(e,{preProcess:t=>{for(const n of ha([".mention, .hashtag, pre, code, a:has(.invisible)",".mention, .hashtag, pre, code"],t))n.remove();for(const n of t.querySelectorAll("a")){const o=n.innerText.trim();(o.startsWith("https://")||o.startsWith("http://"))&&n.remove()}}})}const tf=/^http/i,Qi=({post:e,instance:t,previewMode:n})=>{const{content:o,emojis:i,language:a,mentions:s,url:c}=e,l=D();return Rt(()=>{if(!l.current)return;const u=Ks(o,{emojis:i,returnDOM:!0});for(const f of u.querySelectorAll('a.u-url[target="_blank"]'))tf.test(f.innerText.trim())||f.removeAttribute("target");l.current.replaceChildren(u.cloneNode(!0))},[o,i.length]),r("div",{ref:l,lang:a,dir:"auto",class:"inner-content",onClick:yu({mentions:s,instance:t,previewMode:n,statusURL:c})})},nf={s:"small",m:"medium",l:"large"},of=vo(async e=>{const{detectAll:t}=await k(async()=>{const{detectAll:i}=await import("./tinyld-light-tbgyvj3S.js");return{detectAll:i}},[],import.meta.url);if(e=e==null?void 0:e.trim(),(e==null?void 0:e.length)>500)return null;const o=t(e)[0];return o!=null&&o.lang&&(o==null?void 0:o.accuracy)>.5?o.lang:null}),wn={id:"8fZueG"},yr={},Ji=(e,t=[])=>{if(!e)return!1;const n=Ds(!0),o=e!==n&&!En([e],[n])&&!t.find(i=>e===i||En([e],[i]));return yr[e+t]=!0,o};function Xt({statusID:e,status:t,instance:n,size:o="m",contentTextWeight:i,readOnly:a,enableCommentHint:s,withinContext:c,skeleton:l,enableTranslate:u,forceTranslate:f,previewMode:d,onMediaClick:h,quoted:p,onStatusLinkClick:m=()=>{},showFollowedTags:_,allowContextMenu:v,showActionsBar:T,showReplyParent:b,mediaFirst:w}){var oi,ri,ii,si;const{_:I,_:g}=tt();if(l)return r("div",{class:`status skeleton ${w?"status-media-first small":""}`,children:[!w&&r(st,{size:"xxl"}),r("div",{class:"container",children:[r("div",{class:"meta",children:[(o==="s"||w)&&r(st,{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:x,instance:E,authenticated:A}=lo({instance:n}),{instance:M}=lo(),R=E===M;let S=it(e||(t==null?void 0:t.id),E);const C=Pn(V);if(t||(t=C.statuses[S]||C.statuses[e],S=it(t==null?void 0:t.id,E)),!t)return null;const{account:{acct:N,avatar:q,avatarStatic:B,id:X,url:ae,displayName:ie,username:ee,emojis:Q,bot:me,group:he},id:z,repliesCount:ce,reblogged:le,reblogsCount:Me,favourited:ge,favouritesCount:Ve,bookmarked:Ae,poll:ye,muted:He,sensitive:Ce,spoilerText:F,visibility:Y,language:Ze,editedAt:nt,filtered:re,card:H,createdAt:Z,inReplyToId:te,inReplyToAccountId:oe,content:ue,mentions:Fe,mediaAttachments:W,reblog:We,uri:Ln,url:pe,emojis:be,tags:Se,pinned:Oe,_deleted:dt,_pinned:Mt,emojiReactions:ft}=t,[tn,To]=K(null);J(()=>{if(!ue||Ze||tn)return;let y;return y=setTimeout(async()=>{let P=await of(ef(ue));To(P)},1e3),()=>clearTimeout(y)},[ue,Ze]);const ve=Ze||tn,nn=!!(W!=null&&W.length);w&&nn&&(o="s");const wt=se(()=>Ir(),[]),qe=se(()=>wt&&wt===X,[X,wt]),ne=Ne(aa),_e=!qe&&!a&&!d&&Nr(re,ne);if((_e==null?void 0:_e.action)==="hide")return null;const Pe=y=>{y.shiftKey};if(o!=="l"&&_e)return r(hf,{status:t,filterInfo:_e,instance:E,containerProps:{onMouseEnter:Pe},showFollowedTags:!0,quoted:p});const Te=new Date(Z),xe=new Date(nt);let ht=Fe==null?void 0:Fe.find(y=>y.id===oe);!ht&&oe===z&&(ht={url:ae,username:ee,displayName:ie});const[Ot,Et]=K(ht);if(!c&&!Ot&&oe){const y=V.accounts[oe];y?Et(y):Gd(oe,x).then(P=>{Et(P),V.accounts[P.id]=P}).catch(P=>{})}const Mn=oe===wt||(Fe==null?void 0:Fe.find(y=>y.id===wt)),Ge=se(()=>!!(ir.account.get("preferences")||{})["reading:expand:spoilers"],[]),on=se(()=>{var P;return((P=(ir.account.get("preferences")||{})["reading:expand:media"])==null?void 0:P.toLowerCase())||"default"},[]),Ke=d||Ge||!!C.spoilers[z],xt=d||on==="show_all"||!!C.spoilersMedia[z];if(We)return he?r("div",{"data-state-post-id":S,class:"status-group",onMouseEnter:Pe,children:[r("div",{class:"status-pre-meta",children:[r(L,{icon:"group",size:"l",alt:g({id:"L8fEEm"})})," ",r(yt,{account:t.account,instance:E,showAvatar:!0})]}),r(Xt,{status:e?null:We,statusID:e?We.id:null,instance:E,size:o,contentTextWeight:i,readOnly:a,mediaFirst:w})]}):r("div",{"data-state-post-id":S,class:"status-reblog",onMouseEnter:Pe,children:[r("div",{class:"status-pre-meta",children:[r(L,{icon:"rocket",size:"l"})," ",r(O,{id:"DlhB4J",components:{0:r(yt,{account:t.account,instance:E,showAvatar:!0}),1:r("span",{})}})]}),r(Xt,{status:e?null:We,statusID:e?We.id:null,instance:E,size:o,contentTextWeight:i,readOnly:a,enableCommentHint:!0,mediaFirst:w})]});const St=ke(({children:y})=>r("div",{"data-state-post-id":S,class:"status-followed-tags",onMouseEnter:Pe,children:[r("div",{class:"status-pre-meta",children:[r(L,{icon:"hashtag",size:"l"})," ",C.statusFollowedTags[S].slice(0,3).map(P=>r(Zt,{to:E?`/${E}/t/${P}`:`/t/${P}`,class:"status-followed-tag-item",children:P},P))]}),y]}),[S,E,C.statusFollowedTags[S]]),rn=_&&((oi=C.statusFollowedTags[S])!=null&&oi.length)?St:$,fe=o==="l",[pt,Sa]=K(f),{contentTranslation:wo,contentTranslationAutoInline:zr}=C.settings;wo||(u=!1);const Vr=se(()=>{if(!wo||!zr||a||c&&!fe||d||F||Ce||ye||H||W!=null&&W.length)return!1;const y=Jo(ue);return y>0&&y<=Kd},[wo,zr,a,c,fe,d,F,Ce,ye,H,W,ue]),[Eo,On]=K(!1),[ka,xo]=K(!1),Hr=ao(),Br=ao(),Ia=ao(),Dt=D(null),Dn=g({id:"7jyUKe"}),Ur=ke(()=>Math.max(Math.round((F.length+Jo(ue))/140)||1,1),[F,ue]),jr=An(Te),Wr=nt&&An(xe);let sn=A&&Y!=="direct"&&Y!=="private";Y==="private"&&qe&&(sn=!0);const $n=y=>{var P;if(!R||!A)return alert(Dn);(y!=null&&y.shiftKey||(P=y==null?void 0:y.syntheticEvent)!=null&&P.shiftKey)&&yc({replyToStatus:t})||Gn({replyToStatus:t})},Kr=se(()=>W.some(y=>{var P,G;return!((G=(P=y.description)==null?void 0:P.trim)!=null&&G.call(P))}),[W]),Zr=se(()=>Math.floor((new Date-Te)/(1e3*60*60*24*30)),[Te]),So=async()=>{if(!R||!A)return alert(Dn),!1;try{if(V.statuses[S]={...t,reblogged:!le,reblogsCount:Me+(le?-1:1)},le){const y=await x.v1.statuses.$select(z).unreblog();mt(y,E)}else{const y=await x.v1.statuses.$select(z).reblog();mt(y,E)}return!0}catch{return V.statuses[S]=t,!1}},qr=async()=>{if(!R||!A)return alert(Dn),!1;try{if(V.statuses[S]={...t,favourited:!ge,favouritesCount:Ve+(ge?-1:1)},ge){const y=await x.v1.statuses.$select(z).unfavourite();mt(y,E)}else{const y=await x.v1.statuses.$select(z).favourite();mt(y,E)}return!0}catch{return V.statuses[S]=t,!1}},ko=async()=>{try{const y=await qr();!fe&&y&&Re(g(ge?{id:"sZvpIt",values:{0:ee||N}}:{id:"QB/n+J",values:{1:ee||N}}))}catch{}},Gr=async()=>{if(qn("@mastodon/post-bookmark")){if(!R||!A)return alert(Dn),!1;try{if(V.statuses[S]={...t,bookmarked:!Ae},Ae){const y=await x.v1.statuses.$select(z).unbookmark();mt(y,E)}else{const y=await x.v1.statuses.$select(z).bookmark();mt(y,E)}return!0}catch{return V.statuses[S]=t,!1}}},Yr=async()=>{try{const y=await Gr();!fe&&y&&Re(g(Ae?{id:"+Q6x2B",values:{2:ee||N}}:{id:"cQEDZY",values:{3:ee||N}}))}catch{}},an=C.settings.contentTranslationHideLanguages||[],[$t,Aa]=K(yr[ve+an]?Ji(ve,an):!1);J(()=>{if(!ve||$t||yr[ve+an])return;let y=setTimeout(()=>{const P=Ji(ve,an);P&&Aa(P)},1);return()=>clearTimeout(y)},[ve,$t,an]);const Xr=D(),Qr=D();async function Ca(y){var de,Ue,Nt,Io;y&&(Xr.current=x.v1.statuses.$select(e).rebloggedBy.list({limit:Xi}),Qr.current=x.v1.statuses.$select(e).favouritedBy.list({limit:Xi}));const[{value:P},{value:G}]=await Promise.allSettled([Xr.current.next(),Qr.current.next()]);if((de=P.value)!=null&&de.length||(Ue=G.value)!=null&&Ue.length){const kt=[];return(Nt=P.value)!=null&&Nt.length&&kt.push(...P.value.map(It=>(It._types=["reblog"],It))),(Io=G.value)!=null&&Io.length&&kt.push(...G.value.map(It=>(It._types=["favourite"],It))),{value:kt,done:P.done&&G.done}}return{value:[],done:!0}}const Pa=D(),Jr=["public","unlisted"].includes(Y),Ra=["public","unlisted","private"].includes(Y),ei=r($,{children:[!fe&&R&&r($,{children:r("div",{class:"menu-control-group-horizontal status-menu",children:[r(Ee,{onClick:$n,children:[r(L,{icon:"comment"}),r("span",{children:ce>0?rt(ce):g({id:"ImOQa9"})})]}),r(Oo,{subMenu:!0,confirmLabel:r($,{children:[r(L,{icon:"rocket"}),r("span",{children:g(le?{id:"QzzGsY"}:{id:"kulphB"})})]}),className:`menu-reblog ${le?"checked":""}`,menuExtras:r(Ee,{onClick:()=>{Gn({draftStatus:{status:` ${pe}`}})},children:[r(L,{icon:"quote"}),r("span",{children:r(O,{id:"ZhhOwV"})})]}),menuFooter:Kr&&!le?r("div",{class:"footer",children:[r(L,{icon:"alert"}),r(O,{id:"MB+wJL"})]}):Zr>=3&&r("div",{class:"footer",children:[r(L,{icon:"info"}),r("span",{children:r(O,{id:"dBme/4",values:{0:Xd.format(-Zr,"month")},components:{0:r("strong",{})}})})]}),disabled:!sn,onClick:async()=>{try{const y=await So();!fe&&y&&Re(g(le?{id:"BgT3ls",values:{4:ee||N}}:{id:"iSYdyi",values:{5:ee||N}}))}catch{}},children:[r(L,{icon:"rocket"}),r("span",{children:Me>0?rt(Me):g(le?{id:"QzzGsY"}:{id:"PiVIlD"})})]}),r(Ee,{onClick:ko,className:`menu-favourite ${ge?"checked":""}`,children:[r(L,{icon:"heart"}),r("span",{children:Ve>0?rt(Ve):g(ge?{id:"OcUmcH"}:{id:"W9FRBT"})})]}),qn("@mastodon/post-bookmark")&&r(Ee,{onClick:Yr,className:`menu-bookmark ${Ae?"checked":""}`,children:[r(L,{icon:"bookmark"}),r("span",{children:g(Ae?{id:"q8EQYI"}:{id:"PZlHt8"})})]})]})}),!fe&&R&&(fe||T)&&r(un,{}),(fe||T)&&r($,{children:r(Ee,{onClick:()=>{V.showGenericAccounts={heading:g({id:"+XOeb+"}),fetchAccounts:Ca,instance:E,showReactions:!0,postID:S}},children:[r(L,{icon:"react"}),r("span",{children:r(O,{id:"+XOeb+"})})]})}),!w&&r($,{children:[(u||!ve||$t)&&r(un,{}),u?r("div",{class:_n?"menu-horizontal":"",children:[r(Ee,{disabled:pt,onClick:()=>{Sa(!0)},children:[r(L,{icon:"translate"}),r("span",{children:r(O,{id:"pi8x/S"})})]}),_n&&r(Ee,{onClick:()=>{const y=or(t);y&&ji(y,ve)},children:[r(L,{icon:"speak"}),r("span",{children:r(O,{id:"yIBLq8"})})]})]}):(!ve||$t)&&r("div",{class:_n?"menu-horizontal":"",children:[r(bi,{to:`${E?`/${E}`:""}/s/${z}?translate=1`,children:[r(L,{icon:"translate"}),r("span",{children:r(O,{id:"pi8x/S"})})]}),_n&&r(Ee,{onClick:()=>{const y=or(t);y&&ji(y,ve)},children:[r(L,{icon:"speak"}),r("span",{children:r(O,{id:"yIBLq8"})})]})]})]}),(!fe&&R||u||!ve||$t)&&r(un,{}),!fe&&r($,{children:r(bi,{to:E?`/${E}/s/${z}`:`/s/${z}`,onClick:y=>{m(y,t)},children:[r(L,{icon:"arrows-right"}),r("small",{children:[r(O,{id:"8MkSAW",values:{0:ee||N},components:{0:r("span",{class:"bidi-isolate"})}}),r("br",{}),r("span",{class:"more-insignificant",children:[I(Pt[Y])," โ€ข ",jr]})]})]})}),!!nt&&r($,{children:r(Ee,{onClick:()=>{On(z)},children:[r(L,{icon:"history"}),r("small",{children:[r(O,{id:"QL+7Jw"}),r("br",{}),r("span",{class:"more-insignificant",children:r(O,{id:"DuJJm9",values:{editedDateText:Wr}})})]})]})}),r(Ee,{href:pe,target:"_blank",children:[r(L,{icon:"external"}),r("small",{class:"menu-double-lines",style:{maxWidth:"16em"},children:df(pe)})]}),r("div",{class:"menu-horizontal",children:[r(Ee,{onClick:()=>{try{navigator.clipboard.writeText(pe),Re(g({id:"edWbV6"}))}catch{Re(g({id:"W1ewR0"}))}},children:[r(L,{icon:"link"}),r("span",{children:r(O,{id:"he3ygx"})})]}),Jr&&(navigator==null?void 0:navigator.share)&&((ri=navigator==null?void 0:navigator.canShare)==null?void 0:ri.call(navigator,{url:pe}))&&r(Ee,{onClick:()=>{try{navigator.share({url:pe})}catch{alert(g({id:"TtG3Uh"}))}},children:[r(L,{icon:"share"}),r("span",{children:r(O,{id:"LFKLqp"})})]})]}),Jr&&fe&&r(Ee,{onClick:()=>{xo(!0)},children:[r(L,{icon:"code"}),r("span",{children:r(O,{id:"jdVwsS"})})]}),(qe||Mn)&&r(un,{}),(qe||Mn)&&r(Ee,{onClick:async()=>{try{const y=await x.v1.statuses.$select(z)[He?"unmute":"mute"]();mt(y,E),Re(g(He?{id:"Pm+5jw"}:{id:"ywB7JM"}))}catch{Re(g(He?{id:"c6jxNY"}:{id:"8SN9kN"}))}},children:He?r($,{children:[r(L,{icon:"unmute"}),r("span",{children:r(O,{id:"i51zUR"})})]}):r($,{children:[r(L,{icon:"mute"}),r("span",{children:r(O,{id:"OiUYO5"})})]})}),qe&&Ra&&r(Ee,{onClick:async()=>{try{const y=await x.v1.statuses.$select(z)[Oe?"unpin":"pin"]();mt(y,E),Re(g(Oe?{id:"Yx809+"}:{id:"S6P6E+"}))}catch{Re(g(Oe?{id:"A6cs15"}:{id:"vgUfWO"}))}},children:Oe?r($,{children:[r(L,{icon:"unpin"}),r("span",{children:r(O,{id:"XQMQZw"})})]}):r($,{children:[r(L,{icon:"pin"}),r("span",{children:r(O,{id:"lfHLsx"})})]})}),qe&&r("div",{class:"menu-horizontal",children:[qn("@mastodon/post-edit")&&r(Ee,{onClick:()=>{Gn({editStatus:t})},children:[r(L,{icon:"pencil"}),r("span",{children:r(O,{id:"ePK91l"})})]}),fe&&r(Oo,{subMenu:!0,confirmLabel:r($,{children:[r(L,{icon:"trash"}),r("span",{children:r(O,{id:"FbPNuJ"})})]}),itemProps:{className:"danger"},menuItemClassName:"danger",onClick:()=>{(async()=>{try{await x.v1.statuses.$select(z).remove();const y=ps(z,E);y._deleted=!0,Re(g({id:"KiyvHV"}))}catch{Re(g({id:"Yb6p2q"}))}})()},children:[r(L,{icon:"trash"}),r("span",{children:r(O,{id:"Jb6/SB"})})]})]}),!qe&&fe&&r($,{children:[r(un,{}),r(Ee,{className:"danger",onClick:()=>{V.showReportModal={account:t.account,post:t}},children:[r(L,{icon:"flag"}),r("span",{children:r(O,{id:"7PQAMY"})})]})]})]}),ti=D(),[Nn,cn]=K(!1),[Fn,zn]=K({}),Vn=v||!fe&&!d&&!dt&&!p,La=sa(Yd&&Vn?y=>{var Ue;if(y.pointerType==="mouse")return;const{clientX:P,clientY:G}=((Ue=y.touches)==null?void 0:Ue[0])||y,de=y.target.closest("a");de&&Dt.current.contains(de)&&!de.getAttribute("href").startsWith("#")||(y.preventDefault(),zn({anchorPoint:{x:P,y:G},direction:"right"}),cn(!0))}:null,{threshold:600,captureEvent:!0,detect:"touch",cancelOnMovement:2}),Hn=!a&&!d&&!p,Ma=Bt("r, shift+r",$n,{enabled:Hn}),Oa=Bt("f, l",ko,{enabled:Hn}),Da=Bt("d",Yr,{enabled:Hn}),$a=Bt("shift+b",()=>{(async()=>{try{const y=await So();!fe&&y&&Re(g(le?{id:"G3tPNv",values:{6:ee||N}}:{id:"r8jwY4",values:{7:ee||N}}))}catch{}})()},{enabled:Hn&&sn}),Na=Bt("x",y=>{const P=document.activeElement.closest(".status-link, .status-focus");if(P){const G=P.querySelector(".spoiler-button:not(.spoiling)");if(G)y.stopPropagation(),G.click();else{const de=P.querySelector(".spoiler-media-button:not(.spoiling)");de&&(y.stopPropagation(),de.click())}}}),Bn=W.slice(0,fe?void 0:4),Un=W.length>1&&Bn.some(y=>!!y.description&&!fa(y.description)),Fa=se(()=>{if(!Un)return null;const y=[];return Bn.forEach((P,G)=>{if(!P.description)return;const de=y.findIndex(Ue=>Ue.media.description===P.description);de===-1?y.push({media:P,indices:[G]}):y[de].indices.push(G)}),y.map(({media:P,indices:G})=>r("div",{"data-caption-index":G.map(de=>de+1).join(" "),onClick:de=>{de.preventDefault(),de.stopPropagation(),V.showMediaAlt={alt:P.description,lang:ve}},title:P.description,children:[r("sup",{children:G.map(de=>de+1).join(" ")})," ",P.description]},P.id))},[Un,Bn,ve]),ln=se(()=>{var y;return!!te&&oe===((y=t.account)==null?void 0:y.id)||!!C.statusThreadNumber[S]},[te,oe,(ii=t.account)==null?void 0:ii.id,C.statusThreadNumber[S]]),za=se(()=>s&&!ln&&!c&&!te&&Y==="public"&&ce>0,[s,ln,c,te,ce,Y]),ni=se(()=>{if(H||ye||Ce||F||W!=null&&W.length||ln||c||te||ce<=0||!/[??๏ผŸ๏ธ–โ“โ”โ‡โˆโ‰ยฟโ€ฝุŸ]/.test(ue))return!1;const G=Jo(ue);if(G>0&&G<=Wd)return!0},[H,ye,Ce,F,W,We,ln,c,te,ce,ue]);return r(rn,{children:[b&&!!(te&&oe)&&r(ff,{sKey:S}),r("article",{"data-state-post-id":S,ref:y=>{var G;Dt.current=y;const P=((G=y==null?void 0:y.closest)==null?void 0:G.call(y,".timeline-item, .timeline-item-alt, .status-link, .status-focus"))||y;Ma(P),Oa(P),Da(P),$a(P),Na(P)},tabindex:"-1",class:`status ${!c&&te&&Ot?"status-reply-to":""} visibility-${Y} ${Mt?"status-pinned":""} ${nf[o]} ${dt?"status-deleted":""} ${p?"status-card":""} ${Nn?"status-menu-open":""} ${w&&nn?"status-media-first":""}`,onMouseEnter:Pe,onContextMenu:y=>{var de,Ue;if(!Vn||y.metaKey)return;const P=y.target.closest("a");if(P&&Dt.current.contains(P)&&!P.getAttribute("href").startsWith("#"))return;const G=(de=window.getSelection)==null?void 0:de.call(window);if(G.toString().length>0){const{anchorNode:Nt}=G;if((Ue=Dt.current)!=null&&Ue.contains(Nt))return}y.preventDefault(),zn({anchorPoint:{x:y.clientX,y:y.clientY},direction:"right"}),cn(!0)},...Vn?La():{},children:[Vn&&r(xs,{ref:ti,state:Nn?"open":void 0,...Fn,onClose:y=>{var P,G,de;cn(!1),(y==null?void 0:y.reason)==="click"&&((de=(G=(P=Dt.current)==null?void 0:P.closest("[tabindex]"))==null?void 0:G.focus)==null||de.call(G))},portal:{target:document.body},containerProps:{style:{zIndex:1001},onClick:()=>{var y,P;(P=(y=ti.current)==null?void 0:y.closeMenu)==null||P.call(y)}},overflow:"auto",boundingBoxPadding:Ms(),unmountOnClose:!0,children:ei}),T&&o!=="l"&&!d&&!a&&!dt&&!p&&r("div",{class:`status-actions ${Nn==="actions-bar"?"open":""}`,ref:Pa,children:[r(Ht,{size:"s",title:g({id:"ImOQa9"}),alt:g({id:"ImOQa9"}),class:"reply-button",icon:"comment",iconSize:"m",onClick:$n}),r(Ht,{size:"s",checked:ge,title:[g({id:"W9FRBT"}),g({id:"OcUmcH"})],alt:[g({id:"W9FRBT"}),g({id:"8ab1sR"})],class:"favourite-button",icon:"heart",iconSize:"m",count:Ve,onClick:ko}),r("button",{type:"button",title:g({id:"2FYpfJ"}),class:"plain more-button",onClick:y=>{y.preventDefault(),y.stopPropagation(),zn({anchorRef:{current:y.currentTarget},align:"start",direction:"left",gap:0,shift:-8}),cn("actions-bar")},children:r(L,{icon:"more2",size:"m",alt:g({id:"2FYpfJ"})})})]}),o!=="l"&&r("div",{class:"status-badge",children:[le&&r(L,{class:"reblog",icon:"rocket",size:"s",alt:g({id:"b7T5Zj"})}),ge&&r(L,{class:"favourite",icon:"heart",size:"s",alt:g({id:"8ab1sR"})}),Ae&&r(L,{class:"bookmark",icon:"bookmark",size:"s",alt:g({id:"1C/9Sa"})}),Mt&&r(L,{class:"pin",icon:"pin",size:"s",alt:g({id:"kNiQp6"})})]}),o!=="s"&&r("a",{href:ae,tabindex:"-1",title:`@${N}`,onClick:y=>{y.preventDefault(),y.stopPropagation(),V.showAccount={account:t.account,instance:E}},children:r(st,{url:B||q,size:"xxl",squircle:me})}),r("div",{class:"container",children:[r("div",{class:"meta",children:[r("span",{class:"meta-name",children:r(yt,{account:t.account,instance:E,showAvatar:o==="s",showAcct:fe})})," ",o!=="l"&&(dt?r("span",{class:"status-deleted-tag",children:r(O,{id:"vGjmyl"})}):pe&&!d&&!a&&!p?r(Zt,{to:E?`/${E}/s/${z}`:`/s/${z}`,onClick:y=>{y.metaKey||y.ctrlKey||y.shiftKey||y.altKey||y.which===2||(y.preventDefault(),y.stopPropagation(),m==null||m(y,t),zn({anchorRef:{current:y.currentTarget},align:"end",direction:"bottom",gap:4}),cn(!0))},class:`time ${Nn&&(Fn!=null&&Fn.anchorRef)?"is-open":""}`,children:[za&&!ni?r(L,{icon:"comment2",size:"s",alt:Ie._({id:"RXmXDR",values:{repliesCount:ce}})}):Y!=="public"&&Y!=="direct"&&r(L,{icon:Tn[Y],alt:I(Pt[Y]),size:"s"})," ",r(at,{datetime:Te,format:"micro"}),!d&&!a&&r(L,{icon:"more2",class:"more",alt:g({id:"2FYpfJ"})})]}):r("span",{class:"time",children:[Y!=="public"&&Y!=="direct"&&r($,{children:[r(L,{icon:Tn[Y],alt:I(Pt[Y]),size:"s"})," "]}),r(at,{datetime:Te,format:"micro"})]}))]}),Y==="direct"&&r($,{children:[r("div",{class:"status-direct-badge",children:r(O,{id:"IV4QaU"})})," "]}),!c&&r($,{children:ln?r("div",{class:"status-thread-badge",children:[r(L,{icon:"thread",size:"s"}),r(O,{id:"lQ8zCz",values:{0:C.statusThreadNumber[S]?` ${C.statusThreadNumber[S]}/X`:""}})]}):!!te&&!!Ot&&(!!F||!Fe.find(y=>y.id===oe))&&r("div",{class:"status-reply-badge",children:[r(L,{icon:"reply"})," ",r(yt,{account:Ot,instance:E,short:!0})]})}),r("div",{class:`content-container ${F||Ce?"has-spoiler":""} ${Ke?"show-spoiler":""} ${xt?"show-media":""}`,"data-content-text-weight":i?Ur():null,style:(fe||i)&&{"--content-text-weight":Ur()},children:w&&nn?r($,{children:[(!!F||!!Ce)&&!Ge&&r($,{children:[!!F&&r("span",{class:"spoiler-content media-first-spoiler-content",lang:ve,dir:"auto",ref:Hr,"data-read-more":I(wn),children:[r(qt,{text:F,emojis:be})," "]}),r("button",{class:`light spoiler-button media-first-spoiler-button ${Ke?"spoiling":""}`,type:"button",onClick:y=>{y.preventDefault(),y.stopPropagation(),Ke?(delete V.spoilers[z],Ge||delete V.spoilersMedia[z]):(V.spoilers[z]=!0,Ge||(V.spoilersMedia[z]=!0))},children:[r(L,{icon:Ke?"eye-open":"eye-close"})," ",g(Ke?{id:"6lGV3K"}:{id:"lqBX03"})]})]}),r(sf,{mediaAttachments:W,language:ve,postID:z,instance:E}),!!ue&&r("div",{class:"media-first-content content",ref:Br,children:r(Qi,{post:t,instance:E,previewMode:d})})]}):r($,{children:[!!F&&r($,{children:[r("div",{class:"content spoiler-content",lang:ve,dir:"auto",ref:Hr,"data-read-more":I(wn),children:r("p",{children:r(qt,{text:F,emojis:be})})}),Ge||d?r("div",{class:"spoiler-divider",children:[r(L,{icon:"eye-open"})," ",r(O,{id:"gnKo7f"})]}):r("button",{class:`light spoiler-button ${Ke?"spoiling":""}`,type:"button",onClick:y=>{y.preventDefault(),y.stopPropagation(),Ke?(delete V.spoilers[z],Ge||delete V.spoilersMedia[z]):(V.spoilers[z]=!0,Ge||(V.spoilersMedia[z]=!0))},children:[r(L,{icon:Ke?"eye-open":"eye-close"})," ",g(Ke?{id:"6lGV3K"}:{id:"lqBX03"})]})]}),!!ue&&r("div",{class:"content",ref:Br,"data-read-more":I(wn),inert:F&&!Ke?!0:void 0,children:[r(Qi,{post:t,instance:E,previewMode:d}),r(pf,{id:z,instance:E,level:p})]}),!!ye&&r(hd,{lang:ve,poll:ye,readOnly:a||!R||!A,onUpdate:y=>{V.statuses[S].poll=y},refresh:()=>x.v1.polls.$select(ye.id).fetch().then(y=>{V.statuses[S].poll=y}).catch(y=>{}),votePoll:y=>x.v1.polls.$select(ye.id).votes.create({choices:y}).then(P=>{V.statuses[S].poll=P}).catch(P=>{})}),((u||Vr)&&Jd(ue)&&$t||pt)&&r(qu,{forceTranslate:pt||Vr,mini:!fe&&!c,sourceLanguage:ve,autoDetected:tn,text:or(t)}),!d&&Ce&&!!W.length&&on!=="show_all"&&r("button",{class:`plain spoiler-media-button ${xt?"spoiling":""}`,type:"button",hidden:!Ge&&!!F,onClick:y=>{y.preventDefault(),y.stopPropagation(),xt?delete V.spoilersMedia[z]:V.spoilersMedia[z]=!0},children:[r(L,{icon:xt?"eye-open":"eye-close"})," ",g(xt?{id:"6lGV3K"}:{id:"9ZCilh"})]}),!!W.length&&(W.length>1&&(fe||c&&o==="m")?r("div",{class:"media-large-container",children:W.map((y,P)=>r("div",{class:"media-container media-eq1",children:r(_r,{media:y,autoAnimate:!0,showCaption:!0,allowLongerCaption:!ue,lang:ve,to:`/${E}/s/${z}?${c?"media":"media-only"}=${P+1}`,onClick:h?G=>h(G,P,y,t):void 0})},y.id))}):r(rf,{lang:ve,enabled:Un,captionChildren:Fa,children:r("div",{ref:Ia,class:`media-container media-eq${W.length} ${W.length>2?"media-gt2":""} ${W.length>4?"media-gt4":""}`,children:Bn.map((y,P)=>r(_r,{media:y,autoAnimate:fe,showCaption:W.length===1,allowLongerCaption:!ue&&W.length===1,lang:ve,altIndex:Un&&!!y.description&&P+1,to:`/${E}/s/${z}?${c?"media":"media-only"}=${P+1}`,onClick:h?G=>{h(G,P,y,t)}:void 0,checkAspectRatio:W.length===1},y.id))})})),!!H&&/^https/i.test(H==null?void 0:H.url)&&!Ce&&!F&&!ye&&!W.length&&!C.statusQuotes[S]&&r(cf,{card:H,selfReferential:(H==null?void 0:H.url)===t.url||(H==null?void 0:H.url)===t.uri,selfAuthor:(si=H==null?void 0:H.authors)==null?void 0:si.some(y=>{var P;return((P=y.account)==null?void 0:P.url)===ae}),instance:M})]})}),!fe&&ni&&r("div",{class:"content-comment-hint insignificant",children:[r(L,{icon:"comment2",alt:g({id:"N8UzTV"})})," ",ce]}),fe&&r($,{children:[r("div",{class:"extra-meta",children:dt?r("span",{class:"status-deleted-tag",children:r(O,{id:"vGjmyl"})}):r($,{children:[r("span",{children:I(Pt[Y])})," โ€ข"," ",r("a",{href:pe,target:"_blank",rel:"noopener noreferrer",children:[new Date().getTime()-Te.getTime()<864e5&&r($,{children:[r(at,{datetime:Te,format:"micro"})," ","โ€’"," "]}),r("time",{class:"created",datetime:Te.toISOString(),title:Te.toLocaleString(),children:jr})]}),nt&&r($,{children:[" ","โ€ข ",r(L,{icon:"pencil",alt:g({id:"MRZxAn"})})," ",r("time",{tabIndex:"0",class:"edited",datetime:xe.toISOString(),onClick:()=>{On(z)},children:Wr})]})]})}),!!(ft!=null&&ft.length)&&r("div",{class:"emoji-reactions",children:ft.map(y=>{const{name:P,count:G,me:de,url:Ue,staticUrl:Nt}=y;if(Ue)return r("span",{class:`emoji-reaction tag ${de?"":"insignificant"}`,children:[r(pr,{alt:P,url:Ue,staticUrl:Nt})," ",G]});if(/^:.+?:$/.test(P)){const kt=be.find(It=>It.shortcode===P.replace(/^:/,"").replace(/:$/,""));if(kt)return r("span",{class:`emoji-reaction tag ${de?"":"insignificant"}`,children:[r(pr,{alt:P,url:kt.url,staticUrl:kt.staticUrl})," ",G]})}return r("span",{class:`emoji-reaction tag ${de?"":"insignificant"}`,children:[P," ",G]})})}),r("div",{class:`actions ${dt?"disabled":""}`,children:[r("div",{class:"action has-count",children:r(Ht,{title:g({id:"ImOQa9"}),alt:g({id:"VbyRUy"}),class:"reply-button",icon:"comment",count:ce,onClick:$n})}),r("div",{class:"action has-count",children:r(Oo,{disabled:!sn,onClick:So,confirmLabel:r($,{children:[r(L,{icon:"rocket"}),r("span",{children:g(le?{id:"QzzGsY"}:{id:"kulphB"})})]}),menuExtras:r(Ee,{onClick:()=>{Gn({draftStatus:{status:` ${pe}`}})},children:[r(L,{icon:"quote"}),r("span",{children:r(O,{id:"ZhhOwV"})})]}),menuFooter:Kr&&!le&&r("div",{class:"footer",children:[r(L,{icon:"alert"}),r(O,{id:"MB+wJL"})]}),children:r(Ht,{checked:le,title:[g({id:"kulphB"}),g({id:"QzzGsY"})],alt:[g({id:"kulphB"}),g({id:"b7T5Zj"})],class:"reblog-button",icon:"rocket",count:Me,disabled:!sn})})}),r("div",{class:"action has-count",children:r(Ht,{checked:ge,title:[g({id:"W9FRBT"}),g({id:"OcUmcH"})],alt:[g({id:"W9FRBT"}),g({id:"8ab1sR"})],class:"favourite-button",icon:"heart",count:Ve,onClick:qr})}),qn("@mastodon/post-bookmark")&&r("div",{class:"action",children:r(Ht,{checked:Ae,title:[g({id:"PZlHt8"}),g({id:"q8EQYI"})],alt:[g({id:"PZlHt8"}),g({id:"1C/9Sa"})],class:"bookmark-button",icon:"bookmark",onClick:Gr})}),r(Os,{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:g({id:"2FYpfJ"}),class:"plain more-button",children:r(L,{icon:"more",size:"l",alt:g({id:"2FYpfJ"})})})}),children:ei})]})]})]}),!!Eo&&r(ar,{onClick:y=>{y.target===y.currentTarget&&On(!1)},children:r(lf,{statusID:Eo,instance:E,fetchStatusHistory:()=>x.v1.statuses.$select(Eo).history.list(),onClose:()=>{var y;On(!1),(y=Dt.current)==null||y.focus()}})}),!!ka&&r(ar,{onClick:y=>{y.target===y.currentTarget&&xo(!1)},children:r(uf,{post:t,instance:E,onClose:()=>{xo(!1)}})})]})]})}function rf(e){const{enabled:t,children:n,lang:o,captionChildren:i}=e;return!t||!i?n:r("figure",{class:"media-figure-multiple",children:[n,r("figcaption",{lang:o,dir:"auto",children:i})]})}function sf(e){const{mediaAttachments:t,language:n,postID:o,instance:i}=e,a=t.length>1,s=D(),[c,l]=K(0);return J(()=>{let u=()=>{const{clientWidth:f,scrollLeft:d}=s.current,h=Math.round(Math.abs(d)/f);l(h)};return s.current&&s.current.addEventListener("scroll",u,{passive:!0}),()=>{s.current&&s.current.removeEventListener("scroll",u)}},[]),r($,{children:[r("div",{class:"media-first-container",children:[r("div",{class:"media-first-carousel",ref:s,children:t.map((u,f)=>r("div",{class:"media-first-item",children:r(_r,{media:u,lang:n,to:`/${i}/s/${o}?media=${f+1}`})},u.id))}),a&&r("div",{class:"media-carousel-controls",children:[r("div",{class:"carousel-indexer",children:[c+1,"/",t.length]}),r("label",{class:"media-carousel-button",children:r("button",{type:"button",class:"carousel-button",hidden:c===0,onClick:u=>{u.preventDefault(),u.stopPropagation(),s.current.focus(),s.current.scrollTo({left:s.current.clientWidth*(c-1)*(hr()?-1:1),behavior:"smooth"})},children:r(L,{icon:"arrow-left"})})}),r("label",{class:"media-carousel-button",children:r("button",{type:"button",class:"carousel-button",hidden:c===t.length-1,onClick:u=>{u.preventDefault(),u.stopPropagation(),s.current.focus(),s.current.scrollTo({left:s.current.clientWidth*(c+1)*(hr()?-1:1),behavior:"smooth"})},children:r(L,{icon:"arrow-right"})})})]})]}),a&&r("div",{class:"media-carousel-dots",style:{"--dots-count":t.length},children:t.map((u,f)=>r("span",{class:`carousel-dot ${f===c?"active":""}`},u.id))})]})}function es(e){return Ws.toUnicode(URL.parse(e).hostname.replace(/^www\./,"").replace(/\/$/,""))}function ts(e){return["x.com","twitter.com","threads.net","bsky.app"].includes(e)}function af({authors:e,hidden:t,children:n}){var i,a;if(t||!((a=(i=e==null?void 0:e[0])==null?void 0:i.account)!=null&&a.id))return n;const o=e[0].account;return r("div",{class:"card-byline",children:[n,r("div",{class:"card-byline-author",children:[r(L,{icon:"link",size:"s"})," ",r("small",{children:r(O,{id:"4LHHK6",components:{0:r(yt,{account:o,showAvatar:!0})}})})]})]})}function cf({card:e,selfReferential:t,selfAuthor:n,instance:o}){var X;const i=Pn(V),{blurhash:a,title:s,description:c,html:l,providerName:u,providerUrl:f,authorName:d,authorUrl:h,width:p,height:m,image:_,imageDescription:v,url:T,type:b,embedUrl:w,language:I,publishedAt:g,authors:x}=e,E=s||u||d,M=p/m>=1.2?"large":"",[R,S]=K(null);if(J(()=>{E&&_&&!t&&Xa(T)&&Qa(o,T).then(ae=>{if(!ae)return;const{id:ie,url:ee}=ae;S("#"+ee)})},[E,_,t]),i.unfurledLinks[T])return null;const C=/