import{Y as ct,P as Ne,c as s,p as ee,j as Ae,F as B,A as _n,_ as se,Z as xn,o as It,$ as A,a0 as ca,a1 as tr,a2 as la,q as he,D as Ct,y as Pi,a3 as ua,a4 as $i,T as Oi,k as U,x as yt,a5 as lt,h as da,s as W,a6 as of,a7 as fa,a as nr,n as ha,a8 as Ri,a9 as pa,aa as Di,i as po,L as Ni,g as mo,ab as ma,ac as Re,ad as ga,ae as va,af as Hn,w as it,u as Mn,d as Ko,b as rt,I as Fi,ag as ya,ah as _a,ai as ba}from"./useTitle-TOnOofzE.js";import{e as wa}from"./tinyld-light-PxOyhYWY.js";import{m as Ea}from"./index-gNUvm9kb.js";function qr(){return qr=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 Ia=function(t,n,r){r===void 0&&(r=!1);var o=n.alt,i=n.meta,a=n.mod,l=n.shift,c=n.ctrl,u=n.keys,f=t.key,d=t.code,p=t.ctrlKey,m=t.metaKey,h=t.shiftKey,g=t.altKey,v=mt(d),E=f.toLowerCase();if(!(u!=null&&u.includes(v))&&!(u!=null&&u.includes(E))&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(v))return!1;if(!r){if(o===!g&&E!=="alt"||l===!h&&E!=="shift")return!1;if(a){if(!m&&!p)return!1}else if(i===!m&&E!=="meta"&&E!=="os"||c===!p&&E!=="ctrl"&&E!=="control")return!1}return u&&u.length===1&&(u.includes(E)||u.includes(v))?!0:u?xa(u):!u},Ca=ct(void 0),Pa=function(){return Ne(Ca)};function ji(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,r){return n&&ji(e[r],t[r])},!0):e===t}var $a=ct({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),Oa=function(){return Ne($a)};function Ra(e){var t=B(void 0);return ji(t.current,e)||(t.current=e),t.current}var Zo=function(t){t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation()},Da=typeof window<"u"?_n:se;function Bt(e,t,n,r){var o=B(null),i=B(!1),a=n instanceof Array?r instanceof Array?void 0:r:n,l=go(e)?e.join(a==null?void 0:a.splitKey):e,c=n instanceof Array?n:r instanceof Array?r:void 0,u=Ae(t,c??[]),f=B(u);c?f.current=u:f.current=t;var d=Ra(a),p=Oa(),m=p.enabledScopes,h=Pa();return Da(function(){if(!((d==null?void 0:d.enabled)===!1||!Aa(m,d==null?void 0:d.scopes))){var g=function(w,b){var x;if(b===void 0&&(b=!1),!(La(w)&&!Bi(w,d==null?void 0:d.enableOnFormTags))){if(o.current!==null){var L=o.current.getRootNode();if((L instanceof Document||L instanceof ShadowRoot)&&L.activeElement!==o.current&&!o.current.contains(L.activeElement)){Zo(w);return}}(x=w.target)!=null&&x.isContentEditable&&!(d!=null&&d.enableOnContentEditable)||kr(l,d==null?void 0:d.splitKey).forEach(function(O){var $,S=Lr(O,d==null?void 0:d.combinationKey);if(Ia(w,S,d==null?void 0:d.ignoreModifiers)||($=S.keys)!=null&&$.includes("*")){if(d!=null&&d.ignoreEventWhen!=null&&d.ignoreEventWhen(w)||b&&i.current)return;if(Ma(w,S,d==null?void 0:d.preventDefault),!ka(w,S,d==null?void 0:d.enabled)){Zo(w);return}f.current(w,S),b||(i.current=!0)}})}},v=function(w){w.key!==void 0&&(Hi(mt(w.code)),((d==null?void 0:d.keydown)===void 0&&(d==null?void 0:d.keyup)!==!0||d!=null&&d.keydown)&&g(w))},E=function(w){w.key!==void 0&&(Vi(mt(w.code)),i.current=!1,d!=null&&d.keyup&&g(w,!0))},_=o.current||(a==null?void 0:a.document)||document;return _.addEventListener("keyup",E),_.addEventListener("keydown",v),h&&kr(l,d==null?void 0:d.splitKey).forEach(function(T){return h.addHotkey(Lr(T,d==null?void 0:d.combinationKey,d==null?void 0:d.description))}),function(){_.removeEventListener("keyup",E),_.removeEventListener("keydown",v),h&&kr(l,d==null?void 0:d.splitKey).forEach(function(T){return h.removeHotkey(Lr(T,d==null?void 0:d.combinationKey,d==null?void 0:d.description))})}}},[l,d,m]),o}var vo={exports:{}};/*!
* Toastify js 1.12.0
* https://github.com/apvarun/toastify-js
* @license MIT licensed
*
* Copyright (C) 2018 Varun A P
*/var cf=vo.exports;(function(e){(function(t,n){e.exports?e.exports=n():t.Toastify=n()})(xn,function(t){var n=function(a){return new n.lib.init(a)},r="1.12.0";n.defaults={oldestFirst:!0,text:"Toastify is awesome!",node:void 0,duration:3e3,selector:void 0,callback:function(){},destination:void 0,newWindow:!1,close:!1,gravity:"toastify-top",positionLeft:!1,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:!0,onClick:function(){},offset:{x:0,y:0},escapeMarkup:!0,ariaLive:"polite",style:{background:""}},n.lib=n.prototype={toastify:r,constructor:n,init:function(a){return a||(a={}),this.options={},this.toastElement=null,this.options.text=a.text||n.defaults.text,this.options.node=a.node||n.defaults.node,this.options.duration=a.duration===0?0:a.duration||n.defaults.duration,this.options.selector=a.selector||n.defaults.selector,this.options.callback=a.callback||n.defaults.callback,this.options.destination=a.destination||n.defaults.destination,this.options.newWindow=a.newWindow||n.defaults.newWindow,this.options.close=a.close||n.defaults.close,this.options.gravity=a.gravity==="bottom"?"toastify-bottom":n.defaults.gravity,this.options.positionLeft=a.positionLeft||n.defaults.positionLeft,this.options.position=a.position||n.defaults.position,this.options.backgroundColor=a.backgroundColor||n.defaults.backgroundColor,this.options.avatar=a.avatar||n.defaults.avatar,this.options.className=a.className||n.defaults.className,this.options.stopOnFocus=a.stopOnFocus===void 0?n.defaults.stopOnFocus:a.stopOnFocus,this.options.onClick=a.onClick||n.defaults.onClick,this.options.offset=a.offset||n.defaults.offset,this.options.escapeMarkup=a.escapeMarkup!==void 0?a.escapeMarkup:n.defaults.escapeMarkup,this.options.ariaLive=a.ariaLive||n.defaults.ariaLive,this.options.style=a.style||n.defaults.style,a.backgroundColor&&(this.options.style.background=a.backgroundColor),this},buildToast:function(){if(!this.options)throw"Toastify is not initialized";var a=document.createElement("div");a.className="toastify on "+this.options.className,this.options.position?a.className+=" toastify-"+this.options.position:this.options.positionLeft===!0?(a.className+=" toastify-left",console.warn("Property `positionLeft` will be depreciated in further versions. Please use `position` instead.")):a.className+=" toastify-right",a.className+=" "+this.options.gravity,this.options.backgroundColor&&console.warn('DEPRECATION NOTICE: "backgroundColor" is being deprecated. Please use the "style.background" property.');for(var l in this.options.style)a.style[l]=this.options.style[l];if(this.options.ariaLive&&a.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)a.appendChild(this.options.node);else if(this.options.escapeMarkup?a.innerText=this.options.text:a.innerHTML=this.options.text,this.options.avatar!==""){var c=document.createElement("img");c.src=this.options.avatar,c.className="toastify-avatar",this.options.position=="left"||this.options.positionLeft===!0?a.appendChild(c):a.insertAdjacentElement("afterbegin",c)}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?a.insertAdjacentElement("afterbegin",u):a.appendChild(u)}if(this.options.stopOnFocus&&this.options.duration>0){var d=this;a.addEventListener("mouseover",function(v){window.clearTimeout(a.timeOutValue)}),a.addEventListener("mouseleave",function(){a.timeOutValue=window.setTimeout(function(){d.removeElement(a)},d.options.duration)})}if(typeof this.options.destination<"u"&&a.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"&&a.addEventListener("click",(function(v){v.stopPropagation(),this.options.onClick()}).bind(this)),typeof this.options.offset=="object"){var p=o("x",this.options),m=o("y",this.options),h=this.options.position=="left"?p:"-"+p,g=this.options.gravity=="toastify-top"?m:"-"+m;a.style.transform="translate("+h+","+g+")"}return a},showToast:function(){this.toastElement=this.buildToast();var a;if(typeof this.options.selector=="string"?a=document.getElementById(this.options.selector):this.options.selector instanceof HTMLElement||typeof ShadowRoot<"u"&&this.options.selector instanceof ShadowRoot?a=this.options.selector:a=document.body,!a)throw"Root element is not defined";var l=n.defaults.oldestFirst?a.firstChild:a.lastChild;return a.insertBefore(this.toastElement,l),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(a){a.className=a.className.replace(" on",""),window.setTimeout((function(){this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),a.parentNode&&a.parentNode.removeChild(a),this.options.callback.call(a),n.reposition()}).bind(this),400)}},n.reposition=function(){for(var a={top:15,bottom:15},l={top:15,bottom:15},c={top:15,bottom:15},u=document.getElementsByClassName("toastify"),f,d=0;d0?window.innerWidth:screen.width;h<=360?(u[d].style[f]=c[f]+"px",c[f]+=p+m):i(u[d],"toastify-left")===!0?(u[d].style[f]=a[f]+"px",a[f]+=p+m):(u[d].style[f]=l[f]+"px",l[f]+=p+m)}return this};function o(a,l){return l.offset[a]?isNaN(l.offset[a])?l.offset[a]:l.offset[a]+"px":"0px"}function i(a,l){return!a||typeof l!="string"?!1:!!(a.className&&a.className.trim().split(/\s+/gi).indexOf(l)>-1)}return n.lib.init.prototype=n.lib,n})})(vo);var Na=vo.exports;const Fa=It(Na);window._showToast=Pe;function Pe(e){typeof e=="string"&&(e={text:e});const{onClick:t,delay:n,...r}=e,o=Fa({className:`${t||e.destination?"shiny-pill":""}`,gravity:"bottom",position:"center",...r,onClick:()=>{t==null||t(o)}});return n?setTimeout(()=>{o.showToast()},n):o.showToast(),o}function lf(e,t,n,r){const o=B(e);se(()=>{o.current=e},[e,n]),se(()=>{!r||t===null||t===!1||o.current()},[r]),se(()=>{if(t===null||t===!1)return;const a=setInterval(()=>o.current(),t);return()=>clearInterval(a)},[t])}function za(e){const t=URL.parse("/compose/",window.location),{width:n,height:r}=window.screen,o=Math.max(0,(n-600)/2),i=Math.max(0,(r-450)/2),a=Math.min(n,600),l=Math.min(r,450),c=(e==null?void 0:e.uid)||Math.random(),u=window.open(t,"compose"+c,`width=${a},height=${l},left=${o},top=${i}`);return u?u.__COMPOSE__=e:alert("Looks like your browser is blocking popups."),u}const Ha=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);function Va(){if(Ha){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 Ui={x:()=>A(()=>import("./icons/close-line-YTE7hIJE.js"),[],import.meta.url),heart:()=>A(()=>import("./icons/heart-line-VwvWYh8h.js"),[],import.meta.url),bookmark:()=>A(()=>import("./icons/bookmark-line-D6jQ7QFs.js"),[],import.meta.url),"check-circle":()=>A(()=>import("./icons/check-circle-line-sE41WGxF.js"),[],import.meta.url),"x-circle":()=>A(()=>import("./icons/close-circle-line-qd3g541O.js"),[],import.meta.url),transfer:()=>A(()=>import("./icons/transfer-4-line-Q9QJoxz3.js"),[],import.meta.url),rocket:()=>A(()=>import("./icons/rocket-line-rZbVYYCZ.js"),[],import.meta.url),"arrow-left":()=>A(()=>import("./icons/arrow-left-line-_YC6-XGG.js"),[],import.meta.url),"arrow-right":()=>A(()=>import("./icons/arrow-right-line-PypiEqpu.js"),[],import.meta.url),"arrow-up":()=>A(()=>import("./icons/arrow-up-line-fcuKqhVE.js"),[],import.meta.url),"arrow-down":()=>A(()=>import("./icons/arrow-down-line-0TRJUP_K.js"),[],import.meta.url),earth:()=>A(()=>import("./icons/earth-line-t1Um8wpQ.js"),[],import.meta.url),lock:()=>A(()=>import("./icons/lock-line-0jNHqZpm.js"),[],import.meta.url),unlock:()=>A(()=>import("./icons/unlock-line-w3piJMVb.js"),[],import.meta.url),"eye-close":()=>A(()=>import("./icons/eye-close-line-lBiePPv9.js"),[],import.meta.url),"eye-open":()=>A(()=>import("./icons/eye-2-line-vz_Kw-rK.js"),[],import.meta.url),message:()=>A(()=>import("./icons/mail-line-5XLS6FEo.js"),[],import.meta.url),comment:()=>A(()=>import("./icons/chat-3-line-F0xcdpXY.js"),[],import.meta.url),comment2:()=>A(()=>import("./icons/comment-2-line-xEXuT-Ip.js"),[],import.meta.url),home:()=>A(()=>import("./icons/home-3-line-qJiZhXUH.js"),[],import.meta.url),notification:()=>A(()=>import("./icons/notification-line-olNPLtgS.js"),[],import.meta.url),follow:()=>A(()=>import("./icons/user-follow-line-k_GCWTtp.js"),[],import.meta.url),"follow-add":()=>A(()=>import("./icons/user-add-line-zzW9OULB.js"),[],import.meta.url),poll:[()=>A(()=>import("./icons/chart-bar-line-5r_DfN2w.js"),[],import.meta.url),"90deg"],pencil:()=>A(()=>import("./icons/pencil-line-bKXqElLR.js"),[],import.meta.url),quill:()=>A(()=>import("./icons/quill-pen-line-h_5-FsGz.js"),[],import.meta.url),at:()=>A(()=>import("./icons/at-line-9vJS_Hnl.js"),[],import.meta.url),attachment:()=>A(()=>import("./icons/attachment-line-C2PUa1Ke.js"),[],import.meta.url),upload:()=>A(()=>import("./icons/upload-3-line-Qsjvubiw.js"),[],import.meta.url),gear:()=>A(()=>import("./icons/settings-3-line-kt4MSpRv.js"),[],import.meta.url),more:()=>A(()=>import("./icons/more-3-line-wUD-Yhmj.js"),[],import.meta.url),more2:()=>A(()=>import("./icons/more-1-fill-je1-slyh.js"),[],import.meta.url),external:()=>A(()=>import("./icons/external-link-line-8nOOkmFu.js"),[],import.meta.url),popout:()=>A(()=>import("./icons/external-link-line-8nOOkmFu.js"),[],import.meta.url),popin:[()=>A(()=>import("./icons/external-link-line-8nOOkmFu.js"),[],import.meta.url),"180deg"],plus:()=>A(()=>import("./icons/add-circle-line--O-MfyNy.js"),[],import.meta.url),"chevron-left":()=>A(()=>import("./icons/left-line-Jck0yVmC.js"),[],import.meta.url),"chevron-right":()=>A(()=>import("./icons/right-line-7VBoqLdz.js"),[],import.meta.url),"chevron-down":()=>A(()=>import("./icons/down-line-9PeS5YhF.js"),[],import.meta.url),reply:[()=>A(()=>import("./icons/share-forward-line-4jL-2Q4u.js"),[],import.meta.url),"180deg","horizontal"],thread:()=>A(()=>import("./icons/route-line-2YYy3958.js"),[],import.meta.url),group:()=>A(()=>import("./icons/group-line-JvhJklhQ.js"),[],import.meta.url),bot:()=>A(()=>import("./icons/android-2-line-uPwvVubH.js"),[],import.meta.url),menu:()=>A(()=>import("./icons/rows-4-line-SxGPYpTa.js"),[],import.meta.url),list:()=>A(()=>import("./icons/list-check-line-qNqx9Mm4.js"),[],import.meta.url),search:()=>A(()=>import("./icons/search-2-line-G39AynEw.js"),[],import.meta.url),hashtag:()=>A(()=>import("./icons/hashtag-line-SS3QMu1R.js"),[],import.meta.url),info:()=>A(()=>import("./icons/information-line-8SOch6cR.js"),[],import.meta.url),shortcut:()=>A(()=>import("./icons/lightning-line-JMYUlCZM.js"),[],import.meta.url),user:()=>A(()=>import("./icons/user-4-line-zT_bpOrS.js"),[],import.meta.url),following:()=>A(()=>import("./icons/walk-line-CF7a5s4t.js"),[],import.meta.url),pin:()=>A(()=>import("./icons/pin-line-ULyRQyWZ.js"),[],import.meta.url),unpin:[()=>A(()=>import("./icons/pin-line-ULyRQyWZ.js"),[],import.meta.url),"180deg"],bus:()=>A(()=>import("./icons/bus-2-line-XuQdDZ_w.js"),[],import.meta.url),link:()=>A(()=>import("./icons/link-2-line-BUqp1EwN.js"),[],import.meta.url),history:()=>A(()=>import("./icons/history-line-yoG7K8wL.js"),[],import.meta.url),share:()=>A(()=>import("./icons/share-2-line-PYo-zN94.js"),[],import.meta.url),sparkles:()=>A(()=>import("./icons/sparkles-line-wjZWGZ1a.js"),[],import.meta.url),sparkles2:()=>A(()=>import("./icons/sparkles-2-line-g2FqdZ0R.js"),[],import.meta.url),exit:()=>A(()=>import("./icons/exit-line-l-1uUgI7.js"),[],import.meta.url),translate:()=>A(()=>import("./icons/translate-line-HpDtlqS2.js"),[],import.meta.url),play:()=>A(()=>import("./icons/play-fill-Ey-zv2eL.js"),[],import.meta.url),trash:()=>A(()=>import("./icons/delete-2-line-pjUduCFs.js"),[],import.meta.url),mute:()=>A(()=>import("./icons/volume-mute-line-WthBoXru.js"),[],import.meta.url),unmute:()=>A(()=>import("./icons/volume-line-PZujbN8h.js"),[],import.meta.url),block:()=>A(()=>import("./icons/forbid-circle-line-3FxopGoP.js"),[],import.meta.url),unblock:[()=>A(()=>import("./icons/forbid-circle-line-3FxopGoP.js"),[],import.meta.url),"180deg"],flag:()=>A(()=>import("./icons/flag-1-line-xvcg7G7Q.js"),[],import.meta.url),time:()=>A(()=>import("./icons/time-line-ThP0kTRr.js"),[],import.meta.url),refresh:()=>A(()=>import("./icons/refresh-2-line-t42qqclb.js"),[],import.meta.url),emoji2:()=>A(()=>import("./icons/emoji-2-line--uNVc2IC.js"),[],import.meta.url),filter:()=>A(()=>import("./icons/filter-2-line-KyjbFYlO.js"),[],import.meta.url),filters:()=>A(()=>import("./icons/filter-line-1KEfnWDm.js"),[],import.meta.url),chart:()=>A(()=>import("./icons/chart-line-line-pHaLt6yC.js"),[],import.meta.url),react:()=>A(()=>import("./icons/react-line-YfZPqZem.js"),[],import.meta.url),layout4:()=>A(()=>import("./icons/layout-4-line-FOdnyEcZ.js"),[],import.meta.url),layout5:()=>A(()=>import("./icons/layout-5-line-9Kks7dle.js"),[],import.meta.url),announce:()=>A(()=>import("./icons/announcement-line-MSlAmDH1.js"),[],import.meta.url),alert:()=>A(()=>import("./icons/alert-line-zyc6hy8V.js"),[],import.meta.url),round:()=>A(()=>import("./icons/round-fill-a0rplSmV.js"),[],import.meta.url),"arrow-up-circle":()=>A(()=>import("./icons/arrow-up-circle-line-e3kZqEZN.js"),[],import.meta.url),"arrow-down-circle":()=>A(()=>import("./icons/arrow-down-circle-line-mpqFtRtO.js"),[],import.meta.url),clipboard:()=>A(()=>import("./icons/clipboard-line-9F_Yeo71.js"),[],import.meta.url),"account-edit":()=>A(()=>import("./icons/user-edit-line-9VnWCh0X.js"),[],import.meta.url),"account-warning":()=>A(()=>import("./icons/user-warning-line-gL3RGb1N.js"),[],import.meta.url),keyboard:()=>A(()=>import("./icons/keyboard-line-10AZQcVH.js"),[],import.meta.url),cloud:()=>A(()=>import("./icons/cloud-line-abe0HgFS.js"),[],import.meta.url),month:()=>A(()=>import("./icons/calendar-month-line-VoXZVWAe.js"),[],import.meta.url),media:()=>A(()=>import("./icons/photo-album-line--GdJqjfq.js"),[],import.meta.url),speak:()=>A(()=>import("./icons/radar-line-ndI8IhOG.js"),[],import.meta.url),building:()=>A(()=>import("./icons/building-5-line-ew7lu83B.js"),[],import.meta.url),history2:()=>A(()=>import("./icons/history-2-line-3yIVzoWo.js"),[],import.meta.url),document:()=>A(()=>import("./icons/document-line--D6ooZg1.js"),[],import.meta.url),"arrows-right":()=>A(()=>import("./icons/arrows-right-line-HF4HILdT.js"),[],import.meta.url),code:()=>A(()=>import("./icons/code-line-h4RWLaak.js"),[],import.meta.url),copy:()=>A(()=>import("./icons/copy-2-line-mPSDKieb.js"),[],import.meta.url),quote:()=>A(()=>import("./icons/quote-left-line-NQzeELMO.js"),[],import.meta.url),settings:()=>A(()=>import("./icons/settings-6-line-ZgCBilgF.js"),[],import.meta.url),"heart-break":()=>A(()=>import("./icons/heart-crack-line-P3DoKfTT.js"),[],import.meta.url),"user-x":()=>A(()=>import("./icons/user-x-line-zIdph-gu.js"),[],import.meta.url),minimize:()=>A(()=>import("./icons/arrows-down-line-ovOF9r0o.js"),[],import.meta.url)},Ba={s:12,m:16,l:20,xl:24,xxl:32},qo={},ja=ca(function({width:e,height:t,body:n,rotate:r,flip:o}){return s("svg",{viewBox:`0 0 ${e} ${t}`,dangerouslySetInnerHTML:{__html:n},style:{transform:`${r?`rotate(${r})`:""} ${o?"scaleX(-1)":""}`}})},{isShallowEqual:!0,maxSize:Object.keys(Ui).length,matchesArg:(e,t)=>e.icon===t.icon&&e.body===t.body});function H({icon:e,size:t="m",alt:n,title:r,class:o="",style:i={}}){if(!e)return null;const a=Ba[t];let l=Ui[e];if(!l)return null;let c,u;Array.isArray(l)&&([l,c,u]=l);const[f,d]=ee(qo[e]),p=B(e);return se(()=>{f&&p.current===e||((async()=>{const m=await l();d(m.default),qo[e]=m.default})(),p.current=e)},[e]),s("span",{class:`icon ${o}`,title:r||n,style:{width:`${a}px`,height:`${a}px`,...i},children:f&&s(ja,{icon:e,width:f.width,height:f.height,body:f.body,rotate:c,flip:u})})}function Ua(e,t=[]){!e||typeof e!="function"||se(()=>{const n=new CloseWatcher;return n.addEventListener("close",e),()=>{n.destroy()}},t)}const Wa=window.CloseWatcher?Ua:()=>{},Ya=document.getElementById("modal-container");function Gr({children:e,onClose:t,onClick:n,class:r,minimized:o}){if(!e)return null;const i=B();se(()=>{let u=setTimeout(()=>{var d;const f=(d=i.current)==null?void 0:d.querySelector('[tabindex="-1"]');f&&f.focus()},100);return()=>clearTimeout(u)},[]);const a=window.CloseWatcher,l=Bt("esc",()=>{setTimeout(()=>{t==null||t()},0)},{enabled:!a&&!!t,keydown:!1,keyup:!0},[t]);Wa(t,[t]),se(()=>{const u=document.querySelectorAll(".deck-container");if(o){const f=u[u.length-1];f&&f.tabIndex===-1&&f.focus()}else e?u.forEach(f=>{f.setAttribute("inert","")}):u.forEach(f=>{f.removeAttribute("inert")});return()=>{u.forEach(f=>{f.removeAttribute("inert")})}},[e,o]);const c=s("div",{ref:u=>{var f;i.current=u,l.current=((f=u==null?void 0:u.querySelector)==null?void 0:f.call(u,'[tabindex="-1"]'))||u},className:r,onClick:u=>{n==null||n(u),u.target===u.currentTarget&&(t==null||t(u))},tabIndex:o?0:"-1",inert:o,onFocus:u=>{var f,d;try{if(u.target===u.currentTarget){const p=(f=i.current)==null?void 0:f.querySelector('[tabindex="-1"]'),m=!!p&&((d=getComputedStyle(p))==null?void 0:d.pointerEvents)!=="none";p&&m&&p.focus()}}catch{}},children:e});return tr(c,Ya)}var yo={exports:{}},Ka="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Za=Ka;var qa=Za;function Wi(){}function Yi(){}Yi.resetWarningCache=Wi;var Ga=function(){function e(r,o,i,a,l,c){if(c!==qa){var u=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 u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Yi,resetWarningCache:Wi};return n.PropTypes=n,n};var uf=yo.exports;if(0)var df,ff;else yo.exports=Ga();var G=yo.exports;const _o=e=>!!e&&e[0]==="o",Xr=la||(e=>e());const Nt=(e,t,n=1e-4)=>Math.abs(e-t)e===!0||!!(e&&e[t]),He=(e,t)=>typeof e=="function"?e(t):e,Xa="_szhsinMenu",Ja=e=>e[Xa];const Gt=(e,t)=>(t&&Object.keys(t).forEach(n=>{const r=e[n],o=t[n];typeof o=="function"&&r?e[n]=(...i)=>{o(...i),r(...i)}:e[n]=o}),e),Qa=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],r=isNaN(t[1])?n:t[1];return{top:n,right:r,bottom:isNaN(t[2])?n:t[2],left:isNaN(t[3])?r:t[3]}},Ar=e=>{for(;e;){if(e=e.parentNode,!e||e===document.body||!e.parentNode)return;const{overflow:t,overflowX:n,overflowY:r}=getComputedStyle(e);if(/auto|scroll|overlay|hidden/.test(t+r+n))return e}};function mr(e,t){return{"aria-disabled":e||void 0,tabIndex:t?0:-1}}function Go(e,t){for(let n=0;n({[e?`${e}ClassName`:"className"]:G.oneOfType([G.string,G.func])}),tc={className:G.string,...ec("menu"),arrowProps:G.object,focusProps:G.object,menuStyle:G.object,arrow:G.bool,setDownOverflow:G.bool,gap:G.number,shift:G.number,align:G.oneOf(["start","center","end"]),direction:G.oneOf(["left","right","top","bottom"]),position:G.oneOf(["auto","anchor","initial"]),overflow:G.oneOf(["auto","visible","hidden"])},hf={...tc,containerProps:G.object,initialMounted:G.bool,unmountOnClose:G.bool,transition:G.oneOfType([G.bool,G.exact({open:G.bool,close:G.bool,item:G.bool})]),transitionTimeout:G.number,boundingBoxRef:G.object,boundingBoxPadding:G.string,reposition:G.oneOf(["auto","initial"]),repositionFlag:G.oneOfType([G.string,G.number]),viewScroll:G.oneOf(["auto","close","initial"]),submenuOpenDelay:G.number,submenuCloseDelay:G.number,portal:G.oneOfType([G.bool,G.exact({target:G.object,stablePosition:G.bool})]),theming:G.string,onItemClick:G.func},pf={instanceRef:G.oneOfType([G.object,G.func]),onMenuChange:G.func},Xe=({block:e,element:t,modifiers:n,className:r})=>he(()=>{const o=t?`${e}__${t}`:e;let i=o;n&&Object.keys(n).forEach(l=>{const c=n[l];c&&(i+=` ${o}--${c===!0?l:`${l}-${c}`}`)});let a=typeof r=="function"?r(n):r;return typeof a=="string"&&(a=a.trim(),a&&(i+=` ${a}`)),i},[e,t,n,r]),nc="szh-menu-container",Ge="szh-menu";const rc="arrow",bo="item",oc="divider",ic="header",sc="group",ac="submenu";const Ki=ct(),wo=ct({}),rr=ct({}),Eo=ct({}),cc=ct({}),gr=ct({}),De=Object.freeze({ENTER:"Enter",ESC:"Escape",SPACE:" ",HOME:"Home",END:"End",LEFT:"ArrowLeft",RIGHT:"ArrowRight",UP:"ArrowUp",DOWN:"ArrowDown"}),xe=Object.freeze({RESET:0,SET:1,UNSET:2,INCREASE:3,DECREASE:4,FIRST:5,LAST:6,SET_INDEX:7}),wn=Object.freeze({CLICK:"click",CANCEL:"cancel",BLUR:"blur",SCROLL:"scroll"}),Ut=Object.freeze({FIRST:"first",LAST:"last"}),lc=Object.freeze({entering:"opening",entered:"open",exiting:"closing",exited:"closed"}),Ir="absolute",To="presentation",vr="menuitem",Xo={"aria-hidden":!0,role:vr};const uc=({className:e,containerRef:t,containerProps:n,children:r,isOpen:o,theming:i,transition:a,onClose:l})=>{const c=bn(a,"item");return s("div",{...Gt({onKeyDown:({key:d})=>{switch(d){case De.ESC:He(l,{key:d,reason:wn.CANCEL});break}},onBlur:d=>{o&&!d.currentTarget.contains(d.relatedTarget)&&He(l,{reason:wn.BLUR})}},n),className:Xe({block:nc,modifiers:he(()=>({theme:i,itemTransition:c}),[i,c]),className:e}),style:{position:"absolute",...n==null?void 0:n.style},ref:t,children:r})},dc=()=>{let e,t=0;return{toggle:n=>{n?t++:t--,t=Math.max(t,0)},on:(n,r,o)=>{t?e||(e=setTimeout(()=>{e=0,r()},n)):o==null||o()},off:()=>{e&&(clearTimeout(e),e=0)}}},fc=(e,t)=>{const[n,r]=ee(),i=B({items:[],hoverIndex:-1,sorted:!1}).current,a=Ae((c,u)=>{const{items:f}=i;if(!c)i.items=[];else if(u)f.push(c);else{const d=f.indexOf(c);d>-1&&(f.splice(d,1),c.contains(document.activeElement)&&(t.current.focus(),r()))}i.hoverIndex=-1,i.sorted=!1},[i,t]),l=Ae((c,u,f)=>{const{items:d,hoverIndex:p}=i,m=()=>{if(i.sorted)return;const v=e.current.querySelectorAll(".szh-menu__item");d.sort((E,_)=>Go(v,E)-Go(v,_)),i.sorted=!0};let h=-1,g;switch(c){case xe.RESET:break;case xe.SET:g=u;break;case xe.UNSET:g=v=>v===u?void 0:v;break;case xe.FIRST:m(),h=0,g=d[h];break;case xe.LAST:m(),h=d.length-1,g=d[h];break;case xe.SET_INDEX:m(),h=f,g=d[h];break;case xe.INCREASE:m(),h=p,h<0&&(h=d.indexOf(u)),h++,h>=d.length&&(h=0),g=d[h];break;case xe.DECREASE:m(),h=p,h<0&&(h=d.indexOf(u)),h--,h<0&&(h=d.length-1),g=d[h];break;default:}g||(h=-1),r(g),i.hoverIndex=h},[e,i]);return{hoverItem:n,dispatch:l,updateItems:a}},hc=(e,t,n,r)=>{const o=t.current.getBoundingClientRect(),i=e.current.getBoundingClientRect(),a=n===window?{left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight}:n.getBoundingClientRect(),l=Qa(r),c=h=>h+i.left-a.left-l.left,u=h=>h+i.left+o.width-a.right+l.right,f=h=>h+i.top-a.top-l.top,d=h=>h+i.top+o.height-a.bottom+l.bottom;return{menuRect:o,containerRect:i,getLeftOverflow:c,getRightOverflow:u,getTopOverflow:f,getBottomOverflow:d,confineHorizontally:h=>{let g=c(h);if(g<0)h-=g;else{const v=u(h);v>0&&(h-=v,g=c(h),g<0&&(h-=g))}return h},confineVertically:h=>{let g=f(h);if(g<0)h-=g;else{const v=d(h);v>0&&(h-=v,g=f(h),g<0&&(h-=g))}return h}}},pc=({arrowRef:e,menuY:t,anchorRect:n,containerRect:r,menuRect:o})=>{let i=n.top-r.top-t+n.height/2;const a=e.current.offsetHeight*1.25;return i=Math.max(a,i),i=Math.min(i,o.height-a),i},mc=({anchorRect:e,containerRect:t,menuRect:n,placeLeftorRightY:r,placeLeftX:o,placeRightX:i,getLeftOverflow:a,getRightOverflow:l,confineHorizontally:c,confineVertically:u,arrowRef:f,arrow:d,direction:p,position:m})=>{let h=p,g=r;m!=="initial"&&(g=u(g),m==="anchor"&&(g=Math.min(g,e.bottom-t.top),g=Math.max(g,e.top-t.top-n.height)));let v,E,_;return h==="left"?(v=o,m!=="initial"&&(E=a(v),E<0&&(_=l(i),(_<=0||-E>_)&&(v=i,h="right")))):(v=i,m!=="initial"&&(_=l(v),_>0&&(E=a(o),(E>=0||-E<_)&&(v=o,h="left")))),m==="auto"&&(v=c(v)),{arrowY:d?pc({menuY:g,arrowRef:f,anchorRect:e,containerRect:t,menuRect:n}):void 0,x:v,y:g,computedDirection:h}},gc=({arrowRef:e,menuX:t,anchorRect:n,containerRect:r,menuRect:o})=>{let i=n.left-r.left-t+n.width/2;const a=e.current.offsetWidth*1.25;return i=Math.max(a,i),i=Math.min(i,o.width-a),i},vc=({anchorRect:e,containerRect:t,menuRect:n,placeToporBottomX:r,placeTopY:o,placeBottomY:i,getTopOverflow:a,getBottomOverflow:l,confineHorizontally:c,confineVertically:u,arrowRef:f,arrow:d,direction:p,position:m})=>{let h=p==="top"?"top":"bottom",g=r;m!=="initial"&&(g=c(g),m==="anchor"&&(g=Math.min(g,e.right-t.left),g=Math.max(g,e.left-t.left-n.width)));let v,E,_;return h==="top"?(v=o,m!=="initial"&&(E=a(v),E<0&&(_=l(i),(_<=0||-E>_)&&(v=i,h="bottom")))):(v=i,m!=="initial"&&(_=l(v),_>0&&(E=a(o),(E>=0||-E<_)&&(v=o,h="top")))),m==="auto"&&(v=u(v)),{arrowX:d?gc({menuX:g,arrowRef:f,anchorRect:e,containerRect:t,menuRect:n}):void 0,x:g,y:v,computedDirection:h}},yc=({arrow:e,align:t,direction:n,gap:r,shift:o,position:i,anchorRect:a,arrowRef:l,positionHelpers:c})=>{const{menuRect:u,containerRect:f}=c,d=n==="left"||n==="right";let p=d?r:o,m=d?o:r;if(e){const b=l.current;d?p+=b.offsetWidth:m+=b.offsetHeight}const h=a.left-f.left-u.width-p,g=a.right-f.left+p,v=a.top-f.top-u.height-m,E=a.bottom-f.top+m;let _,T;t==="end"?(_=a.right-f.left-u.width,T=a.bottom-f.top-u.height):t==="center"?(_=a.left-f.left-(u.width-a.width)/2,T=a.top-f.top-(u.height-a.height)/2):(_=a.left-f.left,T=a.top-f.top),_+=p,T+=m;const w={...c,anchorRect:a,placeLeftX:h,placeRightX:g,placeLeftorRightY:T,placeTopY:v,placeBottomY:E,placeToporBottomX:_,arrowRef:l,arrow:e,direction:n,position:i};switch(n){case"left":case"right":return mc(w);case"top":case"bottom":default:return vc(w)}},Wt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?_n:se;function Jo(e,t){typeof e=="function"?e(t):e.current=t}const Xt=(e,t)=>he(()=>e?t?n=>{Jo(e,n),Jo(t,n)}:e:t,[e,t]),Qo=-9999,Zi=({ariaLabel:e,menuClassName:t,menuStyle:n,arrow:r,arrowProps:o={},anchorPoint:i,anchorRef:a,containerRef:l,containerProps:c,focusProps:u,externalRef:f,parentScrollingRef:d,align:p="start",direction:m="bottom",position:h="auto",overflow:g="visible",setDownOverflow:v,repositionFlag:E,captureFocus:_=!0,state:T,endTransition:w,isDisabled:b,menuItemFocus:x,gap:L=0,shift:O=0,children:$,onClose:S,...M})=>{const[V,j]=ee({x:Qo,y:Qo}),[R,I]=ee({}),[k,D]=ee(),[C,z]=ee(m),[N]=ee(dc),[P,Y]=Pi(re=>re+1,1),{transition:K,boundingBoxRef:te,boundingBoxPadding:le,rootMenuRef:Te,rootAnchorRef:pe,scrollNodesRef:_e,reposition:be,viewScroll:ie,submenuCloseDelay:ue}=Ne(gr),{submenuCtx:q,reposSubmenu:ne=E}=Ne(rr),Se=B(null),dt=B(),Z=B(),ve=B(!1),Q=B({width:0,height:0}),ae=B(()=>{}),{hoverItem:ge,dispatch:de,updateItems:oe}=fc(Se,dt),we=_o(T),bt=bn(K,"open"),Ve=bn(K,"close"),me=_e.current,Le=re=>{switch(re.key){case De.HOME:de(xe.FIRST);break;case De.END:de(xe.LAST);break;case De.UP:de(xe.DECREASE,ge);break;case De.DOWN:de(xe.INCREASE,ge);break;case De.SPACE:re.target&&re.target.className.indexOf(Ge)!==-1&&re.preventDefault();return;default:return}re.preventDefault(),re.stopPropagation()},Ie=()=>{T==="closing"&&D(),He(w)},Ce=re=>{re.stopPropagation(),N.on(ue,()=>{de(xe.RESET),dt.current.focus()})},$t=re=>{re.target===re.currentTarget&&N.off()},Ye=Ae(re=>{var Me;const Be=a?(Me=a.current)==null?void 0:Me.getBoundingClientRect():i?{left:i.x,right:i.x,top:i.y,bottom:i.y,width:0,height:0}:null;if(!Be)return;me.menu||(me.menu=(te?te.current:Ar(Te.current))||window);const Fe=hc(l,Se,me.menu,le);let{arrowX:ye,arrowY:tt,x:$e,y:ze,computedDirection:Qt}=yc({arrow:r,align:p,direction:m,gap:L,shift:O,position:h,anchorRect:Be,arrowRef:Z,positionHelpers:Fe});const{menuRect:An}=Fe;let fe=An.height;if(!re&&g!=="visible"){const{getTopOverflow:en,getBottomOverflow:_r}=Fe;let nt,tn;const Ot=Q.current.height,Tt=_r(ze);if(Tt>0||Nt(Tt,0)&&Nt(fe,Ot))nt=fe-Tt,tn=Tt;else{const ht=en(ze);(ht<0||Nt(ht,0)&&Nt(fe,Ot))&&(nt=fe+ht,tn=0-ht,nt>=0&&(ze-=ht))}nt>=0?(fe=nt,D({height:nt,overflowAmt:tn})):D()}r&&I({x:ye,y:tt}),j({x:$e,y:ze}),z(Qt),Q.current={width:An.width,height:fe}},[r,p,le,m,L,O,h,g,i,a,l,te,Te,me]);Wt(()=>{we&&(Ye(),ve.current&&Y()),ve.current=we,ae.current=Ye},[we,Ye,ne]),Wt(()=>{k&&!v&&(Se.current.scrollTop=0)},[k,v]),Wt(()=>oe,[oe]),se(()=>{let{menu:re}=me;if(!we||!re)return;if(re=re.addEventListener?re:window,!me.anchors){me.anchors=[];let ye=Ar(pe&&pe.current);for(;ye&&ye!==re;)me.anchors.push(ye),ye=Ar(ye)}let Me=ie;if(me.anchors.length&&Me==="initial"&&(Me="auto"),Me==="initial")return;const Be=()=>{Me==="auto"?Xr(()=>Ye(!0)):He(S,{reason:wn.SCROLL})},Fe=me.anchors.concat(ie!=="initial"?re:[]);return Fe.forEach(ye=>ye.addEventListener("scroll",Be)),()=>Fe.forEach(ye=>ye.removeEventListener("scroll",Be))},[pe,me,we,S,ie,Ye]);const Ln=!!k&&k.overflowAmt>0;se(()=>{if(Ln||!we||!d)return;const re=()=>Xr(Ye),Me=d.current;return Me.addEventListener("scroll",re),()=>Me.removeEventListener("scroll",re)},[we,Ln,d,Ye]),se(()=>{if(typeof ResizeObserver!="function"||be==="initial")return;const re=new ResizeObserver(([Be])=>{const{borderBoxSize:Fe,target:ye}=Be;let tt,$e;if(Fe){const{inlineSize:ze,blockSize:Qt}=Fe[0]||Fe;tt=ze,$e=Qt}else{const ze=ye.getBoundingClientRect();tt=ze.width,$e=ze.height}tt===0||$e===0||Nt(tt,Q.current.width,1)&&Nt($e,Q.current.height,1)||ua(()=>{ae.current(),Y()})}),Me=Se.current;return re.observe(Me,{box:"border-box"}),()=>re.unobserve(Me)},[be]),se(()=>{if(!we){de(xe.RESET),Ve||D();return}const{position:re,alwaysUpdate:Me}=x||{},Be=()=>{re===Ut.FIRST?de(xe.FIRST):re===Ut.LAST?de(xe.LAST):re>=-1&&de(xe.SET_INDEX,void 0,re)};if(Me)Be();else if(_){const Fe=setTimeout(()=>{const ye=Se.current;ye&&!ye.contains(document.activeElement)&&(dt.current.focus(),Be())},bt?170:100);return()=>clearTimeout(Fe)}},[we,bt,Ve,_,x,de]);const Ee=he(()=>({isParentOpen:we,submenuCtx:N,dispatch:de,updateItems:oe}),[we,N,de,oe]);let wt,Je;k&&(v?Je=k.overflowAmt:wt=k.height);const Qe=he(()=>({reposSubmenu:P,submenuCtx:N,overflow:g,overflowAmt:Je,parentMenuRef:Se,parentDir:C}),[P,N,g,Je,C]),yr=wt>=0?{maxHeight:wt,overflow:g}:void 0,ft=he(()=>({state:T,dir:C}),[T,C]),Et=he(()=>({dir:C}),[C]),et=Xe({block:Ge,element:rc,modifiers:Et,className:o.className}),Jt=s("ul",{role:"menu","aria-label":e,...mr(b),...Gt({onPointerEnter:q==null?void 0:q.off,onPointerMove:Ce,onPointerLeave:$t,onKeyDown:Le,onAnimationEnd:Ie},M),ref:Xt(f,Se),className:Xe({block:Ge,modifiers:ft,className:t}),style:{...n,...yr,margin:0,display:T==="closed"?"none":void 0,position:Ir,left:V.x,top:V.y},children:[s("li",{tabIndex:-1,style:{position:Ir,left:0,top:0,display:"block",outline:"none"},ref:dt,...Xo,...u}),r&&s("li",{...Xo,...o,className:et,style:{display:"block",position:Ir,left:R.x,top:R.y,...o.style},ref:Z}),s(rr.Provider,{value:Qe,children:s(wo.Provider,{value:Ee,children:s(Ki.Provider,{value:ge,children:He($,ft)})})})]});return c?s(uc,{...c,isOpen:we,children:Jt}):Jt},qi=Ct(function({"aria-label":t,className:n,containerProps:r,initialMounted:o,unmountOnClose:i,transition:a,transitionTimeout:l,boundingBoxRef:c,boundingBoxPadding:u,reposition:f="auto",submenuOpenDelay:d=300,submenuCloseDelay:p=150,viewScroll:m="initial",portal:h,theming:g,onItemClick:v,...E},_){const T=B(null),w=B({}),{anchorRef:b,state:x,onClose:L}=E,O=he(()=>({initialMounted:o,unmountOnClose:i,transition:a,transitionTimeout:l,boundingBoxRef:c,boundingBoxPadding:u,rootMenuRef:T,rootAnchorRef:b,scrollNodesRef:w,reposition:f,viewScroll:m,submenuOpenDelay:d,submenuCloseDelay:p}),[o,i,a,l,b,c,u,f,m,d,p]),$=he(()=>({handleClick(M,V){M.stopPropagation||He(v,M);let j=M.keepOpen;j===void 0&&(j=V&&M.key===De.SPACE),j||He(L,{value:M.value,key:M.key,reason:wn.CLICK})},handleClose(M){He(L,{key:M,reason:wn.CLICK})}}),[v,L]);if(!x)return null;const S=s(gr.Provider,{value:O,children:s(Eo.Provider,{value:$,children:s(Zi,{...E,ariaLabel:t||"Menu",externalRef:_,containerRef:T,containerProps:{className:n,containerRef:T,containerProps:r,theming:g,transition:a,onClose:L}})})});return h===!0&&typeof document<"u"?tr(S,document.body):h?h.target?tr(S,h.target):h.stablePosition?null:S:S}),Jr=0,Qr=1,or=2,ir=3,sr=4,_c=5,Gi=6,bc=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],Xi=e=>({_s:e,status:bc[e],isEnter:esr}),eo=e=>e?Gi:_c,wc=(e,t)=>{switch(e){case Qr:case Jr:return or;case sr:case ir:return eo(t)}},Ec=e=>typeof e=="object"?[e.enter,e.exit]:[e,e],ei=(e,t,n,r,o)=>{clearTimeout(r.current);const i=Xi(e);t(i),n.current=i,o&&o({current:i})},Tc=({enter:e=!0,exit:t=!0,preEnter:n,preExit:r,timeout:o,initialEntered:i,mountOnEnter:a,unmountOnExit:l,onStateChange:c}={})=>{const[u,f]=ee(()=>Xi(i?or:eo(a))),d=B(u),p=B(),[m,h]=Ec(o),g=Ae(()=>{const E=wc(d.current._s,l);E&&ei(E,f,d,p,c)},[c,l]),v=Ae(E=>{const _=w=>{switch(ei(w,f,d,p,c),w){case Qr:m>=0&&(p.current=setTimeout(g,m));break;case sr:h>=0&&(p.current=setTimeout(g,h));break;case Jr:case ir:p.current=setTimeout(()=>_(w+1),0);break}},T=d.current.isEnter;typeof E!="boolean"&&(E=!T),E?!T&&_(e?n?Jr:Qr:or):T&&_(t?r?ir:sr:eo(l))},[g,c,e,t,n,r,m,h,l]);return se(()=>()=>clearTimeout(p.current),[]),[u,v,g]};const Sc=({initialOpen:e,initialMounted:t,unmountOnClose:n,transition:r,transitionTimeout:o=500}={})=>{const[{status:i},a,l]=Tc({initialEntered:e,mountOnEnter:!t,unmountOnExit:n,timeout:o,enter:bn(r,"open"),exit:bn(r,"close")});return[{state:lc[i],endTransition:l},a]},Ji=e=>{const[t,n]=Sc(e),[r,o]=ee(),i=(a,l)=>{o({position:a,alwaysUpdate:l}),n(!0)};return[{menuItemFocus:r,...t},n,i]},xc=(e,t)=>{const[n]=ee({});return{onMouseDown:()=>{n.v=e&&e!=="closed"},onClick:r=>n.v?n.v=!1:t(!0,r)}},Qi=(e,t)=>{const n=B(t);se(()=>{n.current!==t&&He(e,{open:t}),n.current=t},[e,t])},Mc=Ct(function({"aria-label":t,captureFocus:n,initialOpen:r,menuButton:o,instanceRef:i,onMenuChange:a,...l},c){const[u,f,d]=Ji(l),{state:p}=u,m=_o(p),h=B(null),g=xc(p,(b,x)=>d(x.detail?void 0:Ut.FIRST)),v=Ae(b=>{f(!1),b.key&&h.current.focus()},[f]),E=b=>{switch(b.key){case De.UP:d(Ut.LAST);break;case De.DOWN:d(Ut.FIRST);break;default:return}b.preventDefault()},_=He(o,{open:m});if(!_||!_.type)throw new Error("Menu requires a menuButton prop.");const T={ref:Xt(_.ref,h),...Gt({onKeyDown:E,...g},_.props)};Ja(_.type)==="MenuButton"&&(T.isOpen=m);const w=$i(_,T);return Qi(a,m),Oi(i,()=>({openMenu:d,closeMenu:()=>f(!1)})),s(U,{children:[w,s(qi,{...l,...u,"aria-label":t||(typeof _.props.children=="string"?_.props.children:"Menu"),anchorRef:h,ref:c,onClose:v})]})}),So=(e,t)=>{const n=yt(t),r=Ct((o,i)=>{const a=B(null);return s(n,{...o,itemRef:a,externalRef:i,isHovering:Ne(Ki)===a.current})});return r.displayName=`WithHovering(${e})`,r},es=(e,t,n)=>{Wt(()=>{if(e)return;const r=t.current;return n(r,!0),()=>{n(r)}},[e,t,n])},kc=So("SubMenu",function({"aria-label":t,className:n,disabled:r,direction:o,label:i,openTrigger:a,onMenuChange:l,isHovering:c,instanceRef:u,itemRef:f,captureFocus:d,repositionFlag:p,itemProps:m={},...h}){const g=Ne(gr),{rootMenuRef:v,submenuOpenDelay:E,submenuCloseDelay:_}=g,{parentMenuRef:T,parentDir:w,overflow:b}=Ne(rr),{isParentOpen:x,submenuCtx:L,dispatch:O,updateItems:$}=Ne(wo),S=b!=="visible",[M,V,j]=Ji(g),{state:R}=M,I=!!r,k=_o(R),D=B(null),[C]=ee({v:0}),z=()=>{L.off(),C.v&&(clearTimeout(C.v),C.v=0)},N=(...ne)=>{z(),P(),!I&&j(...ne)},P=()=>!c&&!I&&O(xe.SET,f.current),Y=ne=>{P(),a||(C.v=setTimeout(()=>Xr(N),Math.max(ne,0)))},K=ne=>{I||(ne.stopPropagation(),!(C.v||k)&&L.on(_,()=>Y(E-_),()=>Y(E)))},te=()=>{z(),k||O(xe.UNSET,f.current)},le=ne=>{if(c)switch(ne.key){case De.ENTER:ne.preventDefault();case De.SPACE:case De.RIGHT:a!=="none"&&N(Ut.FIRST)}},Te=ne=>{let Se=!1;switch(ne.key){case De.LEFT:k&&(f.current.focus(),V(!1),Se=!0);break;case De.RIGHT:k||(Se=!0);break}Se&&(ne.preventDefault(),ne.stopPropagation())};es(I,f,$),Qi(l,k),se(()=>L.toggle(k),[L,k]),se(()=>()=>clearTimeout(C.v),[C]),se(()=>{c&&x?f.current.focus():V(!1)},[c,x,V,f]),Oi(u,()=>({openMenu:(...ne)=>{x&&N(...ne)},closeMenu:()=>{k&&(f.current.focus(),V(!1))}}));const pe=he(()=>({open:k,hover:c,disabled:I,submenu:!0}),[k,c,I]),{ref:_e,className:be,...ie}=m,ue=Gt({onPointerEnter:L.off,onPointerMove:K,onPointerLeave:te,onKeyDown:le,onClick:()=>a!=="none"&&N()},ie),q=()=>{const ne=s(Zi,{...h,...M,ariaLabel:t||(typeof i=="string"?i:"Submenu"),anchorRef:f,containerRef:S?v:D,direction:o||(w==="right"||w==="left"?w:"right"),parentScrollingRef:S&&T,isDisabled:I}),Se=v.current;return S&&Se?tr(ne,Se):ne};return s("li",{className:Xe({block:Ge,element:ac,className:n}),style:{position:"relative"},role:To,ref:D,onKeyDown:Te,children:[s("div",{role:vr,"aria-haspopup":!0,"aria-expanded":k,...mr(I,c),...ue,ref:Xt(_e,f),className:Xe({block:Ge,element:bo,modifiers:pe,className:be}),children:he(()=>He(i,pe),[i,pe])}),R&&q()]})}),ts=(e,t,n,r)=>{const{submenuCloseDelay:o}=Ne(gr),{isParentOpen:i,submenuCtx:a,dispatch:l,updateItems:c}=Ne(wo),u=()=>{!n&&!r&&l(xe.SET,e.current)},f=()=>{!r&&l(xe.UNSET,e.current)},d=h=>{n&&!h.currentTarget.contains(h.relatedTarget)&&f()},p=h=>{r||(h.stopPropagation(),a.on(o,u,u))},m=(h,g)=>{a.off(),!g&&f()};return es(r,e,c),se(()=>{n&&i&&t.current&&t.current.focus()},[t,n,i]),{setHover:u,onBlur:d,onPointerMove:p,onPointerLeave:m}},ke=So("MenuItem",function({className:t,value:n,href:r,type:o,checked:i,disabled:a,children:l,onClick:c,isHovering:u,itemRef:f,externalRef:d,...p}){const m=!!a,{setHover:h,...g}=ts(f,f,u,m),v=Ne(Eo),E=Ne(cc),_=o==="radio",T=o==="checkbox",w=!!r&&!m&&!_&&!T,b=_?E.value===n:T?!!i:!1,x=M=>{if(m){M.stopPropagation(),M.preventDefault();return}const V={value:n,syntheticEvent:M};M.key!==void 0&&(V.key=M.key),T&&(V.checked=!b),_&&(V.name=E.name),He(c,V),_&&He(E.onRadioChange,V),v.handleClick(V,T||_)},L=M=>{if(u)switch(M.key){case De.ENTER:M.preventDefault();case De.SPACE:w?f.current.click():x(M)}},O=he(()=>({type:o,disabled:m,hover:u,checked:b,anchor:w}),[o,m,u,b,w]),$=Gt({...g,onPointerDown:h,onKeyDown:L,onClick:x},p),S={role:_?"menuitemradio":T?"menuitemcheckbox":vr,"aria-checked":_||T?b:void 0,...mr(m,u),...$,ref:Xt(d,f),className:Xe({block:Ge,element:bo,modifiers:O,className:t}),children:he(()=>He(l,O),[l,O])};return w?s("li",{role:To,children:s("a",{href:r,...S})}):s("li",{...S})}),Lc=So("FocusableItem",function({className:t,disabled:n,children:r,isHovering:o,itemRef:i,externalRef:a,...l}){const c=!!n,u=B(null),{setHover:f,onPointerLeave:d,...p}=ts(i,u,o,c),{handleClose:m}=Ne(Eo),h=he(()=>({disabled:c,hover:o,focusable:!0}),[c,o]),g=he(()=>He(r,{...h,ref:u,closeMenu:m}),[r,h,m]),v=Gt({...p,onPointerLeave:E=>d(E,!0),onFocus:f},l);return s("li",{role:vr,...mr(c),...v,ref:Xt(a,i),className:Xe({block:Ge,element:bo,modifiers:h,className:t}),children:g})}),an=yt(Ct(function({className:t,...n},r){return s("li",{role:"separator",...n,ref:r,className:Xe({block:Ge,element:oc,className:t})})})),mf=yt(Ct(function({className:t,...n},r){return s("li",{role:To,...n,ref:r,className:Xe({block:Ge,element:ic,className:t})})})),gf=Ct(function({className:t,style:n,takeOverflow:r,...o},i){const a=B(null),[l,c]=ee(),{overflow:u,overflowAmt:f}=Ne(rr);return Wt(()=>{let d;r&&f>=0&&(d=a.current.getBoundingClientRect().height-f,d<0&&(d=0)),c(d>=0?{maxHeight:d,overflow:u}:void 0)},[r,u,f]),Wt(()=>{l&&(a.current.scrollTop=0)},[l]),s("div",{...o,ref:Xt(i,a),className:Xe({block:Ge,element:sc,className:t}),style:{...n,...l}})});const ti={s:16,m:20,l:24,xl:32,xxl:50,xxxl:64},cn={},dn=window.OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas"),Xn=dn.getContext("2d",{willReadFrequently:!0});Xn.imageSmoothingEnabled=!1;function Ac({url:e,size:t,alt:n="",squircle:r,...o}){t=ti[t]||t||ti.m;const i=B(),a=/missing\.png$/.test(e);return s("span",{ref:i,class:`avatar ${r?"squircle":""} ${cn[e]?"has-alpha":""}`,style:{width:t,height:t},title:n,...o,children:!!e&&s("img",{src:e,width:t,height:t,alt:n,loading:"lazy",decoding:"async",crossOrigin:cn[e]===void 0&&!a?"anonymous":void 0,onError:l=>{l.target.crossOrigin&&(l.target.crossOrigin=null,l.target.src=e)},onLoad:l=>{i.current&&(i.current.dataset.loaded=!0),cn[e]===void 0&&(a||setTimeout(()=>{try{const{width:c,height:u}=l.target;dn.width!==c&&(dn.width=c),dn.height!==u&&(dn.height=u),Xn.drawImage(l.target,0,0);const f=Xn.getImageData(0,0,c,u),d=f.data.filter((p,m)=>m%4===3&&p<=128).length/(f.data.length/4)>.1;d&&i.current.classList.add("has-alpha"),cn[e]=d,Xn.clearRect(0,0,c,u)}catch{cn[e]=!1}},1))}})})}const st=lt(Ac),Kt=Ct((e,t)=>{var l;let n;try{n=da()}catch{}let r=(location.hash||"").replace(/^#/,"").trim();r===""&&(r="/");const{to:o,...i}=e;if(r&&r!=="/"&&r.includes("?")){const c=URL.parse(r,location.origin);if((l=c==null?void 0:c.searchParams)!=null&&l.size){const u=Array.from(c.searchParams.entries()).map(([f,d])=>`${f}=${encodeURIComponent(d)}`).join("&");r=c.pathname+"?"+u}}const a=r===o||decodeURIComponent(r)===o;return s("a",{ref:t,href:`#${o}`,...i,class:`${e.class||""} ${a?"is-active":""}`,onClick:c=>{var u,f,d;(f=(u=c.currentTarget)==null?void 0:u.parentNode)!=null&&f.closest("a")&&c.stopPropagation(),n&&(W.prevLocation=n),(d=e.onClick)==null||d.call(e,c)}})});function Ic(){const[e,t]=ee({width:null,height:null});return _n(()=>{const n=()=>{t({width:window.innerWidth,height:window.innerHeight})};return n(),window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}},[]),e}const Cc=document.documentElement,Vn=getComputedStyle(Cc),Pc=8;let ns=[0,0,0,0];function rs(){const e=Vn.getPropertyValue("--sai-top"),t=Vn.getPropertyValue("--sai-right"),n=Vn.getPropertyValue("--sai-bottom"),r=Vn.getPropertyValue("--sai-left");ns=[Math.max(0,parseInt(e,10)),Math.max(0,parseInt(t,10)),Math.max(0,parseInt(n,10)),Math.max(0,parseInt(r,10))]}requestAnimationFrame(rs);function os(e=[]){return ns.map((n,r)=>(n||Pc)+(e[r]||0)).join(" ")}CSS.supports("top: env(safe-area-inset-top)")&&window.addEventListener("resize",rs,{passive:!0});function is(e){const{containerProps:t,instanceRef:n}=e,r=Ic(),o=n!=null&&n.current?n:B();return s(Mc,{boundingBoxPadding:os(),repositionFlag:`${r.width}x${r.height}`,unmountOnClose:!0,...e,instanceRef:o,containerProps:{onClick:i=>{var a,l,c;i.target===i.currentTarget&&((l=(a=o.current)==null?void 0:a.closeMenu)==null||l.call(a)),(c=t==null?void 0:t.onClick)==null||c.call(t,i)},...t}})}function $c(e){const t=B();return s(kc,{...e,instanceRef:t,itemProps:{onPointerMove:n=>{var r,o;n.pointerType==="touch"&&((o=(r=t.current)==null?void 0:r.openMenu)==null||o.call(r))},onPointerLeave:n=>{var r,o;n.pointerType==="touch"&&((o=(r=t.current)==null?void 0:r.openMenu)==null||o.call(r))}}})}function Cr({subMenu:e=!1,confirm:t=!0,confirmLabel:n,menuItemClassName:r,menuFooter:o,menuExtras:i,...a}){const{children:l,onClick:c,...u}=a;return t?s(e?$c:is,{openTrigger:"clickOnly",direction:"bottom",overflow:"auto",gap:-8,shift:8,menuClassName:"menu-emphasized",...u,menuButton:e?void 0:l,label:e?l:void 0,children:[s(ke,{className:r,onClick:c,children:n}),i,o]}):e?s(ke,{...a}):c?fa(l,{onClick:c}):l}function to({staticUrl:e,alt:t,url:n}){return s("picture",{children:[e&&s("source",{srcset:e,media:"(prefers-reduced-motion: reduce)"}),s("img",{src:n,alt:t,class:"shortcode-emoji emoji",width:"16",height:"16",loading:"lazy",decoding:"async"},t||n)]})}function Oc({text:e,emojis:t}){if(!e)return"";if(!(t!=null&&t.length)||e.indexOf(":")===-1)return e;const n=new RegExp(`:(${t.map(o=>o.shortcode).join("|")}):`,"g");return e.split(n).map(o=>{const i=t.find(a=>a.shortcode===o);if(i){const{url:a,staticUrl:l}=i;return s(to,{staticUrl:l,alt:o,url:a})}return o})}const Zt=yt(Oc,(e,t)=>{var n,r;return e.text===t.text&&((n=e.emojis)==null?void 0:n.length)===((r=t.emojis)==null?void 0:r.length)}),Rc=new Intl.Collator("en",{sensitivity:"base"});function Dc({account:e,instance:t,showAvatar:n,showAcct:r,short:o,external:i,onClick:a}){const{acct:l,avatar:c,avatarStatic:u,id:f,url:d,displayName:p,emojis:m,bot:h,username:g}=e,[v,E,_]=l.match(/([^@]+)(@.+)/i)||[,l];t||(t=nr().instance);const T=g.toLowerCase().trim(),w=(p||"").toLowerCase().trim(),b=w.replace(/(\:(\w|\+|\-)+\:)(?=|[\!\.\?]|$)/g,"").replace(/\s+/g,""),x=b.replace(/[^a-z0-9@\.]/gi,""),L=!o&&(T===w||T===b||T===x||Rc.compare(T,b)===0)||x===l.toLowerCase();return s("a",{class:`name-text ${r?"show-acct":""} ${o?"short":""}`,href:d,target:i?"_blank":null,title:p?`${p} (${_?"":"@"}${l})`:`${_?"":"@"}${l}`,onClick:O=>{if(!i&&!O.shiftKey){if(O.preventDefault(),O.stopPropagation(),a)return a(O);if(O.metaKey||O.ctrlKey||O.shiftKey||O.which===2){const $=`#/${t}/a/${f}`;window.open($,"_blank");return}W.showAccount={account:e,instance:t}}},children:[n&&s(U,{children:[s(st,{url:u||c,squircle:h})," "]}),p&&!o?s(U,{children:[s("b",{children:s(Zt,{text:p,emojis:m})}),!r&&!L&&s(U,{children:[" ",s("i",{children:["@",g]})]})]}):o?s("i",{children:g}):s("b",{children:g}),r&&s(U,{children:[s("br",{}),s("i",{children:[_?"":"@",E,!!_&&s("span",{class:"ib",children:_})]})]})]})}const fn=yt(Dc,(e,t)=>{const{account:n}=e,{account:r}=t;return(n==null?void 0:n.acct)===(r==null?void 0:r.acct)});var ar={exports:{}},vf=ar.exports;(function(e,t){(function(n,r){e.exports=r()})(xn,function(){"use strict";var n=1e3,r=6e4,o=36e5,i="millisecond",a="second",l="minute",c="hour",u="day",f="week",d="month",p="quarter",m="year",h="date",g="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,E=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(R){var I=["th","st","nd","rd"],k=R%100;return"["+R+(I[(k-20)%10]||I[k]||I[0])+"]"}},T=function(R,I,k){var D=String(R);return!D||D.length>=I?R:""+Array(I+1-D.length).join(k)+R},w={s:T,z:function(R){var I=-R.utcOffset(),k=Math.abs(I),D=Math.floor(k/60),C=k%60;return(I<=0?"+":"-")+T(D,2,"0")+":"+T(C,2,"0")},m:function R(I,k){if(I.date()1)return R(N[0])}else{var P=I.name;x[P]=I,C=P}return!D&&C&&(b=C),C||!D&&b},S=function(R,I){if(O(R))return R.clone();var k=typeof I=="object"?I:{};return k.date=R,k.args=arguments,new V(k)},M=w;M.l=$,M.i=O,M.w=function(R,I){return S(R,{locale:I.$L,utc:I.$u,x:I.$x,$offset:I.$offset})};var V=function(){function R(k){this.$L=$(k.locale,null,!0),this.parse(k),this.$x=this.$x||k.x||{},this[L]=!0}var I=R.prototype;return I.parse=function(k){this.$d=function(D){var C=D.date,z=D.utc;if(C===null)return new Date(NaN);if(M.u(C))return new Date;if(C instanceof Date)return new Date(C);if(typeof C=="string"&&!/Z$/i.test(C)){var N=C.match(v);if(N){var P=N[2]-1||0,Y=(N[7]||"0").substring(0,3);return z?new Date(Date.UTC(N[1],P,N[3]||1,N[4]||0,N[5]||0,N[6]||0,Y)):new Date(N[1],P,N[3]||1,N[4]||0,N[5]||0,N[6]||0,Y)}}return new Date(C)}(k),this.init()},I.init=function(){var k=this.$d;this.$y=k.getFullYear(),this.$M=k.getMonth(),this.$D=k.getDate(),this.$W=k.getDay(),this.$H=k.getHours(),this.$m=k.getMinutes(),this.$s=k.getSeconds(),this.$ms=k.getMilliseconds()},I.$utils=function(){return M},I.isValid=function(){return this.$d.toString()!==g},I.isSame=function(k,D){var C=S(k);return this.startOf(D)<=C&&C<=this.endOf(D)},I.isAfter=function(k,D){return S(k)new c(u).valueOf()},c.prototype.isLessThan=function(u){return this.valueOf()-1)||(v=new a.a(h)[g]()),g==="days"||g==="years"){var E=l[m][g];return d.format(E)}return l[m][g].replace("%d",v)}(this)}}}])})})(cr,cr.exports);var Fc=cr.exports;const zc=It(Fc);var lr={exports:{}},_f=lr.exports;(function(e,t){(function(n,r){e.exports=r()})(xn,function(){"use strict";var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(r,o,i){var a=o.prototype,l=a.format;i.en.formats=n,a.format=function(c){c===void 0&&(c="YYYY-MM-DDTHH:mm:ssZ");var u=this.$locale().formats,f=function(d,p){return d.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(m,h,g){var v=g&&g.toUpperCase();return h||p[g]||n[g]||p[v].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(E,_,T){return _||T.slice(1)})})}(c,u===void 0?{}:u);return l.call(this,f)}}})})(lr,lr.exports);var Hc=lr.exports;const Vc=It(Hc);var ur={exports:{}},bf=ur.exports;(function(e,t){(function(n,r){e.exports=r()})(xn,function(){"use strict";return function(n,r,o){n=n||{};var i=r.prototype,a={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function l(u,f,d,p){return i.fromToBase(u,f,d,p)}o.en.relativeTime=a,i.fromToBase=function(u,f,d,p,m){for(var h,g,v,E=d.$locale().relativeTime||a,_=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],T=_.length,w=0;w0,x<=b.r||!b.r){x<=1&&w>0&&(b=_[w-1]);var L=E[b.l];m&&(x=m(""+x)),g=typeof L=="string"?L.replace("%d",x):L(x,f,b.l,v);break}}if(f)return g;var O=v?E.future:E.past;return typeof O=="function"?O(g):O.replace("%s",g)},i.to=function(u,f){return l(u,f,this,!0)},i.from=function(u,f){return l(u,f,this)};var c=function(u){return u.$u?o.utc():o()};i.toNow=function(u){return this.to(c(this),u)},i.fromNow=function(u){return this.from(c(this),u)}}})})(ur,ur.exports);var Bc=ur.exports;const jc=It(Bc);Lt.extend(zc);Lt.extend(Vc);Lt.extend(jc);const Uc=new Intl.DateTimeFormat;function At({datetime:e,format:t}){if(!e)return null;const[n,r]=Pi(c=>c+1,0),o=he(()=>Lt(e),[e]),[i,a,l]=he(()=>{if(!o.isValid())return[""+e,"",""];let c;if(t==="micro"){const u=Lt();u.diff(o,"day")<=1||u.year()===o.year()?c=o.twitter():c=Uc.format(o.toDate())}return c||(c=o.fromNow()),[c,o.toISOString(),o.format("LLLL")]},[o,t,n]);return se(()=>{if(!o.isValid())return;let c,u;function f(){u=requestAnimationFrame(()=>{r(),d()})}function d(){o.diff(Lt(),"minute",!0)<1?c=setTimeout(f,1e4):o.diff(Lt(),"hour",!0)<1&&(c=setTimeout(f,6e4))}return d(),()=>{clearTimeout(c),cancelAnimationFrame(u)}},[]),s("time",{datetime:a,title:l,children:i})}const Wc=[{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"}];function Yc(...e){try{return Ea(...e)}catch{return e[2]||!1}}const no=lt(Yc),Kc=[new Intl.DateTimeFormat().resolvedOptions().locale,...navigator.languages],Zc=no(Kc,Wc.map(e=>e.code.replace("_","-")),"en");function ss(e=!1){if(e){const{contentTranslationTargetLanguage:t}=W.settings;if(t)return t}return Zc}const qc=new Intl.DisplayNames(navigator.languages,{type:"language"});function Gc(e){try{return qc.of(e)}catch{return null}}const Pr=lt(Gc),Yt=2147483647,Ke=36,xo=1,En=26,Xc=38,Jc=700,as=72,cs=128,ls="-",Qc=/^xn--/,el=/[^\0-\x7F]/,tl=/[\x2E\u3002\uFF0E\uFF61]/g,nl={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},$r=Ke-xo,Ze=Math.floor,Or=String.fromCharCode;function pt(e){throw new RangeError(nl[e])}function rl(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function us(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(tl,".");const o=e.split("."),i=rl(o,t).join(".");return r+i}function ds(e){const t=[];let n=0;const r=e.length;for(;n=55296&&o<=56319&&nString.fromCodePoint(...e),il=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:Ke},ni=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},fs=function(e,t,n){let r=0;for(e=n?Ze(e/Jc):e>>1,e+=Ze(e/t);e>$r*En>>1;r+=Ke)e=Ze(e/$r);return Ze(r+($r+1)*e/(e+Xc))},hs=function(e){const t=[],n=e.length;let r=0,o=cs,i=as,a=e.lastIndexOf(ls);a<0&&(a=0);for(let l=0;l=128&&pt("not-basic"),t.push(e.charCodeAt(l));for(let l=a>0?a+1:0;l=n&&pt("invalid-input");const p=il(e.charCodeAt(l++));p>=Ke&&pt("invalid-input"),p>Ze((Yt-r)/f)&&pt("overflow"),r+=p*f;const m=d<=i?xo:d>=i+En?En:d-i;if(pZe(Yt/h)&&pt("overflow"),f*=h}const u=t.length+1;i=fs(r-c,u,c==0),Ze(r/u)>Yt-o&&pt("overflow"),o+=Ze(r/u),r%=u,t.splice(r++,0,o)}return String.fromCodePoint(...t)},ps=function(e){const t=[];e=ds(e);const n=e.length;let r=cs,o=0,i=as;for(const c of e)c<128&&t.push(Or(c));const a=t.length;let l=a;for(a&&t.push(ls);l=r&&fZe((Yt-o)/u)&&pt("overflow"),o+=(c-r)*u,r=c;for(const f of e)if(fYt&&pt("overflow"),f===r){let d=o;for(let p=Ke;;p+=Ke){const m=p<=i?xo:p>=i+En?En:p-i;if(d{const{shortcode:r,staticUrl:o,url:i}=n;e=e.replace(new RegExp(`:${r}:`,"g"),``)}),e):""}const Ft=document.createElement("div"),cl=["u-url","mention","hashtag"];function ll(e,t={}){const{emojis:n,postEnhanceDOM:r=()=>{}}=t;let o=e;const i=document.createElement("div");i.innerHTML=o;const a=/{d.setAttribute("target","_blank")}),i.querySelectorAll("a[class]").forEach(d=>{d.classList.forEach(p=>{cl.includes(p)||d.classList.remove(p)})})),a&&i.querySelectorAll("a[href]").forEach(f=>{/^https?:\/\//i.test(f.textContent.trim())&&(f.classList.add("has-url-text"),hl(f))}),a){const u=i.querySelectorAll("a[href]"),f=[];u.forEach(d=>{const p=d.innerText.trim(),m=d.querySelector("*");if(/^@[^@]+(@[^@]+)?$/g.test(p)){const[h,g,v]=p.split("@");m||(!f.some(([E])=>E===g)||f.some(([E,_])=>E===g&&_===v)?(d.innerHTML=`@${g}`,f.push([g,v])):d.innerHTML=`@${g}@${v}`),d.classList.add("mention")}/^#[^#]+$/g.test(p)&&(m||(d.innerHTML=`#${p.slice(1)}`),d.classList.add("mention","hashtag"))})}let c;if(o.includes(":")&&(c=Dr(i),c.forEach(u=>{let f=u.nodeValue.replace(/&/g,"&").replace(//g,">");n&&(f=dr(f,n)),Ft.innerHTML=f,u.replaceWith(...Ft.childNodes)})),l&&[...i.querySelectorAll("p")].filter(f=>/^```[^]+```$/g.test(f.innerText.trim())).forEach(f=>{const d=document.createElement("pre");f.querySelectorAll("br").forEach(p=>p.replaceWith(`
`)),d.innerHTML=`${f.innerHTML.trim()}
`,f.replaceWith(d)}),l&&[...i.querySelectorAll("p")].filter(d=>/^```/g.test(d.innerText)).forEach(d=>{const p=[d];let m=!1,h=d;for(;h.nextElementSibling;){const g=h.nextElementSibling;if(g&&g.tagName==="P")if(/```$/g.test(g.innerText)){p.push(g),m=!0;break}else p.push(g);else break;h=g}if(m){const g=document.createElement("pre");p.forEach(E=>{E.querySelectorAll("br").forEach(_=>_.replaceWith(`
`))});const v=p.map(E=>E.innerHTML).join(`
`);g.innerHTML=`${v}
`,d.replaceWith(g),p.forEach(E=>E.remove())}}),o.includes("`")&&(c=Dr(i),c.forEach(u=>{let f=u.nodeValue.replace(/&/g,"&").replace(//g,">");/`[^`]+`/g.test(f)&&(f=f.replaceAll(/(`[^]+?`)/g,"$1
")),Ft.innerHTML=f,u.replaceWith(...Ft.childNodes)})),/twitter\.com/i.test(o)&&(c=Dr(i,{rejectFilter:["A"]}),c.forEach(u=>{let f=u.nodeValue.replace(/&/g,"&").replace(//g,">");/@[a-zA-Z0-9_]+@twitter\.com/g.test(f)&&(f=f.replaceAll(/(@([a-zA-Z0-9_]+)@twitter\.com)/g,'$1')),Ft.innerHTML=f,u.replaceWith(...Ft.childNodes)})),o.includes("#")){let u=null;const f=[...i.querySelectorAll("p")].filter((d,p)=>{let m=0;for(let h=0;h3||m>1&&u&&p===u+1)return u=p,!0});f!=null&&f.length&&f.forEach(d=>{d.classList.add("hashtag-stuffing"),d.title=d.innerText})}return o.includes("{const f=u.getAttribute("width")||u.naturalWidth,d=u.getAttribute("height")||u.naturalHeight;f&&d&&u.style.setProperty("--original-aspect-ratio",`${f}/${d}`)}),r&&queueMicrotask(()=>r(i)),o=i.innerHTML,o}const ms=lt(ll),ul=["STYLE","IMG","VIDEO","AUDIO","AREA","MAP","TRACK","EMBED","IFRAME","OBJECT","PICTURE","PORTAL","SOURCE","SVG","MATH","CANVAS","NOSCRIPT","SCRIPT","INPUT","OPTION","TEXTAREA","SLOT","TEMPLATE"],dl=Object.fromEntries(ul.map(e=>[e,!0])),fl=/^(https?:\/\/(www\.)?|xmpp:)/,Rr=30;function hl(e){var t;if(!(!e||(t=e.querySelector)!=null&&t.call(e,"*")))try{const n=e.innerText.trim(),r=(n.match(fl)||[])[0]||"";if(!r)return;const o=n.slice(r.length,r.length+Rr),i=n.slice(r.length+Rr),a=n.slice(r.length).length>Rr;e.innerHTML=`${r}${o}${i}`}catch{}}function Dr(e,t={}){var a;const n=[],r=Object.assign({},dl,(a=t.rejectFilter)==null?void 0:a.reduce((l,c)=>(l[c]=!0,l),{})),o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode(l){return r[l.parentNode.nodeName]?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}},!1);let i;for(;i=o.nextNode();)n.push(i);return n}const zt=document.createElement("div");function pl(e,t){if(!e)return"";const{preProcess:n}=t||{};return zt.innerHTML=e.replace(/<\/p>/g,`
`).replace(/<\/li>/g,`
`),zt.querySelectorAll("br").forEach(r=>{r.replaceWith(`
`)}),n==null||n(zt),zt.querySelectorAll(".invisible").forEach(r=>{r.remove()}),zt.querySelectorAll(".ellipsis").forEach(r=>{r.append("...")}),zt.innerText.replace(/[\r\n]{3,}/g,`
`).trim()}const fr=lt(pl);function ml(e){const{mentions:t=[],instance:n,previewMode:r,statusURL:o}=e||{};return i=>{var f,d;let{target:a}=i;if(a=a.closest("a"),!a||i.metaKey||i.ctrlKey||i.shiftKey||i.altKey||i.which===2)return;const l=(f=a.previousSibling)==null?void 0:f.textContent,c=l==null?void 0:l.endsWith("@"),u=a.innerText.startsWith("@");if((a.classList.contains("u-url")||a.classList.contains("mention"))&&u||c&&!u){const p=(a.querySelector("span")||a).innerText.trim(),m=p.replace(/^@/,""),h=a.getAttribute("href"),g=t.find(v=>v.url===h)||t.find(v=>v.acct===m||v.username===m);if(g)i.preventDefault(),i.stopPropagation(),W.showAccount={account:g.acct,instance:n};else if(!/^http/i.test(p)){i.preventDefault(),i.stopPropagation();const v=a.getAttribute("href");W.showAccount={account:v,instance:n}}}else if(!r){const p=l==null?void 0:l.endsWith("#");if(a.classList.contains("hashtag")||p){i.preventDefault(),i.stopPropagation();const m=a.innerText.replace(/^#/,"").trim(),h=n?`#/${n}/t/${m}`:`#/t/${m}`;location.hash=h}else(d=W.unfurledLinks[a.href])!=null&&d.url&&o!==a.href&&(i.preventDefault(),i.stopPropagation(),W.prevLocation={pathname:location.hash.replace(/^#/,"")},location.hash=`#${W.unfurledLinks[a.href].url}`)}}}const{locale:gl}=new Intl.DateTimeFormat().resolvedOptions(),vl=e=>{const{dateYear:t,hideTime:n,formatOpts:r}=e||{},o=new Date().getFullYear();return Intl.DateTimeFormat(gl,{year:t===o?void 0:"numeric",month:"short",day:"numeric",hour:n?void 0:"numeric",minute:n?void 0:"numeric",...r})},yl=lt(vl);function Tn(e,t){return e instanceof Date||(e=new Date(e)),yl({dateYear:e.getFullYear(),...t}).format(e)}const{locale:_l}=Intl.NumberFormat().resolvedOptions(),vt=Intl.NumberFormat(_l,{notation:"compact",roundingMode:"floor"}).format,ri=5e3;function Bn(e){if(e||(e=!0),W.showCompose){W.composerState.minimized?Pe({duration:ri,text:"A draft post is currently minimized. Post or discard it before creating a new one."}):Pe({duration:ri,text:"A post is currently open. Post or discard it before creating a new one."});return}Va(),W.showCompose=e}const bl=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,hr=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(bl);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},oi=e=>e==="*"||e==="x"||e==="X",ii=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},wl=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],El=(e,t)=>{if(oi(e)||oi(t))return 0;const[n,r]=wl(ii(e),ii(t));return n>r?1:n{for(let n=0;n{const n=hr(e),r=hr(t),o=n.pop(),i=r.pop(),a=jt(n,r);return a!==0?a:o&&i?jt(o.split("."),i.split(".")):o||i?o?-1:1:0},Sl=(e,t,n)=>{xl(n);const r=Tl(e,t);return gs[n].includes(r)},gs={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},si=Object.keys(gs),xl=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(si.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${si.join("|")}`)},Jn=(e,t)=>{if(t=t.replace(/([><=]+)\s+/g,"$1"),t.includes("||"))return t.split("||").some(v=>Jn(e,v));if(t.includes(" - ")){const[v,E]=t.split(" - ",2);return Jn(e,`>=${v} <=${E}`)}else if(t.includes(" "))return t.trim().replace(/\s{2,}/g," ").split(" ").every(v=>Jn(e,v));const n=t.match(/^([<>=~^]+)/),r=n?n[1]:"=";if(r!=="^"&&r!=="~")return Sl(e,t,r);const[o,i,a,,l]=hr(e),[c,u,f,,d]=hr(t),p=[o,i,a],m=[c,u??"x",f??"x"];if(d&&(!l||jt(p,m)!==0||jt(l.split("."),d.split("."))===-1))return!1;const h=m.findIndex(v=>v!=="0")+1,g=r==="~"?2:h>1?h:1;return!(jt(p.slice(0,g),m.slice(0,g))!==0||jt(p.slice(g),m.slice(g))===-1)};const Ml={"@mastodon/edit-media-attributes":">=4.1","@mastodon/list-exclusive":">=4.2","@mastodon/filtered-notifications":"~4.3 || >=4.3","@mastodon/fetch-multiple-statuses":"~4.3 || >=4.3","@mastodon/trending-link-posts":"~4.3 || >=4.3"},Nr=/pixelfed/i,ot=/^(?!.*pixelfed).*$/i,ai={"@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":Nr,"@pixelfed/home-include-reblogs":Nr,"@pixelfed/global-feed":Nr},jn={};function Un(e){try{const{version:t,domain:n}=ha(),r=`${n}-${e}`;if(jn[r])return jn[r];if(ai[e])return jn[r]=ai[e].test(t);const o=Ml[e];return o?jn[r]=Jn(t,o,{includePrerelease:!0,loose:!0}):!1}catch{return!1}}function wf({skeleton:e,account:t,avatarSize:n="xl",useAvatarStatic:r=!1,instance:o,external:i,internal:a,onClick:l,showActivity:c=!1,showStats:u=!1,accountInstance:f,hideDisplayName:d=!1,relationship:p={},excludeRelationshipAttrs:m=[]}){if(e)return s("div",{class:"account-block skeleton",children:[s(st,{size:n}),s("span",{children:[s("b",{children:"████████"}),s("br",{}),s("span",{class:"account-block-acct",children:"██████"})]})]});if(!t)return null;const{id:h,acct:g,avatar:v,avatarStatic:E,displayName:_,username:T,emojis:w,url:b,statusesCount:x,lastStatusAt:L,bot:O,fields:$,note:S,group:M,followersCount:V,createdAt:j,locked:R}=t;let[I,k,D]=g.match(/([^@]+)(@.+)/i)||[,g];f&&(D=`@${f}`);const C=$==null?void 0:$.find(P=>!!P.verifiedAt&&!!P.value),z={};for(const P in p)m.includes(P)||(z[P]=p[P]);const N=z.following||z.followedBy||z.requested;return s("a",{class:"account-block",href:b,target:i?"_blank":null,title:D?g:`@${g}`,onClick:P=>{if(!i){if(P.preventDefault(),l)return l(P);a?location.hash=`/${o}/a/${h}`:W.showAccount={account:t,instance:o}}},children:[s(st,{url:r?E:v||E,size:n,squircle:O}),s("span",{class:"account-block-content",children:[!d&&s(U,{children:_?s("b",{children:s(Zt,{text:_,emojis:w})}):s("b",{children:T})})," ",s("span",{class:"account-block-acct",children:[D?"":"@",k,s("wbr",{}),D,R&&s(U,{children:[" ",s(H,{icon:"lock",size:"s",alt:"Locked"})]})]}),c&&s("div",{class:"account-block-stats",children:["Posts: ",vt(x),!!L&&s(U,{children:[" ","· Last posted:"," ",Tn(L,{hideTime:!0})]})]}),u&&s("div",{class:"account-block-stats",children:[O&&s(U,{children:s("span",{class:"tag collapsed",children:[s(H,{icon:"bot"})," Automated"]})}),!!M&&s(U,{children:s("span",{class:"tag collapsed",children:[s(H,{icon:"group"})," Group"]})}),N&&s("div",{class:"shazam-container-horizontal",children:s("div",{class:"shazam-container-inner",children:z.following&&z.followedBy?s("span",{class:"tag minimal",children:"Mutual"}):z.requested?s("span",{class:"tag minimal",children:"Requested"}):z.following?s("span",{class:"tag minimal",children:"Following"}):z.followedBy?s("span",{class:"tag minimal",children:"Follows you"}):null})},p.id),!!V&&s("span",{class:"ib",children:[vt(V)," ",V===1?"follower":"followers"]}),!!C&&s("span",{class:"verified-field",children:[s(H,{icon:"check-circle",size:"s"})," ",s("span",{dangerouslySetInnerHTML:{__html:ms(C.value,{emojis:w})}})]}),!O&&!M&&!N&&!V&&!C&&!!j&&s("span",{class:"created-at",children:["Joined"," ",s("time",{datetime:j,children:Tn(j,{hideTime:!0})})]})]})]})]})}function ci(e){const{className:t,disabled:n,...r}=e;return s(Lc,{className:t,disabled:n,children:({ref:o,closeMenu:i})=>s(Kt,{...r,ref:o,onClick:({detail:a})=>i(a===0?"Enter":void 0)})})}var vs={};function We(e,t){typeof t=="boolean"&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.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))}var kl=We;We.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};We.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};We.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=new Date().getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var n=this._timeouts.shift();if(n===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),n=this._cachedTimeouts.slice(-1);else return!1;var r=this;return this._timer=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},n),this._options.unref&&this._timer.unref(),!0};We.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var n=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){n._operationTimeoutCb()},n._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};We.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};We.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};We.prototype.start=We.prototype.try;We.prototype.errors=function(){return this._errors};We.prototype.attempts=function(){return this._attempts};We.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},t=null,n=0,r=0;r=n&&(t=o,n=a)}return t};(function(e){var t=kl;e.operation=function(n){var r=e.timeouts(n);return new t(r,{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 r={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var o in n)r[o]=n[o];if(r.minTimeout>r.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var i=[],a=0;aIl.call(e)==="[object Error]",Pl=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 $l(e){return e&&Cl(e)&&e.name==="TypeError"&&typeof e.message=="string"?e.message==="Load failed"?e.stack===void 0:Pl.has(e.message):!1}class Ol 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 li=(e,t,n)=>{const r=n.retries-(t-1);return e.attemptNumber=t,e.retriesLeft=r,e};async function Rl(e,t){return new Promise((n,r)=>{t={onFailedAttempt(){},retries:10,shouldRetry:()=>!0,...t};const o=Al.operation(t),i=()=>{var l;o.stop(),r((l=t.signal)==null?void 0:l.reason)};t.signal&&!t.signal.aborted&&t.signal.addEventListener("abort",i,{once:!0});const a=()=>{var l;(l=t.signal)==null||l.removeEventListener("abort",i),o.stop()};o.attempt(async l=>{try{const c=await e(l);a(),n(c)}catch(c){try{if(!(c instanceof Error))throw new TypeError(`Non-error was thrown: "${c}". You should only throw errors.`);if(c instanceof Ol)throw c.originalError;if(c instanceof TypeError&&!$l(c))throw c;if(li(c,l,t),await t.shouldRetry(c)||(o.stop(),r(c)),await t.onFailedAttempt(c),!o.retry(c))throw o.mainError()}catch(u){li(u,l,t),a(),r(u)}}})})}const Dl=[{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 Nl=Object.defineProperty,Fl=(e,t,n)=>t in e?Nl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Wn=(e,t,n)=>(Fl(e,typeof t!="symbol"?t+"":t,n),n),oo=new Map,Yn=new WeakMap,ui=0,zl=void 0;function Hl(e){return e?(Yn.has(e)||(ui+=1,Yn.set(e,ui.toString())),Yn.get(e)):"0"}function Vl(e){return Object.keys(e).sort().filter(t=>e[t]!==void 0).map(t=>`${t}_${t==="root"?Hl(e.root):e[t]}`).toString()}function Bl(e){const t=Vl(e);let n=oo.get(t);if(!n){const r=new Map;let o;const i=new IntersectionObserver(a=>{a.forEach(l=>{var c;const u=l.isIntersecting&&o.some(f=>l.intersectionRatio>=f);e.trackVisibility&&typeof l.isVisible>"u"&&(l.isVisible=u),(c=r.get(l.target))==null||c.forEach(f=>{f(u,l)})})},e);o=i.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:i,elements:r},oo.set(t,n)}return n}function ys(e,t,n={},r=zl){if(typeof window.IntersectionObserver>"u"&&r!==void 0){const c=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:typeof n.threshold=="number"?n.threshold:0,time:0,boundingClientRect:c,intersectionRect:c,rootBounds:c}),()=>{}}const{id:o,observer:i,elements:a}=Bl(n),l=a.get(e)||[];return a.has(e)||a.set(e,l),l.push(t),i.observe(e),function(){l.splice(l.indexOf(t),1),l.length===0&&(a.delete(e),i.unobserve(e)),a.size===0&&(i.disconnect(),oo.delete(o))}}function jl(e){return typeof e.children!="function"}var Ef=class extends Ri{constructor(e){super(e),Wn(this,"node",null),Wn(this,"_unobserveCb",null),Wn(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()}),Wn(this,"handleChange",(t,n)=>{t&&this.props.triggerOnce&&this.unobserve(),jl(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:r,delay:o,fallbackInView:i}=this.props;this._unobserveCb=ys(this.node,this.handleChange,{threshold:e,root:t,rootMargin:n,trackVisibility:r,delay:o},i)}unobserve(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)}render(){const{children:e}=this.props;if(typeof e=="function"){const{inView:m,entry:h}=this.state;return e({inView:m,entry:h,ref:this.handleNode})}const{as:t,triggerOnce:n,threshold:r,root:o,rootMargin:i,onChange:a,skip:l,trackVisibility:c,delay:u,initialInView:f,fallbackInView:d,...p}=this.props;return pa(t||"div",{ref:this.handleNode,...p},e)}};function Ul({threshold:e,delay:t,trackVisibility:n,rootMargin:r,root:o,triggerOnce:i,skip:a,initialInView:l,fallbackInView:c,onChange:u}={}){var f;const[d,p]=ee(null),m=B(),[h,g]=ee({inView:!!l,entry:void 0});m.current=u,se(()=>{if(a||!d)return;let T;return T=ys(d,(w,b)=>{g({inView:w,entry:b}),m.current&&m.current(w,b),b.isIntersecting&&i&&T&&(T(),T=void 0)},{root:o,rootMargin:r,threshold:e,trackVisibility:n,delay:t},c),()=>{T&&T()}},[Array.isArray(e)?e.toString():e,d,o,r,i,a,n,c,t]);const v=(f=h.entry)==null?void 0:f.target,E=B();!d&&v&&!i&&!a&&E.current!==v&&(E.current=v,g({inView:!!l,entry:void 0}));const _=[p,h.inView,h.entry];return _.ref=_[0],_.inView=_[1],_.entry=_[2],_}const di=48,Fr={};function _s({id:e,children:t}){const n=B(),r=!!Fr[e],[o,i]=ee(!1),[a,l]=ee(r||!1),{ref:c}=Ul({root:null,rootMargin:`-${di}px 0px 0px 0px`,trackVisibility:!0,delay:1e3,onChange:u=>{u&&(i(!0),e&&(Fr[e]=!0))},triggerOnce:!0,skip:a||o});return se(()=>{if(!n.current)return;const u=n.current.getBoundingClientRect();u.bottom>di&&(u.top{let o=vn[zr];return fetch(`https://${o}/api/v1/${t}/${n}/${encodeURIComponent(e)}`).then(i=>{if(!i.ok)throw new Error(i.statusText);return i.json()}).then(i=>{var a;return{provider:"lingva",content:i.translation,detectedSourceLanguage:(a=i.info)==null?void 0:a.detectedSource,info:i.info}})},{retries:3,onFailedAttempt:o=>{zr=(zr+1)%vn.length}})}const bs=1e3*60*60,ws=po(Kl,{maxAge:bs}),Zl=po(Yl(ws),{maxAge:bs});function ql({forceTranslate:e,sourceLanguage:t,onTranslate:n,text:r="",mini:o,autoDetected:i}){const a=ss(!0),[l,c]=ee("default"),[u,f]=ee(null),[d,p]=ee(null),[m,h]=ee(null),g=B(),v=t?Pr(t):null,E=Pr(a),_=B("auto");n||(n=o?Zl:ws);const T=async()=>{var w,b;c("loading");try{const{content:x,detectedSourceLanguage:L,provider:O,error:$,...S}=await n(r,_.current,a);if(x){if(L){const M=Pr(L);h(M)}if(O==="lingva"){const M=(b=(w=S==null?void 0:S.info)==null?void 0:w.pronunciation)==null?void 0:b.query;M&&f(M)}p(x),c("default"),!o&&x.trim()!==r.trim()&&(g.current.open=!0,g.current.scrollIntoView({behavior:"smooth",block:"nearest"}))}else c("error")}catch{c("error")}};return se(()=>{e&&T()},[e]),o?d&&d.trim()!==r.trim()&&m!==E?s(_s,{children:s("div",{class:"status-translation-block-mini",children:[s(H,{icon:"translate",alt:`Auto-translated from ${v}`}),s("output",{lang:a,dir:"auto",title:u||"",children:d})]})}):null:s("div",{class:"status-translation-block",onClick:w=>{w.preventDefault()},children:s("details",{ref:g,children:[s("summary",{children:s("button",{type:"button",onClick:async w=>{w.preventDefault(),w.stopPropagation(),g.current.open=!g.current.open,l!=="loading"&&(d||T())},children:[s(H,{icon:"translate"})," ",s("span",{children:l==="loading"?"Translating…":t&&v&&!m?i?`Translate from ${v} (auto-detected)`:`Translate from ${v}`:"Translate"})]})}),s("div",{class:"translated-block",children:[s("div",{class:"translation-info insignificant",children:[s("select",{class:"translated-source-select",disabled:l==="loading",onChange:w=>{_.current=w.target.value,T()},children:Dl.map(w=>s("option",{value:w.code,children:w.code==="auto"?`Auto (${m??"…"})`:w.name}))})," ",s("span",{children:["→ ",E]}),s(Ni,{abrupt:!0,hidden:l!=="loading"})]}),l==="error"?s("p",{class:"ui-state",children:"Failed to translate"}):!!d&&s(U,{children:[s("output",{class:"translated-content",lang:a,dir:"auto",children:d}),!!u&&s("output",{class:"translated-pronunciation-content",tabIndex:-1,onClick:w=>{w.target.classList.toggle("expand")},children:u})]})]})]})})}const Gl=vn!=null&&vn.length?ql:()=>null;function ut(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Es(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=ut(n);return(o,i)=>r.then(a=>i(a.transaction(t,o).objectStore(t)))}let Hr;function Pt(){return Hr||(Hr=Es("keyval-store","keyval")),Hr}function Xl(e,t=Pt()){return t("readonly",n=>ut(n.get(e)))}function Jl(e,t,n=Pt()){return n("readwrite",r=>(r.put(t,e),ut(r.transaction)))}function Ql(e,t=Pt()){return t("readonly",n=>Promise.all(e.map(r=>ut(n.get(r)))))}function eu(e,t=Pt()){return t("readwrite",n=>(n.delete(e),ut(n.transaction)))}function tu(e,t=Pt()){return t("readwrite",n=>(e.forEach(r=>n.delete(r)),ut(n.transaction)))}function nu(e=Pt()){return e("readwrite",t=>(t.clear(),ut(t.transaction)))}function ru(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},ut(e.transaction)}function ou(e=Pt()){return e("readonly",t=>{if(t.getAllKeys)return ut(t.getAllKeys());const n=[];return ru(t,r=>n.push(r.key)).then(()=>n)})}function hi(e,t){const n=Es(e,t);return{set:(r,o)=>Jl(r,o,n),get:r=>Xl(r,n),getMany:r=>Ql(r,n),del:r=>eu(r,n),delMany:r=>tu(r,n),clear:()=>nu(n),keys:()=>ou(n)}}const Tf={drafts:hi("drafts-db","drafts-store"),catchup:hi("catchup-db","catchup-store")};async function Sf(e,t={}){if(!(e!=null&&e.length))return;const{masto:n}=nr(),r=mo(),o=e.reduce((i,a)=>(!i.includes(a.id)&&!t[a.id]&&a.id!==r&&i.push(a.id),i),[]);if(!o.length)return null;try{return(await n.v1.accounts.relationships.fetch({id:o})).reduce((l,c)=>(l[c.id]=c,l),{})}catch{return null}}class je extends HTMLElement{constructor(){super(),this.isIframeLoaded=!1,this.setupDom()}static get observedAttributes(){return["videoid","playlistid"]}connectedCallback(){this.addEventListener("pointerover",je.warmConnections,{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 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.initIntersectionObserver()}attributeChangedCallback(t,n,r){switch(t){case"videoid":case"playlistid":case"videoTitle":case"videoPlay":{n!==r&&(this.setupComponent(),this.domRefFrame.classList.contains("activated")&&(this.domRefFrame.classList.remove("activated"),this.shadowRoot.querySelector("iframe").remove(),this.isIframeLoaded=!1));break}default:break}}addIframe(t=!1){if(!this.isIframeLoaded){let n=t?0:1;const r=this.noCookie?"-nocookie":"";let o;this.playlistId?o=`?listType=playlist&list=${this.playlistId}&`:o=`${this.videoId}?`,this.isYouTubeShort()&&(this.params=`loop=1&mute=1&modestbranding=1&playsinline=1&rel=0&enablejsapi=1&playlist=${this.videoId}`,n=1);const i=`
`;this.domRefFrame.insertAdjacentHTML("beforeend",i),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 r,o;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}`),(o=(r=this.domRefImg)==null?void 0:r.fallback)==null||o.setAttribute("alt",`${this.videoPlay}: ${this.videoTitle}`)}initIntersectionObserver(){const t={root:null,rootMargin:"0px",threshold:0};new IntersectionObserver((r,o)=>{r.forEach(i=>{i.isIntersecting&&!this.isIframeLoaded&&(je.warmConnections(),this.addIframe(!0),o.unobserve(this))})},t).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 r=document.createElement("link");r.rel=t,r.href=n,r.crossOrigin="true",document.head.append(r)}static warmConnections(){je.isPreconnected||window.liteYouTubeIsPreconnected||(je.addPrefetch("preconnect","https://i.ytimg.com/"),je.addPrefetch("preconnect","https://s.ytimg.com"),je.addPrefetch("preconnect","https://www.youtube.com"),je.addPrefetch("preconnect","https://www.google.com"),je.addPrefetch("preconnect","https://googleads.g.doubleclick.net"),je.addPrefetch("preconnect","https://static.doubleclick.net"),je.isPreconnected=!0,window.liteYouTubeIsPreconnected=!0)}}je.isPreconnected=!1;customElements.define("lite-youtube",je);const iu="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~",Qn=(e,t,n)=>{let r=0;for(;te>10.31475?Ts(e/xs+.052132,2.4):e/Ss,Vr=e=>~~(e>1227e-8?xs*Ts(e,.416666)-13.025:e*Ss+1),yn=e=>(e<0?-1:1)*e*e,pi=e=>{for(e+=Sn/2;e>Sn;)e-=su;const t=1.27323954*e-.405284735*yn(e);return .225*(yn(t)-t)+t};function Mo(e){const t=Qn(e,2,6);return[t>>16,t>>8&255,t&255]}function cu(e,t,n,r){const o=Qn(e,0,1),i=o%9+1,a=~~(o/9)+1,l=i*a;let c=0,u=0,f=0,d=0,p=0,m=0,h=0,g=0,v=0,E=0,_=0,T=0,w=0,b=0;const x=(Qn(e,1,2)+1)/13446*(r|1),L=new Float64Array(l*3),O=Mo(e);for(c=0;c<3;c++)L[c]=au(O[c]);for(c=1;c{const n=t.char||" ",r=t.count||2;let o=0;const i=[];return e.reverse().reduce((a,l)=>{i.length&&o&&i[o]&&i[o]===l.substring(1,i[o].length+1)&&(i.splice(o,1),o--);const u=[`${n.repeat(o?o*r:0)}${l}`,...a];return l.substring(0,2)===""&&(o++,i[o]=l.substring(2,l.length-1)),u},[]).join(`
`)};var uu=lu;const Ms=e=>e.trim().replace(/(^(\s|\t)+|(( |\t)+)$)/gm,""),du=e=>{const t=Ms(e).split(`
`),n=[];let r="";for(let o=0;o")){n.push(`${r}${i.slice(0,-2)} />`),r="";continue}if(i.endsWith(">")){n.push(`${r}${i.startsWith(">")||i.startsWith("<")?"":" "}${i}`),r="";continue}r+=r.length?` ${i}`:i}return n};var fu={mergeAttributesWithElements:du,removeEmptyLines:Ms};const hu=uu,{mergeAttributesWithElements:pu}=fu,mu=(e,t={})=>{const n=pu(e);return hu(n,t)};var gu=mu;const vu=It(gu);var hn=(e=>(e.Mouse="mouse",e.Touch="touch",e.Pointer="pointer",e))(hn||{}),pn=(e=>(e.CancelledByMovement="cancelled-by-movement",e.CancelledByRelease="cancelled-by-release",e.CancelledOutsideElement="cancelled-outside-element",e))(pn||{});const ks=()=>typeof window=="object"?(window==null?void 0:window.PointerEvent)??null:null,yu=()=>typeof window=="object"?(window==null?void 0:window.TouchEvent)??null:null;function Ls(e){const{nativeEvent:t}=e,n=yu();return n&&t instanceof n||"touches"in e}function As(e){const t=ks();return e.nativeEvent instanceof MouseEvent&&!(t&&e.nativeEvent instanceof t)}function Is(e){const{nativeEvent:t}=e;if(!t)return!1;const n=ks();return n&&t instanceof n||"pointerId"in t}function mi(e){return As(e)||Ls(e)||Is(e)}function gi(e){return Ls(e)?{x:e.touches[0].pageX,y:e.touches[0].pageY}:As(e)||Is(e)?{x:e.pageX,y:e.pageY}:null}function _u(e){return{target:e.target,currentTarget:e.currentTarget,nativeEvent:e,persist:()=>{}}}function Cs(e,{threshold:t=400,captureEvent:n=!1,detect:r=hn.Pointer,cancelOnMovement:o=!1,cancelOutsideElement:i=!0,filterEvents:a,onStart:l,onMove:c,onFinish:u,onCancel:f}={}){const d=B(!1),p=B(!1),m=B(),h=B(),g=B(e),v=B(null),E=Ae(b=>x=>{p.current||mi(x)&&(a!==void 0&&!a(x)||(n&&x.persist(),l==null||l(x,{context:b}),v.current=gi(x),p.current=!0,m.current=x.currentTarget,h.current=setTimeout(()=>{g.current&&(g.current(x,{context:b}),d.current=!0)},t)))},[n,a,l,t]),_=Ae(b=>(x,L)=>{mi(x)&&p.current&&(v.current=null,n&&x.persist(),d.current?u==null||u(x,{context:b}):p.current&&(f==null||f(x,{context:b,reason:L??pn.CancelledByRelease})),d.current=!1,p.current=!1,h.current!==void 0&&clearTimeout(h.current))},[n,u,f]),T=Ae(b=>x=>{if(c==null||c(x,{context:b}),o!==!1&&v.current){const L=gi(x);if(L){const O=o===!0?25:o,$={x:Math.abs(L.x-v.current.x),y:Math.abs(L.y-v.current.y)};($.x>O||$.y>O)&&_(b)(x,pn.CancelledByMovement)}}},[_,o,c]),w=Ae(b=>{if(e===null)return{};switch(r){case hn.Mouse:{const x={onMouseDown:E(b),onMouseMove:T(b),onMouseUp:_(b)};return i&&(x.onMouseLeave=L=>{_(b)(L,pn.CancelledOutsideElement)}),x}case hn.Touch:return{onTouchStart:E(b),onTouchMove:T(b),onTouchEnd:_(b)};case hn.Pointer:{const x={onPointerDown:E(b),onPointerMove:T(b),onPointerUp:_(b)};return i&&(x.onPointerLeave=L=>_(b)(L,pn.CancelledOutsideElement)),x}}},[e,_,i,r,T,E]);return se(()=>{if(!window)return;function b(x){const L=_u(x);_()(L)}return window.addEventListener("mouseup",b),window.addEventListener("touchend",b),window.addEventListener("pointerup",b),()=>{window.removeEventListener("mouseup",b),window.removeEventListener("touchend",b),window.removeEventListener("pointerup",b)}},[_]),se(()=>()=>{h.current!==void 0&&clearTimeout(h.current)},[]),se(()=>{g.current=e},[e]),w}function bu({poll:e,lang:t,readOnly:n,refresh:r=()=>{},votePoll:o=()=>{}}){const[i,a]=ee("default"),{expired:l,expiresAt:c,id:u,multiple:f,options:d,ownVotes:p,voted:m,votersCount:h,votesCount:g,emojis:v}=e,E=!!c&&new Date(c),_=h||g;let T=0;_<=1e3?T=0:_<=1e4?T=1:_<=1e5&&(T=2);const[w,b]=ee(!1),x=d.every(L=>L.votesCount!==null);return s("div",{lang:t,dir:"auto",class:`poll ${n?"read-only":""} ${i==="loading"?"loading":""}`,children:[w&&x||m||l?s(U,{children:[s("div",{class:"poll-options",children:d.map((L,O)=>{const{title:$,votesCount:S}=L,M=_?(S/_*100).toFixed(T):0,V=S>0&&S===Math.max(...d.map(j=>j.votesCount));return s("div",{class:`poll-option poll-result ${V?"poll-option-leading":""}`,style:{"--percentage":`${M}%`},children:[s("div",{class:"poll-option-title",children:[s("span",{children:s(Zt,{text:$,emojis:v})}),m&&p.includes(O)&&s(U,{children:[" ",s(H,{icon:"check-circle"})]})]}),s("div",{class:"poll-option-votes",title:`${S} vote${S===1?"":"s"}`,children:[M,"%"]})]},`${O}-${$}-${S}`)})}),!l&&!m&&s("button",{class:"poll-vote-button plain2",disabled:i==="loading",onClick:L=>{L.preventDefault(),b(!1)},children:[s(H,{icon:"arrow-left",size:"s"})," Hide results"]})]}):s("form",{onSubmit:async L=>{L.preventDefault();const O=L.target,$=new FormData(O),S=[];$.forEach((M,V)=>{V==="poll"&&S.push(M)}),S.length&&(a("loading"),await o(S),a("default"))},children:[s("div",{class:"poll-options",children:d.map((L,O)=>{const{title:$}=L;return s("div",{class:"poll-option",children:s("label",{class:"poll-label",children:[s("input",{type:f?"checkbox":"radio",name:"poll",value:O,disabled:i==="loading",readOnly:n}),s("span",{class:"poll-option-title",children:s(Zt,{text:$,emojis:v})})]})})})}),!n&&s("button",{class:"poll-vote-button",type:"submit",disabled:i==="loading",children:"Vote"})]}),s("p",{class:"poll-meta",children:[!l&&!n&&s("button",{type:"button",class:"plain small",disabled:i==="loading",style:{marginLeft:-8},onClick:L=>{L.preventDefault(),a("loading"),(async()=>(await r(),a("default")))()},title:"Refresh",children:s(H,{icon:"refresh",alt:"Refresh"})}),!m&&!l&&!n&&x&&s("button",{type:"button",class:"plain small",disabled:i==="loading",onClick:L=>{L.preventDefault(),b(!w)},title:w?"Hide results":"Show results",children:[s(H,{icon:w?"eye-open":"eye-close",alt:w?"Hide results":"Show results"})," "]}),!l&&!n&&" ",s("span",{title:g,children:vt(g)})," vote",g===1?"":"s",!!h&&h!==g&&s(U,{children:[" ","• ",s("span",{title:h,children:vt(h)})," ","voter",h===1?"":"s"]})," ","• ",l?"Ended":"Ending"," ",!!E&&s(At,{datetime:E})]})," "]})}const Ps=ct();function wu(e,t){if(!(e!=null&&e.length))return!1;const n=e.filter(i=>{const{filter:a}=i,l=a.context.includes(t);return l?a.expiresAt?new Date(a.expiresAt)>new Date:l:!1});if(!n.length)return!1;if(n.some(i=>i.filter.filterAction==="hide"))return{action:"hide"};if(n.some(i=>i.filter.filterAction==="warn")){const i=n.map(a=>a.filter.title);return{action:"warn",titles:i,titlesStr:i.join(" • ")}}return!1}const ko=lt(wu);function Eu(e,t,n){var a;const{filtered:r}=e;if(!(r!=null&&r.length)||n&&((a=e.account)==null?void 0:a.id)===n)return!0;const i=ko(r,t);return i?i.action!=="hide":!0}function xf(e,t){if(!(e!=null&&e.length))return[];if(!t)return e;const n=mo();return e.filter(r=>Eu(r,t,n))}const Br=document.createElement("div");function jr(e){return e?(Br.innerHTML=e,Br.querySelectorAll(".invisible").forEach(t=>{t.remove()}),Br.innerText.length):0}const mn="speechSynthesis"in window;function vi(e,t){if(mn)try{speechSynthesis.speaking&&speechSynthesis.cancel();const n=new SpeechSynthesisUtterance(e);t&&(n.lang=t),speechSynthesis.speak(n)}catch(n){alert(n)}}function $s(e){var a;const{spoilerText:t,content:n,poll:r,mediaAttachments:o}=e;let i="";return t!=null&&t.trim()?i+=t:i+=fr(n),i=i.trim(),(a=r==null?void 0:r.options)!=null&&a.length&&(i+=`
📊:
${r.options.map(l=>`${r.multiple?"▪️":"•"} ${l.title}`).join(`
`)}`),o!=null&&o.length&&(i+=" "+o.map(l=>({image:"🖼️",gifv:"🎞️",video:"📹",audio:"🎵",unknown:""})[l.type]||"").join("")),i}function Tu(e,t,n){var r=this,o=B(null),i=B(0),a=B(null),l=B([]),c=B(),u=B(),f=B(e),d=B(!0);f.current=e;var p=typeof window<"u",m=!t&&t!==0&&p;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var h=!!(n=n||{}).leading,g=!("trailing"in n)||!!n.trailing,v="maxWait"in n,E="debounceOnServer"in n&&!!n.debounceOnServer,_=v?Math.max(+n.maxWait||0,t):null;se(function(){return d.current=!0,function(){d.current=!1}},[]);var T=he(function(){var w=function(S){var M=l.current,V=c.current;return l.current=c.current=null,i.current=S,u.current=f.current.apply(V,M)},b=function(S,M){m&&cancelAnimationFrame(a.current),a.current=m?requestAnimationFrame(S):setTimeout(S,M)},x=function(S){if(!d.current)return!1;var M=S-o.current;return!o.current||M>=t||M<0||v&&S-i.current>=_},L=function(S){return a.current=null,g&&l.current?w(S):(l.current=c.current=null,u.current)},O=function S(){var M=Date.now();if(x(M))return L(M);if(d.current){var V=t-(M-o.current),j=v?Math.min(V,_-(M-i.current)):V;b(S,j)}},$=function(){if(p||E){var S=Date.now(),M=x(S);if(l.current=[].slice.call(arguments),c.current=r,o.current=S,M){if(!a.current&&d.current)return i.current=o.current,b(O,t),h?w(o.current):u.current;if(v)return b(O,t),w(o.current)}return a.current||b(O,t),u.current}};return $.cancel=function(){a.current&&(m?cancelAnimationFrame(a.current):clearTimeout(a.current)),i.current=0,l.current=o.current=c.current=a.current=null},$.isPending=function(){return!!a.current},$.flush=function(){return a.current?L(Date.now()):u.current},$},[h,v,t,_,g,m,p,E]);return T}function Su(e,t,n){var r=n===void 0?{}:n,o=r.leading,i=r.trailing;return Tu(e,t,{maxWait:t,leading:o===void 0||o,trailing:i===void 0||i})}function xu(e,t){var n=B(null),r=B(null);r.current=t;var o=B(null);se(function(){i()});var i=Ae(function(){var a=o.current,l=r.current,c=a||(l?l instanceof Element?l:l.current:null);n.current&&n.current.element===c&&n.current.subscriber===e||(n.current&&n.current.cleanup&&n.current.cleanup(),n.current={element:c,subscriber:e,cleanup:c?e(c):void 0})},[e]);return se(function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}},[]),Ae(function(a){o.current=a,i()},[i])}function yi(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 Mu(e){e===void 0&&(e={});var t=e.onResize,n=B(void 0);n.current=t;var r=e.round||Math.round,o=B(),i=ee({width:void 0,height:void 0}),a=i[0],l=i[1],c=B(!1);se(function(){return c.current=!1,function(){c.current=!0}},[]);var u=B({width:void 0,height:void 0}),f=xu(Ae(function(d){return(!o.current||o.current.box!==e.box||o.current.round!==r)&&(o.current={box:e.box,round:r,instance:new ResizeObserver(function(p){var m=p[0],h=e.box==="border-box"?"borderBoxSize":e.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",g=yi(m,h,"inlineSize"),v=yi(m,h,"blockSize"),E=g?r(g):void 0,_=v?r(v):void 0;if(u.current.width!==E||u.current.height!==_){var T={width:E,height:_};u.current.width=E,u.current.height=_,n.current?n.current(T):c.current||l(T)}})}),o.current.instance.observe(d,{box:e.box}),function(){o.current&&o.current.instance.unobserve(d)}},[e.box,r]),e.ref);return he(function(){return{ref:f,width:a.width,height:a.height}},[f,a.width,a.height])}function er({className:e="truncated"}={}){const t=B(),n=Su(({height:r})=>{if(t.current){const{scrollHeight:o}=t.current;let i=o>r;if(i){const{height:a,maxHeight:l}=getComputedStyle(t.current),c=parseInt(l||a,10);i=o>c}t.current.classList.toggle(e,i)}},300);return Mu({ref:t,box:"border-box",onResize:n}),t}const io={public:"earth",unlisted:"group",private:"lock",direct:"message"};var Os="kvfysmfp",Rs="ufhsfnkm",ku=".".concat(Os,"{overflow:hidden;touch-action:none}.").concat(Rs,"{transform-origin: 0 0}"),Lu=typeof window>"u",Au=function(){return!Lu&&("ontouchstart"in window||navigator.maxTouchPoints>0)};var Iu=function(e){var t=e.x,n=e.y,r=e.scale;return"scale3d(".concat(r,",").concat(r,", 1) translate3d(").concat(t,"px, ").concat(n,"px, 0)")};var Cu=Math.min,Pu=Math.max;function _i(e){var t=e.containerDimension,n=e.childDimension,r=e.padding,o=e.centerContained,i=n-t;return i+2*r<=0&&o?[i/2,i/2]:[Cu(i+r,0)-r,Pu(0,i+r)]}var bi=function(e,t){return t?"".concat(e," ").concat(t):e},Kn=Math.abs,$u=Math.min,Ou=Math.sqrt,Ds=typeof window>"u",Ru=Ds?!1:/(Mac)/i.test(navigator.platform),Ht=function(e){return e==="drag"},ln=function(e){return e==="zoom"},Du=function(e){return Ru&&e.ctrlKey},un=function(e){e.stopPropagation(),e.preventDefault()},wi=function(e,t){var n=e.x-t.x,r=e.y-t.y;return Ou(n*n+r*r)},Nu=function(e,t){var n=wi(e[0],e[1]),r=wi(t[0],t[1]);return r/n},Fu=function(e,t){return e>t-.01&&et?t:n},Bu=function(e){return!(e.ctrlKey||e.metaKey)},ju=function(e){if(e){var t=e.offsetWidth,n=e.offsetHeight;if(t&&n)return{width:t,height:n};var r=getComputedStyle(e),o=parseFloat(r.width),i=parseFloat(r.height);if(i&&o)return{width:o,height:i}}return{width:0,height:0}},Uu=function(e,t){return{x:t.x-e.x,y:t.y-e.y}},Wu=function(e,t){return e.x===t.x&&e.y===t.y},Mt=function(){},qn={x:0,y:0},Ti=function(e){ma(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=Re({},qn),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=Re({},qn),n._startOffset=Re({},qn),n._startTouches=null,n._updatePlaned=!1,n._wheelTimeOut=null,n._zoomFactor=1,n._initialZoomFactor=1,n._draggingPoint=Re({},qn),n._ignoreNextClick=!1,n._containerRef=ga(),n._handleClick=function(r){n._ignoreNextClick&&(n._ignoreNextClick=!1,r.stopPropagation())},n._onResize=function(){var r;!((r=n._containerRef)===null||r===void 0)&&r.current&&(n._updateInitialZoomFactor(),n._setupOffsets(),n._update())},n._handlerOnTouchEnd=n._handlerIfEnable(function(r){n._fingers=r.touches.length,n.props.shouldCancelHandledTouchEndEvents&&(ln(n._interaction)||Ht(n._interaction)&&(n._startOffset.x!==n._offset.x||n._startOffset.y!==n._offset.y))&&un(r),Ht(n._interaction)&&!n._enoughToDrag()&&n._handleClick(r),n._updateInteraction(r)}),n._handlerOnTouchStart=n._handlerIfEnable(function(r){n._firstMove=!0,n._fingers=r.touches.length,n._detectDoubleTap(r)}),n._handlerOnTouchMove=n._handlerIfEnable(function(r){n._isDoubleTap||(n._collectInertia(r),n._firstMove?(n._updateInteraction(r),n._interaction&&un(r),n._startOffset=Re({},n._offset),n._startTouches=Zn(r.touches)):(ln(n._interaction)?n._startTouches&&n._startTouches.length===2&&r.touches.length===2&&n._handleZoom(r,Nu(n._startTouches,Zn(r.touches))):Ht(n._interaction)&&n._handleDrag(r),n._interaction&&(un(r),n._update())),n._firstMove=!1)}),n._handlerWheel=function(r){if(!n.props.shouldInterceptWheel(r)){un(r);var o=r.pageX,i=r.pageY,a=r.deltaY,l=r.deltaMode,c=1;(Du(r)||l===1)&&(c=15);var u={touches:[{pageX:o,pageY:i}]},f=n._getOffsetByFirstTouch(u),d=a*c;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 r=this._getOffsetByFirstTouch(n);this._enoughToDrag()?this._drag(r,this._lastDragPosition):this._virtualDrag(r,this._lastDragPosition),this._offset=this._sanitizeOffset(this._offset),this._lastDragPosition=r},t.prototype._resetInertia=function(){this._velocity=null,this._prevDragMovePoint=null},t.prototype._realizeInertia=function(){var n=this,r=this.props,o=r.inertiaFriction,i=r.inertia;if(!(!i||!this._velocity)){var a=this._velocity,l=a.x,c=a.y;if(l||c){this._stopAnimation(),this._resetInertia();var u=function(){if(l*=o,c*=o,!l&&!c)return n._stopAnimation();var f=Re({},n._offset);if(n._addOffset({x:l,y:c}),n._offset=n._sanitizeOffset(n._offset),Wu(f,n._offset))return n._stopAnimation();n._update({isAnimation:!0})};this._animate(u,{duration:9999})}}},t.prototype._collectInertia=function(n){var r=n.touches;if(this.props.inertia){var o=Zn(r)[0],i=this._prevDragMovePoint;i&&(this._velocity=Uu(o,i)),this._prevDragMovePoint=o}},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,r){var o=Vu(this._getOffsetTouches(n)),i=r/this._lastScale;this._lastScale=r,this._nthZoom+=1,this._nthZoom>3&&(this._scale(i,o),this._drag(o,this._lastZoomCenter),this.props.enforceBoundsDuringZoom&&(this._offset=this._sanitizeOffset(this._offset))),this._lastZoomCenter=o},t.prototype._handleZoomEnd=function(){this.props.onZoomEnd(),this._end()},t.prototype._handleDoubleTap=function(n){var r=this;if(!(this._hasInteraction||this.props.tapZoomFactor===0)){var o=this.props.doubleTapZoomOutOnMaxScale&&this._zoomFactor===this.props.maxZoom||this.props.doubleTapToggleZoom&&this._zoomFactor>1;this.props.onDoubleTap(),this._ignoreNextClick=!0;var i=this._zoomFactor+this.props.tapZoomFactor,a=this._zoomFactor,l=function(u){r._scaleTo(a+u*(i-a),c)},c=this._getOffsetByFirstTouch(n);this._isDoubleTap=!0,a>i&&(c=this._getCurrentZoomCenter()),o?this._zoomOutAnimation():this._animate(l)}},t.prototype._computeInitialOffset=function(){var n=this._getContainerRect(),r=this._getChildSize(),o=r.width,i=r.height,a=-Kn(o*this._getInitialZoomFactor()-n.width)/2,l=-Kn(i*this._getInitialZoomFactor()-n.height)/2;this._initialOffset={x:a,y:l}},t.prototype._resetOffset=function(){this._offset=Re({},this._initialOffset)},t.prototype._setupOffsets=function(){this.props.setOffsetsOnce&&this._isOffsetsSet||(this._isOffsetsSet=!0,this._computeInitialOffset(),this._resetOffset())},t.prototype._sanitizeOffset=function(n){var r=this._getContainerRect(),o=this._getChildSize(),i=o.width,a=o.height,l=i*this._getInitialZoomFactor()*this._zoomFactor,c=a*this._getInitialZoomFactor()*this._zoomFactor,u=_i({containerDimension:r.width,childDimension:l,padding:this.props.horizontalPadding,centerContained:this.props.centerContained}),f=u[0],d=u[1],p=_i({containerDimension:r.height,childDimension:c,padding:this.props.verticalPadding,centerContained:this.props.centerContained}),m=p[0],h=p[1];return{x:Ur(f,d,n.x),y:Ur(m,h,n.y)}},t.prototype.alignCenter=function(n){var r=this,o=Re({duration:250,animated:!0},n),i=o.x,a=o.y,l=o.scale,c=o.animated,u=o.duration,f=i*this._initialZoomFactor,d=a*this._initialZoomFactor,p=this._zoomFactor,m=Re({},this._offset),h=this._getContainerRect(),g={x:h.width/2,y:h.height/2};if(this._zoomFactor=1,this._offset={x:-(g.x-f),y:-(g.y-d)},this._scaleTo(l,g),this._stopAnimation(),!c)return this._update();var v=this._zoomFactor-p,E={x:this._offset.x-m.x,y:this._offset.y-m.y};this._zoomFactor=p,this._offset=Re({},m);var _=function(T){var w=m.x+E.x*T,b=m.y+E.y*T;r._zoomFactor=p+v*T,r._offset=r._sanitizeOffset({x:w,y:b}),r._update()};this._animate(_,{callback:function(){return r._sanitize()},duration:u})},t.prototype.scaleTo=function(n){var r=this,o=Re({duration:250,animated:!0},n),i=o.x,a=o.y,l=o.scale,c=o.animated,u=o.duration,f=this._zoomFactor,d=Re({},this._offset);if(this._zoomFactor=1,this._offset={x:0,y:0},this._scaleTo(l,{x:i,y:a}),this._stopAnimation(),!c)return this._update();var p=this._zoomFactor-f,m={x:this._offset.x-d.x,y:this._offset.y-d.y};this._zoomFactor=f,this._offset=Re({},d);var h=function(g){var v=d.x+m.x*g,E=d.y+m.y*g;r._zoomFactor=f+p*g,r._offset={x:v,y:E},r._update()};this._animate(h,{callback:function(){return r._sanitize()},duration:u})},t.prototype._scaleTo=function(n,r){this._scale(n/this._zoomFactor,r),this._offset=this._sanitizeOffset(this._offset)},t.prototype._scale=function(n,r){n=this._scaleZoomFactor(n),this._addOffset({x:(n-1)*(r.x+this._offset.x),y:(n-1)*(r.y+this._offset.y)}),this.props.onZoomUpdate()},t.prototype._scaleZoomFactor=function(n){var r=this._zoomFactor;return this._zoomFactor*=n,this._zoomFactor=Ur(this.props.minZoom,this.props.maxZoom,this._zoomFactor),this._zoomFactor/r},t.prototype._canDrag=function(){return this.props.draggableUnZoomed||!Fu(this._zoomFactor,1)},t.prototype._drag=function(n,r){if(r){var o=-(n.y-r.y),i=-(n.x-r.x);this.props.lockDragAxis?Kn(i)>Kn(o)?this._addOffset({x:i,y:0}):this._addOffset({y:o,x:0}):this._addOffset({x:i,y:o}),this.props.onDragUpdate()}},t.prototype._virtualDrag=function(n,r){if(r){var o=-(n.y-r.y),i=-(n.x-r.x);this._draggingPoint={x:i+this._draggingPoint.x,y:o+this._draggingPoint.y}}},t.prototype._addOffset=function(n){var r=this._offset,o=r.x,i=r.y;this._offset={x:o+n.x,y:i+n.y}},t.prototype._sanitize=function(){this._zoomFactor=u?(n(1),o._stopAnimation(),c(),o._update()):(p=l(p),n(p),o._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 ju(n==null?void 0:n.firstElementChild)},t.prototype._updateInitialZoomFactor=function(){var n=this._getContainerRect(),r=this._getChildSize(),o=n.width/r.width,i=n.height/r.height;this._initialZoomFactor=$u(o,i)},t.prototype._bindEvents=function(){var n=this,r=this._containerRef.current;window.ResizeObserver?(this._containerObserver=new ResizeObserver(this._onResize),this._containerObserver.observe(r)):window.addEventListener("resize",this._onResize),this._handlers.forEach(function(o){var i=o[0],a=o[1],l=o[2];(l||r).addEventListener(i,a,!0)}),Array.from(r.querySelectorAll("img")).forEach(function(o){return o.addEventListener("load",n._onResize)})},t.prototype._unSubscribe=function(){var n=this,r=this._containerRef.current;this._containerObserver&&(this._containerObserver.disconnect(),this._containerObserver=null),window.removeEventListener("resize",this._onResize),this._handlers.forEach(function(o){var i=o[0],a=o[1],l=o[2];(l||r).removeEventListener(i,a,!0)}),Array.from(r.querySelectorAll("img")).forEach(function(o){return o.removeEventListener("load",n._onResize)})},t.prototype._update=function(n){var r=this;if(!this._updatePlaned){var o=function(){var i=r._getInitialZoomFactor()*r._zoomFactor,a=-r._offset.x/i,l=-r._offset.y/i;r.props.onUpdate({scale:i,x:a,y:l})};if(n!=null&&n.isAnimation)return o();this._updatePlaned=!0,requestAnimationFrame(function(){r._updatePlaned=!1,o()})}},t.prototype._handlerIfEnable=function(n){var r=this;return function(){for(var o=[],i=0;ir?n-r:r-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 r=this._fingers;if(r===2)return this._setInteraction("zoom",n);if(r===1&&this._canDrag())return this._setInteraction("drag",n);this._setInteraction(null,n)},t.prototype._detectDoubleTap=function(n){var r=new Date().getTime();this._fingers>1&&(this._lastTouchStart=0),r-this._lastTouchStart<300?(un(n),this._handleDoubleTap(n),ln(this._interaction)?this._handleZoomEnd():Ht(this._interaction)&&this._handleDragEnd()):this._isDoubleTap=!1,this._fingers===1&&(this._lastTouchStart=r)},t.prototype.simulate=function(n){var r=this;return function(o){var i=o.pageX,a=o.pageY,l=o.type,c=l==="mouseup",u=l==="mousedown";u&&(o.preventDefault(),r._listenMouseMove=!0),r._listenMouseMove&&(o.touches=c?[]:[{pageX:i,pageY:a}],n(o)),c&&(r._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,r=n.children,o=n.containerProps,i=va.only(r),a=o||{};return Hn.createElement(Hn.Fragment,null,Hn.createElement("style",null,ku),Hn.createElement("div",Re({},a,{ref:this._containerRef,className:bi(Os,a.className)}),$i(i,{className:bi(Rs,i.props.className)})))},t.defaultProps={animationDuration:250,draggableUnZoomed:!0,enforceBoundsDuringZoom:!1,centerContained:!1,enabled:!0,inertia:!0,inertiaFriction:.96,horizontalPadding:0,isTouch:Au,lockDragAxis:!1,maxZoom:5,minZoom:.5,onDoubleTap:Mt,onDragEnd:Mt,onDragStart:Mt,onDragUpdate:Mt,onZoomEnd:Mt,onZoomStart:Mt,onZoomUpdate:Mt,setOffsetsOnce:!1,shouldInterceptWheel:Bu,shouldCancelHandledTouchEndEvents:!1,tapZoomFactor:1,verticalPadding:0,wheelScaleFactor:1500,zoomOutFactor:1.3,doubleTapZoomOutOnMaxScale:!1,doubleTapToggleZoom:!1,_document:Ds?null:window.document},t}(Ri);if(0)var Mf,kf,Lf,Af,If,Cf,Pf;function Wr(e){if(!e)return;let t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.round(e%60);return t===0?`${n}:${r.toString().padStart(2,"0")}`:`${t}:${n.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`}const Yu=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Ku="ALT",Yr=e=>{const{alt:t,lang:n,index:r,...o}=e;return!t||!t.trim()?null:s("button",{type:"button",class:"alt-badge clickable",...o,onClick:i=>{i.stopPropagation(),i.preventDefault(),W.showMediaAlt={alt:t,lang:n}},title:"Media description",children:[Ku,!!r&&s("sup",{children:r})]})},Zu=140,qu=280,Ns=lt(e=>e!=null&&e.length?e.length>Zu||/[\n\r].*[\n\r]/.test(e.trim()):!1);function so({class:e="",media:t,to:n,lang:r,showOriginal:o,autoAnimate:i,showCaption:a,allowLongerCaption:l,altIndex:c,onClick:u=()=>{}}){let{blurhash:f,description:d,meta:p,previewRemoteUrl:m,previewUrl:h,remoteUrl:g,url:v,type:E}=t;/no\-preview\./i.test(h)&&(h=null);const{original:_={},small:T,focus:w}=p||{},b=o?_==null?void 0:_.width:(T==null?void 0:T.width)||(_==null?void 0:_.width),x=o?_==null?void 0:_.height:(T==null?void 0:T.height)||(_==null?void 0:_.height),L=o?v:h||v,O=o?g:m||g,$=b&&x,S=$?b>x?"landscape":"portrait":null,M=f?Mo(f):null,V=B();let j;if(w){const Z=(w.x+1)/2*100,ve=(1-w.y)/2*100;j=`${Z.toFixed(0)}% ${ve.toFixed(0)}%`}const R=B(),I=Ae(({x:Z,y:ve,scale:Q})=>{const{current:ae}=R;if(ae){const ge=Iu({x:Z,y:ve,scale:Q});Q===1?ae.style.removeProperty("transform"):ae.style.setProperty("transform",ge),ae.closest(".media-zoom").style.touchAction=Q<=1.01?"pan-x":""}},[]),[k,D]=ee(!1),C={enabled:k,draggableUnZoomed:!1,inertiaFriction:.9,tapZoomFactor:2,doubleTapToggleZoom:!0,containerProps:{className:"media-zoom",style:{overflow:"visible"}},onUpdate:I},z=he(()=>n?Z=>s(Kt,{to:n,...Z}):"div",[n]),N=O?Gu(O):null,P=E==="unknown"&&N&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(N.pathname),Y=E==="unknown"&&N&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test(N.pathname),K=E==="image"||E==="unknown"&&h&&!P&&!Y,te=B(),[le,Te]=ee(!1);_n(()=>{if(!K||!o||!te.current)return;const{offsetWidth:Z,offsetHeight:ve}=te.current,Q=b{const{children:ve,...Q}=Z;return s("figure",{...Q,children:[ve,s("figcaption",{class:"media-caption",lang:r,dir:"auto",onClick:ae=>{ae.preventDefault(),ae.stopPropagation(),W.showMediaAlt={alt:d,lang:r}},children:d})]})}:U,[Se,dt]=ee(void 0);if(K)return C.containerProps.style.display="inherit",_n(()=>{Yu&&o&&(async()=>{try{await fetch(L,{mode:"no-cors"}),R.current.src=L}catch{}})()},[L]),s(ne,{children:s(z,{ref:te,class:`media media-image ${e}`,onClick:u,"data-orientation":S,"data-has-alt":!q||void 0,"data-has-natural-aspect-ratio":Se||void 0,style:o?{backgroundImage:`url(${h})`,backgroundSize:le?`${b}px ${x}px`:void 0,...be}:ie,children:o?s(Ti,{...C,children:s("img",{ref:R,src:L,alt:d,width:b,height:x,"data-orientation":S,loading:"eager",decoding:"sync",onLoad:Z=>{Z.target.closest(".media-image").style.backgroundImage="",Z.target.closest(".media-zoom").style.display="",D(!0)},onError:Z=>{const{src:ve}=Z.target;ve===L&&O&&L!==O&&(Z.target.src=O)}})}):s(U,{children:[s("img",{src:L,alt:q?"":d,width:b,height:x,"data-orientation":S,loading:"lazy",style:{objectPosition:j||"center","--anim-duration":`${Math.min(Math.max(Math.max(b,x)/100,5),120)}s`},onLoad:Z=>{Z.target.dataset.loaded=!0;const ve=Z.target.closest(".media");if(!$&&ve){const{naturalWidth:Q,naturalHeight:ae}=Z.target;ve.dataset.orientation=Q>ae?"landscape":"portrait",ve.style.setProperty("--width",`${Q}px`),ve.style.setProperty("--height",`${ae}px`),ve.style.aspectRatio=`${Q}/${ae}`}if(ve){const{clientWidth:Q,clientHeight:ae,naturalWidth:ge,naturalHeight:de}=Z.target;if(Q&&ae&&ge&&de)if(ge<88||de<88)ve.dataset.hasSmallDimension=!0;else{const we=de*Q/ge;Math.abs(we-ae)<5&&dt(!0)}}},onError:Z=>{const{src:ve}=Z.target;ve===L&&L!==O&&(Z.target.src=O)}}),!q&&s(Yr,{alt:d,lang:r,index:c})]})})});if(E==="gifv"||E==="video"||P){const Z=_.duration>0,ve=_.duration<31,Q=E==="gifv"&&ve,ae=_.duration<61,ge=Wr(_.duration),de=!o&&!i&&Q,oe=!o&&i&&Q,we=_.duration>5,bt=`
`,Ve=`
`;return s(ne,{children:s(z,{class:`media ${e} media-${Q?"gif":"video"} ${oe?"media-contain":""} ${de?"media-hover-animate":""}`,"data-orientation":S,"data-formatted-duration":o?void 0:ge,"data-label":Q&&!o&&!oe?"GIF":void 0,"data-has-alt":!q||void 0,style:!o&&ie,onClick:me=>{if(de)try{V.current.pause()}catch{}u(me)},onMouseEnter:()=>{if(de)try{V.current.play()}catch{}},onMouseLeave:()=>{if(de)try{V.current.pause()}catch{}},onFocus:()=>{if(de)try{V.current.play()}catch{}},onBlur:()=>{if(de)try{V.current.pause()}catch{}},children:[o||oe?Q&&o?s(Ti,{...C,enabled:!0,children:s("div",{ref:R,dangerouslySetInnerHTML:{__html:bt}})}):Q?s("div",{class:"video-container",dangerouslySetInnerHTML:{__html:bt}}):s("div",{class:"video-container",dangerouslySetInnerHTML:{__html:Ve}}):Q?s("video",{ref:V,src:v,poster:h,width:b,height:x,"data-orientation":S,preload:"auto",playsinline:!0,loop:!0,muted:!0,onTimeUpdate:we?me=>{const{target:Le}=me,Ie=Le==null?void 0:Le.closest(".media-gif");if(Ie){const Ce=Le.currentTime/Le.duration*100;Ie.style.setProperty("--progress",`${Ce}%`)}}:void 0}):s(U,{children:[h?s("img",{src:h,alt:q?"":d,width:b,height:x,"data-orientation":S,loading:"lazy",decoding:"async",onLoad:me=>{if(!$){const Le=me.target.closest(".media");if(Le){const{naturalHeight:Ie,naturalWidth:Ce}=me.target;Le.dataset.orientation=Ce>Ie?"landscape":"portrait",Le.style.setProperty("--width",`${Ce}px`),Le.style.setProperty("--height",`${Ie}px`),Le.style.aspectRatio=`${Ce}/${Ie}`}}}}):s("video",{src:v+"#t=0.1",width:b,height:x,"data-orientation":S,preload:"metadata",muted:!0,disablePictureInPicture:!0,onLoadedMetadata:me=>{if(!Z){const{duration:Le}=me.target;if(Le){const Ie=Wr(Le),Ce=me.target.closest(".media-video");Ce&&(Ce.dataset.formattedDuration=Ie)}}}}),s("div",{class:"media-play",children:s(H,{icon:"play",size:"xl"})})]}),!o&&!q&&s(Yr,{alt:d,lang:r,index:c})]})})}else if(E==="audio"||Y){const Z=Wr(_.duration);return s(ne,{children:s(z,{class:`media media-audio ${e}`,"data-formatted-duration":o?void 0:Z,"data-has-alt":!q||void 0,onClick:u,style:!o&&ie,children:[o?s("audio",{src:g||v,preload:"none",controls:!0,autoPlay:!0}):h?s("img",{src:h,alt:q?"":d,width:b,height:x,"data-orientation":S,loading:"lazy",onError:ve=>{var Q,ae;try{(ae=(Q=ve.target)==null?void 0:Q.remove)==null||ae.call(Q)}catch{}}}):null,!o&&s(U,{children:[s("div",{class:"media-play",children:s(H,{icon:"play",size:"xl"})}),!q&&s(Yr,{alt:d,lang:r,index:c})]})]})})}}function Gu(e){return URL.parse(e,location.origin)}const Xu=280,Ju=140,Qu=Di({limit:1,interval:1e3});function ed(e,t){return t.v1.accounts.$select(e).fetch()}const td=po(Qu(ed)),gn={public:"Public",unlisted:"Unlisted",private:"Followers only",direct:"Private mention"},nd=window.ontouchstart!==void 0&&/iPad|iPhone|iPod/.test(navigator.userAgent),rd=new Intl.RelativeTimeFormat,Si=80;function od(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 Kr(e){const{spoilerText:t,content:n,poll:r}=e;return(t?`${t}
`:"")+fr(n)+od(r)}const xi=yt(({post:e,instance:t,previewMode:n})=>{const{content:r,emojis:o,language:i,mentions:a,url:l}=e;return s("div",{lang:i,dir:"auto",class:"inner-content",onClick:ml({mentions:a,instance:t,previewMode:n,statusURL:l}),dangerouslySetInnerHTML:{__html:ms(r,{emojis:o,postEnhanceDOM:c=>{c.querySelectorAll('a.u-url[target="_blank"]').forEach(u=>{/http/i.test(u.innerText.trim())||u.removeAttribute("target")})}})}})},(e,t)=>{const{post:n}=e,{post:r}=t;return n.content===r.content}),id={s:"small",m:"medium",l:"large"},sd=lt(e=>{if(e=e==null?void 0:e.trim(),(e==null?void 0:e.length)>500)return null;const n=wa(e)[0];return n!=null&&n.lang&&(n==null?void 0:n.accuracy)>.5?n.lang:null});function qt({statusID:e,status:t,instance:n,size:r="m",contentTextWeight:o,readOnly:i,enableCommentHint:a,withinContext:l,skeleton:c,enableTranslate:u,forceTranslate:f,previewMode:d,onMediaClick:p,quoted:m,onStatusLinkClick:h=()=>{},showFollowedTags:g,allowContextMenu:v,showActionsBar:E,showReplyParent:_,mediaFirst:T}){var Uo,Wo,Yo;if(c)return s("div",{class:`status skeleton ${T?"status-media-first small":""}`,children:[!T&&s(st,{size:"xxl"}),s("div",{class:"container",children:[s("div",{class:"meta",children:[(r==="s"||T)&&s(st,{size:"m"})," ███ ████████"]}),s("div",{class:"content-container",children:[T&&s("div",{class:"media-first-container"}),s("div",{class:`content ${T?"media-first-content":""}`,children:s("p",{children:"████ ████████"})})]})]})]});const{masto:w,instance:b,authenticated:x}=nr({instance:n}),{instance:L}=nr(),O=b===L;let $=it(e||(t==null?void 0:t.id),b);const S=Mn(W);if(t||(t=S.statuses[$]||S.statuses[e],$=it(t==null?void 0:t.id,b)),!t)return null;const{account:{acct:M,avatar:V,avatarStatic:j,id:R,url:I,displayName:k,username:D,emojis:C,bot:z,group:N},id:P,repliesCount:Y,reblogged:K,reblogsCount:te,favourited:le,favouritesCount:Te,bookmarked:pe,poll:_e,muted:be,sensitive:ie,spoilerText:ue,visibility:q,language:ne,editedAt:Se,filtered:dt,card:Z,createdAt:ve,inReplyToId:Q,inReplyToAccountId:ae,content:ge,mentions:de,mediaAttachments:oe,reblog:we,uri:bt,url:Ve,emojis:me,tags:Le,_deleted:Ie,_pinned:Ce,emojiReactions:$t}=t,[Ye,Ln]=ee(null);se(()=>{if(!ge||ne)return;let y;return y=setTimeout(()=>{let F=sd(fr(ge,{preProcess:J=>{J.querySelectorAll(".mention, .hashtag, pre, code, a:has(.invisible)").forEach(ce=>{ce.remove()}),J.querySelectorAll("a").forEach(ce=>{const Oe=ce.innerText.trim();(Oe.startsWith("https://")||Oe.startsWith("http://"))&&ce.remove()})}}));Ln(F)},1e3),()=>clearTimeout(y)},[ge,ne]);const Ee=ne||Ye,wt=!!(oe!=null&&oe.length);T&&wt&&(r="s");const Je=he(()=>mo(),[]),Qe=he(()=>Je&&Je===R,[R,Je]),yr=Ne(Ps),ft=!Qe&&!i&&!d&&ko(dt,yr);if((ft==null?void 0:ft.action)==="hide")return null;const Et=y=>{y.shiftKey};if(r!=="l"&&ft)return s(pd,{status:t,filterInfo:ft,instance:b,containerProps:{onMouseEnter:Et},showFollowedTags:!0,quoted:m});const et=new Date(ve),Jt=new Date(Se);let re=de==null?void 0:de.find(y=>y.id===ae);!re&&ae===P&&(re={url:I,username:D,displayName:k});const[Me,Be]=ee(re);if(!l&&!Me&&ae){const y=W.accounts[ae];y?Be(y):td(ae,w).then(F=>{Be(F),W.accounts[F.id]=F}).catch(F=>{})}const Fe=ae===Je||(de==null?void 0:de.find(y=>y.id===Je)),ye=he(()=>!!(Ko.account.get("preferences")||{})["reading:expand:spoilers"],[]),tt=he(()=>(Ko.account.get("preferences")||{})["reading:expand:media"]||"default",[]),$e=d||ye||!!S.spoilers[P],ze=d||tt==="show_all"||!!S.spoilersMedia[P];if(we)return N?s("div",{"data-state-post-id":$,class:"status-group",onMouseEnter:Et,children:[s("div",{class:"status-pre-meta",children:[s(H,{icon:"group",size:"l",alt:"Group"})," ",s(fn,{account:t.account,instance:b,showAvatar:!0})]}),s(qt,{status:e?null:we,statusID:e?we.id:null,instance:b,size:r,contentTextWeight:o,readOnly:i,mediaFirst:T})]}):s("div",{"data-state-post-id":$,class:"status-reblog",onMouseEnter:Et,children:[s("div",{class:"status-pre-meta",children:[s(H,{icon:"rocket",size:"l"})," ",s(fn,{account:t.account,instance:b,showAvatar:!0})," ",s("span",{children:"boosted"})]}),s(qt,{status:e?null:we,statusID:e?we.id:null,instance:b,size:r,contentTextWeight:o,readOnly:i,enableCommentHint:!0,mediaFirst:T})]});const Qt=Ae(({children:y})=>s("div",{"data-state-post-id":$,class:"status-followed-tags",onMouseEnter:Et,children:[s("div",{class:"status-pre-meta",children:[s(H,{icon:"hashtag",size:"l"})," ",S.statusFollowedTags[$].slice(0,3).map(F=>s(Kt,{to:b?`/${b}/t/${F}`:`/t/${F}`,class:"status-followed-tag-item",children:F},F))]}),y]}),[$,b,S.statusFollowedTags[$]]),An=g&&((Uo=S.statusFollowedTags[$])!=null&&Uo.length)?Qt:U,fe=r==="l",[en,_r]=ee(f),nt=ss(!0),tn=S.settings.contentTranslationHideLanguages||[],{contentTranslation:Ot,contentTranslationAutoInline:Tt}=S.settings;Ot||(u=!1);const ht=he(()=>{if(!Ot||!Tt||i||l&&!fe||d||ue||ie||_e||Z||oe!=null&&oe.length)return!1;const y=jr(ge);return y>0&&y<=Ju},[Ot,Tt,i,l,fe,d,ue,ie,_e,Z,oe,ge]),[br,In]=ee(!1),[qs,wr]=ee(!1),Ao=er(),Io=er(),Gs=er(),Er="Read more →",Rt=B(null),nn="Sorry, your current logged-in instance can't interact with this post from another instance.",Co=Ae(()=>Math.max(Math.round((ue.length+jr(ge))/140)||1,1),[ue,ge]),Po=Tn(et),$o=Se&&Tn(Jt);let rn=x&&q!=="direct"&&q!=="private";q==="private"&&Qe&&(rn=!0);const Cn=y=>{var F;if(!O||!x)return alert(nn);(y!=null&&y.shiftKey||(F=y==null?void 0:y.syntheticEvent)!=null&&F.shiftKey)&&za({replyToStatus:t})||Bn({replyToStatus:t})},Tr=he(()=>oe.some(y=>{var F,J;return!((J=(F=y.description)==null?void 0:F.trim)!=null&&J.call(F))}),[oe]),Oo=he(()=>Math.floor((new Date-et)/(1e3*60*60*24*30)),[et]),nf=async()=>{if(!O||!x)return alert(nn),!1;try{if(!K){let y="Boost this post?";if(Tr&&(y+=`
⚠️ Some media have no descriptions.`),!confirm(y))return!1}if(W.statuses[$]={...t,reblogged:!K,reblogsCount:te+(K?-1:1)},K){const y=await w.v1.statuses.$select(P).unreblog();return rt(y,b),!0}else{const y=await w.v1.statuses.$select(P).reblog();return rt(y,b),!0}}catch{return W.statuses[$]=t,!1}},Sr=async()=>{if(!O||!x)return alert(nn),!1;try{if(W.statuses[$]={...t,reblogged:!K,reblogsCount:te+(K?-1:1)},K){const y=await w.v1.statuses.$select(P).unreblog();rt(y,b)}else{const y=await w.v1.statuses.$select(P).reblog();rt(y,b)}return!0}catch{return W.statuses[$]=t,!1}},Ro=async()=>{if(!O||!x)return alert(nn),!1;try{if(W.statuses[$]={...t,favourited:!le,favouritesCount:Te+(le?-1:1)},le){const y=await w.v1.statuses.$select(P).unfavourite();rt(y,b)}else{const y=await w.v1.statuses.$select(P).favourite();rt(y,b)}return!0}catch{return W.statuses[$]=t,!1}},xr=async()=>{try{const y=await Ro();!fe&&y&&Pe(le?`Unliked @${D||M}'s post`:`Liked @${D||M}'s post`)}catch{}},Do=async()=>{if(Un("@mastodon/post-bookmark")){if(!O||!x)return alert(nn),!1;try{if(W.statuses[$]={...t,bookmarked:!pe},pe){const y=await w.v1.statuses.$select(P).unbookmark();rt(y,b)}else{const y=await w.v1.statuses.$select(P).bookmark();rt(y,b)}return!0}catch{return W.statuses[$]=t,!1}}},No=async()=>{try{const y=await Do();!fe&&y&&Pe(pe?`Unbookmarked @${D||M}'s post`:`Bookmarked @${D||M}'s post`)}catch{}},Pn=!!Ee&&Ee!==nt&&!no([Ee],[nt])&&!tn.find(y=>Ee===y||no([Ee],[y])),Fo=B(),zo=B();async function Xs(y){var ce,Oe,Dt,Mr;y&&(Fo.current=w.v1.statuses.$select(e).rebloggedBy.list({limit:Si}),zo.current=w.v1.statuses.$select(e).favouritedBy.list({limit:Si}));const[{value:F},{value:J}]=await Promise.allSettled([Fo.current.next(),zo.current.next()]);if((ce=F.value)!=null&&ce.length||(Oe=J.value)!=null&&Oe.length){const St=[];return(Dt=F.value)!=null&&Dt.length&&St.push(...F.value.map(xt=>(xt._types=["reblog"],xt))),(Mr=J.value)!=null&&Mr.length&&St.push(...J.value.map(xt=>(xt._types=["favourite"],xt))),{value:St,done:F.done&&J.done}}return{value:[],done:!0}}const Js=B(),Ho=["public","unlisted"].includes(q),Qs=["public","unlisted","private"].includes(q),Vo=s(U,{children:[!fe&&O&&s(U,{children:s("div",{class:"menu-control-group-horizontal status-menu",children:[s(ke,{onClick:Cn,children:[s(H,{icon:"comment"}),s("span",{children:Y>0?vt(Y):"Reply"})]}),s(Cr,{subMenu:!0,confirmLabel:s(U,{children:[s(H,{icon:"rocket"}),s("span",{children:K?"Unboost":"Boost"})]}),className:`menu-reblog ${K?"checked":""}`,menuExtras:s(ke,{onClick:()=>{Bn({draftStatus:{status:`
${Ve}`}})},children:[s(H,{icon:"quote"}),s("span",{children:"Quote"})]}),menuFooter:Tr&&!K?s("div",{class:"footer",children:[s(H,{icon:"alert"}),"Some media have no descriptions."]}):Oo>=3&&s("div",{class:"footer",children:[s(H,{icon:"info"}),s("span",{children:["Old post (",s("strong",{children:rd.format(-Oo,"month")}),")"]})]}),disabled:!rn,onClick:async()=>{try{const y=await Sr();!fe&&y&&Pe(K?`Unboosted @${D||M}'s post`:`Boosted @${D||M}'s post`)}catch{}},children:[s(H,{icon:"rocket"}),s("span",{children:te>0?vt(te):K?"Unboost":"Boost…"})]}),s(ke,{onClick:xr,className:`menu-favourite ${le?"checked":""}`,children:[s(H,{icon:"heart"}),s("span",{children:Te>0?vt(Te):le?"Unlike":"Like"})]}),Un("@mastodon/post-bookmark")&&s(ke,{onClick:No,className:`menu-bookmark ${pe?"checked":""}`,children:[s(H,{icon:"bookmark"}),s("span",{children:pe?"Unbookmark":"Bookmark"})]})]})}),!fe&&O&&(fe||E)&&s(an,{}),(fe||E)&&s(U,{children:s(ke,{onClick:()=>{W.showGenericAccounts={heading:"Boosted/Liked by…",fetchAccounts:Xs,instance:b,showReactions:!0,postID:$}},children:[s(H,{icon:"react"}),s("span",{children:["Boosted/Liked by",s("span",{class:"more-insignificant",children:"…"})]})]})}),!T&&s(U,{children:[(u||!Ee||Pn)&&s(an,{}),u?s("div",{class:mn?"menu-horizontal":"",children:[s(ke,{disabled:en,onClick:()=>{_r(!0)},children:[s(H,{icon:"translate"}),s("span",{children:"Translate"})]}),mn&&s(ke,{onClick:()=>{const y=Kr(t);y&&vi(y,Ee)},children:[s(H,{icon:"speak"}),s("span",{children:"Speak"})]})]}):(!Ee||Pn)&&s("div",{class:mn?"menu-horizontal":"",children:[s(ci,{to:`${b?`/${b}`:""}/s/${P}?translate=1`,children:[s(H,{icon:"translate"}),s("span",{children:"Translate"})]}),mn&&s(ke,{onClick:()=>{const y=Kr(t);y&&vi(y,Ee)},children:[s(H,{icon:"speak"}),s("span",{children:"Speak"})]})]})]}),(!fe&&O||u||!Ee||Pn)&&s(an,{}),!fe&&s(U,{children:s(ci,{to:b?`/${b}/s/${P}`:`/s/${P}`,onClick:y=>{h(y,t)},children:[s(H,{icon:"arrows-right"}),s("small",{children:["View post by @",D||M,s("br",{}),s("span",{class:"more-insignificant",children:[gn[q]," • ",Po]})]})]})}),!!Se&&s(U,{children:s(ke,{onClick:()=>{In(P)},children:[s(H,{icon:"history"}),s("small",{children:["Show Edit History",s("br",{}),s("span",{class:"more-insignificant",children:["Edited: ",$o]})]})]})}),s(ke,{href:Ve,target:"_blank",children:[s(H,{icon:"external"}),s("small",{class:"menu-double-lines",children:fd(Ve)})]}),s("div",{class:"menu-horizontal",children:[s(ke,{onClick:()=>{try{navigator.clipboard.writeText(Ve),Pe("Link copied")}catch{Pe("Unable to copy link")}},children:[s(H,{icon:"link"}),s("span",{children:"Copy"})]}),Ho&&(navigator==null?void 0:navigator.share)&&((Wo=navigator==null?void 0:navigator.canShare)==null?void 0:Wo.call(navigator,{url:Ve}))&&s(ke,{onClick:()=>{try{navigator.share({url:Ve})}catch{alert("Sharing doesn't seem to work.")}},children:[s(H,{icon:"share"}),s("span",{children:"Share…"})]})]}),Ho&&fe&&s(ke,{onClick:()=>{wr(!0)},children:[s(H,{icon:"code"}),s("span",{children:"Embed post"})]}),(Qe||Fe)&&s(an,{}),(Qe||Fe)&&s(ke,{onClick:async()=>{try{const y=await w.v1.statuses.$select(P)[be?"unmute":"mute"]();rt(y,b),Pe(be?"Conversation unmuted":"Conversation muted")}catch{Pe(be?"Unable to unmute conversation":"Unable to mute conversation")}},children:be?s(U,{children:[s(H,{icon:"unmute"}),s("span",{children:"Unmute conversation"})]}):s(U,{children:[s(H,{icon:"mute"}),s("span",{children:"Mute conversation"})]})}),Qe&&Qs&&s(ke,{onClick:async()=>{try{const y=await w.v1.statuses.$select(P)[Ce?"unpin":"pin"]();Pe(Ce?"Post unpinned from profile":"Post pinned to profile")}catch{Pe(Ce?"Unable to unpin post":"Unable to pin post")}},children:Ce?s(U,{children:[s(H,{icon:"unpin"}),s("span",{children:"Unpin from profile"})]}):s(U,{children:[s(H,{icon:"pin"}),s("span",{children:"Pin to profile"})]})}),Qe&&s("div",{class:"menu-horizontal",children:[Un("@mastodon/post-edit")&&s(ke,{onClick:()=>{Bn({editStatus:t})},children:[s(H,{icon:"pencil"}),s("span",{children:"Edit"})]}),fe&&s(Cr,{subMenu:!0,confirmLabel:s(U,{children:[s(H,{icon:"trash"}),s("span",{children:"Delete this post?"})]}),menuItemClassName:"danger",onClick:()=>{(async()=>{try{await w.v1.statuses.$select(P).remove();const y=Fi(P,b);y._deleted=!0,Pe("Deleted")}catch{Pe("Unable to delete")}})()},children:[s(H,{icon:"trash"}),s("span",{children:"Delete…"})]})]}),!Qe&&fe&&s(U,{children:[s(an,{}),s(ke,{className:"danger",onClick:()=>{W.showReportModal={account:t.account,post:t}},children:[s(H,{icon:"flag"}),s("span",{children:"Report post…"})]})]})]}),Bo=B(),[$n,on]=ee(!1),[On,Rn]=ee({}),Dn=v||!fe&&!d&&!Ie&&!m,ea=Cs(nd&&Dn?y=>{var Oe;if(y.pointerType==="mouse")return;const{clientX:F,clientY:J}=((Oe=y.touches)==null?void 0:Oe[0])||y,ce=y.target.closest("a");ce&&Rt.current.contains(ce)&&!ce.getAttribute("href").startsWith("#")||(y.preventDefault(),Rn({anchorPoint:{x:F,y:J},direction:"right"}),on(!0))}:null,{threshold:600,captureEvent:!0,detect:"touch",cancelOnMovement:2}),Nn=!i&&!d&&!m,ta=Bt("r, shift+r",Cn,{enabled:Nn}),na=Bt("f, l",xr,{enabled:Nn}),ra=Bt("d",No,{enabled:Nn}),oa=Bt("shift+b",()=>{(async()=>{try{const y=await Sr();!fe&&y&&Pe(K?`Unboosted @${D||M}'s post`:`Boosted @${D||M}'s post`)}catch{}})()},{enabled:Nn&&rn}),ia=Bt("x",y=>{const F=document.activeElement.closest(".status-link, .status-focus");if(F){const J=F.querySelector(".spoiler-button:not(.spoiling)");if(J)y.stopPropagation(),J.click();else{const ce=F.querySelector(".spoiler-media-button:not(.spoiling)");ce&&(y.stopPropagation(),ce.click())}}}),Fn=oe.slice(0,fe?void 0:4),zn=oe.length>1&&Fn.some(y=>!!y.description&&!Ns(y.description)),sa=he(()=>{if(!zn)return null;const y=[];return Fn.forEach((F,J)=>{if(!F.description)return;const ce=y.findIndex(Oe=>Oe.media.description===F.description);ce===-1?y.push({media:F,indices:[J]}):y[ce].indices.push(J)}),y.map(({media:F,indices:J})=>s("div",{"data-caption-index":J.map(ce=>ce+1).join(" "),onClick:ce=>{ce.preventDefault(),ce.stopPropagation(),W.showMediaAlt={alt:F.description,lang:Ee}},title:F.description,children:[s("sup",{children:J.map(ce=>ce+1).join(" ")})," ",F.description]},F.id))},[zn,Fn,Ee]),sn=he(()=>{var y;return!!Q&&ae===((y=t.account)==null?void 0:y.id)||!!S.statusThreadNumber[$]},[Q,ae,(Yo=t.account)==null?void 0:Yo.id,S.statusThreadNumber[$]]),aa=he(()=>a&&!sn&&!l&&!Q&&q==="public"&&Y>0,[a,sn,l,Q,Y,q]),jo=he(()=>{if(Z||_e||ie||ue||oe!=null&&oe.length||sn||l||Q||Y<=0||!/[???︖❓❔⁇⁈⁉¿‽؟]/.test(ge))return!1;const J=jr(ge);if(J>0&&J<=Xu)return!0},[Z,_e,ie,ue,oe,we,sn,l,Q,Y,ge]);return s(An,{children:[_&&!!(Q&&ae)&&s(hd,{sKey:$}),s("article",{"data-state-post-id":$,ref:y=>{var J;Rt.current=y;const F=((J=y==null?void 0:y.closest)==null?void 0:J.call(y,".timeline-item, .timeline-item-alt, .status-link, .status-focus"))||y;ta.current=F,na.current=F,ra.current=F,oa.current=F,ia.current=F},tabindex:"-1",class:`status ${!l&&Q&&Me?"status-reply-to":""} visibility-${q} ${Ce?"status-pinned":""} ${id[r]} ${Ie?"status-deleted":""} ${m?"status-card":""} ${$n?"status-menu-open":""} ${T&&wt?"status-media-first":""}`,onMouseEnter:Et,onContextMenu:y=>{var ce,Oe;if(!Dn||y.metaKey)return;const F=y.target.closest("a");if(F&&Rt.current.contains(F)&&!F.getAttribute("href").startsWith("#"))return;const J=(ce=window.getSelection)==null?void 0:ce.call(window);if(J.toString().length>0){const{anchorNode:Dt}=J;if((Oe=Rt.current)!=null&&Oe.contains(Dt))return}y.preventDefault(),Rn({anchorPoint:{x:y.clientX,y:y.clientY},direction:"right"}),on(!0)},...Dn?ea():{},children:[Dn&&s(qi,{ref:Bo,state:$n?"open":void 0,...On,onClose:y=>{var F,J,ce;on(!1),(y==null?void 0:y.reason)==="click"&&((ce=(J=(F=Rt.current)==null?void 0:F.closest("[tabindex]"))==null?void 0:J.focus)==null||ce.call(J))},portal:{target:document.body},containerProps:{style:{zIndex:1001},onClick:()=>{var y,F;(F=(y=Bo.current)==null?void 0:y.closeMenu)==null||F.call(y)}},overflow:"auto",boundingBoxPadding:os(),unmountOnClose:!0,children:Vo}),E&&r!=="l"&&!d&&!i&&!Ie&&!m&&s("div",{class:`status-actions ${$n==="actions-bar"?"open":""}`,ref:Js,children:[s(Vt,{size:"s",title:"Reply",alt:"Reply",class:"reply-button",icon:"comment",iconSize:"m",onClick:Cn}),s(Vt,{size:"s",checked:le,title:["Like","Unlike"],alt:["Like","Liked"],class:"favourite-button",icon:"heart",iconSize:"m",count:Te,onClick:xr}),s("button",{type:"button",title:"More",class:"plain more-button",onClick:y=>{y.preventDefault(),y.stopPropagation(),Rn({anchorRef:{current:y.currentTarget},align:"start",direction:"left",gap:0,shift:-8}),on("actions-bar")},children:s(H,{icon:"more2",size:"m",alt:"More"})})]}),r!=="l"&&s("div",{class:"status-badge",children:[K&&s(H,{class:"reblog",icon:"rocket",size:"s"}),le&&s(H,{class:"favourite",icon:"heart",size:"s"}),pe&&s(H,{class:"bookmark",icon:"bookmark",size:"s"}),Ce&&s(H,{class:"pin",icon:"pin",size:"s"})]}),r!=="s"&&s("a",{href:I,tabindex:"-1",title:`@${M}`,onClick:y=>{y.preventDefault(),y.stopPropagation(),W.showAccount={account:t.account,instance:b}},children:s(st,{url:j||V,size:"xxl",squircle:z})}),s("div",{class:"container",children:[s("div",{class:"meta",children:[s("span",{class:"meta-name",children:s(fn,{account:t.account,instance:b,showAvatar:r==="s",showAcct:fe})})," ",r!=="l"&&(Ie?s("span",{class:"status-deleted-tag",children:"Deleted"}):Ve&&!d&&!i&&!m?s(Kt,{to:b?`/${b}/s/${P}`:`/s/${P}`,onClick:y=>{y.metaKey||y.ctrlKey||y.shiftKey||y.altKey||y.which===2||(y.preventDefault(),y.stopPropagation(),h==null||h(y,t),Rn({anchorRef:{current:y.currentTarget},align:"end",direction:"bottom",gap:4}),on(!0))},class:`time ${$n&&(On!=null&&On.anchorRef)?"is-open":""}`,children:[aa&&!jo?s(H,{icon:"comment2",size:"s",alt:`${Y} ${Y===1?"reply":"replies"}`}):q!=="public"&&q!=="direct"&&s(H,{icon:io[q],alt:gn[q],size:"s"})," ",s(At,{datetime:et,format:"micro"}),!d&&!i&&s(H,{icon:"more2",class:"more"})]}):s("span",{class:"time",children:[q!=="public"&&q!=="direct"&&s(U,{children:[s(H,{icon:io[q],alt:gn[q],size:"s"})," "]}),s(At,{datetime:et,format:"micro"})]}))]}),q==="direct"&&s(U,{children:[s("div",{class:"status-direct-badge",children:"Private mention"})," "]}),!l&&s(U,{children:sn?s("div",{class:"status-thread-badge",children:[s(H,{icon:"thread",size:"s"}),"Thread",S.statusThreadNumber[$]?` ${S.statusThreadNumber[$]}/X`:""]}):!!Q&&!!Me&&(!!ue||!de.find(y=>y.id===ae))&&s("div",{class:"status-reply-badge",children:[s(H,{icon:"reply"})," ",s(fn,{account:Me,instance:b,short:!0})]})}),s("div",{class:`content-container ${ue||ie?"has-spoiler":""} ${$e?"show-spoiler":""} ${ze?"show-media":""}`,"data-content-text-weight":o?Co():null,style:(fe||o)&&{"--content-text-weight":Co()},children:T&&wt?s(U,{children:[(!!ue||!!ie)&&!ye&&s(U,{children:[!!ue&&s("span",{class:"spoiler-content media-first-spoiler-content",lang:Ee,dir:"auto",ref:Ao,"data-read-more":Er,children:[s(Zt,{text:ue,emojis:me})," "]}),s("button",{class:`light spoiler-button media-first-spoiler-button ${$e?"spoiling":""}`,type:"button",onClick:y=>{y.preventDefault(),y.stopPropagation(),$e?(delete W.spoilers[P],ye||delete W.spoilersMedia[P]):(W.spoilers[P]=!0,ye||(W.spoilersMedia[P]=!0))},children:[s(H,{icon:$e?"eye-open":"eye-close"})," ",$e?"Show less":"Show content"]})]}),s(cd,{mediaAttachments:oe,language:Ee,postID:P,instance:b}),!!ge&&s("div",{class:"media-first-content content",ref:Io,children:s(xi,{post:t,instance:b,previewMode:d})})]}):s(U,{children:[!!ue&&s(U,{children:[s("div",{class:"content spoiler-content",lang:Ee,dir:"auto",ref:Ao,"data-read-more":Er,children:s("p",{children:s(Zt,{text:ue,emojis:me})})}),ye||d?s("div",{class:"spoiler-divider",children:[s(H,{icon:"eye-open"})," Content warning"]}):s("button",{class:`light spoiler-button ${$e?"spoiling":""}`,type:"button",onClick:y=>{y.preventDefault(),y.stopPropagation(),$e?(delete W.spoilers[P],ye||delete W.spoilersMedia[P]):(W.spoilers[P]=!0,ye||(W.spoilersMedia[P]=!0))},children:[s(H,{icon:$e?"eye-open":"eye-close"})," ",$e?"Show less":"Show content"]})]}),!!ge&&s("div",{class:"content",ref:Io,"data-read-more":Er,children:[s(xi,{post:t,instance:b,previewMode:d}),s(md,{id:P,instance:b,level:m})]}),!!_e&&s(bu,{lang:Ee,poll:_e,readOnly:i||!O||!x,onUpdate:y=>{W.statuses[$].poll=y},refresh:()=>w.v1.polls.$select(_e.id).fetch().then(y=>{W.statuses[$].poll=y}).catch(y=>{}),votePoll:y=>w.v1.polls.$select(_e.id).votes.create({choices:y}).then(F=>{W.statuses[$].poll=F}).catch(F=>{})}),((u||ht)&&!!ge.trim()&&!!fr(dr(ge,me))&&Pn||en)&&s(Gl,{forceTranslate:en||ht,mini:!fe&&!l,sourceLanguage:Ee,autoDetected:Ye,text:Kr(t)}),!d&&ie&&!!oe.length&&tt!=="show_all"&&s("button",{class:`plain spoiler-media-button ${ze?"spoiling":""}`,type:"button",hidden:!ye&&!!ue,onClick:y=>{y.preventDefault(),y.stopPropagation(),ze?delete W.spoilersMedia[P]:W.spoilersMedia[P]=!0},children:[s(H,{icon:ze?"eye-open":"eye-close"})," ",ze?"Show less":"Show media"]}),!!oe.length&&(oe.length>1&&(fe||l&&r==="m")?s("div",{class:"media-large-container",children:oe.map((y,F)=>s("div",{class:"media-container media-eq1",children:s(so,{media:y,autoAnimate:!0,showCaption:!0,allowLongerCaption:!ge,lang:Ee,to:`/${b}/s/${P}?${l?"media":"media-only"}=${F+1}`,onClick:p?J=>p(J,F,y,t):void 0})},y.id))}):s(ad,{lang:Ee,enabled:zn,captionChildren:sa,children:s("div",{ref:Gs,class:`media-container media-eq${oe.length} ${oe.length>2?"media-gt2":""} ${oe.length>4?"media-gt4":""}`,children:Fn.map((y,F)=>s(so,{media:y,autoAnimate:fe,showCaption:oe.length===1,allowLongerCaption:!ge&&oe.length===1,lang:Ee,altIndex:zn&&!!y.description&&F+1,to:`/${b}/s/${P}?${l?"media":"media-only"}=${F+1}`,onClick:p?J=>{p(J,F,y,t)}:void 0},y.id))})})),!!Z&&/^https/i.test(Z==null?void 0:Z.url)&&!ie&&!ue&&!_e&&!oe.length&&!S.statusQuotes[$]&&s(ld,{card:Z,selfReferential:(Z==null?void 0:Z.url)===t.url||(Z==null?void 0:Z.url)===t.uri,instance:L})]})}),!fe&&jo&&s("div",{class:"content-comment-hint insignificant",children:[s(H,{icon:"comment2",alt:"Replies"})," ",Y]}),fe&&s(U,{children:[s("div",{class:"extra-meta",children:Ie?s("span",{class:"status-deleted-tag",children:"Deleted"}):s(U,{children:[s("span",{children:gn[q]})," •"," ",s("a",{href:Ve,target:"_blank",rel:"noopener noreferrer",children:s("time",{class:"created",datetime:et.toISOString(),title:et.toLocaleString(),children:Po})}),Se&&s(U,{children:[" ","• ",s(H,{icon:"pencil",alt:"Edited"})," ",s("time",{tabIndex:"0",class:"edited",datetime:Jt.toISOString(),onClick:()=>{In(P)},children:$o})]})]})}),!!($t!=null&&$t.length)&&s("div",{class:"emoji-reactions",children:$t.map(y=>{const{name:F,count:J,me:ce,url:Oe,staticUrl:Dt}=y;if(Oe)return s("span",{class:`emoji-reaction tag ${ce?"":"insignificant"}`,children:[s(to,{alt:F,url:Oe,staticUrl:Dt})," ",J]});if(/^:.+?:$/.test(F)){const St=me.find(xt=>xt.shortcode===F.replace(/^:/,"").replace(/:$/,""));if(St)return s("span",{class:`emoji-reaction tag ${ce?"":"insignificant"}`,children:[s(to,{alt:F,url:St.url,staticUrl:St.staticUrl})," ",J]})}return s("span",{class:`emoji-reaction tag ${ce?"":"insignificant"}`,children:[F," ",J]})})}),s("div",{class:`actions ${Ie?"disabled":""}`,children:[s("div",{class:"action has-count",children:s(Vt,{title:"Reply",alt:"Comments",class:"reply-button",icon:"comment",count:Y,onClick:Cn})}),s(Cr,{disabled:!rn,onClick:Sr,confirmLabel:s(U,{children:[s(H,{icon:"rocket"}),s("span",{children:K?"Unboost":"Boost"})]}),menuExtras:s(ke,{onClick:()=>{Bn({draftStatus:{status:`
${Ve}`}})},children:[s(H,{icon:"quote"}),s("span",{children:"Quote"})]}),menuFooter:Tr&&!K&&s("div",{class:"footer",children:[s(H,{icon:"alert"}),"Some media have no descriptions."]}),children:s("div",{class:"action has-count",children:s(Vt,{checked:K,title:["Boost","Unboost"],alt:["Boost","Boosted"],class:"reblog-button",icon:"rocket",count:te,disabled:!rn})})}),s("div",{class:"action has-count",children:s(Vt,{checked:le,title:["Like","Unlike"],alt:["Like","Liked"],class:"favourite-button",icon:"heart",count:Te,onClick:Ro})}),Un("@mastodon/post-bookmark")&&s("div",{class:"action",children:s(Vt,{checked:pe,title:["Bookmark","Unbookmark"],alt:["Bookmark","Bookmarked"],class:"bookmark-button",icon:"bookmark",onClick:Do})}),s(is,{portal:{target:document.querySelector(".status-deck")||document.body},align:"end",gap:4,overflow:"auto",viewScroll:"close",menuButton:s("div",{class:"action",children:s("button",{type:"button",title:"More",class:"plain more-button",children:s(H,{icon:"more",size:"l",alt:"More"})})}),children:Vo})]})]})]}),!!br&&s(Gr,{onClick:y=>{y.target===y.currentTarget&&In(!1)},children:s(ud,{statusID:br,instance:b,fetchStatusHistory:()=>w.v1.statuses.$select(br).history.list(),onClose:()=>{var y;In(!1),(y=Rt.current)==null||y.focus()}})}),!!qs&&s(Gr,{onClick:y=>{y.target===y.currentTarget&&wr(!1)},children:s(dd,{post:t,instance:b,onClose:()=>{wr(!1)}})})]})]})}function ad(e){const{enabled:t,children:n,lang:r,captionChildren:o}=e;return!t||!o?n:s("figure",{class:"media-figure-multiple",children:[n,s("figcaption",{lang:r,dir:"auto",children:o})]})}function cd(e){const{mediaAttachments:t,language:n,postID:r,instance:o}=e,i=t.length>1,a=B(),[l,c]=ee(0);return se(()=>{let u=()=>{const{clientWidth:f,scrollLeft:d}=a.current,p=Math.round(d/f);c(p)};return a.current&&a.current.addEventListener("scroll",u,{passive:!0}),()=>{a.current&&a.current.removeEventListener("scroll",u)}},[]),s(U,{children:[s("div",{class:"media-first-container",children:[s("div",{class:"media-first-carousel",ref:a,children:t.map((u,f)=>s("div",{class:"media-first-item",children:s(so,{media:u,lang:n,to:`/${o}/s/${r}?media=${f+1}`})},u.id))}),i&&s("div",{class:"media-carousel-controls",children:[s("div",{class:"carousel-indexer",children:[l+1,"/",t.length]}),s("label",{class:"media-carousel-button",children:s("button",{type:"button",class:"carousel-button",hidden:l===0,onClick:u=>{u.preventDefault(),u.stopPropagation(),a.current.focus(),a.current.scrollTo({left:a.current.clientWidth*(l-1),behavior:"smooth"})},children:s(H,{icon:"arrow-left"})})}),s("label",{class:"media-carousel-button",children:s("button",{type:"button",class:"carousel-button",hidden:l===t.length-1,onClick:u=>{u.preventDefault(),u.stopPropagation(),a.current.focus(),a.current.scrollTo({left:a.current.clientWidth*(l+1),behavior:"smooth"})},children:s(H,{icon:"arrow-right"})})})]})]}),i&&s("div",{class:"media-carousel-dots",style:{"--dots-count":t.length},children:t.map((u,f)=>s("span",{class:`carousel-dot ${f===l?"active":""}`},u.id))})]})}function ld({card:e,selfReferential:t,instance:n}){var V;const r=Mn(W),{blurhash:o,title:i,description:a,html:l,providerName:c,providerUrl:u,authorName:f,authorUrl:d,width:p,height:m,image:h,imageDescription:g,url:v,type:E,embedUrl:_,language:T,publishedAt:w}=e,b=i||c||f,L=p/m>=1.2?"large":"",[O,$]=ee(null);if(se(()=>{b&&h&&!t&&ya(v)&&_a(n,v).then(j=>{if(!j)return;const{id:R,url:I}=j;$("#"+I)})},[b,h,t]),r.unfurledLinks[v])return null;const S=/