import{Z as ct,E as Ne,c as s,h as ee,q as Ie,A as j,_ as _n,y as se,$ as Sn,o as $t,a0 as I,a1 as ua,a2 as tr,a3 as da,T as he,D as Lt,p as Pi,a4 as fa,a5 as Oi,F as Di,k as U,x as lt,K as ut,i as ha,s as W,a6 as pa,a as nr,n as ma,a7 as Ri,a8 as ga,a9 as Ni,j as ho,L as Fi,g as po,aa as va,ab as De,ac as ya,ad as _a,ae as Hn,w as it,u as Mn,d as Ko,b as rt,J as zi,af as ba,ag as wa,ah as Ta}from"./useTitle-KlNTnsJV.js";import{e as Ea}from"./tinyld-light-PxOyhYWY.js";import{m as xa}from"./index-cp67bciK.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 Ca=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=gt(d),T=f.toLowerCase();if(!(u!=null&&u.includes(v))&&!(u!=null&&u.includes(T))&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(v))return!1;if(!r){if(o===!g&&T!=="alt"||l===!h&&T!=="shift")return!1;if(a){if(!m&&!p)return!1}else if(i===!m&&T!=="meta"&&T!=="os"||c===!p&&T!=="ctrl"&&T!=="control")return!1}return u&&u.length===1&&(u.includes(T)||u.includes(v))?!0:u?ka(u):!u},Pa=ct(void 0),Oa=function(){return Ne(Pa)};function Ui(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&&Ui(e[r],t[r])},!0):e===t}var Da=ct({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),Ra=function(){return Ne(Da)};function Na(e){var t=j(void 0);return Ui(t.current,e)||(t.current=e),t.current}var Zo=function(t){t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation()},Fa=typeof window<"u"?_n:se;function jt(e,t,n,r){var o=j(null),i=j(!1),a=n instanceof Array?r instanceof Array?void 0:r:n,l=mo(e)?e.join(a==null?void 0:a.splitKey):e,c=n instanceof Array?n:r instanceof Array?r:void 0,u=Ie(t,c??[]),f=j(u);c?f.current=u:f.current=t;var d=Na(a),p=Ra(),m=p.enabledScopes,h=Oa();return Fa(function(){if(!((d==null?void 0:d.enabled)===!1||!La(m,d==null?void 0:d.scopes))){var g=function(w,b){var S;if(b===void 0&&(b=!1),!($a(w)&&!Bi(w,d==null?void 0:d.enableOnFormTags))){if(o.current!==null){var A=o.current.getRootNode();if((A instanceof Document||A instanceof ShadowRoot)&&A.activeElement!==o.current&&!o.current.contains(A.activeElement)){Zo(w);return}}(S=w.target)!=null&&S.isContentEditable&&!(d!=null&&d.enableOnContentEditable)||kr(l,d==null?void 0:d.splitKey).forEach(function(O){var P,x=Ar(O,d==null?void 0:d.combinationKey);if(Ca(w,x,d==null?void 0:d.ignoreModifiers)||(P=x.keys)!=null&&P.includes("*")){if(d!=null&&d.ignoreEventWhen!=null&&d.ignoreEventWhen(w)||b&&i.current)return;if(Aa(w,x,d==null?void 0:d.preventDefault),!Ia(w,x,d==null?void 0:d.enabled)){Zo(w);return}f.current(w,x),b||(i.current=!0)}})}},v=function(w){w.key!==void 0&&(Vi(gt(w.code)),((d==null?void 0:d.keydown)===void 0&&(d==null?void 0:d.keyup)!==!0||d!=null&&d.keydown)&&g(w))},T=function(w){w.key!==void 0&&(ji(gt(w.code)),i.current=!1,d!=null&&d.keyup&&g(w,!0))},_=o.current||(a==null?void 0:a.document)||document;return _.addEventListener("keyup",T),_.addEventListener("keydown",v),h&&kr(l,d==null?void 0:d.splitKey).forEach(function(E){return h.addHotkey(Ar(E,d==null?void 0:d.combinationKey,d==null?void 0:d.description))}),function(){_.removeEventListener("keyup",T),_.removeEventListener("keydown",v),h&&kr(l,d==null?void 0:d.splitKey).forEach(function(E){return h.removeHotkey(Ar(E,d==null?void 0:d.combinationKey,d==null?void 0:d.description))})}}},[l,d,m]),o}var go={exports:{}};/*! * Toastify js 1.12.0 * https://github.com/apvarun/toastify-js * @license MIT licensed * * Copyright (C) 2018 Varun A P */var uf=go.exports;(function(e){(function(t,n){e.exports?e.exports=n():t.Toastify=n()})(Sn,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})})(go);var za=go.exports;const Ha=$t(za);window._showToast=Ce;function Ce(e){typeof e=="string"&&(e={text:e});const{onClick:t,delay:n,...r}=e,o=Ha({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 df(e,t,n,r){const o=j(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 Va(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 ja=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);function Ba(){if(ja){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 Wi={x:()=>I(()=>import("./icons/close-line-YTE7hIJE.js"),[],import.meta.url),heart:()=>I(()=>import("./icons/heart-line-VwvWYh8h.js"),[],import.meta.url),bookmark:()=>I(()=>import("./icons/bookmark-line-D6jQ7QFs.js"),[],import.meta.url),"check-circle":()=>I(()=>import("./icons/check-circle-line-sE41WGxF.js"),[],import.meta.url),"x-circle":()=>I(()=>import("./icons/close-circle-line-qd3g541O.js"),[],import.meta.url),transfer:()=>I(()=>import("./icons/transfer-4-line-Q9QJoxz3.js"),[],import.meta.url),rocket:()=>I(()=>import("./icons/rocket-line-rZbVYYCZ.js"),[],import.meta.url),"arrow-left":()=>I(()=>import("./icons/arrow-left-line-_YC6-XGG.js"),[],import.meta.url),"arrow-right":()=>I(()=>import("./icons/arrow-right-line-PypiEqpu.js"),[],import.meta.url),"arrow-up":()=>I(()=>import("./icons/arrow-up-line-fcuKqhVE.js"),[],import.meta.url),"arrow-down":()=>I(()=>import("./icons/arrow-down-line-0TRJUP_K.js"),[],import.meta.url),earth:()=>I(()=>import("./icons/earth-line-t1Um8wpQ.js"),[],import.meta.url),lock:()=>I(()=>import("./icons/lock-line-0jNHqZpm.js"),[],import.meta.url),unlock:()=>I(()=>import("./icons/unlock-line-w3piJMVb.js"),[],import.meta.url),"eye-close":()=>I(()=>import("./icons/eye-close-line-lBiePPv9.js"),[],import.meta.url),"eye-open":()=>I(()=>import("./icons/eye-2-line-vz_Kw-rK.js"),[],import.meta.url),message:()=>I(()=>import("./icons/mail-line-5XLS6FEo.js"),[],import.meta.url),comment:()=>I(()=>import("./icons/chat-3-line-F0xcdpXY.js"),[],import.meta.url),comment2:()=>I(()=>import("./icons/comment-2-line-xEXuT-Ip.js"),[],import.meta.url),home:()=>I(()=>import("./icons/home-3-line-qJiZhXUH.js"),[],import.meta.url),notification:()=>I(()=>import("./icons/notification-line-olNPLtgS.js"),[],import.meta.url),follow:()=>I(()=>import("./icons/user-follow-line-k_GCWTtp.js"),[],import.meta.url),"follow-add":()=>I(()=>import("./icons/user-add-line-zzW9OULB.js"),[],import.meta.url),poll:[()=>I(()=>import("./icons/chart-bar-line-5r_DfN2w.js"),[],import.meta.url),"90deg"],pencil:()=>I(()=>import("./icons/pencil-line-bKXqElLR.js"),[],import.meta.url),quill:()=>I(()=>import("./icons/quill-pen-line-h_5-FsGz.js"),[],import.meta.url),at:()=>I(()=>import("./icons/at-line-9vJS_Hnl.js"),[],import.meta.url),attachment:()=>I(()=>import("./icons/attachment-line-C2PUa1Ke.js"),[],import.meta.url),upload:()=>I(()=>import("./icons/upload-3-line-Qsjvubiw.js"),[],import.meta.url),gear:()=>I(()=>import("./icons/settings-3-line-kt4MSpRv.js"),[],import.meta.url),more:()=>I(()=>import("./icons/more-3-line-wUD-Yhmj.js"),[],import.meta.url),more2:()=>I(()=>import("./icons/more-1-fill-je1-slyh.js"),[],import.meta.url),external:()=>I(()=>import("./icons/external-link-line-8nOOkmFu.js"),[],import.meta.url),popout:()=>I(()=>import("./icons/external-link-line-8nOOkmFu.js"),[],import.meta.url),popin:[()=>I(()=>import("./icons/external-link-line-8nOOkmFu.js"),[],import.meta.url),"180deg"],plus:()=>I(()=>import("./icons/add-circle-line--O-MfyNy.js"),[],import.meta.url),"chevron-left":()=>I(()=>import("./icons/left-line-Jck0yVmC.js"),[],import.meta.url),"chevron-right":()=>I(()=>import("./icons/right-line-7VBoqLdz.js"),[],import.meta.url),"chevron-down":()=>I(()=>import("./icons/down-line-9PeS5YhF.js"),[],import.meta.url),reply:[()=>I(()=>import("./icons/share-forward-line-4jL-2Q4u.js"),[],import.meta.url),"180deg","horizontal"],thread:()=>I(()=>import("./icons/route-line-2YYy3958.js"),[],import.meta.url),group:()=>I(()=>import("./icons/group-line-JvhJklhQ.js"),[],import.meta.url),bot:()=>I(()=>import("./icons/android-2-line-uPwvVubH.js"),[],import.meta.url),menu:()=>I(()=>import("./icons/rows-4-line-SxGPYpTa.js"),[],import.meta.url),list:()=>I(()=>import("./icons/list-check-line-qNqx9Mm4.js"),[],import.meta.url),search:()=>I(()=>import("./icons/search-2-line-G39AynEw.js"),[],import.meta.url),hashtag:()=>I(()=>import("./icons/hashtag-line-SS3QMu1R.js"),[],import.meta.url),info:()=>I(()=>import("./icons/information-line-8SOch6cR.js"),[],import.meta.url),shortcut:()=>I(()=>import("./icons/lightning-line-JMYUlCZM.js"),[],import.meta.url),user:()=>I(()=>import("./icons/user-4-line-zT_bpOrS.js"),[],import.meta.url),following:()=>I(()=>import("./icons/walk-line-CF7a5s4t.js"),[],import.meta.url),pin:()=>I(()=>import("./icons/pin-line-ULyRQyWZ.js"),[],import.meta.url),unpin:[()=>I(()=>import("./icons/pin-line-ULyRQyWZ.js"),[],import.meta.url),"180deg"],bus:()=>I(()=>import("./icons/bus-2-line-XuQdDZ_w.js"),[],import.meta.url),link:()=>I(()=>import("./icons/link-2-line-BUqp1EwN.js"),[],import.meta.url),history:()=>I(()=>import("./icons/history-line-yoG7K8wL.js"),[],import.meta.url),share:()=>I(()=>import("./icons/share-2-line-PYo-zN94.js"),[],import.meta.url),sparkles:()=>I(()=>import("./icons/sparkles-line-wjZWGZ1a.js"),[],import.meta.url),sparkles2:()=>I(()=>import("./icons/sparkles-2-line-g2FqdZ0R.js"),[],import.meta.url),exit:()=>I(()=>import("./icons/exit-line-l-1uUgI7.js"),[],import.meta.url),translate:()=>I(()=>import("./icons/translate-line-HpDtlqS2.js"),[],import.meta.url),play:()=>I(()=>import("./icons/play-fill-Ey-zv2eL.js"),[],import.meta.url),trash:()=>I(()=>import("./icons/delete-2-line-pjUduCFs.js"),[],import.meta.url),mute:()=>I(()=>import("./icons/volume-mute-line-WthBoXru.js"),[],import.meta.url),unmute:()=>I(()=>import("./icons/volume-line-PZujbN8h.js"),[],import.meta.url),block:()=>I(()=>import("./icons/forbid-circle-line-3FxopGoP.js"),[],import.meta.url),unblock:[()=>I(()=>import("./icons/forbid-circle-line-3FxopGoP.js"),[],import.meta.url),"180deg"],flag:()=>I(()=>import("./icons/flag-1-line-xvcg7G7Q.js"),[],import.meta.url),time:()=>I(()=>import("./icons/time-line-ThP0kTRr.js"),[],import.meta.url),refresh:()=>I(()=>import("./icons/refresh-2-line-t42qqclb.js"),[],import.meta.url),emoji2:()=>I(()=>import("./icons/emoji-2-line--uNVc2IC.js"),[],import.meta.url),filter:()=>I(()=>import("./icons/filter-2-line-KyjbFYlO.js"),[],import.meta.url),filters:()=>I(()=>import("./icons/filter-line-1KEfnWDm.js"),[],import.meta.url),chart:()=>I(()=>import("./icons/chart-line-line-pHaLt6yC.js"),[],import.meta.url),react:()=>I(()=>import("./icons/react-line-YfZPqZem.js"),[],import.meta.url),layout4:()=>I(()=>import("./icons/layout-4-line-FOdnyEcZ.js"),[],import.meta.url),layout5:()=>I(()=>import("./icons/layout-5-line-9Kks7dle.js"),[],import.meta.url),announce:()=>I(()=>import("./icons/announcement-line-MSlAmDH1.js"),[],import.meta.url),alert:()=>I(()=>import("./icons/alert-line-zyc6hy8V.js"),[],import.meta.url),round:()=>I(()=>import("./icons/round-fill-a0rplSmV.js"),[],import.meta.url),"arrow-up-circle":()=>I(()=>import("./icons/arrow-up-circle-line-e3kZqEZN.js"),[],import.meta.url),"arrow-down-circle":()=>I(()=>import("./icons/arrow-down-circle-line-mpqFtRtO.js"),[],import.meta.url),clipboard:()=>I(()=>import("./icons/clipboard-line-9F_Yeo71.js"),[],import.meta.url),"account-edit":()=>I(()=>import("./icons/user-edit-line-9VnWCh0X.js"),[],import.meta.url),"account-warning":()=>I(()=>import("./icons/user-warning-line-gL3RGb1N.js"),[],import.meta.url),keyboard:()=>I(()=>import("./icons/keyboard-line-10AZQcVH.js"),[],import.meta.url),cloud:()=>I(()=>import("./icons/cloud-line-abe0HgFS.js"),[],import.meta.url),month:()=>I(()=>import("./icons/calendar-month-line-VoXZVWAe.js"),[],import.meta.url),media:()=>I(()=>import("./icons/photo-album-line--GdJqjfq.js"),[],import.meta.url),speak:()=>I(()=>import("./icons/radar-line-ndI8IhOG.js"),[],import.meta.url),building:()=>I(()=>import("./icons/building-5-line-ew7lu83B.js"),[],import.meta.url),history2:()=>I(()=>import("./icons/history-2-line-3yIVzoWo.js"),[],import.meta.url),document:()=>I(()=>import("./icons/document-line--D6ooZg1.js"),[],import.meta.url),"arrows-right":()=>I(()=>import("./icons/arrows-right-line-HF4HILdT.js"),[],import.meta.url),code:()=>I(()=>import("./icons/code-line-h4RWLaak.js"),[],import.meta.url),copy:()=>I(()=>import("./icons/copy-2-line-mPSDKieb.js"),[],import.meta.url),quote:()=>I(()=>import("./icons/quote-left-line-NQzeELMO.js"),[],import.meta.url),settings:()=>I(()=>import("./icons/settings-6-line-ZgCBilgF.js"),[],import.meta.url),"heart-break":()=>I(()=>import("./icons/heart-crack-line-P3DoKfTT.js"),[],import.meta.url),"user-x":()=>I(()=>import("./icons/user-x-line-zIdph-gu.js"),[],import.meta.url),minimize:()=>I(()=>import("./icons/arrows-down-line-ovOF9r0o.js"),[],import.meta.url)},Ua={s:12,m:16,l:20,xl:24,xxl:32},Yo={},Wa=ua(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(Wi).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=Ua[t];let l=Wi[e];if(!l)return null;let c,u;Array.isArray(l)&&([l,c,u]=l);const[f,d]=ee(Yo[e]),p=j(e);return se(()=>{f&&p.current===e||((async()=>{const m=await l();d(m.default),Yo[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(Wa,{icon:e,width:f.width,height:f.height,body:f.body,rotate:c,flip:u})})}function Ka(e,t=[]){!e||typeof e!="function"||se(()=>{const n=new CloseWatcher;return n.addEventListener("close",e),()=>{n.destroy()}},t)}const Za=window.CloseWatcher?Ka:()=>{},Ya=document.getElementById("modal-container");function Gr({children:e,onClose:t,onClick:n,class:r,minimized:o}){if(!e)return null;const i=j();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=jt("esc",()=>{setTimeout(()=>{t==null||t()},0)},{enabled:!a&&!!t,keydown:!1,keyup:!0},[t]);Za(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 vo={exports:{}},qa="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Ga=qa;var Xa=Ga;function Ki(){}function Zi(){}Zi.resetWarningCache=Ki;var Ja=function(){function e(r,o,i,a,l,c){if(c!==Xa){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:Zi,resetWarningCache:Ki};return n.PropTypes=n,n};var ff=vo.exports;if(0)var hf,pf;else vo.exports=Ja();var G=vo.exports;const yo=e=>!!e&&e[0]==="o",Xr=da||(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,Qa="_szhsinMenu",ec=e=>e[Qa];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),tc=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]}},Ir=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 qo(e,t){for(let n=0;n({[e?`${e}ClassName`:"className"]:G.oneOfType([G.string,G.func])}),rc={className:G.string,...nc("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"])},mf={...rc,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},gf={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]),oc="szh-menu-container",Ge="szh-menu";const ic="arrow",_o="item",sc="divider",ac="header",cc="group",lc="submenu";const Yi=ct(),bo=ct({}),rr=ct({}),wo=ct({}),uc=ct({}),gr=ct({}),Re=Object.freeze({ENTER:"Enter",ESC:"Escape",SPACE:" ",HOME:"Home",END:"End",LEFT:"ArrowLeft",RIGHT:"ArrowRight",UP:"ArrowUp",DOWN:"ArrowDown"}),Se=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"}),dc=Object.freeze({entering:"opening",entered:"open",exiting:"closing",exited:"closed"}),$r="absolute",To="presentation",vr="menuitem",Go={"aria-hidden":!0,role:vr};const fc=({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 Re.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:oc,modifiers:he(()=>({theme:i,itemTransition:c}),[i,c]),className:e}),style:{position:"absolute",...n==null?void 0:n.style},ref:t,children:r})},hc=()=>{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)}}},pc=(e,t)=>{const[n,r]=ee(),i=j({items:[],hoverIndex:-1,sorted:!1}).current,a=Ie((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=Ie((c,u,f)=>{const{items:d,hoverIndex:p}=i,m=()=>{if(i.sorted)return;const v=e.current.querySelectorAll(".szh-menu__item");d.sort((T,_)=>qo(v,T)-qo(v,_)),i.sorted=!0};let h=-1,g;switch(c){case Se.RESET:break;case Se.SET:g=u;break;case Se.UNSET:g=v=>v===u?void 0:v;break;case Se.FIRST:m(),h=0,g=d[h];break;case Se.LAST:m(),h=d.length-1,g=d[h];break;case Se.SET_INDEX:m(),h=f,g=d[h];break;case Se.INCREASE:m(),h=p,h<0&&(h=d.indexOf(u)),h++,h>=d.length&&(h=0),g=d[h];break;case Se.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}},mc=(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=tc(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}}},gc=({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},vc=({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,T,_;return h==="left"?(v=o,m!=="initial"&&(T=a(v),T<0&&(_=l(i),(_<=0||-T>_)&&(v=i,h="right")))):(v=i,m!=="initial"&&(_=l(v),_>0&&(T=a(o),(T>=0||-T<_)&&(v=o,h="left")))),m==="auto"&&(v=c(v)),{arrowY:d?gc({menuY:g,arrowRef:f,anchorRect:e,containerRect:t,menuRect:n}):void 0,x:v,y:g,computedDirection:h}},yc=({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},_c=({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,T,_;return h==="top"?(v=o,m!=="initial"&&(T=a(v),T<0&&(_=l(i),(_<=0||-T>_)&&(v=i,h="bottom")))):(v=i,m!=="initial"&&(_=l(v),_>0&&(T=a(o),(T>=0||-T<_)&&(v=o,h="top")))),m==="auto"&&(v=u(v)),{arrowX:d?yc({menuX:g,arrowRef:f,anchorRect:e,containerRect:t,menuRect:n}):void 0,x:g,y:v,computedDirection:h}},bc=({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,T=a.bottom-f.top+m;let _,E;t==="end"?(_=a.right-f.left-u.width,E=a.bottom-f.top-u.height):t==="center"?(_=a.left-f.left-(u.width-a.width)/2,E=a.top-f.top-(u.height-a.height)/2):(_=a.left-f.left,E=a.top-f.top),_+=p,E+=m;const w={...c,anchorRect:a,placeLeftX:h,placeRightX:g,placeLeftorRightY:E,placeTopY:v,placeBottomY:T,placeToporBottomX:_,arrowRef:l,arrow:e,direction:n,position:i};switch(n){case"left":case"right":return vc(w);case"top":case"bottom":default:return _c(w)}},Wt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?_n:se;function Xo(e,t){typeof e=="function"?e(t):e.current=t}const Xt=(e,t)=>he(()=>e?t?n=>{Xo(e,n),Xo(t,n)}:e:t,[e,t]),Jo=-9999,qi=({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:T,captureFocus:_=!0,state:E,endTransition:w,isDisabled:b,menuItemFocus:S,gap:A=0,shift:O=0,children:P,onClose:x,...M})=>{const[V,B]=ee({x:Jo,y:Jo}),[D,$]=ee({}),[k,R]=ee(),[L,z]=ee(m),[N]=ee(hc),[C,K]=Pi(re=>re+1,1),{transition:Z,boundingBoxRef:te,boundingBoxPadding:le,rootMenuRef:Ee,rootAnchorRef:pe,scrollNodesRef:_e,reposition:be,viewScroll:ie,submenuCloseDelay:ue}=Ne(gr),{submenuCtx:q,reposSubmenu:ne=T}=Ne(rr),xe=j(null),ft=j(),Y=j(),ve=j(!1),Q=j({width:0,height:0}),ae=j(()=>{}),{hoverItem:ge,dispatch:de,updateItems:oe}=pc(xe,ft),we=yo(E),bt=bn(Z,"open"),Ve=bn(Z,"close"),me=_e.current,Ae=re=>{switch(re.key){case Re.HOME:de(Se.FIRST);break;case Re.END:de(Se.LAST);break;case Re.UP:de(Se.DECREASE,ge);break;case Re.DOWN:de(Se.INCREASE,ge);break;case Re.SPACE:re.target&&re.target.className.indexOf(Ge)!==-1&&re.preventDefault();return;default:return}re.preventDefault(),re.stopPropagation()},$e=()=>{E==="closing"&&R(),He(w)},Le=re=>{re.stopPropagation(),N.on(ue,()=>{de(Se.RESET),ft.current.focus()})},Pt=re=>{re.target===re.currentTarget&&N.off()},Ke=Ie(re=>{var Me;const je=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(!je)return;me.menu||(me.menu=(te?te.current:Ir(Ee.current))||window);const Fe=mc(l,xe,me.menu,le);let{arrowX:ye,arrowY:tt,x:Pe,y:ze,computedDirection:Qt}=bc({arrow:r,align:p,direction:m,gap:A,shift:O,position:h,anchorRect:je,arrowRef:Y,positionHelpers:Fe});const{menuRect:In}=Fe;let fe=In.height;if(!re&&g!=="visible"){const{getTopOverflow:en,getBottomOverflow:_r}=Fe;let nt,tn;const Ot=Q.current.height,Et=_r(ze);if(Et>0||Nt(Et,0)&&Nt(fe,Ot))nt=fe-Et,tn=Et;else{const pt=en(ze);(pt<0||Nt(pt,0)&&Nt(fe,Ot))&&(nt=fe+pt,tn=0-pt,nt>=0&&(ze-=pt))}nt>=0?(fe=nt,R({height:nt,overflowAmt:tn})):R()}r&&$({x:ye,y:tt}),B({x:Pe,y:ze}),z(Qt),Q.current={width:In.width,height:fe}},[r,p,le,m,A,O,h,g,i,a,l,te,Ee,me]);Wt(()=>{we&&(Ke(),ve.current&&K()),ve.current=we,ae.current=Ke},[we,Ke,ne]),Wt(()=>{k&&!v&&(xe.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=Ir(pe&&pe.current);for(;ye&&ye!==re;)me.anchors.push(ye),ye=Ir(ye)}let Me=ie;if(me.anchors.length&&Me==="initial"&&(Me="auto"),Me==="initial")return;const je=()=>{Me==="auto"?Xr(()=>Ke(!0)):He(x,{reason:wn.SCROLL})},Fe=me.anchors.concat(ie!=="initial"?re:[]);return Fe.forEach(ye=>ye.addEventListener("scroll",je)),()=>Fe.forEach(ye=>ye.removeEventListener("scroll",je))},[pe,me,we,x,ie,Ke]);const An=!!k&&k.overflowAmt>0;se(()=>{if(An||!we||!d)return;const re=()=>Xr(Ke),Me=d.current;return Me.addEventListener("scroll",re),()=>Me.removeEventListener("scroll",re)},[we,An,d,Ke]),se(()=>{if(typeof ResizeObserver!="function"||be==="initial")return;const re=new ResizeObserver(([je])=>{const{borderBoxSize:Fe,target:ye}=je;let tt,Pe;if(Fe){const{inlineSize:ze,blockSize:Qt}=Fe[0]||Fe;tt=ze,Pe=Qt}else{const ze=ye.getBoundingClientRect();tt=ze.width,Pe=ze.height}tt===0||Pe===0||Nt(tt,Q.current.width,1)&&Nt(Pe,Q.current.height,1)||fa(()=>{ae.current(),K()})}),Me=xe.current;return re.observe(Me,{box:"border-box"}),()=>re.unobserve(Me)},[be]),se(()=>{if(!we){de(Se.RESET),Ve||R();return}const{position:re,alwaysUpdate:Me}=S||{},je=()=>{re===Ut.FIRST?de(Se.FIRST):re===Ut.LAST?de(Se.LAST):re>=-1&&de(Se.SET_INDEX,void 0,re)};if(Me)je();else if(_){const Fe=setTimeout(()=>{const ye=xe.current;ye&&!ye.contains(document.activeElement)&&(ft.current.focus(),je())},bt?170:100);return()=>clearTimeout(Fe)}},[we,bt,Ve,_,S,de]);const Te=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:C,submenuCtx:N,overflow:g,overflowAmt:Je,parentMenuRef:xe,parentDir:L}),[C,N,g,Je,L]),yr=wt>=0?{maxHeight:wt,overflow:g}:void 0,ht=he(()=>({state:E,dir:L}),[E,L]),Tt=he(()=>({dir:L}),[L]),et=Xe({block:Ge,element:ic,modifiers:Tt,className:o.className}),Jt=s("ul",{role:"menu","aria-label":e,...mr(b),...Gt({onPointerEnter:q==null?void 0:q.off,onPointerMove:Le,onPointerLeave:Pt,onKeyDown:Ae,onAnimationEnd:$e},M),ref:Xt(f,xe),className:Xe({block:Ge,modifiers:ht,className:t}),style:{...n,...yr,margin:0,display:E==="closed"?"none":void 0,position:$r,left:V.x,top:V.y},children:[s("li",{tabIndex:-1,style:{position:$r,left:0,top:0,display:"block",outline:"none"},ref:ft,...Go,...u}),r&&s("li",{...Go,...o,className:et,style:{display:"block",position:$r,left:D.x,top:D.y,...o.style},ref:Y}),s(rr.Provider,{value:Qe,children:s(bo.Provider,{value:Te,children:s(Yi.Provider,{value:ge,children:He(P,ht)})})})]});return c?s(fc,{...c,isOpen:we,children:Jt}):Jt},Gi=Lt(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,...T},_){const E=j(null),w=j({}),{anchorRef:b,state:S,onClose:A}=T,O=he(()=>({initialMounted:o,unmountOnClose:i,transition:a,transitionTimeout:l,boundingBoxRef:c,boundingBoxPadding:u,rootMenuRef:E,rootAnchorRef:b,scrollNodesRef:w,reposition:f,viewScroll:m,submenuOpenDelay:d,submenuCloseDelay:p}),[o,i,a,l,b,c,u,f,m,d,p]),P=he(()=>({handleClick(M,V){M.stopPropagation||He(v,M);let B=M.keepOpen;B===void 0&&(B=V&&M.key===Re.SPACE),B||He(A,{value:M.value,key:M.key,reason:wn.CLICK})},handleClose(M){He(A,{key:M,reason:wn.CLICK})}}),[v,A]);if(!S)return null;const x=s(gr.Provider,{value:O,children:s(wo.Provider,{value:P,children:s(qi,{...T,ariaLabel:t||"Menu",externalRef:_,containerRef:E,containerProps:{className:n,containerRef:E,containerProps:r,theming:g,transition:a,onClose:A}})})});return h===!0&&typeof document<"u"?tr(x,document.body):h?h.target?tr(x,h.target):h.stablePosition?null:x:x}),Jr=0,Qr=1,or=2,ir=3,sr=4,wc=5,Xi=6,Tc=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],Ji=e=>({_s:e,status:Tc[e],isEnter:esr}),eo=e=>e?Xi:wc,Ec=(e,t)=>{switch(e){case Qr:case Jr:return or;case sr:case ir:return eo(t)}},xc=e=>typeof e=="object"?[e.enter,e.exit]:[e,e],Qo=(e,t,n,r,o)=>{clearTimeout(r.current);const i=Ji(e);t(i),n.current=i,o&&o({current:i})},Sc=({enter:e=!0,exit:t=!0,preEnter:n,preExit:r,timeout:o,initialEntered:i,mountOnEnter:a,unmountOnExit:l,onStateChange:c}={})=>{const[u,f]=ee(()=>Ji(i?or:eo(a))),d=j(u),p=j(),[m,h]=xc(o),g=Ie(()=>{const T=Ec(d.current._s,l);T&&Qo(T,f,d,p,c)},[c,l]),v=Ie(T=>{const _=w=>{switch(Qo(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}},E=d.current.isEnter;typeof T!="boolean"&&(T=!E),T?!E&&_(e?n?Jr:Qr:or):E&&_(t?r?ir:sr:eo(l))},[g,c,e,t,n,r,m,h,l]);return se(()=>()=>clearTimeout(p.current),[]),[u,v,g]};const Mc=({initialOpen:e,initialMounted:t,unmountOnClose:n,transition:r,transitionTimeout:o=500}={})=>{const[{status:i},a,l]=Sc({initialEntered:e,mountOnEnter:!t,unmountOnExit:n,timeout:o,enter:bn(r,"open"),exit:bn(r,"close")});return[{state:dc[i],endTransition:l},a]},Qi=e=>{const[t,n]=Mc(e),[r,o]=ee(),i=(a,l)=>{o({position:a,alwaysUpdate:l}),n(!0)};return[{menuItemFocus:r,...t},n,i]},kc=(e,t)=>{const[n]=ee({});return{onMouseDown:()=>{n.v=e&&e!=="closed"},onClick:r=>n.v?n.v=!1:t(!0,r)}},es=(e,t)=>{const n=j(t);se(()=>{n.current!==t&&He(e,{open:t}),n.current=t},[e,t])},Ac=Lt(function({"aria-label":t,captureFocus:n,initialOpen:r,menuButton:o,instanceRef:i,onMenuChange:a,...l},c){const[u,f,d]=Qi(l),{state:p}=u,m=yo(p),h=j(null),g=kc(p,(b,S)=>d(S.detail?void 0:Ut.FIRST)),v=Ie(b=>{f(!1),b.key&&h.current.focus()},[f]),T=b=>{switch(b.key){case Re.UP:d(Ut.LAST);break;case Re.DOWN:d(Ut.FIRST);break;default:return}b.preventDefault()},_=He(o,{open:m});if(!_||!_.type)throw new Error("Menu requires a menuButton prop.");const E={ref:Xt(_.ref,h),...Gt({onKeyDown:T,...g},_.props)};ec(_.type)==="MenuButton"&&(E.isOpen=m);const w=Oi(_,E);return es(a,m),Di(i,()=>({openMenu:d,closeMenu:()=>f(!1)})),s(U,{children:[w,s(Gi,{...l,...u,"aria-label":t||(typeof _.props.children=="string"?_.props.children:"Menu"),anchorRef:h,ref:c,onClose:v})]})}),Eo=(e,t)=>{const n=lt(t),r=Lt((o,i)=>{const a=j(null);return s(n,{...o,itemRef:a,externalRef:i,isHovering:Ne(Yi)===a.current})});return r.displayName=`WithHovering(${e})`,r},ts=(e,t,n)=>{Wt(()=>{if(e)return;const r=t.current;return n(r,!0),()=>{n(r)}},[e,t,n])},Ic=Eo("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:T,submenuCloseDelay:_}=g,{parentMenuRef:E,parentDir:w,overflow:b}=Ne(rr),{isParentOpen:S,submenuCtx:A,dispatch:O,updateItems:P}=Ne(bo),x=b!=="visible",[M,V,B]=Qi(g),{state:D}=M,$=!!r,k=yo(D),R=j(null),[L]=ee({v:0}),z=()=>{A.off(),L.v&&(clearTimeout(L.v),L.v=0)},N=(...ne)=>{z(),C(),!$&&B(...ne)},C=()=>!c&&!$&&O(Se.SET,f.current),K=ne=>{C(),a||(L.v=setTimeout(()=>Xr(N),Math.max(ne,0)))},Z=ne=>{$||(ne.stopPropagation(),!(L.v||k)&&A.on(_,()=>K(T-_),()=>K(T)))},te=()=>{z(),k||O(Se.UNSET,f.current)},le=ne=>{if(c)switch(ne.key){case Re.ENTER:ne.preventDefault();case Re.SPACE:case Re.RIGHT:a!=="none"&&N(Ut.FIRST)}},Ee=ne=>{let xe=!1;switch(ne.key){case Re.LEFT:k&&(f.current.focus(),V(!1),xe=!0);break;case Re.RIGHT:k||(xe=!0);break}xe&&(ne.preventDefault(),ne.stopPropagation())};ts($,f,P),es(l,k),se(()=>A.toggle(k),[A,k]),se(()=>()=>clearTimeout(L.v),[L]),se(()=>{c&&S?f.current.focus():V(!1)},[c,S,V,f]),Di(u,()=>({openMenu:(...ne)=>{S&&N(...ne)},closeMenu:()=>{k&&(f.current.focus(),V(!1))}}));const pe=he(()=>({open:k,hover:c,disabled:$,submenu:!0}),[k,c,$]),{ref:_e,className:be,...ie}=m,ue=Gt({onPointerEnter:A.off,onPointerMove:Z,onPointerLeave:te,onKeyDown:le,onClick:()=>a!=="none"&&N()},ie),q=()=>{const ne=s(qi,{...h,...M,ariaLabel:t||(typeof i=="string"?i:"Submenu"),anchorRef:f,containerRef:x?v:R,direction:o||(w==="right"||w==="left"?w:"right"),parentScrollingRef:x&&E,isDisabled:$}),xe=v.current;return x&&xe?tr(ne,xe):ne};return s("li",{className:Xe({block:Ge,element:lc,className:n}),style:{position:"relative"},role:To,ref:R,onKeyDown:Ee,children:[s("div",{role:vr,"aria-haspopup":!0,"aria-expanded":k,...mr($,c),...ue,ref:Xt(_e,f),className:Xe({block:Ge,element:_o,modifiers:pe,className:be}),children:he(()=>He(i,pe),[i,pe])}),D&&q()]})}),ns=(e,t,n,r)=>{const{submenuCloseDelay:o}=Ne(gr),{isParentOpen:i,submenuCtx:a,dispatch:l,updateItems:c}=Ne(bo),u=()=>{!n&&!r&&l(Se.SET,e.current)},f=()=>{!r&&l(Se.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 ts(r,e,c),se(()=>{n&&i&&t.current&&t.current.focus()},[t,n,i]),{setHover:u,onBlur:d,onPointerMove:p,onPointerLeave:m}},ke=Eo("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}=ns(f,f,u,m),v=Ne(wo),T=Ne(uc),_=o==="radio",E=o==="checkbox",w=!!r&&!m&&!_&&!E,b=_?T.value===n:E?!!i:!1,S=M=>{if(m){M.stopPropagation(),M.preventDefault();return}const V={value:n,syntheticEvent:M};M.key!==void 0&&(V.key=M.key),E&&(V.checked=!b),_&&(V.name=T.name),He(c,V),_&&He(T.onRadioChange,V),v.handleClick(V,E||_)},A=M=>{if(u)switch(M.key){case Re.ENTER:M.preventDefault();case Re.SPACE:w?f.current.click():S(M)}},O=he(()=>({type:o,disabled:m,hover:u,checked:b,anchor:w}),[o,m,u,b,w]),P=Gt({...g,onPointerDown:h,onKeyDown:A,onClick:S},p),x={role:_?"menuitemradio":E?"menuitemcheckbox":vr,"aria-checked":_||E?b:void 0,...mr(m,u),...P,ref:Xt(d,f),className:Xe({block:Ge,element:_o,modifiers:O,className:t}),children:he(()=>He(l,O),[l,O])};return w?s("li",{role:To,children:s("a",{href:r,...x})}):s("li",{...x})}),$c=Eo("FocusableItem",function({className:t,disabled:n,children:r,isHovering:o,itemRef:i,externalRef:a,...l}){const c=!!n,u=j(null),{setHover:f,onPointerLeave:d,...p}=ns(i,u,o,c),{handleClose:m}=Ne(wo),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:T=>d(T,!0),onFocus:f},l);return s("li",{role:vr,...mr(c),...v,ref:Xt(a,i),className:Xe({block:Ge,element:_o,modifiers:h,className:t}),children:g})}),an=lt(Lt(function({className:t,...n},r){return s("li",{role:"separator",...n,ref:r,className:Xe({block:Ge,element:sc,className:t})})})),vf=lt(Lt(function({className:t,...n},r){return s("li",{role:To,...n,ref:r,className:Xe({block:Ge,element:ac,className:t})})})),yf=Lt(function({className:t,style:n,takeOverflow:r,...o},i){const a=j(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:cc,className:t}),style:{...n,...l}})});const ei={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 Lc({url:e,size:t,alt:n="",squircle:r,...o}){t=ei[t]||t||ei.m;const i=j(),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=ut(Lc),Zt=Lt((e,t)=>{var l;let n;try{n=ha()}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)}})}),Cc=document.documentElement,Vn=getComputedStyle(Cc),Pc=8;let rs=[0,0,0,0];function os(){const e=Vn.getPropertyValue("--sai-top"),t=Vn.getPropertyValue("--sai-right"),n=Vn.getPropertyValue("--sai-bottom"),r=Vn.getPropertyValue("--sai-left");rs=[Math.max(0,parseInt(e,10)),Math.max(0,parseInt(t,10)),Math.max(0,parseInt(n,10)),Math.max(0,parseInt(r,10))]}requestAnimationFrame(os);function is(e=[]){return rs.map((n,r)=>(n||Pc)+(e[r]||0)).join(" ")}CSS.supports("top: env(safe-area-inset-top)")&&window.addEventListener("resize",os,{passive:!0});function Oc(){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,{passive:!0}),()=>{window.removeEventListener("resize",n)}},[]),e}function ss(e){const{containerProps:t,instanceRef:n}=e,r=Oc(),o=n!=null&&n.current?n:j();return s(Ac,{boundingBoxPadding:is(),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 Dc(e){const t=j();return s(Ic,{...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 Lr({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?Dc:ss,{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?pa(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 Rc({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 Yt=lt(Rc,(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)}),Nc=new Intl.Collator("en",{sensitivity:"base"});function Fc({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,T,_]=l.match(/([^@]+)(@.+)/i)||[,l];t||(t=nr().instance);const E=g.toLowerCase().trim(),w=(p||"").toLowerCase().trim(),b=w.replace(/(\:(\w|\+|\-)+\:)(?=|[\!\.\?]|$)/g,"").replace(/\s+/g,""),S=b.replace(/[^a-z0-9@\.]/gi,""),A=!o&&(E===w||E===b||E===S||Nc.compare(E,b)===0)||S===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 P=`#/${t}/a/${f}`;window.open(P,"_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(Yt,{text:p,emojis:m})}),!r&&!A&&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:[_?"":"@",T,!!_&&s("span",{class:"ib",children:_})]})]})]})}const fn=lt(Fc,(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:{}},_f=ar.exports;(function(e,t){(function(n,r){e.exports=r()})(Sn,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+)?$/,T=/\[([^\]]+)]|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(D){var $=["th","st","nd","rd"],k=D%100;return"["+D+($[(k-20)%10]||$[k]||$[0])+"]"}},E=function(D,$,k){var R=String(D);return!R||R.length>=$?D:""+Array($+1-R.length).join(k)+D},w={s:E,z:function(D){var $=-D.utcOffset(),k=Math.abs($),R=Math.floor(k/60),L=k%60;return($<=0?"+":"-")+E(R,2,"0")+":"+E(L,2,"0")},m:function D($,k){if($.date()1)return D(N[0])}else{var C=$.name;S[C]=$,L=C}return!R&&L&&(b=L),L||!R&&b},x=function(D,$){if(O(D))return D.clone();var k=typeof $=="object"?$:{};return k.date=D,k.args=arguments,new V(k)},M=w;M.l=P,M.i=O,M.w=function(D,$){return x(D,{locale:$.$L,utc:$.$u,x:$.$x,$offset:$.$offset})};var V=function(){function D(k){this.$L=P(k.locale,null,!0),this.parse(k),this.$x=this.$x||k.x||{},this[A]=!0}var $=D.prototype;return $.parse=function(k){this.$d=function(R){var L=R.date,z=R.utc;if(L===null)return new Date(NaN);if(M.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var N=L.match(v);if(N){var C=N[2]-1||0,K=(N[7]||"0").substring(0,3);return z?new Date(Date.UTC(N[1],C,N[3]||1,N[4]||0,N[5]||0,N[6]||0,K)):new Date(N[1],C,N[3]||1,N[4]||0,N[5]||0,N[6]||0,K)}}return new Date(L)}(k),this.init()},$.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()},$.$utils=function(){return M},$.isValid=function(){return this.$d.toString()!==g},$.isSame=function(k,R){var L=x(k);return this.startOf(R)<=L&&L<=this.endOf(R)},$.isAfter=function(k,R){return x(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 T=l[m][g];return d.format(T)}return l[m][g].replace("%d",v)}(this)}}}])})})(cr,cr.exports);var Hc=cr.exports;const Vc=$t(Hc);var lr={exports:{}},wf=lr.exports;(function(e,t){(function(n,r){e.exports=r()})(Sn,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(T,_,E){return _||E.slice(1)})})}(c,u===void 0?{}:u);return l.call(this,f)}}})})(lr,lr.exports);var jc=lr.exports;const Bc=$t(jc);var ur={exports:{}},Tf=ur.exports;(function(e,t){(function(n,r){e.exports=r()})(Sn,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,T=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"}],E=_.length,w=0;w0,S<=b.r||!b.r){S<=1&&w>0&&(b=_[w-1]);var A=T[b.l];m&&(S=m(""+S)),g=typeof A=="string"?A.replace("%d",S):A(S,f,b.l,v);break}}if(f)return g;var O=v?T.future:T.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 Uc=ur.exports;const Wc=$t(Uc);At.extend(Vc);At.extend(Bc);At.extend(Wc);const Kc=new Intl.DateTimeFormat;function It({datetime:e,format:t}){if(!e)return null;const[n,r]=Pi(c=>c+1,0),o=he(()=>At(e),[e]),[i,a,l]=he(()=>{if(!o.isValid())return[""+e,"",""];let c;if(t==="micro"){const u=At();u.diff(o,"day")<=1||u.year()===o.year()?c=o.twitter():c=Kc.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(At(),"minute",!0)<1?c=setTimeout(f,1e4):o.diff(At(),"hour",!0)<1&&(c=setTimeout(f,6e4))}return d(),()=>{clearTimeout(c),cancelAnimationFrame(u)}},[]),s("time",{datetime:a,title:l,children:i})}const Zc=[{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 xa(...e)}catch{return e[2]||!1}}const no=ut(Yc),qc=[new Intl.DateTimeFormat().resolvedOptions().locale,...navigator.languages],Gc=no(qc,Zc.map(e=>e.code.replace("_","-")),"en");function as(e=!1){if(e){const{contentTranslationTargetLanguage:t}=W.settings;if(t)return t}return Gc}const Xc=new Intl.DisplayNames(navigator.languages,{type:"language"});function Jc(e){try{return Xc.of(e)}catch{return null}}const Cr=ut(Jc),Qc=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,dr=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(Qc);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},ti=e=>e==="*"||e==="x"||e==="X",ni=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},el=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],tl=(e,t)=>{if(ti(e)||ti(t))return 0;const[n,r]=el(ni(e),ni(t));return n>r?1:n{for(let n=0;n{const n=dr(e),r=dr(t),o=n.pop(),i=r.pop(),a=Bt(n,r);return a!==0?a:o&&i?Bt(o.split("."),i.split(".")):o||i?o?-1:1:0},rl=(e,t,n)=>{ol(n);const r=nl(e,t);return cs[n].includes(r)},cs={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},ri=Object.keys(cs),ol=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(ri.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${ri.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,T]=t.split(" - ",2);return Jn(e,`>=${v} <=${T}`)}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 rl(e,t,r);const[o,i,a,,l]=dr(e),[c,u,f,,d]=dr(t),p=[o,i,a],m=[c,u??"x",f??"x"];if(d&&(!l||Bt(p,m)!==0||Bt(l.split("."),d.split("."))===-1))return!1;const h=m.findIndex(v=>v!=="0")+1,g=r==="~"?2:h>1?h:1;return!(Bt(p.slice(0,g),m.slice(0,g))!==0||Bt(p.slice(g),m.slice(g))===-1)};const il={"@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","@mastodon/grouped-notifications":"~4.3 || >=4.3"},Pr=/pixelfed/i,ot=/^(?!.*pixelfed).*$/i,oi={"@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":Pr,"@pixelfed/home-include-reblogs":Pr,"@pixelfed/global-feed":Pr},jn={};function Bn(e){try{const{version:t,domain:n}=ma(),r=`${n}-${e}`;if(jn[r])return jn[r];if(oi[e])return jn[r]=oi[e].test(t);const o=il[e];return o?jn[r]=Jn(t,o,{includePrerelease:!0,loose:!0}):!1}catch{return!1}}const Kt=2147483647,Ze=36,xo=1,Tn=26,sl=38,al=700,ls=72,us=128,ds="-",cl=/^xn--/,ll=/[^\0-\x7F]/,ul=/[\x2E\u3002\uFF0E\uFF61]/g,dl={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Or=Ze-xo,Ye=Math.floor,Dr=String.fromCharCode;function mt(e){throw new RangeError(dl[e])}function fl(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function fs(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(ul,".");const o=e.split("."),i=fl(o,t).join(".");return r+i}function hs(e){const t=[];let n=0;const r=e.length;for(;n=55296&&o<=56319&&nString.fromCodePoint(...e),pl=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:Ze},ii=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},ps=function(e,t,n){let r=0;for(e=n?Ye(e/al):e>>1,e+=Ye(e/t);e>Or*Tn>>1;r+=Ze)e=Ye(e/Or);return Ye(r+(Or+1)*e/(e+sl))},ms=function(e){const t=[],n=e.length;let r=0,o=us,i=ls,a=e.lastIndexOf(ds);a<0&&(a=0);for(let l=0;l=128&&mt("not-basic"),t.push(e.charCodeAt(l));for(let l=a>0?a+1:0;l=n&&mt("invalid-input");const p=pl(e.charCodeAt(l++));p>=Ze&&mt("invalid-input"),p>Ye((Kt-r)/f)&&mt("overflow"),r+=p*f;const m=d<=i?xo:d>=i+Tn?Tn:d-i;if(pYe(Kt/h)&&mt("overflow"),f*=h}const u=t.length+1;i=ps(r-c,u,c==0),Ye(r/u)>Kt-o&&mt("overflow"),o+=Ye(r/u),r%=u,t.splice(r++,0,o)}return String.fromCodePoint(...t)},gs=function(e){const t=[];e=hs(e);const n=e.length;let r=us,o=0,i=ls;for(const c of e)c<128&&t.push(Dr(c));const a=t.length;let l=a;for(a&&t.push(ds);l=r&&fYe((Kt-o)/u)&&mt("overflow"),o+=(c-r)*u,r=c;for(const f of e)if(fKt&&mt("overflow"),f===r){let d=o;for(let p=Ze;;p+=Ze){const m=p<=i?xo:p>=i+Tn?Tn:p-i;if(d{const{shortcode:r,staticUrl:o,url:i}=n;e=e.replace(new RegExp(`:${r}:`,"g"),`:${r}:`)}),e):""}const Ft=document.createElement("div"),vl=["u-url","mention","hashtag"];function yl(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=>{vl.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"),Tl(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(([T])=>T===g)||f.some(([T,_])=>T===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=Nr(i),c.forEach(u=>{let f=u.nodeValue.replace(/&/g,"&").replace(//g,">");n&&(f=fr(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(T=>{T.querySelectorAll("br").forEach(_=>_.replaceWith(` `))});const v=p.map(T=>T.innerHTML).join(` `);g.innerHTML=`${v}`,d.replaceWith(g),p.forEach(T=>T.remove())}}),o.includes("`")&&(c=Nr(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=Nr(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 ys=ut(yl),_l=["STYLE","IMG","VIDEO","AUDIO","AREA","MAP","TRACK","EMBED","IFRAME","OBJECT","PICTURE","PORTAL","SOURCE","SVG","MATH","CANVAS","NOSCRIPT","SCRIPT","INPUT","OPTION","TEXTAREA","SLOT","TEMPLATE"],bl=Object.fromEntries(_l.map(e=>[e,!0])),wl=/^(https?:\/\/(www\.)?|xmpp:)/,Rr=30;function Tl(e){var t;if(!(!e||(t=e.querySelector)!=null&&t.call(e,"*")))try{const n=e.innerText.trim(),r=(n.match(wl)||[])[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=`${o}`}catch{}}function Nr(e,t={}){var a;const n=[],r=Object.assign({},bl,(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 El(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 hr=ut(El);function xl(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:Sl}=new Intl.DateTimeFormat().resolvedOptions(),Ml=e=>{const{dateYear:t,hideTime:n,formatOpts:r}=e||{},o=new Date().getFullYear();return Intl.DateTimeFormat(Sl,{year:t===o?void 0:"numeric",month:"short",day:"numeric",hour:n?void 0:"numeric",minute:n?void 0:"numeric",...r})},kl=ut(Ml);function En(e,t){return e instanceof Date||(e=new Date(e)),kl({dateYear:e.getFullYear(),...t}).format(e)}const{locale:Al}=Intl.NumberFormat().resolvedOptions(),yt=Intl.NumberFormat(Al,{notation:"compact",roundingMode:"floor"}).format,si=5e3;function Un(e){if(e||(e=!0),W.showCompose){W.composerState.minimized?Ce({duration:si,text:"A draft post is currently minimized. Post or discard it before creating a new one."}):Ce({duration:si,text:"A post is currently open. Post or discard it before creating a new one."});return}Ba(),W.showCompose=e}function Ef({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:T,displayName:_,username:E,emojis:w,url:b,statusesCount:S,lastStatusAt:A,bot:O,fields:P,note:x,group:M,followersCount:V,createdAt:B,locked:D}=t;let[$,k,R]=g.match(/([^@]+)(@.+)/i)||[,g];f&&(R=`@${f}`);const L=P==null?void 0:P.find(C=>!!C.verifiedAt&&!!C.value),z={};for(const C in p)m.includes(C)||(z[C]=p[C]);const N=z.following||z.followedBy||z.requested;return s("a",{class:"account-block",href:b,target:i?"_blank":null,title:R?g:`@${g}`,onClick:C=>{if(!i){if(C.preventDefault(),l)return l(C);a?location.hash=`/${o}/a/${h}`:W.showAccount={account:t,instance:o}}},children:[s(st,{url:r?T:v||T,size:n,squircle:O}),s("span",{class:"account-block-content",children:[!d&&s(U,{children:_?s("b",{children:s(Yt,{text:_,emojis:w})}):s("b",{children:E})})," ",s("span",{class:"account-block-acct",children:[R?"":"@",k,s("wbr",{}),R,D&&s(U,{children:[" ",s(H,{icon:"lock",size:"s",alt:"Locked"})]})]}),c&&s("div",{class:"account-block-stats",children:["Posts: ",yt(S),!!A&&s(U,{children:[" ","· Last posted:"," ",En(A,{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:[yt(V)," ",V===1?"follower":"followers"]}),!!L&&s("span",{class:"verified-field",children:[s(H,{icon:"check-circle",size:"s"})," ",s("span",{dangerouslySetInnerHTML:{__html:ys(L.value,{emojis:w})}})]}),!O&&!M&&!N&&!V&&!L&&!!B&&s("span",{class:"created-at",children:["Joined"," ",s("time",{datetime:B,children:En(B,{hideTime:!0})})]})]})]})]})}function ai(e){const{className:t,disabled:n,...r}=e;return s($c,{className:t,disabled:n,children:({ref:o,closeMenu:i})=>s(Zt,{...r,ref:o,onClick:({detail:a})=>i(a===0?"Enter":void 0)})})}var _s={};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 Il=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=Il;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;aCl.call(e)==="[object Error]",Ol=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 Dl(e){return e&&Pl(e)&&e.name==="TypeError"&&typeof e.message=="string"?e.message==="Load failed"?e.stack===void 0:Ol.has(e.message):!1}class Rl 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 ci=(e,t,n)=>{const r=n.retries-(t-1);return e.attemptNumber=t,e.retriesLeft=r,e};async function Nl(e,t){return new Promise((n,r)=>{t={onFailedAttempt(){},retries:10,shouldRetry:()=>!0,...t};const o=Ll.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 Rl)throw c.originalError;if(c instanceof TypeError&&!Dl(c))throw c;if(ci(c,l,t),await t.shouldRetry(c)||(o.stop(),r(c)),await t.onFailedAttempt(c),!o.retry(c))throw o.mainError()}catch(u){ci(u,l,t),a(),r(u)}}})})}const Fl=[{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 zl=Object.defineProperty,Hl=(e,t,n)=>t in e?zl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Wn=(e,t,n)=>Hl(e,typeof t!="symbol"?t+"":t,n),ro=new Map,Kn=new WeakMap,li=0,Vl=void 0;function jl(e){return e?(Kn.has(e)||(li+=1,Kn.set(e,li.toString())),Kn.get(e)):"0"}function Bl(e){return Object.keys(e).sort().filter(t=>e[t]!==void 0).map(t=>`${t}_${t==="root"?jl(e.root):e[t]}`).toString()}function Ul(e){const t=Bl(e);let n=ro.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},ro.set(t,n)}return n}function bs(e,t,n={},r=Vl){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}=Ul(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(),ro.delete(o))}}function Wl(e){return typeof e.children!="function"}var xf=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(),Wl(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=bs(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 ga(t||"div",{ref:this.handleNode,...p},e)}};function Kl({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=j(),[h,g]=ee({inView:!!l,entry:void 0});m.current=u,se(()=>{if(a||!d)return;let E;return E=bs(d,(w,b)=>{g({inView:w,entry:b}),m.current&&m.current(w,b),b.isIntersecting&&i&&E&&(E(),E=void 0)},{root:o,rootMargin:r,threshold:e,trackVisibility:n,delay:t},c),()=>{E&&E()}},[Array.isArray(e)?e.toString():e,d,o,r,i,a,n,c,t]);const v=(f=h.entry)==null?void 0:f.target,T=j();!d&&v&&!i&&!a&&T.current!==v&&(T.current=v,g({inView:!!l,entry:void 0}));const _=[p,h.inView,h.entry];return _.ref=_[0],_.inView=_[1],_.entry=_[2],_}const ui=48,Fr={};function ws({id:e,children:t}){const n=j(),r=!!Fr[e],[o,i]=ee(!1),[a,l]=ee(r||!1),{ref:c}=Kl({root:null,rootMargin:`-${ui}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>ui&&(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 Ts=1e3*60*60,Es=ho(ql,{maxAge:Ts}),Gl=ho(Yl(Es),{maxAge:Ts});function Xl({forceTranslate:e,sourceLanguage:t,onTranslate:n,text:r="",mini:o,autoDetected:i}){const a=as(!0),[l,c]=ee("default"),[u,f]=ee(null),[d,p]=ee(null),[m,h]=ee(null),g=j(),v=t?Cr(t):null,T=Cr(a),_=j("auto");n||(n=o?Gl:Es);const E=async()=>{var w,b;c("loading");try{const{content:S,detectedSourceLanguage:A,provider:O,error:P,...x}=await n(r,_.current,a);if(S){if(A){const M=Cr(A);h(M)}if(O==="lingva"){const M=(b=(w=x==null?void 0:x.info)==null?void 0:w.pronunciation)==null?void 0:b.query;M&&f(M)}p(S),c("default"),!o&&S.trim()!==r.trim()&&(g.current.open=!0,g.current.scrollIntoView({behavior:"smooth",block:"nearest"}))}else c("error")}catch{c("error")}};return se(()=>{e&&E()},[e]),o?d&&d.trim()!==r.trim()&&m!==T?s(ws,{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||E())},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,E()},children:Fl.map(w=>s("option",{value:w.code,children:w.code==="auto"?`Auto (${m??"…"})`:w.name}))})," ",s("span",{children:["→ ",T]}),s(Fi,{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 Jl=vn!=null&&vn.length?Xl:()=>null;function dt(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function xs(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=dt(n);return(o,i)=>r.then(a=>i(a.transaction(t,o).objectStore(t)))}let Hr;function Ct(){return Hr||(Hr=xs("keyval-store","keyval")),Hr}function Ql(e,t=Ct()){return t("readonly",n=>dt(n.get(e)))}function eu(e,t,n=Ct()){return n("readwrite",r=>(r.put(t,e),dt(r.transaction)))}function tu(e,t=Ct()){return t("readonly",n=>Promise.all(e.map(r=>dt(n.get(r)))))}function nu(e,t=Ct()){return t("readwrite",n=>(n.delete(e),dt(n.transaction)))}function ru(e,t=Ct()){return t("readwrite",n=>(e.forEach(r=>n.delete(r)),dt(n.transaction)))}function ou(e=Ct()){return e("readwrite",t=>(t.clear(),dt(t.transaction)))}function iu(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},dt(e.transaction)}function su(e=Ct()){return e("readonly",t=>{if(t.getAllKeys)return dt(t.getAllKeys());const n=[];return iu(t,r=>n.push(r.key)).then(()=>n)})}function fi(e,t){const n=xs(e,t);return{set:(r,o)=>eu(r,o,n),get:r=>Ql(r,n),getMany:r=>tu(r,n),del:r=>nu(r,n),delMany:r=>ru(r,n),clear:()=>ou(n),keys:()=>su(n)}}const Sf={drafts:fi("drafts-db","drafts-store"),catchup:fi("catchup-db","catchup-store")};async function Mf(e,t={}){if(!(e!=null&&e.length))return;const{masto:n}=nr(),r=po(),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 Be extends HTMLElement{constructor(){super(),this.isIframeLoaded=!1,this.setupDom()}static get observedAttributes(){return["videoid","playlistid"]}connectedCallback(){this.addEventListener("pointerover",Be.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&&(Be.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(){Be.isPreconnected||window.liteYouTubeIsPreconnected||(Be.addPrefetch("preconnect","https://i.ytimg.com/"),Be.addPrefetch("preconnect","https://s.ytimg.com"),Be.addPrefetch("preconnect","https://www.youtube.com"),Be.addPrefetch("preconnect","https://www.google.com"),Be.addPrefetch("preconnect","https://googleads.g.doubleclick.net"),Be.addPrefetch("preconnect","https://static.doubleclick.net"),Be.isPreconnected=!0,window.liteYouTubeIsPreconnected=!0)}}Be.isPreconnected=!1;customElements.define("lite-youtube",Be);const au="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~",Qn=(e,t,n)=>{let r=0;for(;te>10.31475?Ss(e/ks+.052132,2.4):e/Ms,Vr=e=>~~(e>1227e-8?ks*Ss(e,.416666)-13.025:e*Ms+1),yn=e=>(e<0?-1:1)*e*e,hi=e=>{for(e+=xn/2;e>xn;)e-=cu;const t=1.27323954*e-.405284735*yn(e);return .225*(yn(t)-t)+t};function So(e){const t=Qn(e,2,6);return[t>>16,t>>8&255,t&255]}function uu(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,T=0,_=0,E=0,w=0,b=0;const S=(Qn(e,1,2)+1)/13446*(r|1),A=new Float64Array(l*3),O=So(e);for(c=0;c<3;c++)A[c]=lu(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)==="e.trim().replace(/(^(\s|\t)+|(( |\t)+)$)/gm,""),hu=e=>{const t=As(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 pu={mergeAttributesWithElements:hu,removeEmptyLines:As};const mu=fu,{mergeAttributesWithElements:gu}=pu,vu=(e,t={})=>{const n=gu(e);return mu(n,t)};var yu=vu;const _u=$t(yu);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 Is=()=>typeof window=="object"?(window==null?void 0:window.PointerEvent)??null:null,bu=()=>typeof window=="object"?(window==null?void 0:window.TouchEvent)??null:null;function $s(e){const{nativeEvent:t}=e,n=bu();return n&&t instanceof n||"touches"in e}function Ls(e){const t=Is();return e.nativeEvent instanceof MouseEvent&&!(t&&e.nativeEvent instanceof t)}function Cs(e){const{nativeEvent:t}=e;if(!t)return!1;const n=Is();return n&&t instanceof n||"pointerId"in t}function pi(e){return Ls(e)||$s(e)||Cs(e)}function mi(e){return $s(e)?{x:e.touches[0].pageX,y:e.touches[0].pageY}:Ls(e)||Cs(e)?{x:e.pageX,y:e.pageY}:null}function wu(e){return{target:e.target,currentTarget:e.currentTarget,nativeEvent:e,persist:()=>{}}}function Ps(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=j(!1),p=j(!1),m=j(),h=j(),g=j(e),v=j(null),T=Ie(b=>S=>{p.current||pi(S)&&(a!==void 0&&!a(S)||(n&&S.persist(),l==null||l(S,{context:b}),v.current=mi(S),p.current=!0,m.current=S.currentTarget,h.current=setTimeout(()=>{g.current&&(g.current(S,{context:b}),d.current=!0)},t)))},[n,a,l,t]),_=Ie(b=>(S,A)=>{pi(S)&&p.current&&(v.current=null,n&&S.persist(),d.current?u==null||u(S,{context:b}):p.current&&(f==null||f(S,{context:b,reason:A??pn.CancelledByRelease})),d.current=!1,p.current=!1,h.current!==void 0&&clearTimeout(h.current))},[n,u,f]),E=Ie(b=>S=>{if(c==null||c(S,{context:b}),o!==!1&&v.current){const A=mi(S);if(A){const O=o===!0?25:o,P={x:Math.abs(A.x-v.current.x),y:Math.abs(A.y-v.current.y)};(P.x>O||P.y>O)&&_(b)(S,pn.CancelledByMovement)}}},[_,o,c]),w=Ie(b=>{if(e===null)return{};switch(r){case hn.Mouse:{const S={onMouseDown:T(b),onMouseMove:E(b),onMouseUp:_(b)};return i&&(S.onMouseLeave=A=>{_(b)(A,pn.CancelledOutsideElement)}),S}case hn.Touch:return{onTouchStart:T(b),onTouchMove:E(b),onTouchEnd:_(b)};case hn.Pointer:{const S={onPointerDown:T(b),onPointerMove:E(b),onPointerUp:_(b)};return i&&(S.onPointerLeave=A=>_(b)(A,pn.CancelledOutsideElement)),S}}},[e,_,i,r,E,T]);return se(()=>{if(!window)return;function b(S){const A=wu(S);_()(A)}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 Tu({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,T=!!c&&new Date(c),_=h||g;let E=0;_<=1e3?E=0:_<=1e4?E=1:_<=1e5&&(E=2);const[w,b]=ee(!1),S=d.every(A=>A.votesCount!==null);return s("div",{lang:t,dir:"auto",class:`poll ${n?"read-only":""} ${i==="loading"?"loading":""}`,children:[w&&S||m||l?s(U,{children:[s("div",{class:"poll-options",children:d.map((A,O)=>{const{title:P,votesCount:x}=A,M=_?(x/_*100).toFixed(E):0,V=x>0&&x===Math.max(...d.map(B=>B.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(Yt,{text:P,emojis:v})}),m&&p.includes(O)&&s(U,{children:[" ",s(H,{icon:"check-circle"})]})]}),s("div",{class:"poll-option-votes",title:`${x} vote${x===1?"":"s"}`,children:[M,"%"]})]},`${O}-${P}-${x}`)})}),!l&&!m&&s("button",{class:"poll-vote-button plain2",disabled:i==="loading",onClick:A=>{A.preventDefault(),b(!1)},children:[s(H,{icon:"arrow-left",size:"s"})," Hide results"]})]}):s("form",{onSubmit:async A=>{A.preventDefault();const O=A.target,P=new FormData(O),x=[];P.forEach((M,V)=>{V==="poll"&&x.push(M)}),x.length&&(a("loading"),await o(x),a("default"))},children:[s("div",{class:"poll-options",children:d.map((A,O)=>{const{title:P}=A;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(Yt,{text:P,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:A=>{A.preventDefault(),a("loading"),(async()=>(await r(),a("default")))()},title:"Refresh",children:s(H,{icon:"refresh",alt:"Refresh"})}),!m&&!l&&!n&&S&&s("button",{type:"button",class:"plain small",disabled:i==="loading",onClick:A=>{A.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:yt(g)})," vote",g===1?"":"s",!!h&&h!==g&&s(U,{children:[" ","• ",s("span",{title:h,children:yt(h)})," ","voter",h===1?"":"s"]})," ","• ",l?"Ended":"Ending"," ",!!T&&s(It,{datetime:T})]})," "]})}const Os=ct();function Eu(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 Mo=ut(Eu);function xu(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=Mo(r,t);return i?i.action!=="hide":!0}function kf(e,t){if(!(e!=null&&e.length))return[];if(!t)return e;const n=po();return e.filter(r=>xu(r,t,n))}const jr=document.createElement("div");function Br(e){return e?(jr.innerHTML=e,jr.querySelectorAll(".invisible").forEach(t=>{t.remove()}),jr.innerText.length):0}const mn="speechSynthesis"in window;function gi(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 Ds(e){var a;const{spoilerText:t,content:n,poll:r,mediaAttachments:o}=e;let i="";return t!=null&&t.trim()?i+=t:i+=hr(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 Su(e,t,n){var r=this,o=j(null),i=j(0),a=j(null),l=j([]),c=j(),u=j(),f=j(e),d=j(!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,T="debounceOnServer"in n&&!!n.debounceOnServer,_=v?Math.max(+n.maxWait||0,t):null;se(function(){return d.current=!0,function(){d.current=!1}},[]);var E=he(function(){var w=function(x){var M=l.current,V=c.current;return l.current=c.current=null,i.current=x,u.current=f.current.apply(V,M)},b=function(x,M){m&&cancelAnimationFrame(a.current),a.current=m?requestAnimationFrame(x):setTimeout(x,M)},S=function(x){if(!d.current)return!1;var M=x-o.current;return!o.current||M>=t||M<0||v&&x-i.current>=_},A=function(x){return a.current=null,g&&l.current?w(x):(l.current=c.current=null,u.current)},O=function x(){var M=Date.now();if(S(M))return A(M);if(d.current){var V=t-(M-o.current),B=v?Math.min(V,_-(M-i.current)):V;b(x,B)}},P=function(){if(p||T){var x=Date.now(),M=S(x);if(l.current=[].slice.call(arguments),c.current=r,o.current=x,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 P.cancel=function(){a.current&&(m?cancelAnimationFrame(a.current):clearTimeout(a.current)),i.current=0,l.current=o.current=c.current=a.current=null},P.isPending=function(){return!!a.current},P.flush=function(){return a.current?A(Date.now()):u.current},P},[h,v,t,_,g,m,p,T]);return E}function Mu(e,t,n){var r=n===void 0?{}:n,o=r.leading,i=r.trailing;return Su(e,t,{maxWait:t,leading:o===void 0||o,trailing:i===void 0||i})}function ku(e,t){var n=j(null),r=j(null);r.current=t;var o=j(null);se(function(){i()});var i=Ie(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)}},[]),Ie(function(a){o.current=a,i()},[i])}function vi(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 Au(e){e===void 0&&(e={});var t=e.onResize,n=j(void 0);n.current=t;var r=e.round||Math.round,o=j(),i=ee({width:void 0,height:void 0}),a=i[0],l=i[1],c=j(!1);se(function(){return c.current=!1,function(){c.current=!0}},[]);var u=j({width:void 0,height:void 0}),f=ku(Ie(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=vi(m,h,"inlineSize"),v=vi(m,h,"blockSize"),T=g?r(g):void 0,_=v?r(v):void 0;if(u.current.width!==T||u.current.height!==_){var E={width:T,height:_};u.current.width=T,u.current.height=_,n.current?n.current(E):c.current||l(E)}})}),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=j(),n=Mu(({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 Au({ref:t,box:"border-box",onResize:n}),t}const oo={public:"earth",unlisted:"group",private:"lock",direct:"message"};var Rs="kvfysmfp",Ns="ufhsfnkm",Iu=".".concat(Rs,"{overflow:hidden;touch-action:none}.").concat(Ns,"{transform-origin: 0 0}"),$u=typeof window>"u",Lu=function(){return!$u&&("ontouchstart"in window||navigator.maxTouchPoints>0)};var Cu=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 Pu=Math.min,Ou=Math.max;function yi(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]:[Pu(i+r,0)-r,Ou(0,i+r)]}var _i=function(e,t){return t?"".concat(e," ").concat(t):e},Zn=Math.abs,Du=Math.min,Ru=Math.sqrt,Fs=typeof window>"u",Nu=Fs?!1:/(Mac)/i.test(navigator.platform),Ht=function(e){return e==="drag"},ln=function(e){return e==="zoom"},Fu=function(e){return Nu&&e.ctrlKey},un=function(e){e.stopPropagation(),e.preventDefault()},bi=function(e,t){var n=e.x-t.x,r=e.y-t.y;return Ru(n*n+r*r)},zu=function(e,t){var n=bi(e[0],e[1]),r=bi(t[0],t[1]);return r/n},Hu=function(e,t){return e>t-.01&&et?t:n},Uu=function(e){return!(e.ctrlKey||e.metaKey)},Wu=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}},Ku=function(e,t){return{x:t.x-e.x,y:t.y-e.y}},Zu=function(e,t){return e.x===t.x&&e.y===t.y},Mt=function(){},qn={x:0,y:0},Ti=function(e){va(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n._prevDragMovePoint=null,n._containerObserver=null,n._fingers=0,n._firstMove=!0,n._initialOffset=De({},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=De({},qn),n._startOffset=De({},qn),n._startTouches=null,n._updatePlaned=!1,n._wheelTimeOut=null,n._zoomFactor=1,n._initialZoomFactor=1,n._draggingPoint=De({},qn),n._ignoreNextClick=!1,n._containerRef=ya(),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=De({},n._offset),n._startTouches=Yn(r.touches)):(ln(n._interaction)?n._startTouches&&n._startTouches.length===2&&r.touches.length===2&&n._handleZoom(r,zu(n._startTouches,Yn(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;(Fu(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=De({},n._offset);if(n._addOffset({x:l,y:c}),n._offset=n._sanitizeOffset(n._offset),Zu(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=Yn(r)[0],i=this._prevDragMovePoint;i&&(this._velocity=Ku(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=Bu(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=-Zn(o*this._getInitialZoomFactor()-n.width)/2,l=-Zn(i*this._getInitialZoomFactor()-n.height)/2;this._initialOffset={x:a,y:l}},t.prototype._resetOffset=function(){this._offset=De({},this._initialOffset)},t.prototype._setupOffsets=function(){this.props.setOffsetsOnce&&this._isOffsetsSet||(this._isOffsetsSet=!0,this._computeInitialOffset(),this._resetOffset())},t.prototype._sanitizeOffset=function(n){var 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=yi({containerDimension:r.width,childDimension:l,padding:this.props.horizontalPadding,centerContained:this.props.centerContained}),f=u[0],d=u[1],p=yi({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=De({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=De({},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,T={x:this._offset.x-m.x,y:this._offset.y-m.y};this._zoomFactor=p,this._offset=De({},m);var _=function(E){var w=m.x+T.x*E,b=m.y+T.y*E;r._zoomFactor=p+v*E,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=De({duration:250,animated:!0},n),i=o.x,a=o.y,l=o.scale,c=o.animated,u=o.duration,f=this._zoomFactor,d=De({},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=De({},d);var h=function(g){var v=d.x+m.x*g,T=d.y+m.y*g;r._zoomFactor=f+p*g,r._offset={x:v,y:T},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||!Hu(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?Zn(i)>Zn(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 Wu(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=Du(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=_a.only(r),a=o||{};return Hn.createElement(Hn.Fragment,null,Hn.createElement("style",null,Iu),Hn.createElement("div",De({},a,{ref:this._containerRef,className:_i(Rs,a.className)}),Oi(i,{className:_i(Ns,i.props.className)})))},t.defaultProps={animationDuration:250,draggableUnZoomed:!0,enforceBoundsDuringZoom:!1,centerContained:!1,enabled:!0,inertia:!0,inertiaFriction:.96,horizontalPadding:0,isTouch:Lu,lockDragAxis:!1,maxZoom:5,minZoom:.5,onDoubleTap:Mt,onDragEnd:Mt,onDragStart:Mt,onDragUpdate:Mt,onZoomEnd:Mt,onZoomStart:Mt,onZoomUpdate:Mt,setOffsetsOnce:!1,shouldInterceptWheel:Uu,shouldCancelHandledTouchEndEvents:!1,tapZoomFactor:1,verticalPadding:0,wheelScaleFactor:1500,zoomOutFactor:1.3,doubleTapZoomOutOnMaxScale:!1,doubleTapToggleZoom:!1,_document:Fs?null:window.document},t}(Ri);if(0)var Af,If,$f,Lf,Cf,Pf,Of;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),qu="ALT",Kr=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:[qu,!!r&&s("sup",{children:r})]})},Gu=140,Xu=280,zs=ut(e=>e!=null&&e.length?e.length>Gu||/[\n\r].*[\n\r]/.test(e.trim()):!1);function Ju({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:T}=t;/no\-preview\./i.test(h)&&(h=null);const{original:_={},small:E,focus:w}=p||{},b=o?_==null?void 0:_.width:(E==null?void 0:E.width)||(_==null?void 0:_.width),S=o?_==null?void 0:_.height:(E==null?void 0:E.height)||(_==null?void 0:_.height),A=o?v:h||v,O=o?g:m||g,P=b&&S,x=P?b>S?"landscape":"portrait":null,M=f?So(f):null,V=j();let B;if(w){const Y=(w.x+1)/2*100,ve=(1-w.y)/2*100;B=`${Y.toFixed(0)}% ${ve.toFixed(0)}%`}const D=j(),$=Ie(({x:Y,y:ve,scale:Q})=>{const{current:ae}=D;if(ae){const ge=Cu({x:Y,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,R]=ee(!1),L={enabled:k,draggableUnZoomed:!1,inertiaFriction:.9,tapZoomFactor:2,doubleTapToggleZoom:!0,containerProps:{className:"media-zoom",style:{overflow:"visible"}},onUpdate:$},z=he(()=>n?Y=>s(Zt,{to:n,...Y}):"div",[n]),N=O?Qu(O):null,C=T==="unknown"&&N&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(N.pathname),K=T==="unknown"&&N&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test(N.pathname),Z=T==="image"||T==="unknown"&&h&&!C&&!K,te=j(),[le,Ee]=ee(!1);_n(()=>{if(!Z||!o||!te.current)return;const{offsetWidth:Y,offsetHeight:ve}=te.current,Q=b{const{children:ve,...Q}=Y;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,[xe,ft]=ee(void 0);if(Z)return L.containerProps.style.display="inherit",_n(()=>{Yu&&o&&(async()=>{try{await fetch(A,{mode:"no-cors"}),D.current.src=A}catch{}})()},[A]),s(ne,{children:s(z,{ref:te,class:`media media-image ${e}`,onClick:u,"data-orientation":x,"data-has-alt":!q||void 0,"data-has-natural-aspect-ratio":xe||void 0,style:o?{backgroundImage:`url(${h})`,backgroundSize:le?`${b}px ${S}px`:void 0,...be}:ie,children:o?s(Ti,{...L,children:s("img",{ref:D,src:A,alt:d,width:b,height:S,"data-orientation":x,loading:"eager",decoding:"sync",onLoad:Y=>{Y.target.closest(".media-image").style.backgroundImage="",Y.target.closest(".media-zoom").style.display="",R(!0)},onError:Y=>{const{src:ve}=Y.target;ve===A&&O&&A!==O&&(Y.target.src=O)}})}):s(U,{children:[s("img",{src:A,alt:q?"":d,width:b,height:S,"data-orientation":x,loading:"lazy",style:{objectPosition:B||"center","--anim-duration":`${Math.min(Math.max(Math.max(b,S)/100,5),120)}s`},onLoad:Y=>{Y.target.dataset.loaded=!0;const ve=Y.target.closest(".media");if(!P&&ve){const{naturalWidth:Q,naturalHeight:ae}=Y.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}=Y.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&&ft(!0)}}},onError:Y=>{const{src:ve}=Y.target;ve===A&&A!==O&&(Y.target.src=O)}}),!q&&s(Kr,{alt:d,lang:r,index:c})]})})});if(T==="gifv"||T==="video"||C){const Y=_.duration>0,ve=_.duration<31,Q=T==="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":x,"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,{...L,enabled:!0,children:s("div",{ref:D,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:S,"data-orientation":x,preload:"auto",playsinline:!0,loop:!0,muted:!0,onTimeUpdate:we?me=>{const{target:Ae}=me,$e=Ae==null?void 0:Ae.closest(".media-gif");if($e){const Le=Ae.currentTime/Ae.duration*100;$e.style.setProperty("--progress",`${Le}%`)}}:void 0}):s(U,{children:[h?s("img",{src:h,alt:q?"":d,width:b,height:S,"data-orientation":x,loading:"lazy",decoding:"async",onLoad:me=>{if(!P){const Ae=me.target.closest(".media");if(Ae){const{naturalHeight:$e,naturalWidth:Le}=me.target;Ae.dataset.orientation=Le>$e?"landscape":"portrait",Ae.style.setProperty("--width",`${Le}px`),Ae.style.setProperty("--height",`${$e}px`),Ae.style.aspectRatio=`${Le}/${$e}`}}}}):s("video",{src:v+"#t=0.1",width:b,height:S,"data-orientation":x,preload:"metadata",muted:!0,disablePictureInPicture:!0,onLoadedMetadata:me=>{if(!Y){const{duration:Ae}=me.target;if(Ae){const $e=Wr(Ae),Le=me.target.closest(".media-video");Le&&(Le.dataset.formattedDuration=$e)}}}}),s("div",{class:"media-play",children:s(H,{icon:"play",size:"xl"})})]}),!o&&!q&&s(Kr,{alt:d,lang:r,index:c})]})})}else if(T==="audio"||K){const Y=Wr(_.duration);return s(ne,{children:s(z,{class:`media media-audio ${e}`,"data-formatted-duration":o?void 0:Y,"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:S,"data-orientation":x,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(Kr,{alt:d,lang:r,index:c})]})]})})}}function Qu(e){return URL.parse(e,location.origin)}const io=lt(Ju,(e,t)=>{const n=e.media||{},r=t.media||{};return(n==null?void 0:n.id)===(r==null?void 0:r.id)&&n.url===r.url&&e.to===t.to&&e.class===t.class}),ed=280,td=140,nd=Ni({limit:1,interval:1e3});function rd(e,t){return t.v1.accounts.$select(e).fetch()}const od=ho(nd(rd)),gn={public:"Public",unlisted:"Unlisted",private:"Followers only",direct:"Private mention"},id=window.ontouchstart!==void 0&&/iPad|iPhone|iPod/.test(navigator.userAgent),sd=new Intl.RelativeTimeFormat,Ei=80;function ad(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 Zr(e){const{spoilerText:t,content:n,poll:r}=e;return(t?`${t} `:"")+hr(n)+ad(r)}const xi=lt(({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:xl({mentions:a,instance:t,previewMode:n,statusURL:l}),dangerouslySetInnerHTML:{__html:ys(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}),cd={s:"small",m:"medium",l:"large"},ld=ut(e=>{if(e=e==null?void 0:e.trim(),(e==null?void 0:e.length)>500)return null;const n=Ea(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:T,showReplyParent:_,mediaFirst:E}){var Bo,Uo,Wo;if(c)return s("div",{class:`status skeleton ${E?"status-media-first small":""}`,children:[!E&&s(st,{size:"xxl"}),s("div",{class:"container",children:[s("div",{class:"meta",children:[(r==="s"||E)&&s(st,{size:"m"})," ███ ████████"]}),s("div",{class:"content-container",children:[E&&s("div",{class:"media-first-container"}),s("div",{class:`content ${E?"media-first-content":""}`,children:s("p",{children:"████ ████████"})})]})]})]});const{masto:w,instance:b,authenticated:S}=nr({instance:n}),{instance:A}=nr(),O=b===A;let P=it(e||(t==null?void 0:t.id),b);const x=Mn(W);if(t||(t=x.statuses[P]||x.statuses[e],P=it(t==null?void 0:t.id,b)),!t)return null;const{account:{acct:M,avatar:V,avatarStatic:B,id:D,url:$,displayName:k,username:R,emojis:L,bot:z,group:N},id:C,repliesCount:K,reblogged:Z,reblogsCount:te,favourited:le,favouritesCount:Ee,bookmarked:pe,poll:_e,muted:be,sensitive:ie,spoilerText:ue,visibility:q,language:ne,editedAt:xe,filtered:ft,card:Y,createdAt:ve,inReplyToId:Q,inReplyToAccountId:ae,content:ge,mentions:de,mediaAttachments:oe,reblog:we,uri:bt,url:Ve,emojis:me,tags:Ae,_deleted:$e,_pinned:Le,emojiReactions:Pt}=t,[Ke,An]=ee(null);se(()=>{if(!ge||ne)return;let y;return y=setTimeout(()=>{let F=ld(hr(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()})}}));An(F)},1e3),()=>clearTimeout(y)},[ge,ne]);const Te=ne||Ke,wt=!!(oe!=null&&oe.length);E&&wt&&(r="s");const Je=he(()=>po(),[]),Qe=he(()=>Je&&Je===D,[D,Je]),yr=Ne(Os),ht=!Qe&&!i&&!d&&Mo(ft,yr);if((ht==null?void 0:ht.action)==="hide")return null;const Tt=y=>{y.shiftKey};if(r!=="l"&&ht)return s(vd,{status:t,filterInfo:ht,instance:b,containerProps:{onMouseEnter:Tt},showFollowedTags:!0,quoted:m});const et=new Date(ve),Jt=new Date(xe);let re=de==null?void 0:de.find(y=>y.id===ae);!re&&ae===C&&(re={url:$,username:R,displayName:k});const[Me,je]=ee(re);if(!l&&!Me&&ae){const y=W.accounts[ae];y?je(y):od(ae,w).then(F=>{je(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",[]),Pe=d||ye||!!x.spoilers[C],ze=d||tt==="show_all"||!!x.spoilersMedia[C];if(we)return N?s("div",{"data-state-post-id":P,class:"status-group",onMouseEnter:Tt,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:E})]}):s("div",{"data-state-post-id":P,class:"status-reblog",onMouseEnter:Tt,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:E})]});const Qt=Ie(({children:y})=>s("div",{"data-state-post-id":P,class:"status-followed-tags",onMouseEnter:Tt,children:[s("div",{class:"status-pre-meta",children:[s(H,{icon:"hashtag",size:"l"})," ",x.statusFollowedTags[P].slice(0,3).map(F=>s(Zt,{to:b?`/${b}/t/${F}`:`/t/${F}`,class:"status-followed-tag-item",children:F},F))]}),y]}),[P,b,x.statusFollowedTags[P]]),In=g&&((Bo=x.statusFollowedTags[P])!=null&&Bo.length)?Qt:U,fe=r==="l",[en,_r]=ee(f),nt=as(!0),tn=x.settings.contentTranslationHideLanguages||[],{contentTranslation:Ot,contentTranslationAutoInline:Et}=x.settings;Ot||(u=!1);const pt=he(()=>{if(!Ot||!Et||i||l&&!fe||d||ue||ie||_e||Y||oe!=null&&oe.length)return!1;const y=Br(ge);return y>0&&y<=td},[Ot,Et,i,l,fe,d,ue,ie,_e,Y,oe,ge]),[br,$n]=ee(!1),[Xs,wr]=ee(!1),Ao=er(),Io=er(),Js=er(),Tr="Read more →",Dt=j(null),nn="Sorry, your current logged-in instance can't interact with this post from another instance.",$o=Ie(()=>Math.max(Math.round((ue.length+Br(ge))/140)||1,1),[ue,ge]),Lo=En(et),Co=xe&&En(Jt);let rn=S&&q!=="direct"&&q!=="private";q==="private"&&Qe&&(rn=!0);const Ln=y=>{var F;if(!O||!S)return alert(nn);(y!=null&&y.shiftKey||(F=y==null?void 0:y.syntheticEvent)!=null&&F.shiftKey)&&Va({replyToStatus:t})||Un({replyToStatus:t})},Er=he(()=>oe.some(y=>{var F,J;return!((J=(F=y.description)==null?void 0:F.trim)!=null&&J.call(F))}),[oe]),Po=he(()=>Math.floor((new Date-et)/(1e3*60*60*24*30)),[et]),sf=async()=>{if(!O||!S)return alert(nn),!1;try{if(!Z){let y="Boost this post?";if(Er&&(y+=` ⚠️ Some media have no descriptions.`),!confirm(y))return!1}if(W.statuses[P]={...t,reblogged:!Z,reblogsCount:te+(Z?-1:1)},Z){const y=await w.v1.statuses.$select(C).unreblog();return rt(y,b),!0}else{const y=await w.v1.statuses.$select(C).reblog();return rt(y,b),!0}}catch{return W.statuses[P]=t,!1}},xr=async()=>{if(!O||!S)return alert(nn),!1;try{if(W.statuses[P]={...t,reblogged:!Z,reblogsCount:te+(Z?-1:1)},Z){const y=await w.v1.statuses.$select(C).unreblog();rt(y,b)}else{const y=await w.v1.statuses.$select(C).reblog();rt(y,b)}return!0}catch{return W.statuses[P]=t,!1}},Oo=async()=>{if(!O||!S)return alert(nn),!1;try{if(W.statuses[P]={...t,favourited:!le,favouritesCount:Ee+(le?-1:1)},le){const y=await w.v1.statuses.$select(C).unfavourite();rt(y,b)}else{const y=await w.v1.statuses.$select(C).favourite();rt(y,b)}return!0}catch{return W.statuses[P]=t,!1}},Sr=async()=>{try{const y=await Oo();!fe&&y&&Ce(le?`Unliked @${R||M}'s post`:`Liked @${R||M}'s post`)}catch{}},Do=async()=>{if(Bn("@mastodon/post-bookmark")){if(!O||!S)return alert(nn),!1;try{if(W.statuses[P]={...t,bookmarked:!pe},pe){const y=await w.v1.statuses.$select(C).unbookmark();rt(y,b)}else{const y=await w.v1.statuses.$select(C).bookmark();rt(y,b)}return!0}catch{return W.statuses[P]=t,!1}}},Ro=async()=>{try{const y=await Do();!fe&&y&&Ce(pe?`Unbookmarked @${R||M}'s post`:`Bookmarked @${R||M}'s post`)}catch{}},Cn=!!Te&&Te!==nt&&!no([Te],[nt])&&!tn.find(y=>Te===y||no([Te],[y])),No=j(),Fo=j();async function Qs(y){var ce,Oe,Rt,Mr;y&&(No.current=w.v1.statuses.$select(e).rebloggedBy.list({limit:Ei}),Fo.current=w.v1.statuses.$select(e).favouritedBy.list({limit:Ei}));const[{value:F},{value:J}]=await Promise.allSettled([No.current.next(),Fo.current.next()]);if((ce=F.value)!=null&&ce.length||(Oe=J.value)!=null&&Oe.length){const xt=[];return(Rt=F.value)!=null&&Rt.length&&xt.push(...F.value.map(St=>(St._types=["reblog"],St))),(Mr=J.value)!=null&&Mr.length&&xt.push(...J.value.map(St=>(St._types=["favourite"],St))),{value:xt,done:F.done&&J.done}}return{value:[],done:!0}}const ea=j(),zo=["public","unlisted"].includes(q),ta=["public","unlisted","private"].includes(q),Ho=s(U,{children:[!fe&&O&&s(U,{children:s("div",{class:"menu-control-group-horizontal status-menu",children:[s(ke,{onClick:Ln,children:[s(H,{icon:"comment"}),s("span",{children:K>0?yt(K):"Reply"})]}),s(Lr,{subMenu:!0,confirmLabel:s(U,{children:[s(H,{icon:"rocket"}),s("span",{children:Z?"Unboost":"Boost"})]}),className:`menu-reblog ${Z?"checked":""}`,menuExtras:s(ke,{onClick:()=>{Un({draftStatus:{status:` ${Ve}`}})},children:[s(H,{icon:"quote"}),s("span",{children:"Quote"})]}),menuFooter:Er&&!Z?s("div",{class:"footer",children:[s(H,{icon:"alert"}),"Some media have no descriptions."]}):Po>=3&&s("div",{class:"footer",children:[s(H,{icon:"info"}),s("span",{children:["Old post (",s("strong",{children:sd.format(-Po,"month")}),")"]})]}),disabled:!rn,onClick:async()=>{try{const y=await xr();!fe&&y&&Ce(Z?`Unboosted @${R||M}'s post`:`Boosted @${R||M}'s post`)}catch{}},children:[s(H,{icon:"rocket"}),s("span",{children:te>0?yt(te):Z?"Unboost":"Boost…"})]}),s(ke,{onClick:Sr,className:`menu-favourite ${le?"checked":""}`,children:[s(H,{icon:"heart"}),s("span",{children:Ee>0?yt(Ee):le?"Unlike":"Like"})]}),Bn("@mastodon/post-bookmark")&&s(ke,{onClick:Ro,className:`menu-bookmark ${pe?"checked":""}`,children:[s(H,{icon:"bookmark"}),s("span",{children:pe?"Unbookmark":"Bookmark"})]})]})}),!fe&&O&&(fe||T)&&s(an,{}),(fe||T)&&s(U,{children:s(ke,{onClick:()=>{W.showGenericAccounts={heading:"Boosted/Liked by…",fetchAccounts:Qs,instance:b,showReactions:!0,postID:P}},children:[s(H,{icon:"react"}),s("span",{children:["Boosted/Liked by",s("span",{class:"more-insignificant",children:"…"})]})]})}),!E&&s(U,{children:[(u||!Te||Cn)&&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=Zr(t);y&&gi(y,Te)},children:[s(H,{icon:"speak"}),s("span",{children:"Speak"})]})]}):(!Te||Cn)&&s("div",{class:mn?"menu-horizontal":"",children:[s(ai,{to:`${b?`/${b}`:""}/s/${C}?translate=1`,children:[s(H,{icon:"translate"}),s("span",{children:"Translate"})]}),mn&&s(ke,{onClick:()=>{const y=Zr(t);y&&gi(y,Te)},children:[s(H,{icon:"speak"}),s("span",{children:"Speak"})]})]})]}),(!fe&&O||u||!Te||Cn)&&s(an,{}),!fe&&s(U,{children:s(ai,{to:b?`/${b}/s/${C}`:`/s/${C}`,onClick:y=>{h(y,t)},children:[s(H,{icon:"arrows-right"}),s("small",{children:["View post by @",R||M,s("br",{}),s("span",{class:"more-insignificant",children:[gn[q]," • ",Lo]})]})]})}),!!xe&&s(U,{children:s(ke,{onClick:()=>{$n(C)},children:[s(H,{icon:"history"}),s("small",{children:["Show Edit History",s("br",{}),s("span",{class:"more-insignificant",children:["Edited: ",Co]})]})]})}),s(ke,{href:Ve,target:"_blank",children:[s(H,{icon:"external"}),s("small",{class:"menu-double-lines",children:md(Ve)})]}),s("div",{class:"menu-horizontal",children:[s(ke,{onClick:()=>{try{navigator.clipboard.writeText(Ve),Ce("Link copied")}catch{Ce("Unable to copy link")}},children:[s(H,{icon:"link"}),s("span",{children:"Copy"})]}),zo&&(navigator==null?void 0:navigator.share)&&((Uo=navigator==null?void 0:navigator.canShare)==null?void 0:Uo.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…"})]})]}),zo&&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(C)[be?"unmute":"mute"]();rt(y,b),Ce(be?"Conversation unmuted":"Conversation muted")}catch{Ce(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&&ta&&s(ke,{onClick:async()=>{try{const y=await w.v1.statuses.$select(C)[Le?"unpin":"pin"]();Ce(Le?"Post unpinned from profile":"Post pinned to profile")}catch{Ce(Le?"Unable to unpin post":"Unable to pin post")}},children:Le?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:[Bn("@mastodon/post-edit")&&s(ke,{onClick:()=>{Un({editStatus:t})},children:[s(H,{icon:"pencil"}),s("span",{children:"Edit"})]}),fe&&s(Lr,{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(C).remove();const y=zi(C,b);y._deleted=!0,Ce("Deleted")}catch{Ce("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…"})]})]})]}),Vo=j(),[Pn,on]=ee(!1),[On,Dn]=ee({}),Rn=v||!fe&&!d&&!$e&&!m,na=Ps(id&&Rn?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&&Dt.current.contains(ce)&&!ce.getAttribute("href").startsWith("#")||(y.preventDefault(),Dn({anchorPoint:{x:F,y:J},direction:"right"}),on(!0))}:null,{threshold:600,captureEvent:!0,detect:"touch",cancelOnMovement:2}),Nn=!i&&!d&&!m,ra=jt("r, shift+r",Ln,{enabled:Nn}),oa=jt("f, l",Sr,{enabled:Nn}),ia=jt("d",Ro,{enabled:Nn}),sa=jt("shift+b",()=>{(async()=>{try{const y=await xr();!fe&&y&&Ce(Z?`Unboosted @${R||M}'s post`:`Boosted @${R||M}'s post`)}catch{}})()},{enabled:Nn&&rn}),aa=jt("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&&!zs(y.description)),ca=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:Te}},title:F.description,children:[s("sup",{children:J.map(ce=>ce+1).join(" ")})," ",F.description]},F.id))},[zn,Fn,Te]),sn=he(()=>{var y;return!!Q&&ae===((y=t.account)==null?void 0:y.id)||!!x.statusThreadNumber[P]},[Q,ae,(Wo=t.account)==null?void 0:Wo.id,x.statusThreadNumber[P]]),la=he(()=>a&&!sn&&!l&&!Q&&q==="public"&&K>0,[a,sn,l,Q,K,q]),jo=he(()=>{if(Y||_e||ie||ue||oe!=null&&oe.length||sn||l||Q||K<=0||!/[???︖❓❔⁇⁈⁉¿‽؟]/.test(ge))return!1;const J=Br(ge);if(J>0&&J<=ed)return!0},[Y,_e,ie,ue,oe,we,sn,l,Q,K,ge]);return s(In,{children:[_&&!!(Q&&ae)&&s(gd,{sKey:P}),s("article",{"data-state-post-id":P,ref:y=>{var J;Dt.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;ra.current=F,oa.current=F,ia.current=F,sa.current=F,aa.current=F},tabindex:"-1",class:`status ${!l&&Q&&Me?"status-reply-to":""} visibility-${q} ${Le?"status-pinned":""} ${cd[r]} ${$e?"status-deleted":""} ${m?"status-card":""} ${Pn?"status-menu-open":""} ${E&&wt?"status-media-first":""}`,onMouseEnter:Tt,onContextMenu:y=>{var ce,Oe;if(!Rn||y.metaKey)return;const F=y.target.closest("a");if(F&&Dt.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:Rt}=J;if((Oe=Dt.current)!=null&&Oe.contains(Rt))return}y.preventDefault(),Dn({anchorPoint:{x:y.clientX,y:y.clientY},direction:"right"}),on(!0)},...Rn?na():{},children:[Rn&&s(Gi,{ref:Vo,state:Pn?"open":void 0,...On,onClose:y=>{var F,J,ce;on(!1),(y==null?void 0:y.reason)==="click"&&((ce=(J=(F=Dt.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=Vo.current)==null?void 0:y.closeMenu)==null||F.call(y)}},overflow:"auto",boundingBoxPadding:is(),unmountOnClose:!0,children:Ho}),T&&r!=="l"&&!d&&!i&&!$e&&!m&&s("div",{class:`status-actions ${Pn==="actions-bar"?"open":""}`,ref:ea,children:[s(Vt,{size:"s",title:"Reply",alt:"Reply",class:"reply-button",icon:"comment",iconSize:"m",onClick:Ln}),s(Vt,{size:"s",checked:le,title:["Like","Unlike"],alt:["Like","Liked"],class:"favourite-button",icon:"heart",iconSize:"m",count:Ee,onClick:Sr}),s("button",{type:"button",title:"More",class:"plain more-button",onClick:y=>{y.preventDefault(),y.stopPropagation(),Dn({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:[Z&&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"}),Le&&s(H,{class:"pin",icon:"pin",size:"s"})]}),r!=="s"&&s("a",{href:$,tabindex:"-1",title:`@${M}`,onClick:y=>{y.preventDefault(),y.stopPropagation(),W.showAccount={account:t.account,instance:b}},children:s(st,{url:B||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"&&($e?s("span",{class:"status-deleted-tag",children:"Deleted"}):Ve&&!d&&!i&&!m?s(Zt,{to:b?`/${b}/s/${C}`:`/s/${C}`,onClick:y=>{y.metaKey||y.ctrlKey||y.shiftKey||y.altKey||y.which===2||(y.preventDefault(),y.stopPropagation(),h==null||h(y,t),Dn({anchorRef:{current:y.currentTarget},align:"end",direction:"bottom",gap:4}),on(!0))},class:`time ${Pn&&(On!=null&&On.anchorRef)?"is-open":""}`,children:[la&&!jo?s(H,{icon:"comment2",size:"s",alt:`${K} ${K===1?"reply":"replies"}`}):q!=="public"&&q!=="direct"&&s(H,{icon:oo[q],alt:gn[q],size:"s"})," ",s(It,{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:oo[q],alt:gn[q],size:"s"})," "]}),s(It,{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",x.statusThreadNumber[P]?` ${x.statusThreadNumber[P]}/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":""} ${Pe?"show-spoiler":""} ${ze?"show-media":""}`,"data-content-text-weight":o?$o():null,style:(fe||o)&&{"--content-text-weight":$o()},children:E&&wt?s(U,{children:[(!!ue||!!ie)&&!ye&&s(U,{children:[!!ue&&s("span",{class:"spoiler-content media-first-spoiler-content",lang:Te,dir:"auto",ref:Ao,"data-read-more":Tr,children:[s(Yt,{text:ue,emojis:me})," "]}),s("button",{class:`light spoiler-button media-first-spoiler-button ${Pe?"spoiling":""}`,type:"button",onClick:y=>{y.preventDefault(),y.stopPropagation(),Pe?(delete W.spoilers[C],ye||delete W.spoilersMedia[C]):(W.spoilers[C]=!0,ye||(W.spoilersMedia[C]=!0))},children:[s(H,{icon:Pe?"eye-open":"eye-close"})," ",Pe?"Show less":"Show content"]})]}),s(dd,{mediaAttachments:oe,language:Te,postID:C,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:Te,dir:"auto",ref:Ao,"data-read-more":Tr,children:s("p",{children:s(Yt,{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 ${Pe?"spoiling":""}`,type:"button",onClick:y=>{y.preventDefault(),y.stopPropagation(),Pe?(delete W.spoilers[C],ye||delete W.spoilersMedia[C]):(W.spoilers[C]=!0,ye||(W.spoilersMedia[C]=!0))},children:[s(H,{icon:Pe?"eye-open":"eye-close"})," ",Pe?"Show less":"Show content"]})]}),!!ge&&s("div",{class:"content",ref:Io,"data-read-more":Tr,children:[s(xi,{post:t,instance:b,previewMode:d}),s(yd,{id:C,instance:b,level:m})]}),!!_e&&s(Tu,{lang:Te,poll:_e,readOnly:i||!O||!S,onUpdate:y=>{W.statuses[P].poll=y},refresh:()=>w.v1.polls.$select(_e.id).fetch().then(y=>{W.statuses[P].poll=y}).catch(y=>{}),votePoll:y=>w.v1.polls.$select(_e.id).votes.create({choices:y}).then(F=>{W.statuses[P].poll=F}).catch(F=>{})}),((u||pt)&&!!ge.trim()&&!!hr(fr(ge,me))&&Cn||en)&&s(Jl,{forceTranslate:en||pt,mini:!fe&&!l,sourceLanguage:Te,autoDetected:Ke,text:Zr(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[C]:W.spoilersMedia[C]=!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(io,{media:y,autoAnimate:!0,showCaption:!0,allowLongerCaption:!ge,lang:Te,to:`/${b}/s/${C}?${l?"media":"media-only"}=${F+1}`,onClick:p?J=>p(J,F,y,t):void 0})},y.id))}):s(ud,{lang:Te,enabled:zn,captionChildren:ca,children:s("div",{ref:Js,class:`media-container media-eq${oe.length} ${oe.length>2?"media-gt2":""} ${oe.length>4?"media-gt4":""}`,children:Fn.map((y,F)=>s(io,{media:y,autoAnimate:fe,showCaption:oe.length===1,allowLongerCaption:!ge&&oe.length===1,lang:Te,altIndex:zn&&!!y.description&&F+1,to:`/${b}/s/${C}?${l?"media":"media-only"}=${F+1}`,onClick:p?J=>{p(J,F,y,t)}:void 0},y.id))})})),!!Y&&/^https/i.test(Y==null?void 0:Y.url)&&!ie&&!ue&&!_e&&!oe.length&&!x.statusQuotes[P]&&s(fd,{card:Y,selfReferential:(Y==null?void 0:Y.url)===t.url||(Y==null?void 0:Y.url)===t.uri,instance:A})]})}),!fe&&jo&&s("div",{class:"content-comment-hint insignificant",children:[s(H,{icon:"comment2",alt:"Replies"})," ",K]}),fe&&s(U,{children:[s("div",{class:"extra-meta",children:$e?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:Lo})}),xe&&s(U,{children:[" ","• ",s(H,{icon:"pencil",alt:"Edited"})," ",s("time",{tabIndex:"0",class:"edited",datetime:Jt.toISOString(),onClick:()=>{$n(C)},children:Co})]})]})}),!!(Pt!=null&&Pt.length)&&s("div",{class:"emoji-reactions",children:Pt.map(y=>{const{name:F,count:J,me:ce,url:Oe,staticUrl:Rt}=y;if(Oe)return s("span",{class:`emoji-reaction tag ${ce?"":"insignificant"}`,children:[s(to,{alt:F,url:Oe,staticUrl:Rt})," ",J]});if(/^:.+?:$/.test(F)){const xt=me.find(St=>St.shortcode===F.replace(/^:/,"").replace(/:$/,""));if(xt)return s("span",{class:`emoji-reaction tag ${ce?"":"insignificant"}`,children:[s(to,{alt:F,url:xt.url,staticUrl:xt.staticUrl})," ",J]})}return s("span",{class:`emoji-reaction tag ${ce?"":"insignificant"}`,children:[F," ",J]})})}),s("div",{class:`actions ${$e?"disabled":""}`,children:[s("div",{class:"action has-count",children:s(Vt,{title:"Reply",alt:"Comments",class:"reply-button",icon:"comment",count:K,onClick:Ln})}),s(Lr,{disabled:!rn,onClick:xr,confirmLabel:s(U,{children:[s(H,{icon:"rocket"}),s("span",{children:Z?"Unboost":"Boost"})]}),menuExtras:s(ke,{onClick:()=>{Un({draftStatus:{status:` ${Ve}`}})},children:[s(H,{icon:"quote"}),s("span",{children:"Quote"})]}),menuFooter:Er&&!Z&&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:Z,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:Ee,onClick:Oo})}),Bn("@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(ss,{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:Ho})]})]})]}),!!br&&s(Gr,{onClick:y=>{y.target===y.currentTarget&&$n(!1)},children:s(hd,{statusID:br,instance:b,fetchStatusHistory:()=>w.v1.statuses.$select(br).history.list(),onClose:()=>{var y;$n(!1),(y=Dt.current)==null||y.focus()}})}),!!Xs&&s(Gr,{onClick:y=>{y.target===y.currentTarget&&wr(!1)},children:s(pd,{post:t,instance:b,onClose:()=>{wr(!1)}})})]})]})}function ud(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 dd(e){const{mediaAttachments:t,language:n,postID:r,instance:o}=e,i=t.length>1,a=j(),[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(io,{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 Si(e){return vs.toUnicode(URL.parse(e).hostname.replace(/^www\./,"").replace(/\/$/,""))}function Mi(e){return["x.com","twitter.com","threads.net","bsky.app"].includes(e)}function fd({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:T,embedUrl:_,language:E,publishedAt:w}=e,b=i||c||f,A=p/m>=1.2?"large":"",[O,P]=ee(null);if(se(()=>{b&&h&&!t&&ba(v)&&wa(n,v).then(B=>{if(!B)return;const{id:D,url:$}=B;P("#"+$)})},[b,h,t]),r.unfurledLinks[v])return null;const x=/