184 lines
200 KiB
JavaScript
184 lines
200 KiB
JavaScript
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 Mn,o as $t,a0 as I,a1 as fa,a2 as tr,a3 as ha,T as he,D as Lt,p as Di,a4 as pa,a5 as Ri,F as Ni,k as U,x as lt,K as ut,i as ma,s as W,a6 as ga,a as nr,n as va,a7 as Fi,a8 as ya,a9 as zi,j as ho,L as Hi,g as po,aa as _a,ab as De,ac as ba,ad as wa,ae as Hn,w as it,u as Sn,d as Zo,b as rt,J as Vi,af as Ta,ag as Ea,ah as xa}from"./useTitle-YZXo8QRp.js";import{e as Ma}from"./tinyld-light-PxOyhYWY.js";import{m as Sa}from"./index-A6D3rukc.js";function qr(){return qr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qr.apply(this,arguments)}var ji=["shift","alt","meta","mod","ctrl"],ka={esc:"escape",return:"enter",".":"period",",":"comma","-":"slash"," ":"space","`":"backquote","#":"backslash","+":"bracketright",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function gt(e){return(ka[e]||e).trim().toLowerCase().replace(/key|digit|numpad|arrow/,"")}function Aa(e){return ji.includes(e)}function kr(e,t){return t===void 0&&(t=","),e.split(t)}function Ar(e,t,n){t===void 0&&(t="+");var r=e.toLocaleLowerCase().split(t).map(function(a){return gt(a)}),o={alt:r.includes("alt"),ctrl:r.includes("ctrl")||r.includes("control"),shift:r.includes("shift"),meta:r.includes("meta"),mod:r.includes("mod")},i=r.filter(function(a){return!ji.includes(a)});return qr({},o,{keys:i,description:n})}(function(){typeof document<"u"&&(document.addEventListener("keydown",function(e){e.key!==void 0&&Bi([gt(e.key),gt(e.code)])}),document.addEventListener("keyup",function(e){e.key!==void 0&&Ui([gt(e.key),gt(e.code)])})),typeof window<"u"&&window.addEventListener("blur",function(){vt.clear()})})();var vt=new Set;function mo(e){return Array.isArray(e)}function Ia(e,t){t===void 0&&(t=",");var n=mo(e)?e:e.split(t);return n.every(function(r){return vt.has(r.trim().toLowerCase())})}function Bi(e){var t=Array.isArray(e)?e:[e];vt.has("meta")&&vt.forEach(function(n){return!Aa(n)&&vt.delete(n.toLowerCase())}),t.forEach(function(n){return vt.add(n.toLowerCase())})}function Ui(e){var t=Array.isArray(e)?e:[e];e==="meta"?vt.clear():t.forEach(function(n){return vt.delete(n.toLowerCase())})}function $a(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function La(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function Ca(e){return Wi(e,["input","textarea","select"])}function Wi(e,t){var n=e.target;t===void 0&&(t=!1);var r=n&&n.tagName;return mo(t)?!!(r&&t&&t.some(function(o){return o.toLowerCase()===r.toLowerCase()})):!!(r&&t&&t===!0)}function Pa(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'),!0):t?e.some(function(n){return t.includes(n)})||e.includes("*"):!0}var Oa=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?Ia(u):!u},Da=ct(void 0),Ra=function(){return Ne(Da)};function Ki(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&&Ki(e[r],t[r])},!0):e===t}var Na=ct({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),Fa=function(){return Ne(Na)};function za(e){var t=j(void 0);return Ki(t.current,e)||(t.current=e),t.current}var Yo=function(t){t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation()},Ha=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=za(a),p=Fa(),m=p.enabledScopes,h=Ra();return Ha(function(){if(!((d==null?void 0:d.enabled)===!1||!Pa(m,d==null?void 0:d.scopes))){var g=function(w,b){var M;if(b===void 0&&(b=!1),!(Ca(w)&&!Wi(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)){Yo(w);return}}(M=w.target)!=null&&M.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(Oa(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($a(w,x,d==null?void 0:d.preventDefault),!La(w,x,d==null?void 0:d.enabled)){Yo(w);return}f.current(w,x),b||(i.current=!0)}})}},v=function(w){w.key!==void 0&&(Bi(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&&(Ui(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 ff=go.exports;(function(e){(function(t,n){e.exports?e.exports=n():t.Toastify=n()})(Mn,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;d<u.length;d++){i(u[d],"toastify-top")===!0?f="toastify-top":f="toastify-bottom";var p=u[d].offsetHeight;f=f.substr(9,f.length-1);var m=15,h=window.innerWidth>0?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 Va=go.exports;const ja=$t(Va);window._showToast=Ce;function Ce(e){typeof e=="string"&&(e={text:e});const{onClick:t,delay:n,...r}=e,o=ja({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 hf(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 Ba(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 Ua=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);function Wa(){if(Ua){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 Zi={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)},Ka={s:12,m:16,l:20,xl:24,xxl:32},qo={},Za=fa(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(Zi).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=Ka[t];let l=Zi[e];if(!l)return null;let c,u;Array.isArray(l)&&([l,c,u]=l);const[f,d]=ee(qo[e]),p=j(e);return se(()=>{f&&p.current===e||((async()=>{const m=await l();d(m.default),qo[e]=m.default})(),p.current=e)},[e]),s("span",{class:`icon ${o}`,title:r||n,style:{width:`${a}px`,height:`${a}px`,...i},children:f&&s(Za,{icon:e,width:f.width,height:f.height,body:f.body,rotate:c,flip:u})})}function Ya(e,t=[]){!e||typeof e!="function"||se(()=>{const n=new CloseWatcher;return n.addEventListener("close",e),()=>{n.destroy()}},t)}const qa=window.CloseWatcher?Ya:()=>{},Ga=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]);qa(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,Ga)}var vo={exports:{}},Xa="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Ja=Xa;var Qa=Ja;function Yi(){}function qi(){}qi.resetWarningCache=Yi;var ec=function(){function e(r,o,i,a,l,c){if(c!==Qa){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:qi,resetWarningCache:Yi};return n.PropTypes=n,n};var pf=vo.exports;if(0)var mf,gf;else vo.exports=ec();var G=vo.exports;const yo=e=>!!e&&e[0]==="o",Xr=ha||(e=>e());const Nt=(e,t,n=1e-4)=>Math.abs(e-t)<n,bn=(e,t)=>e===!0||!!(e&&e[t]),He=(e,t)=>typeof e=="function"?e(t):e,tc="_szhsinMenu",nc=e=>e[tc];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),rc=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 Go(e,t){for(let n=0;n<e.length;n++)if(e[n]===t)return n;return-1}const oc=e=>({[e?`${e}ClassName`:"className"]:G.oneOfType([G.string,G.func])}),ic={className:G.string,...oc("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"])},vf={...ic,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},yf={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]),sc="szh-menu-container",Ge="szh-menu";const ac="arrow",_o="item",cc="divider",lc="header",uc="group",dc="submenu";const Gi=ct(),bo=ct({}),rr=ct({}),wo=ct({}),fc=ct({}),gr=ct({}),Re=Object.freeze({ENTER:"Enter",ESC:"Escape",SPACE:" ",HOME:"Home",END:"End",LEFT:"ArrowLeft",RIGHT:"ArrowRight",UP:"ArrowUp",DOWN:"ArrowDown"}),Me=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"}),hc=Object.freeze({entering:"opening",entered:"open",exiting:"closing",exited:"closed"}),$r="absolute",To="presentation",vr="menuitem",Xo={"aria-hidden":!0,role:vr};const pc=({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:sc,modifiers:he(()=>({theme:i,itemTransition:c}),[i,c]),className:e}),style:{position:"absolute",...n==null?void 0:n.style},ref:t,children:r})},mc=()=>{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)}}},gc=(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,_)=>Go(v,T)-Go(v,_)),i.sorted=!0};let h=-1,g;switch(c){case Me.RESET:break;case Me.SET:g=u;break;case Me.UNSET:g=v=>v===u?void 0:v;break;case Me.FIRST:m(),h=0,g=d[h];break;case Me.LAST:m(),h=d.length-1,g=d[h];break;case Me.SET_INDEX:m(),h=f,g=d[h];break;case Me.INCREASE:m(),h=p,h<0&&(h=d.indexOf(u)),h++,h>=d.length&&(h=0),g=d[h];break;case Me.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}},Jo=(e,t)=>Math.round(e)===t?e:t,Eo=e=>{const t=e.getBoundingClientRect();return t.width=Jo(t.width,e.offsetWidth),t.height=Jo(t.height,e.offsetHeight),t},vc=(e,t,n,r)=>{const o=Eo(t.current),i=e.current.getBoundingClientRect(),a=n===window?{left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight}:n.getBoundingClientRect(),l=rc(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}}},yc=({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},_c=({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?yc({menuY:g,arrowRef:f,anchorRect:e,containerRect:t,menuRect:n}):void 0,x:v,y:g,computedDirection:h}},bc=({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},wc=({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?bc({menuX:g,arrowRef:f,anchorRect:e,containerRect:t,menuRect:n}):void 0,x:g,y:v,computedDirection:h}},Tc=({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 _c(w);case"top":case"bottom":default:return wc(w)}},Wt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?_n:se;function Qo(e,t){typeof e=="function"?e(t):e.current=t}const Xt=(e,t)=>he(()=>e?t?n=>{Qo(e,n),Qo(t,n)}:e:t,[e,t]),ei=-9999,Xi=({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:M,gap:A=0,shift:O=0,children:P,onClose:x,...S})=>{const[V,B]=ee({x:ei,y:ei}),[D,$]=ee({}),[k,R]=ee(),[L,z]=ee(m),[N]=ee(mc),[C,K]=Di(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}=gc(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(Me.FIRST);break;case Re.END:de(Me.LAST);break;case Re.UP:de(Me.DECREASE,ge);break;case Re.DOWN:de(Me.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(Me.RESET),ft.current.focus()})},Pt=re=>{re.target===re.currentTarget&&N.off()},Ke=Ie(re=>{var Se;const je=a?(Se=a.current)==null?void 0:Se.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=vc(l,xe,me.menu,le);let{arrowX:ye,arrowY:tt,x:Pe,y:ze,computedDirection:Qt}=Tc({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 Se=ie;if(me.anchors.length&&Se==="initial"&&(Se="auto"),Se==="initial")return;const je=()=>{Se==="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),Se=d.current;return Se.addEventListener("scroll",re),()=>Se.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=Eo(ye);tt=ze.width,Pe=ze.height}tt===0||Pe===0||Nt(tt,Q.current.width,1)&&Nt(Pe,Q.current.height,1)||pa(()=>{ae.current(),K()})}),Se=xe.current;return re.observe(Se,{box:"border-box"}),()=>re.unobserve(Se)},[be]),se(()=>{if(!we){de(Me.RESET),Ve||R();return}const{position:re,alwaysUpdate:Se}=M||{},je=()=>{re===Ut.FIRST?de(Me.FIRST):re===Ut.LAST?de(Me.LAST):re>=-1&&de(Me.SET_INDEX,void 0,re)};if(Se)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,_,M,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,align:p,dir:L}),[E,p,L]),Tt=he(()=>({dir:L}),[L]),et=Xe({block:Ge,element:ac,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},S),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,...Xo,...u}),r&&s("li",{...Xo,...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(Gi.Provider,{value:ge,children:He(P,ht)})})})]});return c?s(pc,{...c,isOpen:we,children:Jt}):Jt},Ji=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:M,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(S,V){S.stopPropagation||He(v,S);let B=S.keepOpen;B===void 0&&(B=V&&S.key===Re.SPACE),B||He(A,{value:S.value,key:S.key,reason:wn.CLICK})},handleClose(S){He(A,{key:S,reason:wn.CLICK})}}),[v,A]);if(!M)return null;const x=s(gr.Provider,{value:O,children:s(wo.Provider,{value:P,children:s(Xi,{...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,Ec=5,Qi=6,xc=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],es=e=>({_s:e,status:xc[e],isEnter:e<ir,isMounted:e!==Qi,isResolved:e===or||e>sr}),eo=e=>e?Qi:Ec,Mc=(e,t)=>{switch(e){case Qr:case Jr:return or;case sr:case ir:return eo(t)}},Sc=e=>typeof e=="object"?[e.enter,e.exit]:[e,e],ti=(e,t,n,r,o)=>{clearTimeout(r.current);const i=es(e);t(i),n.current=i,o&&o({current:i})},kc=({enter:e=!0,exit:t=!0,preEnter:n,preExit:r,timeout:o,initialEntered:i,mountOnEnter:a,unmountOnExit:l,onStateChange:c}={})=>{const[u,f]=ee(()=>es(i?or:eo(a))),d=j(u),p=j(),[m,h]=Sc(o),g=Ie(()=>{const T=Mc(d.current._s,l);T&&ti(T,f,d,p,c)},[c,l]),v=Ie(T=>{const _=w=>{switch(ti(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 Ac=({initialOpen:e,initialMounted:t,unmountOnClose:n,transition:r,transitionTimeout:o=500}={})=>{const[{status:i},a,l]=kc({initialEntered:e,mountOnEnter:!t,unmountOnExit:n,timeout:o,enter:bn(r,"open"),exit:bn(r,"close")});return[{state:hc[i],endTransition:l},a]},ts=e=>{const[t,n]=Ac(e),[r,o]=ee(),i=(a,l)=>{o({position:a,alwaysUpdate:l}),n(!0)};return[{menuItemFocus:r,...t},n,i]},Ic=(e,t)=>{const[n]=ee({});return{onMouseDown:()=>{n.v=e&&e!=="closed"},onClick:r=>n.v?n.v=!1:t(!0,r)}},ns=(e,t)=>{const n=j(t);se(()=>{n.current!==t&&He(e,{open:t}),n.current=t},[e,t])},$c=Lt(function({"aria-label":t,captureFocus:n,initialOpen:r,menuButton:o,instanceRef:i,onMenuChange:a,...l},c){const[u,f,d]=ts(l),{state:p}=u,m=yo(p),h=j(null),g=Ic(p,(b,M)=>d(M.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)};nc(_.type)==="MenuButton"&&(E.isOpen=m);const w=Ri(_,E);return ns(a,m),Ni(i,()=>({openMenu:d,closeMenu:()=>f(!1)})),s(U,{children:[w,s(Ji,{...l,...u,"aria-label":t||(typeof _.props.children=="string"?_.props.children:"Menu"),anchorRef:h,ref:c,onClose:v})]})}),xo=(e,t)=>{const n=lt(t),r=Lt((o,i)=>{const a=j(null);return s(n,{...o,itemRef:a,externalRef:i,isHovering:Ne(Gi)===a.current})});return r.displayName=`WithHovering(${e})`,r},rs=(e,t,n)=>{Wt(()=>{if(e)return;const r=t.current;return n(r,!0),()=>{n(r)}},[e,t,n])},Lc=xo("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:M,submenuCtx:A,dispatch:O,updateItems:P}=Ne(bo),x=b!=="visible",[S,V,B]=ts(g),{state:D}=S,$=!!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(Me.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(Me.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())};rs($,f,P),ns(l,k),se(()=>A.toggle(k),[A,k]),se(()=>()=>clearTimeout(L.v),[L]),se(()=>{c&&M?f.current.focus():V(!1)},[c,M,V,f]),Ni(u,()=>({openMenu:(...ne)=>{M&&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(Xi,{...h,...S,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:dc,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()]})}),os=(e,t,n,r)=>{const{submenuCloseDelay:o}=Ne(gr),{isParentOpen:i,submenuCtx:a,dispatch:l,updateItems:c}=Ne(bo),u=()=>{!n&&!r&&l(Me.SET,e.current)},f=()=>{!r&&l(Me.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 rs(r,e,c),se(()=>{n&&i&&t.current&&t.current.focus()},[t,n,i]),{setHover:u,onBlur:d,onPointerMove:p,onPointerLeave:m}},ke=xo("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}=os(f,f,u,m),v=Ne(wo),T=Ne(fc),_=o==="radio",E=o==="checkbox",w=!!r&&!m&&!_&&!E,b=_?T.value===n:E?!!i:!1,M=S=>{if(m){S.stopPropagation(),S.preventDefault();return}const V={value:n,syntheticEvent:S};S.key!==void 0&&(V.key=S.key),E&&(V.checked=!b),_&&(V.name=T.name),He(c,V),_&&He(T.onRadioChange,V),v.handleClick(V,E||_)},A=S=>{if(u)switch(S.key){case Re.ENTER:S.preventDefault();case Re.SPACE:w?f.current.click():M(S)}},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:M},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})}),Cc=xo("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}=os(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:cc,className:t})})})),_f=lt(Lt(function({className:t,...n},r){return s("li",{role:To,...n,ref:r,className:Xe({block:Ge,element:lc,className:t})})})),bf=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=Eo(a.current).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:uc,className:t}),style:{...n,...l}})});const ni={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 Pc({url:e,size:t,alt:n="",squircle:r,...o}){t=ni[t]||t||ni.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(Pc),Zt=Lt((e,t)=>{var l;let n;try{n=ma()}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)}})}),Oc=document.documentElement,Vn=getComputedStyle(Oc),Dc=8;let is=[0,0,0,0];function ss(){const e=Vn.getPropertyValue("--sai-top"),t=Vn.getPropertyValue("--sai-right"),n=Vn.getPropertyValue("--sai-bottom"),r=Vn.getPropertyValue("--sai-left");is=[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(ss);function as(e=[]){return is.map((n,r)=>(n||Dc)+(e[r]||0)).join(" ")}CSS.supports("top: env(safe-area-inset-top)")&&window.addEventListener("resize",ss,{passive:!0});function Rc(){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 cs(e){const{containerProps:t,instanceRef:n}=e,r=Rc(),o=n!=null&&n.current?n:j();return s($c,{boundingBoxPadding:as(),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 Nc(e){const t=j();return s(Lc,{...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?Nc:cs,{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?ga(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 Fc({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(Fc,(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)}),zc=new Intl.Collator("en",{sensitivity:"base"});function Hc({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,""),M=b.replace(/[^a-z0-9@\.]/gi,""),A=!o&&(E===w||E===b||E===M||zc.compare(E,b)===0)||M===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(Hc,(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:{}},wf=ar.exports;(function(e,t){(function(n,r){e.exports=r()})(Mn,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()<k.date())return-D(k,$);var R=12*(k.year()-$.year())+(k.month()-$.month()),L=$.clone().add(R,d),z=k-L<0,N=$.clone().add(R+(z?-1:1),d);return+(-(R+(k-L)/(z?L-N:N-L))||0)},a:function(D){return D<0?Math.ceil(D)||0:Math.floor(D)},p:function(D){return{M:d,y:m,w:f,d:u,D:h,h:c,m:l,s:a,ms:i,Q:p}[D]||String(D||"").toLowerCase().replace(/s$/,"")},u:function(D){return D===void 0}},b="en",M={};M[b]=_;var A="$isDayjsObject",O=function(D){return D instanceof V||!(!D||!D[A])},P=function D($,k,R){var L;if(!$)return b;if(typeof $=="string"){var z=$.toLowerCase();M[z]&&(L=z),k&&(M[z]=k,L=z);var N=$.split("-");if(!L&&N.length>1)return D(N[0])}else{var C=$.name;M[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)},S=w;S.l=P,S.i=O,S.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(S.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 S},$.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)<this.startOf(R)},$.isBefore=function(k,R){return this.endOf(R)<x(k)},$.$g=function(k,R,L){return S.u(k)?this[R]:this.set(L,k)},$.unix=function(){return Math.floor(this.valueOf()/1e3)},$.valueOf=function(){return this.$d.getTime()},$.startOf=function(k,R){var L=this,z=!!S.u(R)||R,N=S.p(k),C=function(be,ie){var ue=S.w(L.$u?Date.UTC(L.$y,ie,be):new Date(L.$y,ie,be),L);return z?ue:ue.endOf(u)},K=function(be,ie){return S.w(L.toDate()[be].apply(L.toDate("s"),(z?[0,0,0,0]:[23,59,59,999]).slice(ie)),L)},Z=this.$W,te=this.$M,le=this.$D,Ee="set"+(this.$u?"UTC":"");switch(N){case m:return z?C(1,0):C(31,11);case d:return z?C(1,te):C(0,te+1);case f:var pe=this.$locale().weekStart||0,_e=(Z<pe?Z+7:Z)-pe;return C(z?le-_e:le+(6-_e),te);case u:case h:return K(Ee+"Hours",0);case c:return K(Ee+"Minutes",1);case l:return K(Ee+"Seconds",2);case a:return K(Ee+"Milliseconds",3);default:return this.clone()}},$.endOf=function(k){return this.startOf(k,!1)},$.$set=function(k,R){var L,z=S.p(k),N="set"+(this.$u?"UTC":""),C=(L={},L[u]=N+"Date",L[h]=N+"Date",L[d]=N+"Month",L[m]=N+"FullYear",L[c]=N+"Hours",L[l]=N+"Minutes",L[a]=N+"Seconds",L[i]=N+"Milliseconds",L)[z],K=z===u?this.$D+(R-this.$W):R;if(z===d||z===m){var Z=this.clone().set(h,1);Z.$d[C](K),Z.init(),this.$d=Z.set(h,Math.min(this.$D,Z.daysInMonth())).$d}else C&&this.$d[C](K);return this.init(),this},$.set=function(k,R){return this.clone().$set(k,R)},$.get=function(k){return this[S.p(k)]()},$.add=function(k,R){var L,z=this;k=Number(k);var N=S.p(R),C=function(te){var le=x(z);return S.w(le.date(le.date()+Math.round(te*k)),z)};if(N===d)return this.set(d,this.$M+k);if(N===m)return this.set(m,this.$y+k);if(N===u)return C(1);if(N===f)return C(7);var K=(L={},L[l]=r,L[c]=o,L[a]=n,L)[N]||1,Z=this.$d.getTime()+k*K;return S.w(Z,this)},$.subtract=function(k,R){return this.add(-1*k,R)},$.format=function(k){var R=this,L=this.$locale();if(!this.isValid())return L.invalidDate||g;var z=k||"YYYY-MM-DDTHH:mm:ssZ",N=S.z(this),C=this.$H,K=this.$m,Z=this.$M,te=L.weekdays,le=L.months,Ee=L.meridiem,pe=function(ie,ue,q,ne){return ie&&(ie[ue]||ie(R,z))||q[ue].slice(0,ne)},_e=function(ie){return S.s(C%12||12,ie,"0")},be=Ee||function(ie,ue,q){var ne=ie<12?"AM":"PM";return q?ne.toLowerCase():ne};return z.replace(T,function(ie,ue){return ue||function(q){switch(q){case"YY":return String(R.$y).slice(-2);case"YYYY":return S.s(R.$y,4,"0");case"M":return Z+1;case"MM":return S.s(Z+1,2,"0");case"MMM":return pe(L.monthsShort,Z,le,3);case"MMMM":return pe(le,Z);case"D":return R.$D;case"DD":return S.s(R.$D,2,"0");case"d":return String(R.$W);case"dd":return pe(L.weekdaysMin,R.$W,te,2);case"ddd":return pe(L.weekdaysShort,R.$W,te,3);case"dddd":return te[R.$W];case"H":return String(C);case"HH":return S.s(C,2,"0");case"h":return _e(1);case"hh":return _e(2);case"a":return be(C,K,!0);case"A":return be(C,K,!1);case"m":return String(K);case"mm":return S.s(K,2,"0");case"s":return String(R.$s);case"ss":return S.s(R.$s,2,"0");case"SSS":return S.s(R.$ms,3,"0");case"Z":return N}return null}(ie)||N.replace(":","")})},$.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},$.diff=function(k,R,L){var z,N=this,C=S.p(R),K=x(k),Z=(K.utcOffset()-this.utcOffset())*r,te=this-K,le=function(){return S.m(N,K)};switch(C){case m:z=le()/12;break;case d:z=le();break;case p:z=le()/3;break;case f:z=(te-Z)/6048e5;break;case u:z=(te-Z)/864e5;break;case c:z=te/o;break;case l:z=te/r;break;case a:z=te/n;break;default:z=te}return L?z:S.a(z)},$.daysInMonth=function(){return this.endOf(d).$D},$.$locale=function(){return M[this.$L]},$.locale=function(k,R){if(!k)return this.$L;var L=this.clone(),z=P(k,R,!0);return z&&(L.$L=z),L},$.clone=function(){return S.w(this.$d,this)},$.toDate=function(){return new Date(this.valueOf())},$.toJSON=function(){return this.isValid()?this.toISOString():null},$.toISOString=function(){return this.$d.toISOString()},$.toString=function(){return this.$d.toUTCString()},D}(),B=V.prototype;return x.prototype=B,[["$ms",i],["$s",a],["$m",l],["$H",c],["$W",u],["$M",d],["$y",m],["$D",h]].forEach(function(D){B[D[1]]=function($){return this.$g($,D[0],D[1])}}),x.extend=function(D,$){return D.$i||(D($,V,x),D.$i=!0),x},x.locale=P,x.isDayjs=O,x.unix=function(D){return x(1e3*D)},x.en=M[b],x.Ls=M,x.p={},x})})(ar,ar.exports);var Vc=ar.exports;const At=$t(Vc);var cr={exports:{}},Tf=cr.exports;(function(e,t){(function(n,r){e.exports=r()})(Mn,function(){return function(n){var r={};function o(i){if(r[i])return r[i].exports;var a=r[i]={i,l:!1,exports:{}};return n[i].call(a.exports,a,a.exports,o),a.l=!0,a.exports}return o.m=n,o.c=r,o.d=function(i,a,l){o.o(i,a)||Object.defineProperty(i,a,{enumerable:!0,get:l})},o.r=function(i){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},o.t=function(i,a){if(1&a&&(i=o(i)),8&a||4&a&&typeof i=="object"&&i&&i.__esModule)return i;var l=Object.create(null);if(o.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:i}),2&a&&typeof i!="string")for(var c in i)o.d(l,c,(function(u){return i[u]}).bind(null,c));return l},o.n=function(i){var a=i&&i.__esModule?function(){return i.default}:function(){return i};return o.d(a,"a",a),a},o.o=function(i,a){return Object.prototype.hasOwnProperty.call(i,a)},o.p="",o(o.s=1)}([function(n,r,o){var i,a=(function(){var l={ns:1e-6,us:.001,µs:.001,μs:.001,ms:1,s:1e3,m:6e4,h:36e5,d:864e5,w:6048e5},c=function(u){if(u instanceof c)return u;switch(typeof u){case"number":if(!isFinite(u))throw new Error("invalid duration: "+u);this._milliseconds=u;break;case"string":this._milliseconds=c.parse(u).valueOf();break;case"undefined":this._milliseconds=0;break;default:throw new Error("invalid duration: "+u)}};return c.millisecond=new c(1),c.second=new c(1e3),c.minute=new c(6e4),c.hour=new c(36e5),c.day=new c(864e5),c.week=new c(6048e5),c.prototype.nanoseconds=function(){return Math.floor(this._milliseconds/1e-6)},c.prototype.microseconds=function(){return Math.floor(this._milliseconds/.001)},c.prototype.milliseconds=function(){return this._milliseconds},c.prototype.seconds=function(){return Math.floor(this._milliseconds/1e3)},c.prototype.minutes=function(){return Math.floor(this._milliseconds/6e4)},c.prototype.hours=function(){return Math.floor(this._milliseconds/36e5)},c.prototype.days=function(){return Math.floor(this._milliseconds/864e5)},c.prototype.weeks=function(){return Math.floor(this._milliseconds/6048e5)},c.prototype.toString=function(){var u="",f=Math.abs(this._milliseconds),d=this._milliseconds<0?"-":"";if(f===0)return"0";var p=Math.floor(f/36e5);p!==0&&(f-=36e5*p,u+=p.toString()+"h");var m=Math.floor(f/6e4);m!==0&&(f-=6e4*m,u+=m.toString()+"m");var h=Math.floor(f/1e3);return h!==0&&(f-=1e3*h,u+=h.toString()+"s"),f!==0&&(u+=f.toString()+"ms"),d+u},c.prototype.valueOf=function(){return this._milliseconds},c.parse=function(u){if(u==="0"||u==="+0"||u==="-0")return new c(0);for(var f,d,p,m=/([\-\+\d\.]+)([a-zµμ]+)/g,h=0,g=0,v=u[0]==="-"?-1:1;p=m.exec(u);){if(f=p[2],d=Math.abs(parseFloat(p[1])),g++,isNaN(d))throw new Error("invalid duration");if(l[f]===void 0)throw new Error("invalid unit: "+f);h+=d*l[f]}if(g===0)throw new Error("invalid duration");return new c(Math.floor(h)*v)},c.prototype.roundTo=function(u){var f=new c(u).valueOf();this._milliseconds=f*Math.round(this._milliseconds/f)},c.prototype.isGreaterThan=function(u){return this.valueOf()>new c(u).valueOf()},c.prototype.isLessThan=function(u){return this.valueOf()<new c(u).valueOf()},c.prototype.isEqualTo=function(u){return this.valueOf()===new c(u).valueOf()},c.prototype.after=function(u){return new Date(u.valueOf()+this._milliseconds)},c.since=function(u){return new c(new Date().valueOf()-u.valueOf())},c.until=function(u){return new c(u.valueOf()-new Date().valueOf())},c.fromMicroseconds=function(u){var f=Math.floor(u/1e3);return new c(f)},c.fromNanoseconds=function(u){var f=Math.floor(u/1e6);return new c(f)},c.between=function(u,f){return new c(f.valueOf()-u.valueOf())},c.add=function(u,f){return new c(u+f)},c.subtract=function(u,f){return new c(u-f)},c.multiply=function(u,f){return new c(u*f)},c.divide=function(u,f){return u/f},c}).call(this);(i=(function(){return a}).apply(r,[]))===void 0||(n.exports=i)},function(n,r,o){"use strict";o.r(r);var i=o(0),a=o.n(i),l={en:{now:"Now",seconds:"%ds",minutes:"%dm",hours:"%dh",days:"MMM D",years:"MMM D, YYYY"},es:{now:"Ahora",seconds:"%ds",minutes:"%dmin",hours:"%dh",days:"D MMM.",years:"D MMM. YYYY"},ru:{now:"1 с",seconds:"%d с",minutes:"%d мин",hours:"%d ч",days:"D MMM.",years:"D MMM. YYYY"},fr:{now:"Μaintenant",seconds:"%ds",minutes:"%dm",hours:"%dh",days:"MMM D",years:"MMM D, YYYY"},el:{now:"Τώρα",seconds:"%dδ",minutes:"%dλ",hours:"%dω",days:"MMM D",years:"MMM D, YYYY"}};r.default=function(c,u,f){u.prototype.twitter=function(){return function(d){var p=d.$locale(),m=p?p.name:"en",h=Math.abs(d.diff(new Date)),g=null,v=null;if(g=h<=1e3?"now":h<6e4?"seconds":h<36e5?"minutes":h<864e5?"hours":h<31536e6?"days":"years",v&&g||!(["seconds","minutes","hours"].indexOf(g)>-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 jc=cr.exports;const Bc=$t(jc);var lr={exports:{}},Ef=lr.exports;(function(e,t){(function(n,r){e.exports=r()})(Mn,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 Uc=lr.exports;const Wc=$t(Uc);var ur={exports:{}},xf=ur.exports;(function(e,t){(function(n,r){e.exports=r()})(Mn,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;w<E;w+=1){var b=_[w];b.d&&(h=p?o(u).diff(d,b.d,!0):d.diff(u,b.d,!0));var M=(n.rounding||Math.round)(Math.abs(h));if(v=h>0,M<=b.r||!b.r){M<=1&&w>0&&(b=_[w-1]);var A=T[b.l];m&&(M=m(""+M)),g=typeof A=="string"?A.replace("%d",M):A(M,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 Kc=ur.exports;const Zc=$t(Kc);At.extend(Bc);At.extend(Wc);At.extend(Zc);const Yc=new Intl.DateTimeFormat;function It({datetime:e,format:t}){if(!e)return null;const[n,r]=Di(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=Yc.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 qc=[{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 Gc(...e){try{return Sa(...e)}catch{return e[2]||!1}}const no=ut(Gc),Xc=[new Intl.DateTimeFormat().resolvedOptions().locale,...navigator.languages],Jc=no(Xc,qc.map(e=>e.code.replace("_","-")),"en");function ls(e=!1){if(e){const{contentTranslationTargetLanguage:t}=W.settings;if(t)return t}return Jc}const Qc=new Intl.DisplayNames(navigator.languages,{type:"language"});function el(e){try{return Qc.of(e)}catch{return null}}const Cr=ut(el),tl=/^[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(tl);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},ri=e=>e==="*"||e==="x"||e==="X",oi=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},nl=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],rl=(e,t)=>{if(ri(e)||ri(t))return 0;const[n,r]=nl(oi(e),oi(t));return n>r?1:n<r?-1:0},Bt=(e,t)=>{for(let n=0;n<Math.max(e.length,t.length);n++){const r=rl(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0},ol=(e,t)=>{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},il=(e,t,n)=>{sl(n);const r=ol(e,t);return us[n].includes(r)},us={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},ii=Object.keys(us),sl=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(ii.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${ii.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 il(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 al={"@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,si={"@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}=va(),r=`${n}-${e}`;if(jn[r])return jn[r];if(si[e])return jn[r]=si[e].test(t);const o=al[e];return o?jn[r]=Jn(t,o,{includePrerelease:!0,loose:!0}):!1}catch{return!1}}const Kt=2147483647,Ze=36,Mo=1,Tn=26,cl=38,ll=700,ds=72,fs=128,hs="-",ul=/^xn--/,dl=/[^\0-\x7F]/,fl=/[\x2E\u3002\uFF0E\uFF61]/g,hl={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Or=Ze-Mo,Ye=Math.floor,Dr=String.fromCharCode;function mt(e){throw new RangeError(hl[e])}function pl(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function ps(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(fl,".");const o=e.split("."),i=pl(o,t).join(".");return r+i}function ms(e){const t=[];let n=0;const r=e.length;for(;n<r;){const o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){const i=e.charCodeAt(n++);(i&64512)==56320?t.push(((o&1023)<<10)+(i&1023)+65536):(t.push(o),n--)}else t.push(o)}return t}const ml=e=>String.fromCodePoint(...e),gl=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:Ze},ai=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},gs=function(e,t,n){let r=0;for(e=n?Ye(e/ll):e>>1,e+=Ye(e/t);e>Or*Tn>>1;r+=Ze)e=Ye(e/Or);return Ye(r+(Or+1)*e/(e+cl))},vs=function(e){const t=[],n=e.length;let r=0,o=fs,i=ds,a=e.lastIndexOf(hs);a<0&&(a=0);for(let l=0;l<a;++l)e.charCodeAt(l)>=128&&mt("not-basic"),t.push(e.charCodeAt(l));for(let l=a>0?a+1:0;l<n;){const c=r;for(let f=1,d=Ze;;d+=Ze){l>=n&&mt("invalid-input");const p=gl(e.charCodeAt(l++));p>=Ze&&mt("invalid-input"),p>Ye((Kt-r)/f)&&mt("overflow"),r+=p*f;const m=d<=i?Mo:d>=i+Tn?Tn:d-i;if(p<m)break;const h=Ze-m;f>Ye(Kt/h)&&mt("overflow"),f*=h}const u=t.length+1;i=gs(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)},ys=function(e){const t=[];e=ms(e);const n=e.length;let r=fs,o=0,i=ds;for(const c of e)c<128&&t.push(Dr(c));const a=t.length;let l=a;for(a&&t.push(hs);l<n;){let c=Kt;for(const f of e)f>=r&&f<c&&(c=f);const u=l+1;c-r>Ye((Kt-o)/u)&&mt("overflow"),o+=(c-r)*u,r=c;for(const f of e)if(f<r&&++o>Kt&&mt("overflow"),f===r){let d=o;for(let p=Ze;;p+=Ze){const m=p<=i?Mo:p>=i+Tn?Tn:p-i;if(d<m)break;const h=d-m,g=Ze-m;t.push(Dr(ai(m+h%g,0))),d=Ye(h/g)}t.push(Dr(ai(d,0))),i=gs(o,u,l===a),o=0,++l}++o,++r}return t.join("")},vl=function(e){return ps(e,function(t){return ul.test(t)?vs(t.slice(4).toLowerCase()):t})},yl=function(e){return ps(e,function(t){return dl.test(t)?"xn--"+ys(t):t})},_s={version:"2.3.1",ucs2:{decode:ms,encode:ml},decode:vs,encode:ys,toASCII:yl,toUnicode:vl};function fr(e,t=[]){return e?(!t.length||e.indexOf(":")===-1||t.forEach(n=>{const{shortcode:r,staticUrl:o,url:i}=n;e=e.replace(new RegExp(`:${r}:`,"g"),`<picture><source srcset="${o}" media="(prefers-reduced-motion: reduce)"></source><img class="shortcode-emoji emoji" src="${i}" alt=":${r}:" width="16" height="16" loading="lazy" decoding="async" /></picture>`)}),e):""}const Ft=document.createElement("div"),_l=["u-url","mention","hashtag"];function bl(e,t={}){const{emojis:n,postEnhanceDOM:r=()=>{}}=t;let o=e;const i=document.createElement("div");i.innerHTML=o;const a=/<a/i.test(o),l=o.includes("```");if(a&&(i.querySelectorAll('a:not([target="_blank"])').forEach(d=>{d.setAttribute("target","_blank")}),i.querySelectorAll("a[class]").forEach(d=>{d.classList.forEach(p=>{_l.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"),xl(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=`@<span>${g}</span>`,f.push([g,v])):d.innerHTML=`@<span>${g}@${v}</span>`),d.classList.add("mention")}/^#[^#]+$/g.test(p)&&(m||(d.innerHTML=`#<span>${p.slice(1)}</span>`),d.classList.add("mention","hashtag"))})}let c;if(o.includes(":")&&(c=Nr(i),c.forEach(u=>{let f=u.nodeValue.replace(/&/g,"&").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=`<code>${f.innerHTML.trim()}</code>`,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=`<code tabindex="0">${v}</code>`,d.replaceWith(g),p.forEach(T=>T.remove())}}),o.includes("`")&&(c=Nr(i),c.forEach(u=>{let f=u.nodeValue.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");/`[^`]+`/g.test(f)&&(f=f.replaceAll(/(`[^]+?`)/g,"<code>$1</code>")),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,"<").replace(/>/g,">");/@[a-zA-Z0-9_]+@twitter\.com/g.test(f)&&(f=f.replaceAll(/(@([a-zA-Z0-9_]+)@twitter\.com)/g,'<a href="https://twitter.com/$2" rel="nofollow noopener noreferrer" target="_blank">$1</a>')),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;h<d.childNodes.length;h++){const g=d.childNodes[h];if(g.nodeType===Node.TEXT_NODE){if(g.textContent.trim()!=="")return!1}else if(g.tagName!=="BR")if(g.tagName==="A"){const v=g.textContent.trim();if(!v||!v.startsWith("#"))return!1;m++}else return!1}if(m>3||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("<img")&&i.querySelectorAll("img").forEach(u=>{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 bs=ut(bl),wl=["STYLE","IMG","VIDEO","AUDIO","AREA","MAP","TRACK","EMBED","IFRAME","OBJECT","PICTURE","PORTAL","SOURCE","SVG","MATH","CANVAS","NOSCRIPT","SCRIPT","INPUT","OPTION","TEXTAREA","SLOT","TEMPLATE"],Tl=Object.fromEntries(wl.map(e=>[e,!0])),El=/^(https?:\/\/(www\.)?|xmpp:)/,Rr=30;function xl(e){var t;if(!(!e||(t=e.querySelector)!=null&&t.call(e,"*")))try{const n=e.innerText.trim(),r=(n.match(El)||[])[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=`<span class="invisible">${r}</span><span class=${a?"ellipsis":""}>${o}</span><span class="invisible">${i}</span>`}catch{}}function Nr(e,t={}){var a;const n=[],r=Object.assign({},Tl,(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 Ml(e,t){if(!e)return"";const{preProcess:n}=t||{};return zt.innerHTML=e.replace(/<\/p>/g,`</p>
|
||
|
||
`).replace(/<\/li>/g,`</li>
|
||
`),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(Ml);function Sl(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:kl}=new Intl.DateTimeFormat().resolvedOptions(),Al=e=>{const{dateYear:t,hideTime:n,formatOpts:r}=e||{},o=new Date().getFullYear();return Intl.DateTimeFormat(kl,{year:t===o?void 0:"numeric",month:"short",day:"numeric",hour:n?void 0:"numeric",minute:n?void 0:"numeric",...r})},Il=ut(Al);function En(e,t){return e instanceof Date||(e=new Date(e)),Il({dateYear:e.getFullYear(),...t}).format(e)}const{locale:$l}=Intl.NumberFormat().resolvedOptions(),yt=Intl.NumberFormat($l,{notation:"compact",roundingMode:"floor"}).format,ci=5e3;function Un(e){if(e||(e=!0),W.showCompose){W.composerState.minimized?Ce({duration:ci,text:"A draft post is currently minimized. Post or discard it before creating a new one."}):Ce({duration:ci,text:"A post is currently open. Post or discard it before creating a new one."});return}Wa(),W.showCompose=e}function Mf({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:M,lastStatusAt:A,bot:O,fields:P,note:x,group:S,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(M),!!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"]})}),!!S&&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:bs(L.value,{emojis:w})}})]}),!O&&!S&&!N&&!V&&!L&&!!B&&s("span",{class:"created-at",children:["Joined"," ",s("time",{datetime:B,children:En(B,{hideTime:!0})})]})]})]})]})}function li(e){const{className:t,disabled:n,...r}=e;return s(Cc,{className:t,disabled:n,children:({ref:o,closeMenu:i})=>s(Zt,{...r,ref:o,onClick:({detail:a})=>i(a===0?"Enter":void 0)})})}var ws={};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 Ll=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<this._errors.length;r++){var o=this._errors[r],i=o.message,a=(e[i]||0)+1;e[i]=a,a>=n&&(t=o,n=a)}return t};(function(e){var t=Ll;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;a<r.retries;a++)i.push(this.createTimeout(a,r));return n&&n.forever&&!i.length&&i.push(this.createTimeout(a,r)),i.sort(function(l,c){return l-c}),i},e.createTimeout=function(n,r){var o=r.randomize?Math.random()+1:1,i=Math.round(o*Math.max(r.minTimeout,1)*Math.pow(r.factor,n));return i=Math.min(i,r.maxTimeout),i},e.wrap=function(n,r,o){if(r instanceof Array&&(o=r,r=null),!o){o=[];for(var i in n)typeof n[i]=="function"&&o.push(i)}for(var a=0;a<o.length;a++){var l=o[a],c=n[l];n[l]=(function(f){var d=e.operation(r),p=Array.prototype.slice.call(arguments,1),m=p.pop();p.push(function(h){d.retry(h)||(h&&(arguments[0]=d.mainError()),m.apply(this,arguments))}),d.attempt(function(){f.apply(n,p)})}).bind(n,c),n[l].options=r}}})(ws);var Cl=ws;const Pl=$t(Cl),Ol=Object.prototype.toString,Dl=e=>Ol.call(e)==="[object Error]",Rl=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 Nl(e){return e&&Dl(e)&&e.name==="TypeError"&&typeof e.message=="string"?e.message==="Load failed"?e.stack===void 0:Rl.has(e.message):!1}class Fl 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 ui=(e,t,n)=>{const r=n.retries-(t-1);return e.attemptNumber=t,e.retriesLeft=r,e};async function zl(e,t){return new Promise((n,r)=>{t={onFailedAttempt(){},retries:10,shouldRetry:()=>!0,...t};const o=Pl.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 Fl)throw c.originalError;if(c instanceof TypeError&&!Nl(c))throw c;if(ui(c,l,t),await t.shouldRetry(c)||(o.stop(),r(c)),await t.onFailedAttempt(c),!o.retry(c))throw o.mainError()}catch(u){ui(u,l,t),a(),r(u)}}})})}const Hl=[{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 Vl=Object.defineProperty,jl=(e,t,n)=>t in e?Vl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Wn=(e,t,n)=>jl(e,typeof t!="symbol"?t+"":t,n),ro=new Map,Kn=new WeakMap,di=0,Bl=void 0;function Ul(e){return e?(Kn.has(e)||(di+=1,Kn.set(e,di.toString())),Kn.get(e)):"0"}function Wl(e){return Object.keys(e).sort().filter(t=>e[t]!==void 0).map(t=>`${t}_${t==="root"?Ul(e.root):e[t]}`).toString()}function Kl(e){const t=Wl(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 Ts(e,t,n={},r=Bl){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}=Kl(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 Zl(e){return typeof e.children!="function"}var Sf=class extends Fi{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(),Zl(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=Ts(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 ya(t||"div",{ref:this.handleNode,...p},e)}};function Yl({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=Ts(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 fi=48,Fr={};function Es({id:e,children:t}){const n=j(),r=!!Fr[e],[o,i]=ee(!1),[a,l]=ee(r||!1),{ref:c}=Yl({root:null,rootMargin:`-${fi}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>fi&&(u.top<window.innerHeight?i(!0):l(!0),e&&(Fr[e]=!0))},[]),a?t:s("div",{ref:n,class:"shazam-container no-animation",hidden:!o,children:s("div",{ref:c,class:"shazam-container-inner",children:t})})}var ql={BASE_URL:"./",DEV:!1,MODE:"production",PHANPY_CLIENT_NAME:"Phanpy",PHANPY_LINGVA_INSTANCES:"lingva.phanpy.social lingva.lunar.icu lingva.garudalinux.org translate.plausibility.cloud",PHANPY_PRIVACY_POLICY_URL:"https://github.com/cheeaun/phanpy/blob/main/PRIVACY.MD",PHANPY_WEBSITE:"https://phanpy.social",PROD:!0,SSR:!1,VITE_APP_ENV:"production"};const{PHANPY_LINGVA_INSTANCES:hi}=ql,vn=hi?hi.split(/\s+/):[],Gl=zi({limit:1,interval:2e3});let zr=0;function Xl(e,t,n){return zl(()=>{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 xs=1e3*60*60,Ms=ho(Xl,{maxAge:xs}),Jl=ho(Gl(Ms),{maxAge:xs});function Ql({forceTranslate:e,sourceLanguage:t,onTranslate:n,text:r="",mini:o,autoDetected:i}){const a=ls(!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?Jl:Ms);const E=async()=>{var w,b;c("loading");try{const{content:M,detectedSourceLanguage:A,provider:O,error:P,...x}=await n(r,_.current,a);if(M){if(A){const S=Cr(A);h(S)}if(O==="lingva"){const S=(b=(w=x==null?void 0:x.info)==null?void 0:w.pronunciation)==null?void 0:b.query;S&&f(S)}p(M),c("default"),!o&&M.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(Es,{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:Hl.map(w=>s("option",{value:w.code,children:w.code==="auto"?`Auto (${m??"…"})`:w.name}))})," ",s("span",{children:["→ ",T]}),s(Hi,{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 eu=vn!=null&&vn.length?Ql:()=>null;function dt(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Ss(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=Ss("keyval-store","keyval")),Hr}function tu(e,t=Ct()){return t("readonly",n=>dt(n.get(e)))}function nu(e,t,n=Ct()){return n("readwrite",r=>(r.put(t,e),dt(r.transaction)))}function ru(e,t=Ct()){return t("readonly",n=>Promise.all(e.map(r=>dt(n.get(r)))))}function ou(e,t=Ct()){return t("readwrite",n=>(n.delete(e),dt(n.transaction)))}function iu(e,t=Ct()){return t("readwrite",n=>(e.forEach(r=>n.delete(r)),dt(n.transaction)))}function su(e=Ct()){return e("readwrite",t=>(t.clear(),dt(t.transaction)))}function au(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},dt(e.transaction)}function cu(e=Ct()){return e("readonly",t=>{if(t.getAllKeys)return dt(t.getAllKeys());const n=[];return au(t,r=>n.push(r.key)).then(()=>n)})}function pi(e,t){const n=Ss(e,t);return{set:(r,o)=>nu(r,o,n),get:r=>tu(r,n),getMany:r=>ru(r,n),del:r=>ou(r,n),delMany:r=>iu(r,n),clear:()=>su(n),keys:()=>cu(n)}}const kf={drafts:pi("drafts-db","drafts-store"),catchup:pi("catchup-db","catchup-store")};async function Af(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=`
|
||
<style ${n}>
|
||
:host {
|
||
contain: content;
|
||
display: block;
|
||
position: relative;
|
||
width: 100%;
|
||
padding-bottom: calc(100% / (16 / 9));
|
||
}
|
||
|
||
@media (max-width: 40em) {
|
||
:host([short]) {
|
||
padding-bottom: calc(100% / (9 / 16));
|
||
}
|
||
}
|
||
|
||
#frame, #fallbackPlaceholder, iframe {
|
||
position: absolute;
|
||
width: 100%;
|
||
height: 100%;
|
||
left: 0;
|
||
}
|
||
|
||
#frame {
|
||
cursor: pointer;
|
||
}
|
||
|
||
#fallbackPlaceholder {
|
||
object-fit: cover;
|
||
}
|
||
|
||
#frame::before {
|
||
content: '';
|
||
display: block;
|
||
position: absolute;
|
||
top: 0;
|
||
background-image: linear-gradient(180deg, #111 -20%, transparent 90%);
|
||
height: 60px;
|
||
width: 100%;
|
||
z-index: 1;
|
||
}
|
||
|
||
#playButton {
|
||
width: 68px;
|
||
height: 48px;
|
||
background-color: transparent;
|
||
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68 48"><path d="M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55c-2.93.78-4.63 3.26-5.42 6.19C.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26z" fill="red"/><path d="M45 24 27 14v20" fill="white"/></svg>');
|
||
z-index: 1;
|
||
border: 0;
|
||
border-radius: inherit;
|
||
}
|
||
|
||
#playButton:before {
|
||
content: '';
|
||
border-style: solid;
|
||
border-width: 11px 0 11px 19px;
|
||
border-color: transparent transparent transparent #fff;
|
||
}
|
||
|
||
#playButton,
|
||
#playButton:before {
|
||
position: absolute;
|
||
top: 50%;
|
||
left: 50%;
|
||
transform: translate3d(-50%, -50%, 0);
|
||
cursor: inherit;
|
||
}
|
||
|
||
/* Post-click styles */
|
||
.activated {
|
||
cursor: unset;
|
||
}
|
||
|
||
#frame.activated::before,
|
||
#frame.activated > #playButton {
|
||
display: none;
|
||
}
|
||
</style>
|
||
<div id="frame">
|
||
<picture>
|
||
<source id="webpPlaceholder" type="image/webp">
|
||
<source id="jpegPlaceholder" type="image/jpeg">
|
||
<img id="fallbackPlaceholder" referrerpolicy="origin" loading="lazy">
|
||
</picture>
|
||
<button id="playButton"></button>
|
||
</div>
|
||
`,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=`
|
||
<iframe frameborder="0" title="${this.videoTitle}"
|
||
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen
|
||
src="https://www.youtube${r}.com/embed/${o}autoplay=${n}&${this.params}"
|
||
></iframe>`;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 lu="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~",Qn=(e,t,n)=>{let r=0;for(;t<n;)r*=83,r+=lu.indexOf(e[t++]);return r},ks=Math.pow,xn=Math.PI,uu=xn*2,As=3294.6,Is=269.025,du=e=>e>10.31475?ks(e/Is+.052132,2.4):e/As,Vr=e=>~~(e>1227e-8?Is*ks(e,.416666)-13.025:e*As+1),yn=e=>(e<0?-1:1)*e*e,mi=e=>{for(e+=xn/2;e>xn;)e-=uu;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 fu(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 M=(Qn(e,1,2)+1)/13446*(r|1),A=new Float64Array(l*3),O=So(e);for(c=0;c<3;c++)A[c]=du(O[c]);for(c=1;c<l;c++)b=Qn(e,4+c*2,6+c*2),A[c*3]=yn(~~(b/(19*19))-9)*M,A[c*3+1]=yn(~~(b/19)%19-9)*M,A[c*3+2]=yn(b%19-9)*M;const P=t*4,x=new Uint8ClampedArray(P*n);for(d=0;d<n;d++)for(E=xn*d/n,f=0;f<t;f++){for(p=0,m=0,h=0,w=xn*f/t,u=0;u<a;u++)for(v=mi(E*u),c=0;c<i;c++)g=mi(w*c)*v,T=(c+u*i)*3,p+=A[T]*g,m+=A[T+1]*g,h+=A[T+2]*g;_=4*f+d*P,x[_]=Vr(p),x[_+1]=Vr(m),x[_+2]=Vr(h),x[_+3]=255}return x}const hu=(e,t={})=>{const n=t.char||" ",r=t.count||2;let o=0;const i=[];return e.reverse().reduce((a,l)=>{i.length&&o&&i[o]&&i[o]===l.substring(1,i[o].length+1)&&(i.splice(o,1),o--);const u=[`${n.repeat(o?o*r:0)}${l}`,...a];return l.substring(0,2)==="</"&&(o++,i[o]=l.substring(2,l.length-1)),u},[]).join(`
|
||
`)};var pu=hu;const $s=e=>e.trim().replace(/(^(\s|\t)+|(( |\t)+)$)/gm,""),mu=e=>{const t=$s(e).split(`
|
||
`),n=[];let r="";for(let o=0;o<t.length;o+=1){const i=t[o];if(i.endsWith("/>")){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 gu={mergeAttributesWithElements:mu,removeEmptyLines:$s};const vu=pu,{mergeAttributesWithElements:yu}=gu,_u=(e,t={})=>{const n=yu(e);return vu(n,t)};var bu=_u;const wu=$t(bu);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 Ls=()=>typeof window=="object"?(window==null?void 0:window.PointerEvent)??null:null,Tu=()=>typeof window=="object"?(window==null?void 0:window.TouchEvent)??null:null;function Cs(e){const{nativeEvent:t}=e,n=Tu();return n&&t instanceof n||"touches"in e}function Ps(e){const t=Ls();return e.nativeEvent instanceof MouseEvent&&!(t&&e.nativeEvent instanceof t)}function Os(e){const{nativeEvent:t}=e;if(!t)return!1;const n=Ls();return n&&t instanceof n||"pointerId"in t}function gi(e){return Ps(e)||Cs(e)||Os(e)}function vi(e){return Cs(e)?{x:e.touches[0].pageX,y:e.touches[0].pageY}:Ps(e)||Os(e)?{x:e.pageX,y:e.pageY}:null}function Eu(e){return{target:e.target,currentTarget:e.currentTarget,nativeEvent:e,persist:()=>{}}}function Ds(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=>M=>{p.current||gi(M)&&(a!==void 0&&!a(M)||(n&&M.persist(),l==null||l(M,{context:b}),v.current=vi(M),p.current=!0,m.current=M.currentTarget,h.current=setTimeout(()=>{g.current&&(g.current(M,{context:b}),d.current=!0)},t)))},[n,a,l,t]),_=Ie(b=>(M,A)=>{gi(M)&&p.current&&(v.current=null,n&&M.persist(),d.current?u==null||u(M,{context:b}):p.current&&(f==null||f(M,{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=>M=>{if(c==null||c(M,{context:b}),o!==!1&&v.current){const A=vi(M);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)(M,pn.CancelledByMovement)}}},[_,o,c]),w=Ie(b=>{if(e===null)return{};switch(r){case hn.Mouse:{const M={onMouseDown:T(b),onMouseMove:E(b),onMouseUp:_(b)};return i&&(M.onMouseLeave=A=>{_(b)(A,pn.CancelledOutsideElement)}),M}case hn.Touch:return{onTouchStart:T(b),onTouchMove:E(b),onTouchEnd:_(b)};case hn.Pointer:{const M={onPointerDown:T(b),onPointerMove:E(b),onPointerUp:_(b)};return i&&(M.onPointerLeave=A=>_(b)(A,pn.CancelledOutsideElement)),M}}},[e,_,i,r,E,T]);return se(()=>{if(!window)return;function b(M){const A=Eu(M);_()(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 xu({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),M=d.every(A=>A.votesCount!==null);return s("div",{lang:t,dir:"auto",class:`poll ${n?"read-only":""} ${i==="loading"?"loading":""}`,children:[w&&M||m||l?s(U,{children:[s("div",{class:"poll-options",children:d.map((A,O)=>{const{title:P,votesCount:x}=A,S=_?(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":`${S}%`},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:[S,"%"]})]},`${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((S,V)=>{V==="poll"&&x.push(S)}),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&&M&&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 Rs=ct();function Mu(e,t){if(!(e!=null&&e.length))return!1;const n=e.filter(i=>{const{filter:a}=i,l=a.context.includes(t);return l?a.expiresAt?new Date(a.expiresAt)>new Date:l:!1});if(!n.length)return!1;if(n.some(i=>i.filter.filterAction==="hide"))return{action:"hide"};if(n.some(i=>i.filter.filterAction==="warn")){const i=n.map(a=>a.filter.title);return{action:"warn",titles:i,titlesStr:i.join(" • ")}}return!1}const ko=ut(Mu);function Su(e,t,n){var a;const{filtered:r}=e;if(!(r!=null&&r.length)||n&&((a=e.account)==null?void 0:a.id)===n)return!0;const i=ko(r,t);return i?i.action!=="hide":!0}function If(e,t){if(!(e!=null&&e.length))return[];if(!t)return e;const n=po();return e.filter(r=>Su(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 yi(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 Ns(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 ku(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 S=l.current,V=c.current;return l.current=c.current=null,i.current=x,u.current=f.current.apply(V,S)},b=function(x,S){m&&cancelAnimationFrame(a.current),a.current=m?requestAnimationFrame(x):setTimeout(x,S)},M=function(x){if(!d.current)return!1;var S=x-o.current;return!o.current||S>=t||S<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 S=Date.now();if(M(S))return A(S);if(d.current){var V=t-(S-o.current),B=v?Math.min(V,_-(S-i.current)):V;b(x,B)}},P=function(){if(p||T){var x=Date.now(),S=M(x);if(l.current=[].slice.call(arguments),c.current=r,o.current=x,S){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 Au(e,t,n){var r=n===void 0?{}:n,o=r.leading,i=r.trailing;return ku(e,t,{maxWait:t,leading:o===void 0||o,trailing:i===void 0||i})}function Iu(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 _i(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 $u(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=Iu(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=_i(m,h,"inlineSize"),v=_i(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=Au(({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 $u({ref:t,box:"border-box",onResize:n}),t}const oo={public:"earth",unlisted:"group",private:"lock",direct:"message"};var Fs="kvfysmfp",zs="ufhsfnkm",Lu=".".concat(Fs,"{overflow:hidden;touch-action:none}.").concat(zs,"{transform-origin: 0 0}"),Cu=typeof window>"u",Pu=function(){return!Cu&&("ontouchstart"in window||navigator.maxTouchPoints>0)};var Ou=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 Du=Math.min,Ru=Math.max;function bi(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]:[Du(i+r,0)-r,Ru(0,i+r)]}var wi=function(e,t){return t?"".concat(e," ").concat(t):e},Zn=Math.abs,Nu=Math.min,Fu=Math.sqrt,Hs=typeof window>"u",zu=Hs?!1:/(Mac)/i.test(navigator.platform),Ht=function(e){return e==="drag"},ln=function(e){return e==="zoom"},Hu=function(e){return zu&&e.ctrlKey},un=function(e){e.stopPropagation(),e.preventDefault()},Ti=function(e,t){var n=e.x-t.x,r=e.y-t.y;return Fu(n*n+r*r)},Vu=function(e,t){var n=Ti(e[0],e[1]),r=Ti(t[0],t[1]);return r/n},ju=function(e,t){return e>t-.01&&e<t+.01},Bu=function(e){return-Math.cos(e*Math.PI)/2+.5},Uu=function(e){return{x:e.pageX,y:e.pageY}},Yn=function(e){return Array.from(e).map(Uu)},Ei=function(e,t){return e+t},Wu=function(e){return{x:e.map(function(t){var n=t.x;return n}).reduce(Ei,0)/e.length,y:e.map(function(t){var n=t.y;return n}).reduce(Ei,0)/e.length}},Ur=function(e,t,n){return n<e?e:n>t?t:n},Ku=function(e){return!(e.ctrlKey||e.metaKey)},Zu=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}},Yu=function(e,t){return{x:t.x-e.x,y:t.y-e.y}},qu=function(e,t){return e.x===t.x&&e.y===t.y},St=function(){},qn={x:0,y:0},xi=function(e){_a(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=ba(),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,Vu(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;(Hu(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),qu(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=Yu(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=Wu(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=bi({containerDimension:r.width,childDimension:l,padding:this.props.horizontalPadding,centerContained:this.props.centerContained}),f=u[0],d=u[1],p=bi({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||!ju(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<this.props.zoomOutFactor?(this._resetInertia(),this._zoomOutAnimation()):this._isInsaneOffset()&&this._sanitizeOffsetAnimation()},t.prototype._isInsaneOffset=function(){var n=this._offset,r=this._sanitizeOffset(n);return r.x!==n.x||r.y!==n.y},t.prototype._sanitizeOffsetAnimation=function(){var n=this,r=this._sanitizeOffset(this._offset),o=De({},this._offset),i=function(a){var l=o.x+a*(r.x-o.x),c=o.y+a*(r.y-o.y);n._offset={x:l,y:c},n._update()};this._animate(i)},t.prototype._zoomOutAnimation=function(){var n=this;if(this._zoomFactor!==1){var r=this._zoomFactor,o=1,i=this._getCurrentZoomCenter(),a=function(l){var c=r+l*(o-r);n._scaleTo(c,i)};this._animate(a)}},t.prototype._getInitialZoomFactor=function(){return this._initialZoomFactor},t.prototype._getCurrentZoomCenter=function(){var n=this._offset,r=n.x,o=n.y,i=r-this._initialOffset.x,a=o-this._initialOffset.y;return{x:-1*r-i/(1/this._zoomFactor-1),y:-1*o-a/(1/this._zoomFactor-1)}},t.prototype._getOffsetByFirstTouch=function(n){return this._getOffsetTouches(n)[0]},t.prototype._getOffsetTouches=function(n){var r=this.props._document,o=r.documentElement,i=r.body,a=this._getContainerRect(),l=a.top,c=a.left,u=o.scrollTop||i.scrollTop,f=o.scrollLeft||i.scrollLeft,d=l+u,p=c+f;return Yn(n.touches).map(function(m){var h=m.x,g=m.y;return{x:h-p,y:g-d}})},t.prototype._animate=function(n,r){var o=this,i=new Date().getTime(),a=De({timeFn:Bu,callback:function(){},duration:this.props.animationDuration},r),l=a.timeFn,c=a.callback,u=a.duration,f=function(){if(o._inAnimation){var d=new Date().getTime()-i,p=d/u;d>=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 Zu(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=Nu(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;i<arguments.length;i++)o[i]=arguments[i];r.props.enabled&&n.apply(void 0,o)}},t.prototype._setInteraction=function(n,r){var o=this._interaction;o!==n&&(o&&!n&&(ln(o)?this._handleZoomEnd():Ht(o)&&this._handleDragEnd()),ln(n)?this._handleZoomStart():Ht(n)&&this._handleDragStart(r)),this._interaction=n},t.prototype._distanceBetweenNumbers=function(n,r){return n>r?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=wa.only(r),a=o||{};return Hn.createElement(Hn.Fragment,null,Hn.createElement("style",null,Lu),Hn.createElement("div",De({},a,{ref:this._containerRef,className:wi(Fs,a.className)}),Ri(i,{className:wi(zs,i.props.className)})))},t.defaultProps={animationDuration:250,draggableUnZoomed:!0,enforceBoundsDuringZoom:!1,centerContained:!1,enabled:!0,inertia:!0,inertiaFriction:.96,horizontalPadding:0,isTouch:Pu,lockDragAxis:!1,maxZoom:5,minZoom:.5,onDoubleTap:St,onDragEnd:St,onDragStart:St,onDragUpdate:St,onZoomEnd:St,onZoomStart:St,onZoomUpdate:St,setOffsetsOnce:!1,shouldInterceptWheel:Ku,shouldCancelHandledTouchEndEvents:!1,tapZoomFactor:1,verticalPadding:0,wheelScaleFactor:1500,zoomOutFactor:1.3,doubleTapZoomOutOnMaxScale:!1,doubleTapToggleZoom:!1,_document:Hs?null:window.document},t}(Fi);if(0)var $f,Lf,Cf,Pf,Of,Df,Rf;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 Gu=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Xu="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:[Xu,!!r&&s("sup",{children:r})]})},Ju=140,Qu=280,Vs=ut(e=>e!=null&&e.length?e.length>Ju||/[\n\r].*[\n\r]/.test(e.trim()):!1);function ed({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),M=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&&M,x=P?b>M?"landscape":"portrait":null,S=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=Ou({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?td(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<Y&&M<ve;Q&&Ee(Q)},[b,M]);const pe=window.innerHeight*(x==="portrait"?.45:.33),_e=x==="portrait"?0:160,be={"--average-color":S&&`rgb(${S.join(",")})`},ie=b&&M?{"--width":`${b}px`,"--height":`${M}px`,"--aspectWidth":`${b/M*Math.max(_e,pe)}px`,aspectRatio:`${b} / ${M}`,...be}:{...be},ue=Vs(d);let q=!!a&&!o&&!!d&&!ue;l&&!q&&(d==null?void 0:d.length)<=Qu&&(q=!0);const ne=q?Y=>{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(()=>{Gu&&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 ${M}px`:void 0,...be}:ie,children:o?s(xi,{...L,children:s("img",{ref:D,src:A,alt:d,width:b,height:M,"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:M,"data-orientation":x,loading:"lazy",style:{objectPosition:B||"center","--anim-duration":`${Math.min(Math.max(Math.max(b,M)/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=`
|
||
<video
|
||
src="${v}"
|
||
poster="${h}"
|
||
width="${b}"
|
||
height="${M}"
|
||
data-orientation="${x}"
|
||
preload="auto"
|
||
autoplay
|
||
muted
|
||
playsinline
|
||
${ae?"loop":""}
|
||
ondblclick="this.paused ? this.play() : this.pause()"
|
||
${we?"ontimeupdate=\"this.closest('.media-gif') && this.closest('.media-gif').style.setProperty('--progress', `${~~((this.currentTime / this.duration) * 100)}%`)\"":""}
|
||
></video>
|
||
`,Ve=`
|
||
<video
|
||
src="${v}"
|
||
poster="${h}"
|
||
width="${b}"
|
||
height="${M}"
|
||
data-orientation="${x}"
|
||
preload="auto"
|
||
autoplay
|
||
playsinline
|
||
${ae?"loop":""}
|
||
controls
|
||
></video>
|
||
`;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(xi,{...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:M,"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:M,"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:M,"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:M,"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 td(e){return URL.parse(e,location.origin)}const io=lt(ed,(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}),nd=280,rd=140,od=zi({limit:1,interval:1e3});function id(e,t){return t.v1.accounts.$select(e).fetch()}const sd=ho(od(id)),gn={public:"Public",unlisted:"Unlisted",private:"Followers only",direct:"Private mention"},ad=window.ontouchstart!==void 0&&/iPad|iPhone|iPod/.test(navigator.userAgent),cd=new Intl.RelativeTimeFormat,Mi=80;function ld(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)+ld(r)}const Si=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:Sl({mentions:a,instance:t,previewMode:n,statusURL:l}),dangerouslySetInnerHTML:{__html:bs(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}),ud={s:"small",m:"medium",l:"large"},dd=ut(e=>{if(e=e==null?void 0:e.trim(),(e==null?void 0:e.length)>500)return null;const n=Ma(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 Uo,Wo,Ko;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:M}=nr({instance:n}),{instance:A}=nr(),O=b===A;let P=it(e||(t==null?void 0:t.id),b);const x=Sn(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:S,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=dd(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(Rs),ht=!Qe&&!i&&!d&&ko(ft,yr);if((ht==null?void 0:ht.action)==="hide")return null;const Tt=y=>{y.shiftKey};if(r!=="l"&&ht)return s(_d,{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[Se,je]=ee(re);if(!l&&!Se&&ae){const y=W.accounts[ae];y?je(y):sd(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(()=>!!(Zo.account.get("preferences")||{})["reading:expand:spoilers"],[]),tt=he(()=>(Zo.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&&((Uo=x.statusFollowedTags[P])!=null&&Uo.length)?Qt:U,fe=r==="l",[en,_r]=ee(f),nt=ls(!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<=rd},[Ot,Et,i,l,fe,d,ue,ie,_e,Y,oe,ge]),[br,$n]=ee(!1),[Qs,wr]=ee(!1),Io=er(),$o=er(),ea=er(),Tr="Read more →",Dt=j(null),nn="Sorry, your current logged-in instance can't interact with this post from another instance.",Lo=Ie(()=>Math.max(Math.round((ue.length+Br(ge))/140)||1,1),[ue,ge]),Co=En(et),Po=xe&&En(Jt);let rn=M&&q!=="direct"&&q!=="private";q==="private"&&Qe&&(rn=!0);const Ln=y=>{var F;if(!O||!M)return alert(nn);(y!=null&&y.shiftKey||(F=y==null?void 0:y.syntheticEvent)!=null&&F.shiftKey)&&Ba({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]),Oo=he(()=>Math.floor((new Date-et)/(1e3*60*60*24*30)),[et]),cf=async()=>{if(!O||!M)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||!M)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}},Do=async()=>{if(!O||!M)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}},Mr=async()=>{try{const y=await Do();!fe&&y&&Ce(le?`Unliked @${R||S}'s post`:`Liked @${R||S}'s post`)}catch{}},Ro=async()=>{if(Bn("@mastodon/post-bookmark")){if(!O||!M)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}}},No=async()=>{try{const y=await Ro();!fe&&y&&Ce(pe?`Unbookmarked @${R||S}'s post`:`Bookmarked @${R||S}'s post`)}catch{}},Cn=!!Te&&Te!==nt&&!no([Te],[nt])&&!tn.find(y=>Te===y||no([Te],[y])),Fo=j(),zo=j();async function ta(y){var ce,Oe,Rt,Sr;y&&(Fo.current=w.v1.statuses.$select(e).rebloggedBy.list({limit:Mi}),zo.current=w.v1.statuses.$select(e).favouritedBy.list({limit:Mi}));const[{value:F},{value:J}]=await Promise.allSettled([Fo.current.next(),zo.current.next()]);if((ce=F.value)!=null&&ce.length||(Oe=J.value)!=null&&Oe.length){const xt=[];return(Rt=F.value)!=null&&Rt.length&&xt.push(...F.value.map(Mt=>(Mt._types=["reblog"],Mt))),(Sr=J.value)!=null&&Sr.length&&xt.push(...J.value.map(Mt=>(Mt._types=["favourite"],Mt))),{value:xt,done:F.done&&J.done}}return{value:[],done:!0}}const na=j(),Ho=["public","unlisted"].includes(q),ra=["public","unlisted","private"].includes(q),Vo=s(U,{children:[!fe&&O&&s(U,{children:s("div",{class:"menu-control-group-horizontal status-menu",children:[s(ke,{onClick: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."]}):Oo>=3&&s("div",{class:"footer",children:[s(H,{icon:"info"}),s("span",{children:["Old post (",s("strong",{children:cd.format(-Oo,"month")}),")"]})]}),disabled:!rn,onClick:async()=>{try{const y=await xr();!fe&&y&&Ce(Z?`Unboosted @${R||S}'s post`:`Boosted @${R||S}'s post`)}catch{}},children:[s(H,{icon:"rocket"}),s("span",{children:te>0?yt(te):Z?"Unboost":"Boost…"})]}),s(ke,{onClick:Mr,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:No,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:ta,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&&yi(y,Te)},children:[s(H,{icon:"speak"}),s("span",{children:"Speak"})]})]}):(!Te||Cn)&&s("div",{class:mn?"menu-horizontal":"",children:[s(li,{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&&yi(y,Te)},children:[s(H,{icon:"speak"}),s("span",{children:"Speak"})]})]})]}),(!fe&&O||u||!Te||Cn)&&s(an,{}),!fe&&s(U,{children:s(li,{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||S,s("br",{}),s("span",{class:"more-insignificant",children:[gn[q]," • ",Co]})]})]})}),!!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: ",Po]})]})]})}),s(ke,{href:Ve,target:"_blank",children:[s(H,{icon:"external"}),s("small",{class:"menu-double-lines",children:vd(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"})]}),Ho&&(navigator==null?void 0:navigator.share)&&((Wo=navigator==null?void 0:navigator.canShare)==null?void 0:Wo.call(navigator,{url:Ve}))&&s(ke,{onClick:()=>{try{navigator.share({url:Ve})}catch{alert("Sharing doesn't seem to work.")}},children:[s(H,{icon:"share"}),s("span",{children:"Share…"})]})]}),Ho&&fe&&s(ke,{onClick:()=>{wr(!0)},children:[s(H,{icon:"code"}),s("span",{children:"Embed post"})]}),(Qe||Fe)&&s(an,{}),(Qe||Fe)&&s(ke,{onClick:async()=>{try{const y=await w.v1.statuses.$select(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&&ra&&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=Vi(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…"})]})]})]}),jo=j(),[Pn,on]=ee(!1),[On,Dn]=ee({}),Rn=v||!fe&&!d&&!$e&&!m,oa=Ds(ad&&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,ia=jt("r, shift+r",Ln,{enabled:Nn}),sa=jt("f, l",Mr,{enabled:Nn}),aa=jt("d",No,{enabled:Nn}),ca=jt("shift+b",()=>{(async()=>{try{const y=await xr();!fe&&y&&Ce(Z?`Unboosted @${R||S}'s post`:`Boosted @${R||S}'s post`)}catch{}})()},{enabled:Nn&&rn}),la=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&&!Vs(y.description)),ua=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,(Ko=t.account)==null?void 0:Ko.id,x.statusThreadNumber[P]]),da=he(()=>a&&!sn&&!l&&!Q&&q==="public"&&K>0,[a,sn,l,Q,K,q]),Bo=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<=nd)return!0},[Y,_e,ie,ue,oe,we,sn,l,Q,K,ge]);return s(In,{children:[_&&!!(Q&&ae)&&s(yd,{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;ia.current=F,sa.current=F,aa.current=F,ca.current=F,la.current=F},tabindex:"-1",class:`status ${!l&&Q&&Se?"status-reply-to":""} visibility-${q} ${Le?"status-pinned":""} ${ud[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?oa():{},children:[Rn&&s(Ji,{ref:jo,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=jo.current)==null?void 0:y.closeMenu)==null||F.call(y)}},overflow:"auto",boundingBoxPadding:as(),unmountOnClose:!0,children:Vo}),T&&r!=="l"&&!d&&!i&&!$e&&!m&&s("div",{class:`status-actions ${Pn==="actions-bar"?"open":""}`,ref:na,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:Mr}),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:`@${S}`,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:[da&&!Bo?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&&!!Se&&(!!ue||!de.find(y=>y.id===ae))&&s("div",{class:"status-reply-badge",children:[s(H,{icon:"reply"})," ",s(fn,{account:Se,instance:b,short:!0})]})}),s("div",{class:`content-container ${ue||ie?"has-spoiler":""} ${Pe?"show-spoiler":""} ${ze?"show-media":""}`,"data-content-text-weight":o?Lo():null,style:(fe||o)&&{"--content-text-weight":Lo()},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:Io,"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(hd,{mediaAttachments:oe,language:Te,postID:C,instance:b}),!!ge&&s("div",{class:"media-first-content content",ref:$o,children:s(Si,{post:t,instance:b,previewMode:d})})]}):s(U,{children:[!!ue&&s(U,{children:[s("div",{class:"content spoiler-content",lang:Te,dir:"auto",ref:Io,"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:$o,"data-read-more":Tr,children:[s(Si,{post:t,instance:b,previewMode:d}),s(bd,{id:C,instance:b,level:m})]}),!!_e&&s(xu,{lang:Te,poll:_e,readOnly:i||!O||!M,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(eu,{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(fd,{lang:Te,enabled:zn,captionChildren:ua,children:s("div",{ref:ea,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(pd,{card:Y,selfReferential:(Y==null?void 0:Y.url)===t.url||(Y==null?void 0:Y.url)===t.uri,instance:A})]})}),!fe&&Bo&&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:Co})}),xe&&s(U,{children:[" ","• ",s(H,{icon:"pencil",alt:"Edited"})," ",s("time",{tabIndex:"0",class:"edited",datetime:Jt.toISOString(),onClick:()=>{$n(C)},children:Po})]})]})}),!!(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(Mt=>Mt.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:Do})}),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:Ro})}),s(cs,{portal:{target:document.querySelector(".status-deck")||document.body},align:"end",gap:4,overflow:"auto",viewScroll:"close",menuButton:s("div",{class:"action",children:s("button",{type:"button",title:"More",class:"plain more-button",children:s(H,{icon:"more",size:"l",alt:"More"})})}),children:Vo})]})]})]}),!!br&&s(Gr,{onClick:y=>{y.target===y.currentTarget&&$n(!1)},children:s(md,{statusID:br,instance:b,fetchStatusHistory:()=>w.v1.statuses.$select(br).history.list(),onClose:()=>{var y;$n(!1),(y=Dt.current)==null||y.focus()}})}),!!Qs&&s(Gr,{onClick:y=>{y.target===y.currentTarget&&wr(!1)},children:s(gd,{post:t,instance:b,onClose:()=>{wr(!1)}})})]})]})}function fd(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 hd(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 ki(e){return _s.toUnicode(URL.parse(e).hostname.replace(/^www\./,"").replace(/\/$/,""))}function Ai(e){return["x.com","twitter.com","threads.net","bsky.app"].includes(e)}function pd({card:e,selfReferential:t,instance:n}){var V;const r=Sn(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&&Ta(v)&&Ea(n,v).then(B=>{if(!B)return;const{id:D,url:$}=B;P("#"+$)})},[b,h,t]),r.unfurledLinks[v])return null;const x=/<iframe/i.test(l),S=Ie(B=>{x&&(B.preventDefault(),W.showEmbedModal={html:l,url:v||_,width:p,height:m})},[x]);if(b&&(h||T==="photo"&&o)){const B=ki(v);let D;const $=h&&o?So(o):null;if(!h){const z=fu(o,44,44),N=window.OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas");N.width=44,N.height=44;const C=N.getContext("2d");C.imageSmoothingEnabled=!1;const K=C.createImageData(44,44);K.data.set(z),C.putImageData(K,0,0),D=N.toDataURL()}const k=Ai(B);return s("a",{href:O||v,target:O?null:"_blank",rel:"nofollow noopener noreferrer",class:`card link ${k?"card-post":""} ${D?"":A}`,lang:E,dir:"auto",style:{"--average-color":$&&`rgb(${$.join(",")})`},onClick:S,children:[s("div",{class:"card-image",children:s("img",{src:h||D,width:p,height:m,loading:"lazy",alt:g||"",onError:R=>{try{R.target.style.display="none"}catch{}},style:{"--anim-duration":p&&m&&`${Math.min(Math.max(Math.max(p,m)/100,5),120)}s`}})}),s("div",{class:"meta-container",children:[s("p",{class:"meta domain",children:[s("span",{class:"domain",children:B})," ",!!w&&s(U,{children:"· "}),!!w&&s(U,{children:s(It,{datetime:w,format:"micro"})})]}),s("p",{class:"title",dir:"auto",title:i,children:i}),s("p",{class:"meta",dir:"auto",title:a,children:a||!!w&&s(It,{datetime:w,format:"micro"})})]})]})}else{if(T==="photo")return s("a",{href:v,target:"_blank",rel:"nofollow noopener noreferrer",class:"card photo",onClick:S,children:s("img",{src:_,width:p,height:m,alt:i||a,loading:"lazy",style:{height:"auto",aspectRatio:`${p}/${m}`}})});if(T==="video"&&/youtube/i.test(c)){const B=(V=v.match(/watch\?v=([^&]+)/))==null?void 0:V[1];if(B)return s("a",{class:"card video",onClick:S,children:s("lite-youtube",{videoid:B,nocookie:!0})})}if(b&&!h){const B=ki(v),D=Ai(B);return s("a",{href:O||v,target:O?null:"_blank",rel:"nofollow noopener noreferrer",class:`card link ${D?"card-post":""} no-image`,lang:E,onClick:S,children:s("div",{class:"meta-container",children:[s("p",{class:"meta domain",children:[s("span",{class:"domain",children:[s(H,{icon:"link",size:"s"})," ",s("span",{children:B})]})," ",!!w&&s(U,{children:"· "}),!!w&&s(U,{children:s(It,{datetime:w,format:"micro"})})]}),s("p",{class:"title",title:i,children:i}),s("p",{class:"meta",title:a||c||f,children:a||c||f})]})})}}}function md({statusID:e,instance:t,fetchStatusHistory:n=()=>{},onClose:r}){const[o,i]=ee("default"),[a,l]=ee([]);return se(()=>{i("loading"),(async()=>{try{const c=await n();l(c),i("default")}catch{i("error")}})()},[]),s("div",{id:"edit-history",class:"sheet",children:[!!r&&s("button",{type:"button",class:"sheet-close",onClick:r,children:s(H,{icon:"x"})}),s("header",{children:[s("h2",{children:"Edit History"}),o==="error"&&s("p",{children:"Failed to load history"}),o==="loading"&&s("p",{children:[s(Hi,{abrupt:!0})," Loading…"]})]}),s("main",{tabIndex:"-1",children:a.length>0&&s("ol",{children:a.map(c=>{const{createdAt:u}=c,f=new Date(u);return s("li",{class:"history-item",children:[s("h3",{children:s("time",{children:En(f,{formatOpts:{weekday:"short",second:"numeric"}})})}),s(qt,{status:c,instance:t,size:"s",withinContext:!0,readOnly:!0,previewMode:!0})]},u)})})})]})}function js(e,t,n=0){var S;const{account:{url:r,displayName:o,acct:i,username:a,emojis:l,bot:c,group:u},id:f,poll:d,spoilerText:p,language:m,editedAt:h,createdAt:g,content:v,mediaAttachments:T,url:_,emojis:E}=e,w=it(f,t),M=(W.statusQuotes[w]||[]).filter((V,B,D)=>D.findIndex($=>$.url===V.url)===B),A=M.length&&n<=2?M.map(V=>{const{id:B,instance:D}=V,$=it(B,D),k=W.statuses[$];if(k)return js(k,D,++n)}).join(""):"",O=new Date(g),P=fr(v,E)+`
|
||
`+A+`
|
||
`+((S=d==null?void 0:d.options)!=null&&S.length?`
|
||
<p>📊:</p>
|
||
<ul>
|
||
${d.options.map(V=>`
|
||
<li>
|
||
${V.title}
|
||
${V.votesCount>=0?` (${V.votesCount})`:""}
|
||
</li>
|
||
`).join("")}
|
||
</ul>`:"")+(T.length>0?`
|
||
`+T.map(V=>{const{description:B,meta:D,previewRemoteUrl:$,previewUrl:k,remoteUrl:R,url:L,type:z}=V,{original:N={},small:C}=D||{},K=(C==null?void 0:C.width)||(N==null?void 0:N.width),Z=(C==null?void 0:C.height)||(N==null?void 0:N.height),te=R||L,le=$||k,Ee=le||te,pe=te?URL.parse(te):null,_e=z==="unknown"&&pe&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(pe.pathname),be=z==="unknown"&&pe&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test(pe.pathname),ie=z==="image"||z==="unknown"&&le&&!_e&&!be,ue=z==="gifv"||z==="video"||_e,q=z==="audio"||be;let ne="";return ie?ne=`<img src="${Ee}" width="${K}" height="${Z}" alt="${B}" loading="lazy" />`:ue?ne=`
|
||
<video src="${te}" width="${K}" height="${Z}" controls preload="auto" poster="${le}" loading="lazy"></video>
|
||
${B?`<figcaption>${B}</figcaption>`:""}
|
||
`:q?ne=`
|
||
<audio src="${te}" controls preload="auto"></audio>
|
||
${B?`<figcaption>${B}</figcaption>`:""}
|
||
`:ne=`
|
||
<a href="${te}">📄 ${B||te}</a>
|
||
`,`<figure>${ne}</figure>`}).join(`
|
||
`):""),x=`
|
||
<blockquote lang="${m}" cite="${_}">
|
||
${p?`
|
||
<details>
|
||
<summary>${p}</summary>
|
||
${P}
|
||
</details>
|
||
`:P}
|
||
<footer>
|
||
— ${fr(o,l)} (@${i}) <a href="${_}"><time datetime="${O.toISOString()}">${O.toLocaleString()}</time></a>
|
||
</footer>
|
||
</blockquote>
|
||
`;return wu(x)}function gd({post:e,instance:t,onClose:n}){const{account:{url:r,displayName:o,username:i,emojis:a,bot:l,group:c},id:u,poll:f,spoilerText:d,language:p,editedAt:m,createdAt:h,content:g,mediaAttachments:v,url:T,emojis:_}=e,E=js(e,t);return s("div",{id:"embed-post",class:"sheet",children:[!!n&&s("button",{type:"button",class:"sheet-close",onClick:n,children:s(H,{icon:"x"})}),s("header",{children:s("h2",{children:"Embed post"})}),s("main",{tabIndex:"-1",children:[s("h3",{children:"HTML Code"}),s("textarea",{class:"embed-code",readonly:!0,onClick:w=>{w.target.select()},children:E}),s("button",{type:"button",onClick:()=>{try{navigator.clipboard.writeText(E),Ce("HTML code copied")}catch{Ce("Unable to copy HTML code")}},children:[s(H,{icon:"clipboard"})," ",s("span",{children:"Copy"})]}),!!(v!=null&&v.length)&&s("section",{children:[s("p",{children:"Media attachments:"}),s("ol",{class:"links-list",children:v.map(w=>s("li",{children:s("a",{href:w.remoteUrl||w.url,target:"_blank",download:!0,children:w.remoteUrl||w.url})},w.id))})]}),!!(a!=null&&a.length)&&s("section",{children:[s("p",{children:"Account Emojis:"}),s("ul",{children:a.map(w=>s("li",{children:[s("picture",{children:[s("source",{srcset:w.staticUrl,media:"(prefers-reduced-motion: reduce)"}),s("img",{class:"shortcode-emoji emoji",src:w.url,alt:`:${w.shortcode}:`,width:"16",height:"16",loading:"lazy",decoding:"async"})]})," ",s("code",{children:[":",w.shortcode,":"]})," (",s("a",{href:w.url,target:"_blank",download:!0,children:"url"}),")",w.staticUrl?s(U,{children:[" ","(",s("a",{href:w.staticUrl,target:"_blank",download:!0,children:"static"}),")"]}):null]},w.shortcode))})]}),!!(_!=null&&_.length)&&s("section",{children:[s("p",{children:"Emojis:"}),s("ul",{children:_.map(w=>s("li",{children:[s("picture",{children:[s("source",{srcset:w.staticUrl,media:"(prefers-reduced-motion: reduce)"}),s("img",{class:"shortcode-emoji emoji",src:w.url,alt:`:${w.shortcode}:`,width:"16",height:"16",loading:"lazy",decoding:"async"})]})," ",s("code",{children:[":",w.shortcode,":"]})," (",s("a",{href:w.url,target:"_blank",download:!0,children:"url"}),")",w.staticUrl?s(U,{children:[" ","(",s("a",{href:w.staticUrl,target:"_blank",download:!0,children:"static"}),")"]}):null]},w.shortcode))})]}),s("section",{children:s("small",{children:[s("p",{children:"Notes:"}),s("ul",{children:[s("li",{children:"This is static, unstyled and scriptless. You may need to apply your own styles and edit as needed."}),s("li",{children:"Polls are not interactive, becomes a list with vote counts."}),s("li",{children:"Media attachments can be images, videos, audios or any file types."}),s("li",{children:"Post could be edited or deleted later."})]})]})}),s("h3",{children:"Preview"}),s("output",{class:"embed-preview",dangerouslySetInnerHTML:{__html:E}}),s("p",{children:s("small",{children:"Note: This preview is lightly styled."})})]})]})}function Vt({checked:e,count:t,class:n,title:r,alt:o,size:i,icon:a,iconSize:l="l",onClick:c,...u}){typeof r=="string"&&(r=[r,r]),typeof o=="string"&&(o=[o,o]);const[f,d]=ee(r[0]||""),[p,m]=ee(o[0]||"");return se(()=>{e?(d(r[1]||""),m(o[1]||"")):(d(r[0]||""),m(o[0]||""))},[e,r,o]),s("button",{type:"button",title:f,class:`plain ${i?"small":""} ${n} ${e?"checked":""}`,onClick:h=>{c&&(h.preventDefault(),h.stopPropagation(),c(h))},...u,children:[s(H,{icon:a,size:l,alt:p}),!!t&&s(U,{children:[" ",s("small",{title:t,children:yt(t)})]})]})}function vd(e){if(!e)return;const t=URL.parse(e),{host:n,pathname:r}=t,o=r.replace(/\/$/,""),[i,a,l]=o.match(/\/(@[^\/]+)\/(.*)/)||[];return s(U,{children:[_s.toUnicode(n),a?s(U,{children:["/",a,s("wbr",{}),s("span",{class:"more-insignificant",children:["/",l]})]}):s("span",{class:"more-insignificant",children:o})]})}function yd({sKey:e}){const n=Sn(W).statusReply[e];if(!n)return null;const{id:r,instance:o}=n,i=Vi(r,o);if(!i)return null;const{sensitive:a,spoilerText:l,account:{avatar:c,avatarStatic:u,bot:f}={},visibility:d,content:p,language:m,filtered:h}=i;if(a||l||!p)return null;const g=it(r,o),v=Ns(i),T=Ne(Rs),_=ko(h,T);if((_==null?void 0:_.action)==="hide")return null;const E=(_==null?void 0:_.titlesStr)||"";return s("article",{class:`status compact-reply ${d==="direct"?"visibility-direct":""}`,tabindex:"-1","data-state-post-id":g,children:[s(st,{url:u||c,squircle:f}),s("div",{class:"content-compact",title:v,lang:m,dir:"auto",children:_?s("b",{class:"status-filtered-badge badge-meta",title:E,children:[s("span",{children:"Filtered"}),s("span",{children:E})]}):s("span",{children:v})})]})}function _d({status:e,filterInfo:t,instance:n,containerProps:r={},showFollowedTags:o,quoted:i}){var V;const a=Sn(W),{id:l,account:{avatar:c,avatarStatic:u,bot:f,group:d},createdAt:p,visibility:m,reblog:h}=e,g=!!h,v=(t==null?void 0:t.titlesStr)||"",T=new Date(p),_=Ns(e.reblog||e),[E,w]=ee(!1),b=Ds(()=>{w(!0)},{threshold:600,captureEvent:!0,detect:"touch",cancelOnMovement:2}),M=er(),A=it(e.id,n),O=it(e.id,n)+" "+(it(h==null?void 0:h.id,n)||""),P=(h==null?void 0:h.id)||l,x=n?`/${n}/s/${P}`:`/s/${P}`,S=o&&!!((V=a.statusFollowedTags[A])!=null&&V.length);return s("div",{class:i?"":g?d?"status-group":"status-reblog":S?"status-followed-tags":"",...r,onContextMenu:B=>{B.preventDefault(),w(!0)},...b(),children:[s("article",{"data-state-post-id":O,class:`status filtered ${i?"status-card":""}`,tabindex:"-1",children:[s("b",{class:"status-filtered-badge clickable badge-meta",title:v,onClick:B=>{B.preventDefault(),w(!0)},children:[s("span",{children:"Filtered"}),s("span",{children:v})]})," ",s(st,{url:u||c,squircle:f}),s("span",{class:"status-filtered-info",children:[s("span",{class:"status-filtered-info-1",children:[s(fn,{account:e.account,instance:n})," ",s(H,{icon:oo[m],alt:gn[m],size:"s"})," ",g?"boosted":S?s("span",{children:a.statusFollowedTags[A].slice(0,3).map(B=>s("span",{class:"status-followed-tag-item",children:["#",B]},B))}):s(It,{datetime:T,format:"micro"})]}),s("span",{class:"status-filtered-info-2",children:[g&&s(U,{children:[s(st,{url:h.account.avatarStatic||h.account.avatar,squircle:f})," "]}),_]})]})]}),!!E&&s(Gr,{onClick:B=>{B.target===B.currentTarget&&w(!1)},children:s("div",{id:"filtered-status-peek",class:"sheet",children:[s("button",{type:"button",class:"sheet-close",onClick:()=>w(!1),children:s(H,{icon:"x"})}),s("header",{children:[s("b",{class:"status-filtered-badge",children:"Filtered"})," ",v]}),s("main",{tabIndex:"-1",children:s(Zt,{ref:M,class:"status-link",to:x,onClick:()=>{w(!1)},"data-read-more":"Read more →",children:s(qt,{status:e,instance:n,size:"s",readOnly:!0})})})]})})]})}const bd=lt(({id:e,instance:t,level:n=0})=>{if(!e||!t)return;const r=Sn(W),o=it(e,t),i=r.statusQuotes[o],a=i==null?void 0:i.filter((l,c,u)=>u.findIndex(f=>f.url===l.url)===c);if(a!=null&&a.length&&!(n>2))return a.map(l=>s(Es,{id:l.instance+l.id,children:s(Zt,{to:`${l.instance?`/${l.instance}`:""}/s/${l.id}`,class:"status-card-link","data-read-more":"Read more →",children:s(qt,{statusID:l.id,instance:l.instance,size:"s",quoted:n+1,enableCommentHint:!0})},l.instance+l.id)}))}),Nf=lt(qt,(e,t)=>{const{status:n,...r}=e,{status:o,...i}=t;return(n==null?void 0:n.id)===(o==null?void 0:o.id)&&xa(r,i)});var Ii=36,Bs="";for(;Ii--;)Bs+=Ii.toString(36);function Ff(e){for(var t="",n=e||11;n--;)t+=Bs[Math.random()*36|0];return t}function at(e){return Array.isArray?Array.isArray(e):Ks(e)==="[object Array]"}const wd=1/0;function Td(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-wd?"-0":t}function Ed(e){return e==null?"":Td(e)}function qe(e){return typeof e=="string"}function Us(e){return typeof e=="number"}function xd(e){return e===!0||e===!1||Md(e)&&Ks(e)=="[object Boolean]"}function Ws(e){return typeof e=="object"}function Md(e){return Ws(e)&&e!==null}function Ue(e){return e!=null}function Yr(e){return!e.trim().length}function Ks(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const Sd="Incorrect 'index' type",kd=e=>`Invalid value for key ${e}`,Ad=e=>`Pattern length exceeds max of ${e}.`,Id=e=>`Missing ${e} property in key`,$d=e=>`Property 'weight' in key '${e}' must be a positive integer`,$i=Object.prototype.hasOwnProperty;class Ld{constructor(t){this._keys=[],this._keyMap={};let n=0;t.forEach(r=>{let o=Zs(r);this._keys.push(o),this._keyMap[o.id]=o,n+=o.weight}),this._keys.forEach(r=>{r.weight/=n})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Zs(e){let t=null,n=null,r=null,o=1,i=null;if(qe(e)||at(e))r=e,t=Li(e),n=so(e);else{if(!$i.call(e,"name"))throw new Error(Id("name"));const a=e.name;if(r=a,$i.call(e,"weight")&&(o=e.weight,o<=0))throw new Error($d(a));t=Li(a),n=so(a),i=e.getFn}return{path:t,id:n,weight:o,src:r,getFn:i}}function Li(e){return at(e)?e:e.split(".")}function so(e){return at(e)?e.join("."):e}function Cd(e,t){let n=[],r=!1;const o=(i,a,l)=>{if(Ue(i))if(!a[l])n.push(i);else{let c=a[l];const u=i[c];if(!Ue(u))return;if(l===a.length-1&&(qe(u)||Us(u)||xd(u)))n.push(Ed(u));else if(at(u)){r=!0;for(let f=0,d=u.length;f<d;f+=1)o(u[f],a,l+1)}else a.length&&o(u,a,l+1)}};return o(e,qe(t)?t.split("."):t,0),r?n:n[0]}const Pd={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},Od={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},Dd={location:0,threshold:.6,distance:100},Rd={useExtendedSearch:!1,getFn:Cd,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var X={...Od,...Pd,...Dd,...Rd};const Nd=/[^ ]+/g;function Fd(e=1,t=3){const n=new Map,r=Math.pow(10,t);return{get(o){const i=o.match(Nd).length;if(n.has(i))return n.get(i);const a=1/Math.pow(i,.5*e),l=parseFloat(Math.round(a*r)/r);return n.set(i,l),l},clear(){n.clear()}}}class Ao{constructor({getFn:t=X.getFn,fieldNormWeight:n=X.fieldNormWeight}={}){this.norm=Fd(n,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((n,r)=>{this._keysMap[n.id]=r})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,qe(this.docs[0])?this.docs.forEach((t,n)=>{this._addString(t,n)}):this.docs.forEach((t,n)=>{this._addObject(t,n)}),this.norm.clear())}add(t){const n=this.size();qe(t)?this._addString(t,n):this._addObject(t,n)}removeAt(t){this.records.splice(t,1);for(let n=t,r=this.size();n<r;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(t,n){return t[this._keysMap[n]]}size(){return this.records.length}_addString(t,n){if(!Ue(t)||Yr(t))return;let r={v:t,i:n,n:this.norm.get(t)};this.records.push(r)}_addObject(t,n){let r={i:n,$:{}};this.keys.forEach((o,i)=>{let a=o.getFn?o.getFn(t):this.getFn(t,o.path);if(Ue(a)){if(at(a)){let l=[];const c=[{nestedArrIndex:-1,value:a}];for(;c.length;){const{nestedArrIndex:u,value:f}=c.pop();if(Ue(f))if(qe(f)&&!Yr(f)){let d={v:f,i:u,n:this.norm.get(f)};l.push(d)}else at(f)&&f.forEach((d,p)=>{c.push({nestedArrIndex:p,value:d})})}r.$[i]=l}else if(qe(a)&&!Yr(a)){let l={v:a,n:this.norm.get(a)};r.$[i]=l}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function Ys(e,t,{getFn:n=X.getFn,fieldNormWeight:r=X.fieldNormWeight}={}){const o=new Ao({getFn:n,fieldNormWeight:r});return o.setKeys(e.map(Zs)),o.setSources(t),o.create(),o}function zd(e,{getFn:t=X.getFn,fieldNormWeight:n=X.fieldNormWeight}={}){const{keys:r,records:o}=e,i=new Ao({getFn:t,fieldNormWeight:n});return i.setKeys(r),i.setIndexRecords(o),i}function Gn(e,{errors:t=0,currentLocation:n=0,expectedLocation:r=0,distance:o=X.distance,ignoreLocation:i=X.ignoreLocation}={}){const a=t/e.length;if(i)return a;const l=Math.abs(r-n);return o?a+l/o:l?1:a}function Hd(e=[],t=X.minMatchCharLength){let n=[],r=-1,o=-1,i=0;for(let a=e.length;i<a;i+=1){let l=e[i];l&&r===-1?r=i:!l&&r!==-1&&(o=i-1,o-r+1>=t&&n.push([r,o]),r=-1)}return e[i-1]&&i-r>=t&&n.push([r,i-1]),n}const kt=32;function Vd(e,t,n,{location:r=X.location,distance:o=X.distance,threshold:i=X.threshold,findAllMatches:a=X.findAllMatches,minMatchCharLength:l=X.minMatchCharLength,includeMatches:c=X.includeMatches,ignoreLocation:u=X.ignoreLocation}={}){if(t.length>kt)throw new Error(Ad(kt));const f=t.length,d=e.length,p=Math.max(0,Math.min(r,d));let m=i,h=p;const g=l>1||c,v=g?Array(d):[];let T;for(;(T=e.indexOf(t,h))>-1;){let A=Gn(t,{currentLocation:T,expectedLocation:p,distance:o,ignoreLocation:u});if(m=Math.min(A,m),h=T+f,g){let O=0;for(;O<f;)v[T+O]=1,O+=1}}h=-1;let _=[],E=1,w=f+d;const b=1<<f-1;for(let A=0;A<f;A+=1){let O=0,P=w;for(;O<P;)Gn(t,{errors:A,currentLocation:p+P,expectedLocation:p,distance:o,ignoreLocation:u})<=m?O=P:w=P,P=Math.floor((w-O)/2+O);w=P;let x=Math.max(1,p-P+1),S=a?d:Math.min(p+P,d)+f,V=Array(S+2);V[S+1]=(1<<A)-1;for(let D=S;D>=x;D-=1){let $=D-1,k=n[e.charAt($)];if(g&&(v[$]=+!!k),V[D]=(V[D+1]<<1|1)&k,A&&(V[D]|=(_[D+1]|_[D])<<1|1|_[D+1]),V[D]&b&&(E=Gn(t,{errors:A,currentLocation:$,expectedLocation:p,distance:o,ignoreLocation:u}),E<=m)){if(m=E,h=$,h<=p)break;x=Math.max(1,2*p-h)}}if(Gn(t,{errors:A+1,currentLocation:p,expectedLocation:p,distance:o,ignoreLocation:u})>m)break;_=V}const M={isMatch:h>=0,score:Math.max(.001,E)};if(g){const A=Hd(v,l);A.length?c&&(M.indices=A):M.isMatch=!1}return M}function jd(e){let t={};for(let n=0,r=e.length;n<r;n+=1){const o=e.charAt(n);t[o]=(t[o]||0)|1<<r-n-1}return t}class qs{constructor(t,{location:n=X.location,threshold:r=X.threshold,distance:o=X.distance,includeMatches:i=X.includeMatches,findAllMatches:a=X.findAllMatches,minMatchCharLength:l=X.minMatchCharLength,isCaseSensitive:c=X.isCaseSensitive,ignoreLocation:u=X.ignoreLocation}={}){if(this.options={location:n,threshold:r,distance:o,includeMatches:i,findAllMatches:a,minMatchCharLength:l,isCaseSensitive:c,ignoreLocation:u},this.pattern=c?t:t.toLowerCase(),this.chunks=[],!this.pattern.length)return;const f=(p,m)=>{this.chunks.push({pattern:p,alphabet:jd(p),startIndex:m})},d=this.pattern.length;if(d>kt){let p=0;const m=d%kt,h=d-m;for(;p<h;)f(this.pattern.substr(p,kt),p),p+=kt;if(m){const g=d-kt;f(this.pattern.substr(g),g)}}else f(this.pattern,0)}searchIn(t){const{isCaseSensitive:n,includeMatches:r}=this.options;if(n||(t=t.toLowerCase()),this.pattern===t){let h={isMatch:!0,score:0};return r&&(h.indices=[[0,t.length-1]]),h}const{location:o,distance:i,threshold:a,findAllMatches:l,minMatchCharLength:c,ignoreLocation:u}=this.options;let f=[],d=0,p=!1;this.chunks.forEach(({pattern:h,alphabet:g,startIndex:v})=>{const{isMatch:T,score:_,indices:E}=Vd(t,h,g,{location:o+v,distance:i,threshold:a,findAllMatches:l,minMatchCharLength:c,includeMatches:r,ignoreLocation:u});T&&(p=!0),d+=_,T&&E&&(f=[...f,...E])});let m={isMatch:p,score:p?d/this.chunks.length:1};return p&&r&&(m.indices=f),m}}class _t{constructor(t){this.pattern=t}static isMultiMatch(t){return Ci(t,this.multiRegex)}static isSingleMatch(t){return Ci(t,this.singleRegex)}search(){}}function Ci(e,t){const n=e.match(t);return n?n[1]:null}class Bd extends _t{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const n=t===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class Ud extends _t{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const r=t.indexOf(this.pattern)===-1;return{isMatch:r,score:r?0:1,indices:[0,t.length-1]}}}class Wd extends _t{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const n=t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class Kd extends _t{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const n=!t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class Zd extends _t{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const n=t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class Yd extends _t{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const n=!t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class Gs extends _t{constructor(t,{location:n=X.location,threshold:r=X.threshold,distance:o=X.distance,includeMatches:i=X.includeMatches,findAllMatches:a=X.findAllMatches,minMatchCharLength:l=X.minMatchCharLength,isCaseSensitive:c=X.isCaseSensitive,ignoreLocation:u=X.ignoreLocation}={}){super(t),this._bitapSearch=new qs(t,{location:n,threshold:r,distance:o,includeMatches:i,findAllMatches:a,minMatchCharLength:l,isCaseSensitive:c,ignoreLocation:u})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class Xs extends _t{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let n=0,r;const o=[],i=this.pattern.length;for(;(r=t.indexOf(this.pattern,n))>-1;)n=r+i,o.push([r,n-1]);const a=!!o.length;return{isMatch:a,score:a?0:1,indices:o}}}const ao=[Bd,Xs,Wd,Kd,Yd,Zd,Ud,Gs],Pi=ao.length,qd=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Gd="|";function Xd(e,t={}){return e.split(Gd).map(n=>{let r=n.trim().split(qd).filter(i=>i&&!!i.trim()),o=[];for(let i=0,a=r.length;i<a;i+=1){const l=r[i];let c=!1,u=-1;for(;!c&&++u<Pi;){const f=ao[u];let d=f.isMultiMatch(l);d&&(o.push(new f(d,t)),c=!0)}if(!c)for(u=-1;++u<Pi;){const f=ao[u];let d=f.isSingleMatch(l);if(d){o.push(new f(d,t));break}}}return o})}const Jd=new Set([Gs.type,Xs.type]);class Qd{constructor(t,{isCaseSensitive:n=X.isCaseSensitive,includeMatches:r=X.includeMatches,minMatchCharLength:o=X.minMatchCharLength,ignoreLocation:i=X.ignoreLocation,findAllMatches:a=X.findAllMatches,location:l=X.location,threshold:c=X.threshold,distance:u=X.distance}={}){this.query=null,this.options={isCaseSensitive:n,includeMatches:r,minMatchCharLength:o,findAllMatches:a,ignoreLocation:i,location:l,threshold:c,distance:u},this.pattern=n?t:t.toLowerCase(),this.query=Xd(this.pattern,this.options)}static condition(t,n){return n.useExtendedSearch}searchIn(t){const n=this.query;if(!n)return{isMatch:!1,score:1};const{includeMatches:r,isCaseSensitive:o}=this.options;t=o?t:t.toLowerCase();let i=0,a=[],l=0;for(let c=0,u=n.length;c<u;c+=1){const f=n[c];a.length=0,i=0;for(let d=0,p=f.length;d<p;d+=1){const m=f[d],{isMatch:h,indices:g,score:v}=m.search(t);if(h){if(i+=1,l+=v,r){const T=m.constructor.type;Jd.has(T)?a=[...a,...g]:a.push(g)}}else{l=0,i=0,a.length=0;break}}if(i){let d={isMatch:!0,score:l/i};return r&&(d.indices=a),d}}return{isMatch:!1,score:1}}}const co=[];function ef(...e){co.push(...e)}function lo(e,t){for(let n=0,r=co.length;n<r;n+=1){let o=co[n];if(o.condition(e,t))return new o(e,t)}return new qs(e,t)}const pr={AND:"$and",OR:"$or"},uo={PATH:"$path",PATTERN:"$val"},fo=e=>!!(e[pr.AND]||e[pr.OR]),tf=e=>!!e[uo.PATH],nf=e=>!at(e)&&Ws(e)&&!fo(e),Oi=e=>({[pr.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function Js(e,t,{auto:n=!0}={}){const r=o=>{let i=Object.keys(o);const a=tf(o);if(!a&&i.length>1&&!fo(o))return r(Oi(o));if(nf(o)){const c=a?o[uo.PATH]:i[0],u=a?o[uo.PATTERN]:o[c];if(!qe(u))throw new Error(kd(c));const f={keyId:so(c),pattern:u};return n&&(f.searcher=lo(u,t)),f}let l={children:[],operator:i[0]};return i.forEach(c=>{const u=o[c];at(u)&&u.forEach(f=>{l.children.push(r(f))})}),l};return fo(e)||(e=Oi(e)),r(e)}function rf(e,{ignoreFieldNorm:t=X.ignoreFieldNorm}){e.forEach(n=>{let r=1;n.matches.forEach(({key:o,norm:i,score:a})=>{const l=o?o.weight:null;r*=Math.pow(a===0&&l?Number.EPSILON:a,(l||1)*(t?1:i))}),n.score=r})}function of(e,t){const n=e.matches;t.matches=[],Ue(n)&&n.forEach(r=>{if(!Ue(r.indices)||!r.indices.length)return;const{indices:o,value:i}=r;let a={indices:o,value:i};r.key&&(a.key=r.key.src),r.idx>-1&&(a.refIndex=r.idx),t.matches.push(a)})}function sf(e,t){t.score=e.score}function af(e,t,{includeMatches:n=X.includeMatches,includeScore:r=X.includeScore}={}){const o=[];return n&&o.push(of),r&&o.push(sf),e.map(i=>{const{idx:a}=i,l={item:t[a],refIndex:a};return o.length&&o.forEach(c=>{c(i,l)}),l})}class kn{constructor(t,n={},r){this.options={...X,...n},this.options.useExtendedSearch,this._keyStore=new Ld(this.options.keys),this.setCollection(t,r)}setCollection(t,n){if(this._docs=t,n&&!(n instanceof Ao))throw new Error(Sd);this._myIndex=n||Ys(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){Ue(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const n=[];for(let r=0,o=this._docs.length;r<o;r+=1){const i=this._docs[r];t(i,r)&&(this.removeAt(r),r-=1,o-=1,n.push(i))}return n}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:n=-1}={}){const{includeMatches:r,includeScore:o,shouldSort:i,sortFn:a,ignoreFieldNorm:l}=this.options;let c=qe(t)?qe(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return rf(c,{ignoreFieldNorm:l}),i&&c.sort(a),Us(n)&&n>-1&&(c=c.slice(0,n)),af(c,this._docs,{includeMatches:r,includeScore:o})}_searchStringList(t){const n=lo(t,this.options),{records:r}=this._myIndex,o=[];return r.forEach(({v:i,i:a,n:l})=>{if(!Ue(i))return;const{isMatch:c,score:u,indices:f}=n.searchIn(i);c&&o.push({item:i,idx:a,matches:[{score:u,value:i,norm:l,indices:f}]})}),o}_searchLogical(t){const n=Js(t,this.options),r=(l,c,u)=>{if(!l.children){const{keyId:d,searcher:p}=l,m=this._findMatches({key:this._keyStore.get(d),value:this._myIndex.getValueForItemAtKeyId(c,d),searcher:p});return m&&m.length?[{idx:u,item:c,matches:m}]:[]}const f=[];for(let d=0,p=l.children.length;d<p;d+=1){const m=l.children[d],h=r(m,c,u);if(h.length)f.push(...h);else if(l.operator===pr.AND)return[]}return f},o=this._myIndex.records,i={},a=[];return o.forEach(({$:l,i:c})=>{if(Ue(l)){let u=r(n,l,c);u.length&&(i[c]||(i[c]={idx:c,item:l,matches:[]},a.push(i[c])),u.forEach(({matches:f})=>{i[c].matches.push(...f)}))}}),a}_searchObjectList(t){const n=lo(t,this.options),{keys:r,records:o}=this._myIndex,i=[];return o.forEach(({$:a,i:l})=>{if(!Ue(a))return;let c=[];r.forEach((u,f)=>{c.push(...this._findMatches({key:u,value:a[f],searcher:n}))}),c.length&&i.push({idx:l,item:a,matches:c})}),i}_findMatches({key:t,value:n,searcher:r}){if(!Ue(n))return[];let o=[];if(at(n))n.forEach(({v:i,i:a,n:l})=>{if(!Ue(i))return;const{isMatch:c,score:u,indices:f}=r.searchIn(i);c&&o.push({score:u,key:t,value:i,idx:a,norm:l,indices:f})});else{const{v:i,n:a}=n,{isMatch:l,score:c,indices:u}=r.searchIn(i);l&&o.push({score:c,key:t,value:i,norm:a,indices:u})}return o}}kn.version="7.0.0";kn.createIndex=Ys;kn.parseIndex=zd;kn.config=X;kn.parseQuery=Js;ef(Qd);export{fr as $,st as A,no as B,mn as C,yi as D,Yt as E,So as F,io as G,to as H,H as I,er as J,Au as K,Zt as L,Gr as M,fn as N,Rs as O,ko as P,Ds as Q,It as R,Nc as S,eu as T,as as U,Ji as V,ku as W,If as X,Ns as Y,Ff as Z,Br as _,jt as a,_f as a0,Cc as a1,bf as a2,kn as a3,zl as a4,ja as a5,Zi as a6,qa as a7,oo as a8,Ba as b,cs as c,ke as d,an as e,Lr as f,ls as g,Bn as h,Mf as i,li as j,Sl as k,Cr as l,bs as m,yt as n,Wa as o,_s as p,En as q,Un as r,Ce as s,qc as t,hf as u,hr as v,kf as w,Af as x,Nf as y,Sf as z};
|
||
//# sourceMappingURL=fuse-BiYvWrZm.js.map
|